From ac0ad884d1ecd684c392410720b27381b2316730 Mon Sep 17 00:00:00 2001 From: Richard Oudkerk Date: Wed, 5 Jun 2013 23:29:30 +0100 Subject: Issue #17931: Resolve confusion on Windows between pids and process handles. --- Include/longobject.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Include/longobject.h') diff --git a/Include/longobject.h b/Include/longobject.h index cd0cf30814..886bc63457 100644 --- a/Include/longobject.h +++ b/Include/longobject.h @@ -52,6 +52,19 @@ PyAPI_FUNC(PyObject *) PyLong_GetInfo(void); #error "sizeof(pid_t) is neither sizeof(int), sizeof(long) or sizeof(long long)" #endif /* SIZEOF_PID_T */ +#if SIZEOF_VOID_P == SIZEOF_INT +# define _Py_PARSE_INTPTR "i" +# define _Py_PARSE_UINTPTR "I" +#elif SIZEOF_VOID_P == SIZEOF_LONG +# define _Py_PARSE_INTPTR "l" +# define _Py_PARSE_UINTPTR "k" +#elif defined(SIZEOF_LONG_LONG) && SIZEOF_VOID_P == SIZEOF_LONG_LONG +# define _Py_PARSE_INTPTR "L" +# define _Py_PARSE_UINTPTR "K" +#else +# error "void* different in size from int, long and long long" +#endif /* SIZEOF_VOID_P */ + /* Used by Python/mystrtoul.c. */ #ifndef Py_LIMITED_API PyAPI_DATA(unsigned char) _PyLong_DigitValue[256]; -- cgit v1.2.1