diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst index adac7755562..8f8cc680fc1 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 93402a384d5..3b1aee458da 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 ` function now returns -integer values for registry type ``REG_QWORD``. +Added the 64-bit integer type :data:`REG_QWORD `. (Contributed by Clement Rouault in :issue:`23026`.) diff --git a/PC/winreg.c b/PC/winreg.c index 49e1cd7eebd..d704d66c9f3 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;