diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-05-25 11:26:07 -0700 |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-05-25 11:26:07 -0700 |
commit | d21823d2de708df5515b3f511cc057ee519b52d6 (patch) | |
tree | 62dc4decccf2d53f24ea928d82ff0ccc422f8d45 | |
parent | 29c057d142a5086e2d941ee2add76cc661e8153b (diff) | |
download | cpython-d21823d2de708df5515b3f511cc057ee519b52d6.tar.gz |
Closes #23026: Documentation improvements and code formatting
-rw-r--r-- | Doc/library/winreg.rst | 4 | ||||
-rw-r--r-- | Doc/whatsnew/3.6.rst | 3 | ||||
-rw-r--r-- | PC/winreg.c | 8 |
3 files changed, 9 insertions, 6 deletions
diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst index adac775556..8f8cc680fc 100644 --- a/Doc/library/winreg.rst +++ b/Doc/library/winreg.rst @@ -661,10 +661,14 @@ For more information, see `Registry Value Types A 64-bit number. + .. versionadded:: 3.6 + .. data:: REG_QWORD_LITTLE_ENDIAN A 64-bit number in little-endian format. Equivalent to :const:`REG_QWORD`. + .. versionadded:: 3.6 + .. data:: REG_RESOURCE_LIST A device-driver resource list. diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index 93402a384d..3b1aee458d 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -424,8 +424,7 @@ The "Object allocated at" traceback is new and only displayed if winreg ------ -The :func:`QueryValueEx <winreg.QueryValueEx>` function now returns -integer values for registry type ``REG_QWORD``. +Added the 64-bit integer type :data:`REG_QWORD <winreg.REG_QWORD>`. (Contributed by Clement Rouault in :issue:`23026`.) diff --git a/PC/winreg.c b/PC/winreg.c index 49e1cd7eeb..d704d66c9f 100644 --- a/PC/winreg.c +++ b/PC/winreg.c @@ -549,7 +549,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) if (value != Py_None && !PyLong_Check(value)) return FALSE; *retDataBuf = (BYTE *)PyMem_NEW(DWORD, 1); - if (*retDataBuf==NULL){ + if (*retDataBuf == NULL){ PyErr_NoMemory(); return FALSE; } @@ -567,7 +567,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) if (value != Py_None && !PyLong_Check(value)) return FALSE; *retDataBuf = (BYTE *)PyMem_NEW(DWORD64, 1); - if (*retDataBuf==NULL){ + if (*retDataBuf == NULL){ PyErr_NoMemory(); return FALSE; } @@ -637,7 +637,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) *retDataSize = size + 2; *retDataBuf = (BYTE *)PyMem_NEW(char, *retDataSize); - if (*retDataBuf==NULL){ + if (*retDataBuf == NULL){ PyErr_NoMemory(); return FALSE; } @@ -683,7 +683,7 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) return FALSE; *retDataBuf = (BYTE *)PyMem_NEW(char, view.len); - if (*retDataBuf==NULL){ + if (*retDataBuf == NULL){ PyBuffer_Release(&view); PyErr_NoMemory(); return FALSE; |