summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-05-25 11:26:07 -0700
committerSteve Dower <steve.dower@microsoft.com>2016-05-25 11:26:07 -0700
commitd21823d2de708df5515b3f511cc057ee519b52d6 (patch)
tree62dc4decccf2d53f24ea928d82ff0ccc422f8d45
parent29c057d142a5086e2d941ee2add76cc661e8153b (diff)
downloadcpython-d21823d2de708df5515b3f511cc057ee519b52d6.tar.gz
Closes #23026: Documentation improvements and code formatting
-rw-r--r--Doc/library/winreg.rst4
-rw-r--r--Doc/whatsnew/3.6.rst3
-rw-r--r--PC/winreg.c8
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;