Commit Graph

598 Commits

Author SHA1 Message Date
Victor Stinner
e8453bc136 C API doc: try to group concrete objects 2013-11-07 22:05:48 +01:00
Serhiy Storchaka
c679227e31 Issue #1772673: The type of char* arguments now changed to const char*. 2013-10-19 21:03:34 +03:00
Nick Coghlan
1805a62f1f Issue #16129: Py_SetStandardStreamEncoding cleanups
- don't call PyErr_NoMemory with interpreter is not initialised
- note that it's OK to call _PyMem_RawStrDup here
- don't include this in the limited API
- capitalise "IO"
- be explicit that a non-zero return indicates an error
- include versionadded marker in docs
2013-10-18 23:11:47 +10:00
Nick Coghlan
7d270ee05d Issue #16129: Add Py_SetStandardStreamEncoding
This new pre-initialization API allows embedding
applications like Blender to force a particular
encoding and error handler for the standard IO streams.

Also refactors Modules/_testembed.c to let us start
testing multiple embedding scenarios.

(Initial patch by Bastien Montagne)
2013-10-17 22:35:35 +10:00
Georg Brandl
7c11e52f7e merge with 3.3 2013-10-12 20:01:14 +02:00
Georg Brandl
5c01d99c12 Introduce support for documenting which C API elements are not part of the stable/limited API. 2013-10-12 19:54:30 +02:00
Georg Brandl
a636c8e150 merge with 3.3 2013-10-12 19:03:47 +02:00
Georg Brandl
ae30a813a9 Closes #13833: document PyStructSequence C-API functions. 2013-10-12 19:03:43 +02:00
Victor Stinner
2fe9bac4dc Close #16742: Fix misuse of memory allocations in PyOS_Readline()
The GIL must be held to call PyMem_Malloc(), whereas PyOS_Readline() releases
the GIL to read input.

The result of the C callback PyOS_ReadlineFunctionPointer must now be a string
allocated by PyMem_RawMalloc() or PyMem_RawRealloc() (or NULL if an error
occurred), instead of a string allocated by PyMem_Malloc() or PyMem_Realloc().

Fixing this issue was required to setup a hook on PyMem_Malloc(), for example
using the tracemalloc module.

PyOS_Readline() copies the result of PyOS_ReadlineFunctionPointer() into a new
buffer allocated by PyMem_Malloc(). So the public API of PyOS_Readline() does
not change.
2013-10-10 16:18:20 +02:00
Victor Stinner
6cf185dc06 Issue #18874: _PyObject_Malloc/Realloc/Free() now falls back on
_PyMem_RawMalloc/Realloc/Free, instead of _PyMem_Malloc/Realloc/Free.  So it
becomes possible to use the fast pymalloc allocator for the PYMEM_DOMAIN_MEM
domain (PyMem_Malloc/Realloc/Free functions).
2013-10-10 15:58:42 +02:00
Raymond Hettinger
5ed3bc9adb merge 2013-10-09 22:43:30 -07:00
Raymond Hettinger
8ee7708c7f Issue #19005: Fix documentation for PyIter_Next(). 2013-10-09 22:42:46 -07:00
Serhiy Storchaka
d51f42372b Issue 19195: Improved cross-references in C API documentation. 2013-10-09 13:26:57 +03:00
Serhiy Storchaka
0b68a2d675 Issue 19195: Improved cross-references in C API documentation. 2013-10-09 13:26:17 +03:00
Antoine Pitrou
c8fb4fc96e Add a "skull and crossbones" to Py_AddPendingCall. 2013-09-30 21:38:49 +02:00
Antoine Pitrou
1a67bee701 Add a "skull and crossbones" to Py_AddPendingCall. 2013-09-30 21:35:44 +02:00
Victor Stinner
14e461d5b9 Close #11619: The parser and the import machinery do not encode Unicode
filenames anymore on Windows.
2013-08-26 22:28:21 +02:00
Serhiy Storchaka
bbbf191707 Issue #18743: Fix references to non-existant "StringIO" module. 2013-08-17 00:11:54 +03:00
Serhiy Storchaka
e79be877df Issue #18743: Fix references to non-existant "StringIO" module. 2013-08-17 00:09:55 +03:00
Christian Heimes
ad73a9cf97 Issue #16400: Add command line option for isolated mode.
-I

    Run Python in isolated mode. This also implies -E and -s. In isolated mode
    sys.path contains neither the script’s directory nor the user’s
    site-packages directory. All PYTHON* environment variables are ignored,
    too. Further restrictions may be imposed to prevent the user from
    injecting malicious code.
2013-08-10 16:36:18 +02:00
Eli Bendersky
562d9cbfe9 Issue #18668: Further clarify m_size setting for non-negative values 2013-08-10 05:58:10 -07:00
Eli Bendersky
43694a50ab Issue #18668: Further clarify m_size setting for non-negative values 2013-08-10 05:57:27 -07:00
Serhiy Storchaka
0738aff368 Fix a typo in PyUnicode_CopyCharacters() documentation. 2013-08-08 16:49:45 +03:00
Serhiy Storchaka
cdd0279b0b Fix a typo in PyUnicode_CopyCharacters() documentation. 2013-08-08 16:47:43 +03:00
Eli Bendersky
7533137f4e Closing #18668: Properly document setting m_size in PyModuleDef 2013-08-07 05:54:28 -07:00