Richard Oudkerk added the comment: > @sbt: Would you like to have a strict separation between UNIX-like pid > (pid_t) and Windows process identifier (HANDLE)?
Yes. And would I certainly like SIZEOF_PID_T == sizeof(pid_t) ;-) Note that _winapi takes the policy of treating HANDLE as an unsigned quantity (as PyLong_*VoidPtr() does for pointers). I am not sure if signed or unsigned is better, but I lean towards unsigned. It is easy enough to cast to intptr_t if we need to. I think it is enough to treat HANDLE as void*, but adding PyLong_*Handle() is easy enough. There does not seem to be a format character for void* (or size_t), and adding one would be useful. Or maybe rather than adding ever more format characters which are aliases for old ones, we could just create macros like #define PY_PARSE_INT "i" #define PY_PARSE_UINTPTR_T "K" #define PY_PARSE_VOID_PTR PY_PARSE_UINTPTR_T #define PY_PARSE_HANDLE PY_PARSE_UINTPTR_T #define PY_PARSE_PID_T PY_PARSE_INT ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17931> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com