summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2012-12-27 10:14:30 -0600
committerBrian Curtin <brian@python.org>2012-12-27 10:14:30 -0600
commit62cf69ec7c8ccfccea3ea98da815d5090ccf2fff (patch)
treed967c821ea2249c26cfac2f228bcd5712e7df438 /PC/winreg.c
parent#16618: Make glob.glob match consistently across strings and bytes (diff)
parentFix #14420. Use PyLong_AsUnsignedLong to support the full range of DWORD. (diff)
downloadcpython-62cf69ec7c8ccfccea3ea98da815d5090ccf2fff.tar.gz
cpython-62cf69ec7c8ccfccea3ea98da815d5090ccf2fff.tar.bz2
cpython-62cf69ec7c8ccfccea3ea98da815d5090ccf2fff.zip
Merge 3.2
Diffstat (limited to 'PC/winreg.c')
-rw-r--r--PC/winreg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/winreg.c b/PC/winreg.c
index 091b477235f..afc59217523 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -785,7 +785,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
memcpy(*retDataBuf, &zero, sizeof(DWORD));
}
else {
- DWORD d = PyLong_AsLong(value);
+ DWORD d = PyLong_AsUnsignedLong(value);
memcpy(*retDataBuf, &d, sizeof(DWORD));
}
break;