Closes #23026: Documentation improvements and code formatting
This commit is contained in:
parent
74f2fe6489
commit
4d4bc42c8b
|
@ -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.
|
||||
|
|
|
@ -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`.)
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue