178 Commits

Author SHA1 Message Date
Victor Stinner
f70c581056 Issue #8227: Fix C API documentation, argument parsing
* 'z', 'z#', 'z*' does also accept Unicode
 * unify types name: replace "string or Unicode objet" by "string or Unicode"
2010-04-03 08:40:16 +00:00
Georg Brandl
677fdec8fc Document PyImport_ExecCodeModuleEx(). 2010-04-02 09:07:42 +00:00
Larry Hastings
402b73fb8d Backported PyCapsule from 3.1, and converted most uses of
CObject to PyCapsule.
2010-03-25 00:54:54 +00:00
Georg Brandl
f6d3674599 Fix warnings from "make check". 2010-03-12 10:02:03 +00:00
Georg Brandl
0d4bfec134 #8044: document Py_{Enter,Leave}RecursiveCall functions. 2010-03-07 21:32:06 +00:00
Georg Brandl
303e675940 #8085: The function is called PyObject_NewVar, not PyObject_VarNew. 2010-03-07 20:58:31 +00:00
Ezio Melotti
91d26b43c9 Use the correct markup for args 2010-01-30 13:27:05 +00:00
Ezio Melotti
99af64820a Relocate a couple of stars and remove redundant backticks 2010-01-30 13:08:54 +00:00
Mark Dickinson
a36507c64c Issue #7767: Add new C-API function PyLong_AsLongLongAndOverflow, a
long long variant of PyLong_AsLongAndOverflow.  Patch by Case Van
Horsen.
2010-01-30 10:08:33 +00:00
Georg Brandl
54fd8ae0a3 Fix description for Py_GetPath(); it sounded like it always returned sys.path. 2010-01-07 20:54:45 +00:00
Ezio Melotti
722a8a95b7 :stmt: -> :keyword: 2010-01-03 09:09:55 +00:00
Gregory P. Smith
b56fb12b74 Correct documentation for s* z* and w*, the argument that should be passed
is the address of a Py_buffer, not a Py_buffer *.
2010-01-02 21:29:54 +00:00
Benjamin Peterson
0f02d3933b check if the attribute is set before deleting it with T_OBJECT_EX (fixes #7604)
Also, add a note to the docs about the better behavior of T_OBJECT_EX as
compared to T_OBJECT.
2009-12-30 19:34:10 +00:00
Georg Brandl
740cdc3a9f #7033: add new API function PyErr_NewExceptionWithDoc, for easily giving new exceptions a docstring. 2009-12-28 08:34:58 +00:00
Georg Brandl
1686f3499f #7577: fix signature of PyBuffer_FillInfo(). 2009-12-28 07:59:05 +00:00
Mark Dickinson
e31d300664 Issue #7528: Backport PyLong_AsLongAndOverflow from py3k to trunk.
Thanks Case Van Horsen for the patch.
2009-12-21 11:21:25 +00:00
Ezio Melotti
062d2b52f3 #7388: "python".capitalize() in the Doc 2009-12-19 22:41:49 +00:00
Georg Brandl
670e5969cb #7521: remove Py_GetBuildNumber(), which was removed in favor of Py_GetBuildInfo(). 2009-12-19 17:34:32 +00:00
Mark Dickinson
82864d1ab1 Issue #7228: Add '%lld' and '%llu' support to PyFormat_FromString,
PyFormat_FromStringV and PyErr_Format.
2009-11-15 16:18:58 +00:00
Mark Dickinson
09823a2e21 Deprecate PyOS_ascii_strtod and PyOS_ascii_atof, and document the replacement function PyOS_string_to_double. 2009-10-31 09:42:39 +00:00
Eric Smith
c12781abcb Issue #7169: Document PyFloat_AsString and PyFloat_AsReprString, and note that they are unsafe and deprecated. 2009-10-19 14:38:14 +00:00
Ezio Melotti
4b017bbac0 #6881 - fixed wrong return type; improved the formatting 2009-09-20 07:10:39 +00:00
Georg Brandl
579a358e61 #6930: clarify description about byteorder handling in UTF decoder routines. 2009-09-18 21:35:59 +00:00
Thomas Wouters
c4dcb3801e Fix issue #1590864, multiple threads and fork() can cause deadlocks, by
acquiring the import lock around fork() calls. This prevents other threads
from having that lock while the fork happens, and is the recommended way of
dealing with such issues. There are two other locks we care about, the GIL
and the Thread Local Storage lock. The GIL is obviously held when calling
Python functions like os.fork(), and the TLS lock is explicitly reallocated
instead, while also deleting now-orphaned TLS data.

This only fixes calls to os.fork(), not extension modules or embedding
programs calling C's fork() directly. Solving that requires a new set of API
functions, and possibly a rewrite of the Python/thread_*.c mess. Add a
warning explaining the problem to the documentation in the mean time.

This also changes behaviour a little on AIX. Before, AIX (but only AIX) was
getting the import lock reallocated, seemingly to avoid this very same
problem. This is not the right approach, because the import lock is a
re-entrant one, and reallocating would do the wrong thing when forking while
holding the import lock.

Will backport to 2.6, minus the tiny AIX behaviour change.
2009-09-16 19:55:54 +00:00
Benjamin Peterson
ea7120c7c1 Py_SetPythonHome uses static storage #6913 2009-09-15 03:36:26 +00:00