summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Windows build broke from recent Unicode changes -- need to #defineTim Peters2001-06-261-0/+1
| | | | | | SIZEOF_SHORT by hand here. Also added dynamic check that SIZEOF_SHORT is correct for the platform (in _testcapimodule).
* Fix error in comment, and in test_long_api and test_longlong_api removeTim Peters2001-06-161-6/+2
| | | | the need for the F_ERROR macro.
* Fixed typo in comment.Tim Peters2001-06-141-1/+1
|
* Add tests of PyLong_{As,From}{Unsigned,}Long. These are very much likeTim Peters2001-06-141-158/+71
| | | | | | | | | | | the new PyLong_{As,From}{Unsigned,}LongLong tests, so the bulk of the code is in the new #include file testcapi_long.h, which generates different code depending on how macros are set. This sucks, but I couldn't think of anything that sucked less. UNIX headache? If we still maintain dependencies by hand, someone who knows what they're doing should teach whatever needs it that _testcapimodule.c includes testcapi_long.h.
* longobject.c:Tim Peters2001-06-131-15/+158
| | | | | | | | | | | Replaced PyLong_{As,From}{Unsigned,}LongLong guts with calls to _PyLong_{As,From}ByteArray. _testcapimodule.c: Added strong tests of PyLong_{As,From}{Unsigned,}LongLong. Fixes SF bug #432552 PyLong_AsLongLong() problems. Possible bugfix candidate, but the fix relies on code added to longobject to support the new q/Q structmodule format codes.
* The merest start of a test for the PyLong_{As,From}{Unsigned,}LongLong()Tim Peters2001-06-121-4/+57
| | | | | | | | | | functions. I intend to replace their guts with calls to the new _PyLong_{As,From}ByteArray() functions, but AFAICT there's no tests for them at all now; I also suspect PyLong_AsLongLong() isn't catching all overflow cases, but without a std test to demonstrate that why should you believe me <wink>. Also added a raiseTestError() utility function.
* Slight adaptation of Michael Hudson's patch to test PyDict_Next()Guido van Rossum2001-04-131-0/+62
| | | | | | | | | | | | (with modification of existing dict elements!). This is part of SF patch #409864: lazy fix for Pings bizarre scoping crash. The adaptation I made to Michael's patch was to change the error handling to avoid masking other errors (moving the specific error message to inside test_dict_inner()), and to insert a test for dict==NULL at the start.
* Related to SF bug 132008 (PyList_Reverse blows up).Tim Peters2001-02-121-0/+46
| | | | | | | | _testcapimodule.c make sure PyList_Reverse doesn't blow up again getargs.c assert args isn't NULL at the top of vgetargs1 instead of waiting for a NULL-pointer dereference at the end
* Renamed _testXXX to _testcapiXXX. Jack is my hero -- good call!Tim Peters2001-02-041-0/+68