text_combined: trent nelson ktctpxaonresolvecom shall check fix guest take youll address original pylong_fromssize_tfromsize_t issue posted patch right trent ________________________________ mark dickinson mailtovqpxmqtcgmailcom sent 15 april 2008 0130 trent nelson cc python 3000 subject python3000 longobjectc windows x64 mon apr 14 2008 801 pm trent nelson wrote 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 extra tests arent trunk version longobjectc looks though theyre result merging 2x longobjectc intobjectc produce 30 longobjectc also notice _pylong_frombytearray doesnt check_small_int pylong_fromlong perhaps reason extra test agree would simpler use pylong_fromlong pylong_fromlonglong surely guarding properly error case sizeofsize_t sizeoflong sizeofpy_long_long reusing existing methods exactly want would better mimicking fair enough twisted mind trying find ways size_t might something long long long seems unlikely 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 right think technically undefined behaviour signed arithmetic overflow nevertheless ends right thing compilers think fixed something like untested ival 0 unsigned long1ival 1 else unsigned longival safe overflow including machines ones complement signmagnitude representation negative integersdo machines exist shall check fix mark _______________________________________________ python3000 mailing list smsbmo9552pythonorg httpmailpythonorgmailmanlistinfopython3000 unsubscribe httpmailpythonorgmailmanoptionspython3000python300040tangomucom thu 07 aug 2008 083146 0700 python3000 longobjectc windows x64