summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-07-29 12:35:12 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-07-29 12:35:12 (GMT)
commit5ef6fde92c76df03455481bb1f4d6f2125c9e3ac (patch)
treecc58f12d5000ecb5477b7615ccf664171e8bc851 /Modules
parente0374c7a03a2876815f96e759bbf2093601b7207 (diff)
parent9c631a0f71a6c4beb5d29c10602a555e6a33fd12 (diff)
downloadcpython-5ef6fde92c76df03455481bb1f4d6f2125c9e3ac.zip
cpython-5ef6fde92c76df03455481bb1f4d6f2125c9e3ac.tar.gz
cpython-5ef6fde92c76df03455481bb1f4d6f2125c9e3ac.tar.bz2
Merge 3.4 (ctypes)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/cfield.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_ctypes/cfield.c b/Modules/_ctypes/cfield.c
index 4bd022d..3c7a52a 100644
--- a/Modules/_ctypes/cfield.c
+++ b/Modules/_ctypes/cfield.c
@@ -765,6 +765,7 @@ I_set_sw(void *ptr, PyObject *value, Py_ssize_t size)
if (get_ulong(value, &val) < 0)
return NULL;
memcpy(&field, ptr, sizeof(field));
+ field = SWAP_INT(field);
field = SET(unsigned int, field, (unsigned int)val, size);
field = SWAP_INT(field);
memcpy(ptr, &field, sizeof(field));