summaryrefslogtreecommitdiffstats
path: root/PC/msvcrtmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'PC/msvcrtmodule.c')
-rw-r--r--PC/msvcrtmodule.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
index 423afea..4797cdc 100644
--- a/PC/msvcrtmodule.c
+++ b/PC/msvcrtmodule.c
@@ -33,12 +33,12 @@
#endif
/*[python input]
-class Py_intptr_t_converter(CConverter):
- type = 'Py_intptr_t'
+class intptr_t_converter(CConverter):
+ type = 'intptr_t'
format_unit = '"_Py_PARSE_INTPTR"'
class handle_return_converter(long_return_converter):
- type = 'Py_intptr_t'
+ type = 'intptr_t'
cast = '(void *)'
conversion_fn = 'PyLong_FromVoidPtr'
@@ -59,7 +59,7 @@ class wchar_t_return_converter(CReturnConverter):
data.return_conversion.append(
'return_value = PyUnicode_FromOrdinal(_return_value);\n')
[python start generated code]*/
-/*[python end generated code: output=da39a3ee5e6b4b0d input=6a54fc4e73d0b367]*/
+/*[python end generated code: output=da39a3ee5e6b4b0d input=b59f1663dba11997]*/
/*[clinic input]
module msvcrt
@@ -152,7 +152,7 @@ msvcrt_setmode_impl(PyObject *module, int fd, int flags)
/*[clinic input]
msvcrt.open_osfhandle -> long
- handle: Py_intptr_t
+ handle: intptr_t
flags: int
/
@@ -164,8 +164,8 @@ to os.fdopen() to create a file object.
[clinic start generated code]*/
static long
-msvcrt_open_osfhandle_impl(PyObject *module, Py_intptr_t handle, int flags)
-/*[clinic end generated code: output=bf65e422243a39f9 input=4d8516ed32db8f65]*/
+msvcrt_open_osfhandle_impl(PyObject *module, intptr_t handle, int flags)
+/*[clinic end generated code: output=cede871bf939d6e3 input=cb2108bbea84514e]*/
{
int fd;
@@ -189,11 +189,11 @@ Return the file handle for the file descriptor fd.
Raises IOError if fd is not recognized.
[clinic start generated code]*/
-static Py_intptr_t
+static intptr_t
msvcrt_get_osfhandle_impl(PyObject *module, int fd)
-/*[clinic end generated code: output=eac47643338c0baa input=c7d18d02c8017ec1]*/
+/*[clinic end generated code: output=7ce761dd0de2b503 input=c7d18d02c8017ec1]*/
{
- Py_intptr_t handle = -1;
+ intptr_t handle = -1;
_Py_BEGIN_SUPPRESS_IPH
handle = _get_osfhandle(fd);
@@ -574,7 +574,6 @@ PyInit_msvcrt(void)
#endif
/* constants for the crt versions */
- (void)st;
#ifdef _VC_ASSEMBLY_PUBLICKEYTOKEN
st = PyModule_AddStringConstant(m, "VC_ASSEMBLY_PUBLICKEYTOKEN",
_VC_ASSEMBLY_PUBLICKEYTOKEN);
@@ -600,6 +599,8 @@ PyInit_msvcrt(void)
st = PyModule_AddObject(m, "CRT_ASSEMBLY_VERSION", version);
if (st < 0) return NULL;
#endif
+ /* make compiler warning quiet if st is unused */
+ (void)st;
return m;
}