Message190693
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 |
|
Date |
User |
Action |
Args |
2013-06-05 21:35:01 | vstinner | set | recipients:
+ vstinner, mark.dickinson, Devin Jeanpierre, skrah, serhiy.storchaka |
2013-06-05 21:35:01 | vstinner | set | messageid: <1370468101.16.0.563815402427.issue17870@psf.upfronthosting.co.za> |
2013-06-05 21:35:01 | vstinner | link | issue17870 messages |
2013-06-05 21:35:01 | vstinner | create | |
|