diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2013-06-05 22:29:30 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2013-06-05 22:29:30 (GMT) |
commit | ac0ad884d1ecd684c392410720b27381b2316730 (patch) | |
tree | ff6ac8d74faa2c75b9eb474194708a594cbe1447 /PC | |
parent | 448f1a86ef13fba826bac70f81b265dc50e333ac (diff) | |
download | cpython-ac0ad884d1ecd684c392410720b27381b2316730.zip cpython-ac0ad884d1ecd684c392410720b27381b2316730.tar.gz cpython-ac0ad884d1ecd684c392410720b27381b2316730.tar.bz2 |
Issue #17931: Resolve confusion on Windows between pids and process handles.
Diffstat (limited to 'PC')
-rwxr-xr-x | PC/msvcrtmodule.c | 5 | ||||
-rw-r--r-- | PC/pyconfig.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c index 04d2088..18dec6d 100755 --- a/PC/msvcrtmodule.c +++ b/PC/msvcrtmodule.c @@ -113,11 +113,12 @@ os.O_BINARY."); static PyObject * msvcrt_open_osfhandle(PyObject *self, PyObject *args) { - long handle; + Py_intptr_t handle; int flags; int fd; - if (!PyArg_ParseTuple(args, "li:open_osfhandle", &handle, &flags)) + if (!PyArg_ParseTuple(args, _Py_PARSE_INTPTR "i:open_osfhandle", + &handle, &flags)) return NULL; fd = _open_osfhandle(handle, flags); diff --git a/PC/pyconfig.h b/PC/pyconfig.h index 8c4c7f3..365ddbb 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h @@ -723,8 +723,8 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ /* The size of `wchar_t', as computed by sizeof. */ #define SIZEOF_WCHAR_T 2 -/* The size of `pid_t' (HANDLE). */ -#define SIZEOF_PID_T SIZEOF_VOID_P +/* The size of `pid_t', as computed by sizeof. */ +#define SIZEOF_PID_T SIZEOF_INT /* Define if you have the dl library (-ldl). */ /* #undef HAVE_LIBDL */ |