aboutsummaryrefslogtreecommitdiffstats
path: root/src/_cffi_src
diff options
context:
space:
mode:
Diffstat (limited to 'src/_cffi_src')
-rw-r--r--src/_cffi_src/openssl/callbacks.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/_cffi_src/openssl/callbacks.py b/src/_cffi_src/openssl/callbacks.py
index 3e4ef572..5ae89b18 100644
--- a/src/_cffi_src/openssl/callbacks.py
+++ b/src/_cffi_src/openssl/callbacks.py
@@ -4,6 +4,8 @@
from __future__ import absolute_import, division, print_function
+import sys
+
import cffi
INCLUDES = """
@@ -44,7 +46,8 @@ CUSTOMIZATIONS = """
static const long Cryptography_STATIC_CALLBACKS = 1;
"""
-if cffi.__version_info__ < (1, 4, 0):
+if cffi.__version_info__ < (1, 4, 0) or sys.version_info >= (3, 5):
# backwards compatibility for old cffi version on PyPy
+ # and Python >=3.5 (https://github.com/pyca/cryptography/issues/2970)
TYPES = "static const long Cryptography_STATIC_CALLBACKS;"
CUSTOMIZATIONS = "static const long Cryptography_STATIC_CALLBACKS = 0;"