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 vstinner
Recipients Devin Jeanpierre, mark.dickinson, serhiy.storchaka, skrah, vstinner
Date 2013-06-05.21:35:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1370468101.16.0.563815402427.issue17870@psf.upfronthosting.co.za>
In-reply-to
Content
Another place where PyLong_FromIntMax_t() would help, _elementtree.c:

    id = PyLong_FromSsize_t((Py_uintptr_t) self);

selectmodule.c defines PyLong_AsUintptr_t() with:

#if (SIZEOF_UINTPTR_T != SIZEOF_VOID_P)
#   error uintptr_t does not match void *!
#elif (SIZEOF_UINTPTR_T == SIZEOF_LONG_LONG)
#   define T_UINTPTRT         T_ULONGLONG
#   define T_INTPTRT          T_LONGLONG
#   define PyLong_AsUintptr_t PyLong_AsUnsignedLongLong
#   define UINTPTRT_FMT_UNIT  "K"
#   define INTPTRT_FMT_UNIT   "L"
#elif (SIZEOF_UINTPTR_T == SIZEOF_LONG)
#   define T_UINTPTRT         T_ULONG
#   define T_INTPTRT          T_LONG
#   define PyLong_AsUintptr_t PyLong_AsUnsignedLong
#   define UINTPTRT_FMT_UNIT  "k"
#   define INTPTRT_FMT_UNIT   "l"
#elif (SIZEOF_UINTPTR_T == SIZEOF_INT)
#   define T_UINTPTRT         T_UINT
#   define T_INTPTRT          T_INT
#   define PyLong_AsUintptr_t PyLong_AsUnsignedLong
#   define UINTPTRT_FMT_UNIT  "I"
#   define INTPTRT_FMT_UNIT   "i"
#else
#   error uintptr_t does not match int, long, or long long!
#endif
History
Date User Action Args
2013-06-05 21:35:01vstinnersetrecipients: + vstinner, mark.dickinson, Devin Jeanpierre, skrah, serhiy.storchaka
2013-06-05 21:35:01vstinnersetmessageid: <1370468101.16.0.563815402427.issue17870@psf.upfronthosting.co.za>
2013-06-05 21:35:01vstinnerlinkissue17870 messages
2013-06-05 21:35:01vstinnercreate