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 pitrou
Recipients brian.curtin, christian.heimes, pitrou, tim.golden
Date 2010-08-17.18:50:11
SpamBayes Score 0.000710271
Marked as misclassified No
Message-id <1282071013.13.0.416867033883.issue9629@psf.upfronthosting.co.za>
In-reply-to
Content
longobject.h uses SIZEOF_SOCKET_T:

#if SIZEOF_SOCKET_T <= SIZEOF_LONG
#define PyLong_FromSocket_t(fd) PyLong_FromLong((SOCKET_T)(fd))
#define PyLong_AsSocket_t(fd) (SOCKET_T)PyLong_AsLong(fd)
#else
#define PyLong_FromSocket_t(fd) PyLong_FromLongLong(((SOCKET_T)(fd));
#define PyLong_AsSocket_t(fd) (SOCKET_T)PyLong_AsLongLong(fd)
#endif

but SIZEOF_SOCKET_T doesn't exist at that point since it is defined in Modules/socketmodule.h which isn't part of Include/Python.h. As a result, PyLong_FromSocket_t is always aliased to PyLong_FromLong, which is wrong under 64-bit Windows (a SOCKET is 64-bit there, while a long is 32-bit).
History
Date User Action Args
2010-08-17 18:50:13pitrousetrecipients: + pitrou, christian.heimes, tim.golden, brian.curtin
2010-08-17 18:50:13pitrousetmessageid: <1282071013.13.0.416867033883.issue9629@psf.upfronthosting.co.za>
2010-08-17 18:50:11pitroulinkissue9629 messages
2010-08-17 18:50:11pitroucreate