aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Paul Calderone <exarkun@twistedmatrix.com>2013-12-27 14:02:45 -0500
committerJean-Paul Calderone <exarkun@twistedmatrix.com>2013-12-27 14:02:45 -0500
commit470a116786e692753ef96da2095d72e5383d417d (patch)
tree9bce279903d0d9a07930b37cedc1d60a9968074d
parent3aa5b942364aec3cd6c281802dab18c04e22b0f1 (diff)
downloadcryptography-470a116786e692753ef96da2095d72e5383d417d.tar.gz
cryptography-470a116786e692753ef96da2095d72e5383d417d.tar.bz2
cryptography-470a116786e692753ef96da2095d72e5383d417d.zip
Use uintptr_t to get sufficiently wide storage for these types even on 32 bit Windows.
-rw-r--r--cryptography/hazmat/backends/openssl/asn1.py2
-rw-r--r--cryptography/hazmat/backends/openssl/bignum.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/cryptography/hazmat/backends/openssl/asn1.py b/cryptography/hazmat/backends/openssl/asn1.py
index 3d3a8dea..e7c18a52 100644
--- a/cryptography/hazmat/backends/openssl/asn1.py
+++ b/cryptography/hazmat/backends/openssl/asn1.py
@@ -23,7 +23,7 @@ TYPES = """
* <fijal> I think you want to declare your value too large (e.g. long)
* <fijal> that way you'll never pass garbage
*/
-typedef long time_t;
+typedef uintptr_t time_t;
typedef int ASN1_BOOLEAN;
typedef ... ASN1_INTEGER;
diff --git a/cryptography/hazmat/backends/openssl/bignum.py b/cryptography/hazmat/backends/openssl/bignum.py
index 41c9d1e5..a5ba07b1 100644
--- a/cryptography/hazmat/backends/openssl/bignum.py
+++ b/cryptography/hazmat/backends/openssl/bignum.py
@@ -24,7 +24,7 @@ typedef ... BIGNUM;
* <fijal> I think you want to declare your value too large (e.g. long)
* <fijal> that way you'll never pass garbage
*/
-typedef unsigned long long BN_ULONG;
+typedef uintptr_t BN_ULONG;
"""
FUNCTIONS = """