cpython: ac2a2534f793 (original) (raw)

Mercurial > cpython

changeset 101487:ac2a2534f793

Issue #23026: winreg.QueryValueEx() now return an integer for REG_QWORD type. (Patch by hakril) [#23026]

Steve Dower steve.dower@microsoft.com
date Tue, 24 May 2016 15:42:04 -0700
parents 3a57eafd8401
children b730baee0877
files Doc/library/winreg.rst Doc/whatsnew/3.6.rst Lib/test/test_winreg.py Misc/NEWS PC/winreg.c
diffstat 5 files changed, 50 insertions(+), 3 deletions(-)[+] [-] Doc/library/winreg.rst 10 Doc/whatsnew/3.6.rst 8 Lib/test/test_winreg.py 1 Misc/NEWS 2 PC/winreg.c 32

line wrap: on

line diff

--- a/Doc/library/winreg.rst +++ b/Doc/library/winreg.rst @@ -633,7 +633,7 @@ For more information, see `Registry Valu .. data:: REG_DWORD_LITTLE_ENDIAN

.. data:: REG_DWORD_BIG_ENDIAN @@ -657,6 +657,14 @@ For more information, see `Registry Valu No defined value type. +.. data:: REG_QWORD +

+.. data:: REG_QWORD_LITTLE_ENDIAN +

.. data:: REG_RESOURCE_LIST A device-driver resource list.

--- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -421,6 +421,14 @@ The "Object allocated at" traceback is n :mod:warnings was already imported. +winreg +------ + +The :func:QueryValueEx <winreg.QueryValueEx> function now returns +integer values for registry type REG_QWORD. +(Contributed by Clement Rouault in :issue:23026.) + + zipfile -------

--- a/Lib/test/test_winreg.py +++ b/Lib/test/test_winreg.py @@ -37,6 +37,7 @@ test_reflect_key_name = "SOFTWARE\Class test_data = [ ("Int Value", 45, REG_DWORD),

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -19,6 +19,8 @@ Core and Builtins Library ------- +- Issue #23026: winreg.QueryValueEx() now return an integer for REG_QWORD type. +

--- a/PC/winreg.c +++ b/PC/winreg.c @@ -563,6 +563,24 @@ Py2Reg(PyObject *value, DWORD typ, BYTE memcpy(*retDataBuf, &d, sizeof(DWORD)); } break;

@@ -690,7 +708,13 @@ Reg2Py(BYTE *retDataBuf, DWORD retDataSi if (retDataSize == 0) obData = PyLong_FromUnsignedLong(0); else

@@ -1599,7 +1623,7 @@ winreg.SetValueEx An integer that specifies the type of the data, one of: REG_BINARY -- Binary data in any form. REG_DWORD -- A 32-bit number.

@@ -1609,6 +1633,8 @@ winreg.SetValueEx by two null characters. Note that Python handles this termination automatically. REG_NONE -- No defined value type.