summaryrefslogtreecommitdiff
path: root/Modules/_winapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_winapi.c')
-rw-r--r--Modules/_winapi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Modules/_winapi.c b/Modules/_winapi.c
index edc6cf4adb..91d4f0172c 100644
--- a/Modules/_winapi.c
+++ b/Modules/_winapi.c
@@ -175,7 +175,7 @@ class HANDLE_return_converter(CReturnConverter):
self.declare(data)
self.err_occurred_if("_return_value == INVALID_HANDLE_VALUE", data)
data.return_conversion.append(
- 'if (_return_value == NULL)\n Py_RETURN_NONE;\n')
+ 'if (_return_value == NULL) {\n Py_RETURN_NONE;\n}\n')
data.return_conversion.append(
'return_value = HANDLE_TO_PYNUM(_return_value);\n')
@@ -188,7 +188,7 @@ class DWORD_return_converter(CReturnConverter):
data.return_conversion.append(
'return_value = Py_BuildValue("k", _return_value);\n')
[python start generated code]*/
-/*[python end generated code: output=da39a3ee5e6b4b0d input=374076979596ebba]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=94819e72d2c6d558]*/
#include "clinic/_winapi.c.h"
@@ -486,7 +486,7 @@ _winapi_CreateJunction_impl(PyObject *module, LPWSTR src_path,
const USHORT prefix_len = 4;
USHORT print_len = 0;
USHORT rdb_size = 0;
- PREPARSE_DATA_BUFFER rdb = NULL;
+ _Py_PREPARSE_DATA_BUFFER rdb = NULL;
/* Junction point creation */
HANDLE junction = NULL;
@@ -542,18 +542,18 @@ _winapi_CreateJunction_impl(PyObject *module, LPWSTR src_path,
- the size of the print name in bytes
- the size of the substitute name in bytes
- the size of two NUL terminators in bytes */
- rdb_size = REPARSE_DATA_BUFFER_HEADER_SIZE +
+ rdb_size = _Py_REPARSE_DATA_BUFFER_HEADER_SIZE +
sizeof(rdb->MountPointReparseBuffer) -
sizeof(rdb->MountPointReparseBuffer.PathBuffer) +
/* Two +1's for NUL terminators. */
(prefix_len + print_len + 1 + print_len + 1) * sizeof(WCHAR);
- rdb = (PREPARSE_DATA_BUFFER)PyMem_RawMalloc(rdb_size);
+ rdb = (_Py_PREPARSE_DATA_BUFFER)PyMem_RawMalloc(rdb_size);
if (rdb == NULL)
goto cleanup;
memset(rdb, 0, rdb_size);
rdb->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;
- rdb->ReparseDataLength = rdb_size - REPARSE_DATA_BUFFER_HEADER_SIZE;
+ rdb->ReparseDataLength = rdb_size - _Py_REPARSE_DATA_BUFFER_HEADER_SIZE;
rdb->MountPointReparseBuffer.SubstituteNameOffset = 0;
rdb->MountPointReparseBuffer.SubstituteNameLength =
(prefix_len + print_len) * sizeof(WCHAR);
@@ -674,7 +674,7 @@ _winapi_CreatePipe_impl(PyObject *module, PyObject *pipe_attrs, DWORD size)
/* helpers for createprocess */
static unsigned long
-getulong(PyObject* obj, char* name)
+getulong(PyObject* obj, const char* name)
{
PyObject* value;
unsigned long ret;
@@ -690,7 +690,7 @@ getulong(PyObject* obj, char* name)
}
static HANDLE
-gethandle(PyObject* obj, char* name)
+gethandle(PyObject* obj, const char* name)
{
PyObject* value;
HANDLE ret;