summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-03-16 16:30:54 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-03-16 16:30:54 (GMT)
commitfca286601b99e00ab6d04f49634bdc27af461144 (patch)
tree6b8078b58be6b613c6d6dc305bf9ac9444731a82 /Modules
parentffa1f2795099fd188e3dc9bad2ef4b8b44783862 (diff)
parentfda33559dcad6f9595eefec8afc326e5ac0c81c5 (diff)
downloadcpython-fca286601b99e00ab6d04f49634bdc27af461144.zip
cpython-fca286601b99e00ab6d04f49634bdc27af461144.tar.gz
cpython-fca286601b99e00ab6d04f49634bdc27af461144.tar.bz2
merge 3.3 (#20946)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/cfield.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index 65772cf..79d60f3 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -1640,9 +1640,9 @@ typedef struct { char c; void *x; } s_void_p;
/*
#define CHAR_ALIGN (sizeof(s_char) - sizeof(char))
#define SHORT_ALIGN (sizeof(s_short) - sizeof(short))
-#define INT_ALIGN (sizeof(s_int) - sizeof(int))
#define LONG_ALIGN (sizeof(s_long) - sizeof(long))
*/
+#define INT_ALIGN (sizeof(s_int) - sizeof(int))
#define FLOAT_ALIGN (sizeof(s_float) - sizeof(float))
#define DOUBLE_ALIGN (sizeof(s_double) - sizeof(double))
#define LONGDOUBLE_ALIGN (sizeof(s_long_double) - sizeof(long double))
@@ -1684,8 +1684,8 @@ ffi_type ffi_type_sint8 = { 1, 1, FFI_TYPE_SINT8 };
ffi_type ffi_type_uint16 = { 2, 2, FFI_TYPE_UINT16 };
ffi_type ffi_type_sint16 = { 2, 2, FFI_TYPE_SINT16 };
-ffi_type ffi_type_uint32 = { 4, 4, FFI_TYPE_UINT32 };
-ffi_type ffi_type_sint32 = { 4, 4, FFI_TYPE_SINT32 };
+ffi_type ffi_type_uint32 = { 4, INT_ALIGN, FFI_TYPE_UINT32 };
+ffi_type ffi_type_sint32 = { 4, INT_ALIGN, FFI_TYPE_SINT32 };
ffi_type ffi_type_uint64 = { 8, LONG_LONG_ALIGN, FFI_TYPE_UINT64 };
ffi_type ffi_type_sint64 = { 8, LONG_LONG_ALIGN, FFI_TYPE_SINT64 };