diff options
Diffstat (limited to 'PC/clinic/msvcrtmodule.c.h')
-rw-r--r-- | PC/clinic/msvcrtmodule.c.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/PC/clinic/msvcrtmodule.c.h b/PC/clinic/msvcrtmodule.c.h index c6545ac..debd9b0 100644 --- a/PC/clinic/msvcrtmodule.c.h +++ b/PC/clinic/msvcrtmodule.c.h @@ -113,13 +113,13 @@ PyDoc_STRVAR(msvcrt_open_osfhandle__doc__, {"open_osfhandle", (PyCFunction)msvcrt_open_osfhandle, METH_FASTCALL, msvcrt_open_osfhandle__doc__}, static long -msvcrt_open_osfhandle_impl(PyObject *module, intptr_t handle, int flags); +msvcrt_open_osfhandle_impl(PyObject *module, void *handle, int flags); static PyObject * msvcrt_open_osfhandle(PyObject *module, PyObject **args, Py_ssize_t nargs) { PyObject *return_value = NULL; - intptr_t handle; + void *handle; int flags; long _return_value; @@ -148,7 +148,7 @@ PyDoc_STRVAR(msvcrt_get_osfhandle__doc__, #define MSVCRT_GET_OSFHANDLE_METHODDEF \ {"get_osfhandle", (PyCFunction)msvcrt_get_osfhandle, METH_O, msvcrt_get_osfhandle__doc__}, -static intptr_t +static void * msvcrt_get_osfhandle_impl(PyObject *module, int fd); static PyObject * @@ -156,16 +156,16 @@ msvcrt_get_osfhandle(PyObject *module, PyObject *arg) { PyObject *return_value = NULL; int fd; - intptr_t _return_value; + void *_return_value; if (!PyArg_Parse(arg, "i:get_osfhandle", &fd)) { goto exit; } _return_value = msvcrt_get_osfhandle_impl(module, fd); - if ((_return_value == -1) && PyErr_Occurred()) { + if ((_return_value == NULL || _return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred()) { goto exit; } - return_value = PyLong_FromVoidPtr((void *)_return_value); + return_value = PyLong_FromVoidPtr(_return_value); exit: return return_value; @@ -426,26 +426,26 @@ PyDoc_STRVAR(msvcrt_CrtSetReportFile__doc__, #define MSVCRT_CRTSETREPORTFILE_METHODDEF \ {"CrtSetReportFile", (PyCFunction)msvcrt_CrtSetReportFile, METH_FASTCALL, msvcrt_CrtSetReportFile__doc__}, -static long -msvcrt_CrtSetReportFile_impl(PyObject *module, int type, int file); +static void * +msvcrt_CrtSetReportFile_impl(PyObject *module, int type, void *file); static PyObject * msvcrt_CrtSetReportFile(PyObject *module, PyObject **args, Py_ssize_t nargs) { PyObject *return_value = NULL; int type; - int file; - long _return_value; + void *file; + void *_return_value; - if (!_PyArg_ParseStack(args, nargs, "ii:CrtSetReportFile", + if (!_PyArg_ParseStack(args, nargs, "i"_Py_PARSE_INTPTR":CrtSetReportFile", &type, &file)) { goto exit; } _return_value = msvcrt_CrtSetReportFile_impl(module, type, file); - if ((_return_value == -1) && PyErr_Occurred()) { + if ((_return_value == NULL || _return_value == INVALID_HANDLE_VALUE) && PyErr_Occurred()) { goto exit; } - return_value = PyLong_FromLong(_return_value); + return_value = PyLong_FromVoidPtr(_return_value); exit: return return_value; @@ -569,4 +569,4 @@ exit: #ifndef MSVCRT_SET_ERROR_MODE_METHODDEF #define MSVCRT_SET_ERROR_MODE_METHODDEF #endif /* !defined(MSVCRT_SET_ERROR_MODE_METHODDEF) */ -/*[clinic end generated code: output=8e9e57c48c4defcc input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e86cf578e7f1ffd2 input=a9049054013a1b77]*/ |