Author: Armin Rigo <[email protected]>
Branch: openssl-1.1
Changeset: r88044:9bf5a9ff7207
Date: 2016-11-01 18:48 +0100
http://bitbucket.org/pypy/pypy/changeset/9bf5a9ff7207/
Log: We need 'OPENSSL_free' on 1.1, and we need it to be a macro there
diff --git a/rpython/rlib/ropenssl.py b/rpython/rlib/ropenssl.py
--- a/rpython/rlib/ropenssl.py
+++ b/rpython/rlib/ropenssl.py
@@ -499,10 +499,12 @@
# with the GIL held, and so is allowed to run in a RPython __del__ method.
ssl_external('SSL_free', [SSL], lltype.Void, releasegil=False)
ssl_external('SSL_CTX_free', [SSL_CTX], lltype.Void, releasegil=False)
-libssl_OPENSSL_free = external(
- 'OPENSSL_free' if OPENSSL_VERSION_NUMBER >= 0x10100000
- else 'CRYPTO_free',
- [rffi.VOIDP], lltype.Void)
+if OPENSSL_VERSION_NUMBER >= 0x10100000:
+ ssl_external('OPENSSL_free', [rffi.VOIDP], lltype.Void, macro=True)
+else:
+ ssl_external('CRYPTO_free', [rffi.VOIDP], lltype.Void)
+ libssl_OPENSSL_free = libssl_CRYPTO_free
+ del libssl_CRYPTO_free
ssl_external('SSL_write', [SSL, rffi.CCHARP, rffi.INT], rffi.INT,
save_err=SAVE_ERR)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit