summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue 4474: On platforms with sizeof(wchar_t) == 4 andMark Dickinson2009-03-181-0/+43
| | | | | | | | | sizeof(Py_UNICODE) == 2, PyUnicode_FromWideChar now converts each character outside the BMP to the appropriate surrogate pair. Thanks Victor Stinner for the patch. (backport of r70452 from py3k to trunk)
* Issue 4293: Make Py_AddPendingCall() thread safeKristján Valur Jónsson2009-01-091-0/+38
| | | | Add test cases and documentation
* Just inserted blank line.Hirokazu Yamamoto2008-12-311-0/+1
|
* Fixed compile error on windows.Hirokazu Yamamoto2008-12-311-1/+2
|
* Issue #4701: implicitly call PyType_Ready from PyObject_HashNick Coghlan2008-12-301-0/+101
|
* make global staticBenjamin Peterson2008-12-231-1/+1
|
* use a global variable, so the compiler doesn't optimize the assignment outBenjamin Peterson2008-12-231-2/+3
|
* silence compiler warningBenjamin Peterson2008-12-221-0/+1
|
* fix #4720: the format to PyArg_ParseTupleAndKeywords can now start with '|'Benjamin Peterson2008-12-221-0/+27
|
* #4122: On Windows, Py_UNICODE_ISSPACE cannot be used in an extension module:Amaury Forgeot d'Arc2008-10-141-0/+4
| | | | | | compilation fails with "undefined reference to _Py_ascii_whitespace" Will backport to 2.6.
* #3643 add a few more checks to _testcapi to prevent segfaultsBenjamin Peterson2008-08-231-4/+20
| | | | | Author: Victor Stinner Reviewer: Benjamin Peterson
* Added garbage collector overhead and optional default return value toRobert Schuppenies2008-07-101-0/+1
| | | | sys.getsizeof.
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-3/+3
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-3/+3
|
* Rename the test_traceback_print() function to traceback_print() to preventBrett Cannon2008-04-281-3/+3
| | | | test_capi from automatically calling the function.
* Fix a bug introduced by the warnings rewrite where tracebacks were beingBrett Cannon2008-04-281-0/+19
| | | | | | improperly indented. Closes issue #2699.
* Patch #1691070 from Roger Upole: Speed up PyArg_ParseTupleAndKeywords() and ↵Christian Heimes2008-02-261-0/+18
| | | | | | improve error msg My tests don't show the promised speed up of 10%. The code is as fast as the old code for simple cases and slightly faster for complex cases with several of args and kwargs. But the patch simplifies the code, too.
* Reformat some ugly code.Georg Brandl2008-01-211-26/+39
|
* Patch #1720595: add T_BOOL to the range of structmember types.Georg Brandl2008-01-211-2/+5
| | | | Patch by Angelo Mottola, reviewed by MvL, tests by me.
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-1/+1
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-3/+2
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Patch #1733960: Allow T_LONGLONG to accept ints.Martin v. Löwis2007-06-091-3/+27
| | | | Will backport to 2.5.
* Fix crash in test on HP-UX. Apparently, it's not possible to delete a lock ifNeal Norwitz2006-10-281-0/+3
| | | | | | it's held (even by the current thread). Will backport.
* Get DBL_MAX from float.h not values.h. Will backport.Martin v. Löwis2006-10-271-3/+1
|
* Check for values.h. Will backport.Martin v. Löwis2006-10-271-0/+2
|
* Patch #1549049: Rewrite type conversion in structmember.Martin v. Löwis2006-10-271-8/+121
| | | | Fixes #1545696 and #1566140. Will backport to 2.5.
* Change fix for segfaulting property(), add a NEWS entry and a test.Georg Brandl2006-08-041-0/+9
|
* Part of bug #1523610: fix miscalculation of buffer length.Georg Brandl2006-07-261-0/+11
| | | | | Also add a guard against NULL in converttuple and add a test case (that previously would have crashed).
* Remove lie in new comment.Tim Peters2006-05-131-3/+1
|
* Teach PyString_FromFormat, PyErr_Format, and PyString_FromFormatVTim Peters2006-05-131-4/+43
| | | | | | | | | | | | about "%u", "%lu" and "%zu" formats. Since PyString_FromFormat and PyErr_Format have exactly the same rules (both inherited from PyString_FromFormatV), it would be good if someone with more LaTeX Fu changed one of them to just point to the other. Their docs were way out of synch before this patch, and I just did a mass copy+paste to repair that. Not a backport candidate (this is a new feature).
* correct function signatureSkip Montanaro2006-04-181-1/+1
|
* Add a test for Py_ssize_t. Correct typo in getargs.c.Georg Brandl2006-04-131-11/+21
|
* Add PY_SSIZE_T_MIN/MAX to _testcapi.Georg Brandl2006-04-131-0/+2
|
* Fix some warnings on HP-UX when using cc/aCCNeal Norwitz2006-04-101-2/+2
|
* Try to repair at least one segfault on the Mac buildbot,Tim Peters2006-03-211-12/+42
| | | | | | | | | | | | | | | | | | | | | | as diagnosed by Nick Coghlan. test_capi.py: A test module should never spawn a thread as a side effect of being imported. Because this one did, the segfault one of its thread tests caused didn't occur until a few tests after test_regrtest.py thought test_capi was finished. Repair that. Also join() the thread spawned at the end, so that test_capi is truly finished when regrtest reports that it's done. _testcapimodule.c test_thread_state(): this spawns a couple of non-threading.py threads, passing them a PyObject* argument, but did nothing to ensure that those threads finished before returning. As a result, the PyObject* _could_ (although this was unlikely) get decref'ed out of existence before the threads got around to using it. Added explicit synchronization (via a Python mutex) so that test_thread_state can reliably wait for its spawned threads to finish.
* Add tests for the C APIs PyCodec_IncrementalEncoder() andWalter Dörwald2006-03-181-0/+24
| | | | PyCodec_IncrementalDecoder().
* Move test code out of xxmodule and into _testcapimodule.c where it belongs.Neal Norwitz2006-03-151-0/+13
| | | | Will backport.
* Merge ssize_t branch.Martin v. Löwis2006-02-151-1/+2
|
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* Fix silly leak in test used in test_exceptions.Michael W. Hudson2003-08-151-0/+1
|
* New support functions for test_getargs2.Thomas Heller2003-04-241-69/+70
| | | | | Theres now a separate function for each of the format codes b, B, H, I, k, i, l, L, K.
* Get test_capi & test_getargs2 to pass on alphasNeal Norwitz2003-04-221-6/+19
| | | | | | * UINT_MAX -> ULONG_MAX since we are dealing with longs * ParseTuple needs &int for 'i' and &long for 'l' There may be a better way to do this, but this works.
* New PyGILState_ API - implements pep 311, from patch 684256.Mark Hammond2003-04-191-0/+47
|
* SF # 595026: support for masks in getargs.c.Thomas Heller2003-04-171-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New functions: unsigned long PyInt_AsUnsignedLongMask(PyObject *); unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *); unsigned long PyLong_AsUnsignedLongMask(PyObject *); unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *); New and changed format codes: b unsigned char 0..UCHAR_MAX B unsigned char none ** h unsigned short 0..USHRT_MAX H unsigned short none ** i int INT_MIN..INT_MAX I * unsigned int 0..UINT_MAX l long LONG_MIN..LONG_MAX k * unsigned long none L long long LLONG_MIN..LLONG_MAX K * unsigned long long none Notes: * New format codes. ** Changed from previous "range-and-a-half" to "none"; the range-and-a-half checking wasn't particularly useful. New test test_getargs2.py, to verify all this.
* Rename LONG_LONG to PY_LONG_LONG. Fixes #710285.Martin v. Löwis2003-03-291-5/+5
|
* _PyLong_NumBits(): The definition of this was too specific to the quirkyTim Peters2003-01-311-21/+27
| | | | | | | | | needs of pickling longs. Backed off to a definition that's much easier to understand. The pickler will have to work a little harder, but other uses are more likely to be correct <0.5 wink>. _PyLong_Sign(): New teensy function to characterize a long, as to <0, ==0, or >0.
* Added new private API function _PyLong_NumBits. This will be used at theTim Peters2003-01-281-2/+39
| | | | | | | start for the C implemention of new pickle LONG1 and LONG4 opcodes (the linear-time way to pickle a long is to call _PyLong_AsByteArray, but the caller has no idea how big an array to allocate, and correct calculation is a bit subtle).
* Replace DL_IMPORT with PyMODINIT_FUNC and remove "/export:init..." linkMark Hammond2002-07-231-1/+1
| | | | | command line for Windows builds. This should allow MSVC to import and build the Python MSVC6 project files without error.
* Switch to using METH_NOARGS where possible.Fred Drake2002-04-011-38/+18
| | | | Convert to use PyModule_*() instead of manipulating the module dict directly.
* Fixed "u#" parser marker to pass through Unicode objects as-is withoutMarc-André Lemburg2002-01-091-0/+50
| | | | | | going through the buffer interface API. Added tests for this to the _testcapi module and updated docs.