Issue #17931: Resolve confusion on Windows between pids and process handles.

This commit is contained in:
Richard Oudkerk 2013-06-05 23:29:30 +01:00
parent 448f1a86ef
commit ac0ad884d1
5 changed files with 29 additions and 23 deletions

View file

@ -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);

View file

@ -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 */