This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients brian.curtin, mark.dickinson, pitrou, python-dev, sbt, serhiy.storchaka, tim.golden, vstinner
Date 2013-06-05.13:15:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370438133.0.0.869262940076.issue17931@psf.upfronthosting.co.za>
In-reply-to
Content
> @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
History
Date User Action Args
2013-06-05 13:15:33sbtsetrecipients: + sbt, mark.dickinson, pitrou, vstinner, tim.golden, brian.curtin, python-dev, serhiy.storchaka
2013-06-05 13:15:33sbtsetmessageid: <1370438133.0.0.869262940076.issue17931@psf.upfronthosting.co.za>
2013-06-05 13:15:32sbtlinkissue17931 messages
2013-06-05 13:15:32sbtcreate