trent nelson ktctpxaonresolvecom mon apr 14 2008 602 trent nelson wrote windows x64 sizeofsize_t sizeoflong existing pylong_fromssize_t pylong_fromsize_t implementations longobjectc plain wrong ive patched follows im well versed many intricacies longobjectc id appreciate input others im missing something way existing implementations wrong see test ival pylong_base pylong_fromssize_t something like ival pylong_base ival pylong_base yeah thats wrong part referring guess wanted bring issue well question actual implementation example fixed statement wed something looking like pyobject pylong_fromssize_tpy_ssize_t ival py_ssize_t bytes ival int one 1 ival pylong_base ival pylong_base return pylong_fromlongival return _pylong_frombytearray unsigned char bytes sizeof_size_t is_little_endian 1 dont understand wed interested testing pylong_fromlong shortcut reverting _pylong_frombytearray know always going dealing py_ssize_t speed safety cut paste went awry call correct pylong_fromlonglong depending sizeofsize_t done couldnt pylong_fromssize_t written exactly mimic pylong_fromlonglong means duplication code know also means relying ssize_t equal either long long long surely guarding properly error case sizeofsize_t sizeoflong sizeofpy_long_long reusing existing methods exactly want would better mimicking way dont much like handling negative values pylong_fromlong pylong_fromlonglong functions use code like ival 0 ival ival negative 1 looks though might mishandle case ival long_min fixed ah interesting stepped pylong_fromlong via following python 30a4 py3k apr 14 2008 184417 msc v1500 64 bit amd64 win32 type help copyright credits license information import _testcapi tgetargs_ltlong_min 2147483648 tgetargs_ltlong_min1 2147483647 ival long_min ival ival statement doesnt effect value ival stays long_min long_min1 though ival correctly get cast back positive realm isnt causing problem least windows ivals cast unsigned long later method wonder platformscompilers silently ignore ival ival long_min though trent _______________________________________________ python3000 mailing list smsbmo9552pythonorg httpmailpythonorgmailmanlistinfopython3000 unsubscribe httpmailpythonorgmailmanoptionspython3000python300040tangomucom thu 07 aug 2008 081308 0700 python3000 longobjectc windows x64