summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #10833: Use PyErr_Format() and PyUnicode_FromFormat() instead ofVictor Stinner2011-03-211-8/+1
| | | | | PyOS_snprintf() to avoid temporary buffer allocated on the stack and a conversion from bytes to Unicode.
* Issue #10833: Use PyUnicode_FromFormat() and PyErr_Format() instead ofVictor Stinner2011-03-211-4/+2
| | | | PyOS_snprintf().
* Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer withAntoine Pitrou2011-02-241-0/+11
| | | | a buffer struct having a NULL data pointer.
* test_unicode: use ctypes to test PyUnicode_FromFormat()Victor Stinner2011-01-051-12/+0
| | | | | Instead of _testcapi.format_unicode() because it has a limited API: it requires exactly one argument of type unicode.
* Issue #9566: use Py_ssize_t instead of intVictor Stinner2011-01-041-1/+1
|
* Issue #6697: Fixed instances of _PyUnicode_AsString() result not checked for ↵Alexander Belopolsky2010-12-081-9/+10
| | | | NULL
* Merge branches/pep-0384.Martin v. Löwis2010-12-031-1/+1
|
* Issue #10359: Remove ";" after function definition, invalid in ISO CVictor Stinner2010-11-091-1/+1
|
* Issue #10185: use Py_hash_t instead of longAntoine Pitrou2010-10-231-1/+1
|
* PyUnicode_AsWideCharString() takes a PyObject*, not a PyUnicodeObject*Victor Stinner2010-10-071-1/+1
| | | | | All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the prototype for the new function PyUnicode_AsWideCharString().
* Issue #8670: Rename testcapi unicode test methodsVictor Stinner2010-10-021-4/+4
| | | | | * test_aswidechar() => unicode_aswidechar() * test_aswidecharstring() => unicode_aswidecharstring()
* Oops, revert unwanted _testcapi changes of r85174Victor Stinner2010-10-021-4/+4
|
* Issue #8670: ctypes.c_wchar supports non-BMP characters with 32 bits wchar_tVictor Stinner2010-10-021-4/+4
|
* Issue #8870: PyUnicode_AsWideCharString() doesn't count the trailing nul ↵Victor Stinner2010-10-021-9/+63
| | | | | | character And write unit tests for PyUnicode_AsWideChar() and PyUnicode_AsWideCharString().
* Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error onVictor Stinner2010-09-111-0/+12
| | | | | | a non-ASCII byte in the format string. Document also the encoding.
* Issue #8850: Remove "w" and "w#" formats from PyArg_Parse*() functions, useVictor Stinner2010-06-251-0/+23
| | | | "w*" format instead. Add tests for "w*" format.
* Issue #8592: PyArg_Parse*() functions raise a TypeError for "y", "u" and "Z"Victor Stinner2010-06-131-1/+165
| | | | | formats if the string contains a null byte/character. Write unit tests for string formats.
* Fix test_capi in !pydebug mode, where my original attempt segfaulted withoutJeffrey Yasskin2010-05-171-1/+5
| | | | | producing the expected error message. The test only tests what it's supposed to test in pydebug mode though. Fixes issue 8726.
* Make PyErr_Occurred return NULL if there is no current thread. Previously itJeffrey Yasskin2010-05-131-0/+12
| | | | | | | would Py_FatalError, which called PyErr_Occurred, resulting in a semi-infinite recursion. Fixes issue 3605.
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-1673/+1673
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 79661 via svnmerge fromMark Dickinson2010-04-031-9/+16
| | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79661 | mark.dickinson | 2010-04-03 11:27:05 +0100 (Sat, 03 Apr 2010) | 14 lines Fix a couple of issues with the test_structmembersType class in _testcapimodule - rename to _test_structmembersType to avoid the class being automatically called by test_capi - allow space for trailing NUL in inplace_member field of all_structmembers - use T_STRING_INPLACE instead of T_INPLACE_STRING as keyword argument to _test_structmembersType initializer - don't attempt to initialize inplace_member field if T_STRING_INPLACE argument wasn't supplied. ........
* Merged revisions 79642,79644 via svnmerge fromBenjamin Peterson2010-04-031-3/+14
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79642 | benjamin.peterson | 2010-04-02 20:08:34 -0500 (Fri, 02 Apr 2010) | 1 line split out large test function ........ r79644 | benjamin.peterson | 2010-04-02 20:28:57 -0500 (Fri, 02 Apr 2010) | 1 line give TypeError when trying to set T_STRING_INPLACE ........
* Issue #8014: Fix PyLong_As<c-integer-type> methods not to produce anMark Dickinson2010-03-131-4/+7
| | | | | internal error on non-integer input: they now raise TypeError instead. This is needed for attributes declared via PyMemberDefs.
* Revert an earlier attempt (r76810) to fix the intermittent test_capi ↵Mark Dickinson2010-02-131-15/+0
| | | | failures fixed in r78172.
* Issue #7924: Fix an intermittent 'XXX undetected error' crash inMark Dickinson2010-02-131-0/+2
| | | | | test_capi, due to test_capsule failing to clear an exception. Many thanks to Florent Xicluna for the diagnosis and fix.
* Followup to r77918: fix build under Windows.Antoine Pitrou2010-02-041-1/+2
|
* Merged revisions 77866-77867 via svnmerge fromBenjamin Peterson2010-02-031-4/+15
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77866 | benjamin.peterson | 2010-01-30 17:26:05 -0600 (Sat, 30 Jan 2010) | 1 line move test outside WITH_THREAD section ........ r77867 | benjamin.peterson | 2010-01-30 17:28:38 -0600 (Sat, 30 Jan 2010) | 1 line be robust against test being run over and over (such as -R) ........
* Merged revisions 77916 via svnmerge fromAntoine Pitrou2010-02-021-0/+90
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77916 | antoine.pitrou | 2010-02-02 23:36:17 +0100 (mar., 02 févr. 2010) | 4 lines Issue #7385: Fix a crash in `MemoryView_FromObject` when `PyObject_GetBuffer` fails. Patch by Florent Xicluna. ........
* Merged revisions 77842 via svnmerge fromMark Dickinson2010-01-301-0/+167
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77842 | mark.dickinson | 2010-01-30 10:08:33 +0000 (Sat, 30 Jan 2010) | 4 lines Issue #7767: Add new C-API function PyLong_AsLongLongAndOverflow, a long long variant of PyLong_AsLongAndOverflow. Patch by Case Van Horsen. ........
* Python strings ending with '\0' should not be equivalent to their C ↵Benjamin Peterson2010-01-091-0/+18
| | | | counterparts in PyUnicode_CompareWithASCIIString
* Merged revisions 77088 via svnmerge fromGeorg Brandl2009-12-281-0/+22
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77088 | georg.brandl | 2009-12-28 09:34:58 +0100 (Mo, 28 Dez 2009) | 1 line #7033: add new API function PyErr_NewExceptionWithDoc, for easily giving new exceptions a docstring. ........
* Keep PyLong_AsLongAndOverflow documentation and implementation in syncMark Dickinson2009-12-211-0/+167
| | | | | between py3k and trunk; merge new tests from trunk to py3k. (See issue #7528.)
* Merged revisions 76930 via svnmerge fromMark Dickinson2009-12-201-0/+10
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76930 | mark.dickinson | 2009-12-20 15:57:56 +0000 (Sun, 20 Dec 2009) | 1 line Add missing tests for PyArg_Parse* with format 'h' ........
* Merged revisions 76822,76824 via svnmerge fromBenjamin Peterson2009-12-131-0/+16
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76822 | benjamin.peterson | 2009-12-13 15:21:43 -0600 (Sun, 13 Dec 2009) | 1 line initialize to NULL ........ r76824 | benjamin.peterson | 2009-12-13 15:27:53 -0600 (Sun, 13 Dec 2009) | 1 line add a test of loading the datetime capi ........
* Make sure that test_capsule always returns NULL on error; this mayMark Dickinson2009-12-131-0/+15
| | | | help diagnose the sporadic test_capi failures on Solaris.
* Issue #7414: Add missing 'case 'C'' to skipitem() in getargs.c. ThisMark Dickinson2009-12-031-0/+47
| | | | | | was causing PyArg_ParseTupleAndKeywords(args, kwargs, "|CC", ...) to fail with a RuntimeError. Thanks Case Van Horsen for tracking down the source of this error.
* Merged revisions 76308 via svnmerge fromMark Dickinson2009-11-161-0/+6
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76308 | mark.dickinson | 2009-11-15 16:18:58 +0000 (Sun, 15 Nov 2009) | 3 lines Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString, PyFormat_FromStringV and PyErr_Format. ........
* remove shadowing declartionBenjamin Peterson2009-10-271-1/+0
|
* Merged revisions 72487-72488,72879 via svnmerge fromAlexandre Vassalotti2009-07-211-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72487 | jeffrey.yasskin | 2009-05-08 17:51:06 -0400 (Fri, 08 May 2009) | 7 lines PyCode_NewEmpty: Most uses of PyCode_New found by http://www.google.com/codesearch?q=PyCode_New are trying to build an empty code object, usually to put it in a dummy frame object. This patch adds a PyCode_NewEmpty wrapper which lets the user specify just the filename, function name, and first line number, instead of also requiring lots of code internals. ........ r72488 | jeffrey.yasskin | 2009-05-08 18:23:21 -0400 (Fri, 08 May 2009) | 13 lines Issue 5954, PyFrame_GetLineNumber: Most uses of PyCode_Addr2Line (http://www.google.com/codesearch?q=PyCode_Addr2Line) are just trying to get the line number of a specified frame, but there's no way to do that directly. Forcing people to go through the code object makes them know more about the guts of the interpreter than they should need. The remaining uses of PyCode_Addr2Line seem to be getting the line from a traceback (for example, http://www.google.com/codesearch/p?hl=en#u_9_nDrchrw/pygame-1.7.1release/src/base.c&q=PyCode_Addr2Line), which is replaced by the tb_lineno field. So we may be able to deprecate PyCode_Addr2Line entirely for external use. ........ r72879 | jeffrey.yasskin | 2009-05-23 19:23:01 -0400 (Sat, 23 May 2009) | 14 lines Issue #6042: lnotab-based tracing is very complicated and isn't documented very well. There were at least 3 comment blocks purporting to document co_lnotab, and none did a very good job. This patch unifies them into Objects/lnotab_notes.txt which tries to completely capture the current state of affairs. I also discovered that we've attached 2 layers of patches to the basic tracing scheme. The first layer avoids jumping to instructions that don't start a line, to avoid problems in if statements and while loops. The second layer discovered that jumps backward do need to trace at instructions that don't start a line, so it added extra lnotab entries for 'while' and 'for' loops, and added a special case for backward jumps within the same line. I replaced these patches by just treating forward and backward jumps differently. ........
* Issue #6012: Add cleanup support to O& argument parsing.Martin v. Löwis2009-05-291-1/+31
|
* Merged revisions 72367 via svnmerge fromBenjamin Peterson2009-05-051-5/+5
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72367 | benjamin.peterson | 2009-05-05 18:00:48 -0500 (Tue, 05 May 2009) | 1 line tabify :( ........
* add a replacement API for PyCObject, PyCapsule #5630Benjamin Peterson2009-05-051-1/+151
| | | | | | All stdlib modules with C-APIs now use this. Patch by Larry Hastings
* Merged revisions 72357 via svnmerge fromBenjamin Peterson2009-05-051-0/+9
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72357 | benjamin.peterson | 2009-05-05 16:09:21 -0500 (Tue, 05 May 2009) | 4 lines fix running test_capi with -R :: Also, fix a refleak in the test that was preventing running. :) ........
* Issue #5914: Add new C-API function PyOS_string_to_double, to complementMark Dickinson2009-05-031-0/+49
| | | | PyOS_double_to_string, and deprecate PyOS_ascii_strtod and PyOS_ascii_atof.
* Issue 4474: On platforms with sizeof(wchar_t) == 4 andMark Dickinson2009-03-181-0/+45
| | | | | | | sizeof(Py_UNICODE) == 2, PyUnicode_FromWideChar now converts each character outside the BMP to the appropriate surrogate pair. Thanks Victor Stinner for the patch.
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-2/+2
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.
* Merged revisions 68425,68461,68498 via svnmerge fromBenjamin Peterson2009-01-131-0/+38
| | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68425 | benjamin.peterson | 2009-01-08 20:56:32 -0600 (Thu, 08 Jan 2009) | 1 line fix markup ........ r68461 | kristjan.jonsson | 2009-01-09 15:35:16 -0600 (Fri, 09 Jan 2009) | 2 lines Issue 4293: Make Py_AddPendingCall() thread safe Add test cases and documentation ........ r68498 | benjamin.peterson | 2009-01-10 13:08:49 -0600 (Sat, 10 Jan 2009) | 1 line fix encoding ........
* Merged revisions 68097,68099 via svnmerge fromHirokazu Yamamoto2008-12-311-1/+3
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68097 | hirokazu.yamamoto | 2008-12-31 14:24:37 +0900 | 1 line Fixed compile error on windows. ........ r68099 | hirokazu.yamamoto | 2008-12-31 14:47:19 +0900 | 1 line Just inserted blank line. ........
* Recorded merge of revisions 68051 via svnmerge fromNick Coghlan2008-12-301-0/+100
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r68051 | nick.coghlan | 2008-12-30 11:18:48 +1000 (Tue, 30 Dec 2008) | 1 line Issue #4701: implicitly call PyType_Ready from PyObject_Hash ........
* Merged revisions ↵Benjamin Peterson2008-12-271-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 67889-67892,67895,67898,67904-67907,67912,67918,67920-67921,67923-67924,67926-67927,67930,67943 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ................ r67889 | benjamin.peterson | 2008-12-20 19:04:32 -0600 (Sat, 20 Dec 2008) | 1 line sphinx.web is long gone ................ r67890 | benjamin.peterson | 2008-12-20 19:12:26 -0600 (Sat, 20 Dec 2008) | 1 line update readme ................ r67891 | benjamin.peterson | 2008-12-20 19:14:47 -0600 (Sat, 20 Dec 2008) | 1 line there are way too many places which need to have the current version added ................ r67892 | benjamin.peterson | 2008-12-20 19:29:32 -0600 (Sat, 20 Dec 2008) | 9 lines Merged revisions 67809 via svnmerge from svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r67809 | benjamin.peterson | 2008-12-15 21:54:45 -0600 (Mon, 15 Dec 2008) | 1 line fix logic error ........ ................ r67895 | neal.norwitz | 2008-12-21 08:28:32 -0600 (Sun, 21 Dec 2008) | 2 lines Add Tarek for work on distutils. ................ r67898 | benjamin.peterson | 2008-12-21 15:00:53 -0600 (Sun, 21 Dec 2008) | 1 line compute DISTVERSION with patchlevel.py ................ r67904 | benjamin.peterson | 2008-12-22 14:44:58 -0600 (Mon, 22 Dec 2008) | 1 line less attitude ................ r67905 | benjamin.peterson | 2008-12-22 14:51:15 -0600 (Mon, 22 Dec 2008) | 1 line fix #4720: the format to PyArg_ParseTupleAndKeywords can now start with '|' ................ r67906 | benjamin.peterson | 2008-12-22 14:52:53 -0600 (Mon, 22 Dec 2008) | 1 line add NEWS note ................ r67907 | benjamin.peterson | 2008-12-22 16:12:19 -0600 (Mon, 22 Dec 2008) | 1 line silence compiler warning ................ r67912 | georg.brandl | 2008-12-23 06:37:21 -0600 (Tue, 23 Dec 2008) | 2 lines Fix missing "svn" command. ................ r67918 | georg.brandl | 2008-12-23 09:44:25 -0600 (Tue, 23 Dec 2008) | 2 lines Markup fix. ................ r67920 | benjamin.peterson | 2008-12-23 14:09:28 -0600 (Tue, 23 Dec 2008) | 1 line use a global variable, so the compiler doesn't optimize the assignment out ................ r67921 | benjamin.peterson | 2008-12-23 14:12:33 -0600 (Tue, 23 Dec 2008) | 1 line make global static ................ r67923 | benjamin.peterson | 2008-12-24 09:10:27 -0600 (Wed, 24 Dec 2008) | 1 line #4736 BufferRWPair.closed shouldn't try to call another property as a function ................ r67924 | benjamin.peterson | 2008-12-24 10:10:05 -0600 (Wed, 24 Dec 2008) | 1 line pretend exceptions don't exist a while longer ................ r67926 | tarek.ziade | 2008-12-24 13:10:05 -0600 (Wed, 24 Dec 2008) | 1 line fixed #4400 : distutils .pypirc default generated file was broken. ................ r67927 | benjamin.peterson | 2008-12-26 17:26:30 -0600 (Fri, 26 Dec 2008) | 1 line python version is included in file name now ................ r67930 | hirokazu.yamamoto | 2008-12-26 22:19:48 -0600 (Fri, 26 Dec 2008) | 2 lines Issue #4740: Use HIGHEST_PROTOCOL in pickle test. (There is no behavior difference in 2.x because HIGHEST_PROTOCOL == 2) ................ r67943 | alexandre.vassalotti | 2008-12-27 04:02:59 -0600 (Sat, 27 Dec 2008) | 2 lines Fix bogus unicode tests in pickletester. ................