Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112) | Serhiy Storchaka | 2019-02-25 | 1 | -5/+11 |
| | |||||
* | bpo-35454: Fix miscellaneous minor issues in error handling. (#11077) | Serhiy Storchaka | 2018-12-11 | 1 | -2/+4 |
| | | | | | | * bpo-35454: Fix miscellaneous minor issues in error handling. * Fix a null pointer dereference. | ||||
* | bpo-35081: Rename internal headers (GH-10275) | Victor Stinner | 2018-11-12 | 1 | -1/+1 |
| | | | | | | | | | | | | | | Rename Include/internal/ headers: * pycore_hash.h -> pycore_pyhash.h * pycore_lifecycle.h -> pycore_pylifecycle.h * pycore_mem.h -> pycore_pymem.h * pycore_state.h -> pycore_pystate.h Add missing headers to Makefile.pre.in and PCbuild: * pycore_condvar.h. * pycore_hamt.h * pycore_pyhash.h | ||||
* | bpo-35081: Add pycore_ prefix to internal header files (GH-10263) | Victor Stinner | 2018-10-31 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | * Rename Include/internal/ header files: * pyatomic.h -> pycore_atomic.h * ceval.h -> pycore_ceval.h * condvar.h -> pycore_condvar.h * context.h -> pycore_context.h * pygetopt.h -> pycore_getopt.h * gil.h -> pycore_gil.h * hamt.h -> pycore_hamt.h * hash.h -> pycore_hash.h * mem.h -> pycore_mem.h * pystate.h -> pycore_state.h * warnings.h -> pycore_warnings.h * PCbuild project, Makefile.pre.in, Modules/Setup: add the Include/internal/ directory to the search paths of header files. * Update includes. For example, replace #include "internal/mem.h" with #include "pycore_mem.h". | ||||
* | bpo-34301: Add _PyInterpreterState_Get() helper function (GH-8592) | Victor Stinner | 2018-08-03 | 1 | -8/+6 |
| | | | | sys_setcheckinterval() now uses a local variable to parse arguments, before writing into interp->check_interval. | ||||
* | bpo-33231: Fix potential leak in normalizestring() (GH-6386) | INADA Naoki | 2018-04-06 | 1 | -2/+0 |
| | |||||
* | bpo-32571: Avoid raising unneeded AttributeError and silencing it in C code ↵ | Serhiy Storchaka | 2018-01-25 | 1 | -9/+5 |
| | | | | | (GH-5222) Add two new private APIs: _PyObject_LookupAttr() and _PyObject_LookupAttrId() | ||||
* | bpo-30860: Consolidate stateful runtime globals. (#3397) | Eric Snow | 2017-09-08 | 1 | -0/+1 |
| | | | | | | | * group the (stateful) runtime globals into various topical structs * consolidate the topical structs under a single top-level _PyRuntimeState struct * add a check-c-globals.py script that helps identify runtime globals Other globals are excluded (see globals.txt and check-c-globals.py). | ||||
* | Issue #28858: Remove _PyObject_CallArg1() macro | Victor Stinner | 2016-12-05 | 1 | -1/+1 |
| | | | | | | | | | | | Replace _PyObject_CallArg1(func, arg) with PyObject_CallFunctionObjArgs(func, arg, NULL) Using the _PyObject_CallArg1() macro increases the usage of the C stack, which was unexpected and unwanted. PyObject_CallFunctionObjArgs() doesn't have this issue. | ||||
* | Replace PyObject_CallFunction() with fastcall | Victor Stinner | 2016-12-01 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | Replace PyObject_CallFunction(func, "O", arg) and PyObject_CallFunction(func, "O", arg, NULL) with _PyObject_CallArg1(func, arg) Replace PyObject_CallFunction(func, NULL) with _PyObject_CallNoArg(func) _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. | ||||
* | Added the const qualifier to char* variables that refer to readonly internal | Serhiy Storchaka | 2016-11-20 | 1 | -1/+1 |
| | | | | UTF-8 represenatation of Unicode objects. | ||||
* | Issue #28510: Clean up decoding error handlers. | Serhiy Storchaka | 2016-10-23 | 1 | -15/+6 |
| | | | | | Since PyUnicodeDecodeError_GetObject() always returns bytes, following PyBytes_AsString() can be replaced with PyBytes_AS_STRING(). | ||||
* | Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc | Martin Panter | 2016-04-15 | 1 | -2/+2 |
| | | | | This affects documentation, code comments, and a debugging messages. | ||||
* | Issue #24993: Handle import error in namereplace error handler | Victor Stinner | 2015-09-03 | 1 | -7/+5 |
| | | | | | Handle PyCapsule_Import() failure (exception) in PyCodec_NameReplaceErrors(): return immedialty NULL. | ||||
* | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(), | Serhiy Storchaka | 2015-05-30 | 1 | -5/+6 |
|\ | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly. | ||||
| * | Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(), | Serhiy Storchaka | 2015-05-30 | 1 | -5/+6 |
| | | | | | | | | | | PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() to check for and handle errors correctly. | ||||
* | | Issue #24102: Fixed exception type checking in standard error handlers. | Serhiy Storchaka | 2015-05-18 | 1 | -27/+21 |
|\ \ | |/ | |||||
| * | Issue #24102: Fixed exception type checking in standard error handlers. | Serhiy Storchaka | 2015-05-18 | 1 | -24/+18 |
| | | |||||
* | | Issue #23450: Fixed possible integer overflows. | Serhiy Storchaka | 2015-02-16 | 1 | -1/+1 |
| | | |||||
* | | Issue #22286: The "backslashreplace" error handlers now works with | Serhiy Storchaka | 2015-01-25 | 1 | -53/+91 |
| | | | | | | | | decoding and translating. | ||||
* | | correct assertion | Benjamin Peterson | 2014-11-26 | 1 | -1/+1 |
| | | |||||
* | | fix variable name | Benjamin Peterson | 2014-11-26 | 1 | -1/+1 |
| | | |||||
* | | Issue #19676: Fixed integer overflow issue in "namereplace" error handler. | Serhiy Storchaka | 2014-11-26 | 1 | -5/+11 |
| | | |||||
* | | Issue #19676: Added the "namereplace" error handler. | Serhiy Storchaka | 2014-11-25 | 1 | -0/+108 |
| | | |||||
* | | Issue #22518: Fixed integer overflow issues in "backslashreplace", | Serhiy Storchaka | 2014-10-04 | 1 | -2/+8 |
|\ \ | |/ | | | | | "xmlcharrefreplace", and "surrogatepass" error handlers. | ||||
| * | Issue #22518: Fixed integer overflow issues in "backslashreplace", | Serhiy Storchaka | 2014-10-04 | 1 | -2/+8 |
| | | | | | | | | "xmlcharrefreplace", and "surrogatepass" error handlers. | ||||
* | | Fixed reference leak in the "backslashreplace" error handler. | Serhiy Storchaka | 2014-09-23 | 1 | -1/+3 |
|\ \ | |/ | |||||
| * | Fixed reference leak in the "backslashreplace" error handler. | Serhiy Storchaka | 2014-09-23 | 1 | -1/+3 |
| | | |||||
* | | Merge fix for issue #22166 from 3.4 | Nick Coghlan | 2014-09-15 | 1 | -0/+26 |
|\ \ | |/ | |||||
| * | Issue #22166: clear codec caches in test_codecs | Nick Coghlan | 2014-09-15 | 1 | -0/+26 |
| | | |||||
* | | Issue #13916: Fix surrogatepass error handler on Windows | Victor Stinner | 2014-05-16 | 1 | -0/+4 |
| | | |||||
* | | Issue #13916: Disallowed the surrogatepass error handler for non UTF-* | Serhiy Storchaka | 2014-05-15 | 1 | -4/+19 |
|/ | | | | encodings. | ||||
* | Close #20404: blacklist non-text encodings in io.TextIOWrapper | Nick Coghlan | 2014-02-04 | 1 | -21/+63 |
| | | | | | | | | | - io.TextIOWrapper (and hence the open() builtin) now use the internal codec marking system added for issue #19619 - also tweaked the C code to only look up the encoding once, rather than multiple times - the existing output type checks remain in place to deal with unmarked third party codecs. | ||||
* | Issue #19619: Blacklist non-text codecs in method API | Nick Coghlan | 2013-11-22 | 1 | -16/+122 |
| | | | | | | | | | | str.encode, bytes.decode and bytearray.decode now use an internal API to throw LookupError for known non-text encodings, rather than attempting the encoding or decoding operation and then throwing a TypeError for an unexpected output type. The latter mechanism remains in place for third party non-text encodings. | ||||
* | Issue #12892: The utf-16* and utf-32* codecs now reject (lone) surrogates. | Serhiy Storchaka | 2013-11-19 | 1 | -17/+146 |
| | | | | | | | | | | The utf-16* and utf-32* encoders no longer allow surrogate code points (U+D800-U+DFFF) to be encoded. The utf-32* decoders no longer decode byte sequences that correspond to surrogate code points. The surrogatepass error handler now works with the utf-16* and utf-32* codecs. Based on patches by Victor Stinner and Kang-Hao (Kenny) Lu. | ||||
* | Close 19609: narrow scope of codec exc chaining | Nick Coghlan | 2013-11-15 | 1 | -4/+6 |
| | |||||
* | Close #17828: better handling of codec errors | Nick Coghlan | 2013-11-13 | 1 | -0/+18 |
| | | | | | | | | - output type errors now redirect users to the type-neutral convenience functions in the codecs module - stateless errors that occur during encoding and decoding will now be automatically wrapped in exceptions that give the name of the codec involved | ||||
* | Issue #1772673: The type of `char*` arguments now changed to `const char*`. | Serhiy Storchaka | 2013-10-19 | 1 | -2/+2 |
| | |||||
* | Issue #18722: Remove uses of the "register" keyword in C code. | Antoine Pitrou | 2013-08-13 | 1 | -2/+2 |
| | |||||
* | Issue #18408: normalizestring() now raises MemoryError on memory allocation ↵ | Victor Stinner | 2013-07-11 | 1 | -1/+1 |
| | | | | failure | ||||
* | Issue #15422: get rid of PyCFunction_New macro | Andrew Svetlov | 2012-12-25 | 1 | -1/+1 |
| | |||||
* | #16336: merge with 3.3. | Ezio Melotti | 2012-11-03 | 1 | -4/+4 |
|\ | |||||
| * | #16336: merge with 3.2. | Ezio Melotti | 2012-11-03 | 1 | -4/+4 |
| |\ | |||||
| | * | #16336: fix input checking in the surrogatepass error handler. Patch by ↵ | Ezio Melotti | 2012-11-03 | 1 | -4/+4 |
| | | | | | | | | | | | | Serhiy Storchaka. | ||||
* | | | Issue #16330: Use surrogate-related macros | Victor Stinner | 2012-10-30 | 1 | -2/+2 |
|/ / | | | | | | | Patch written by Serhiy Storchaka. | ||||
* | | merge with 3.2 | Philip Jenvey | 2012-10-27 | 1 | -3/+4 |
|\ \ | |/ | |||||
| * | bounds check for bad data (thanks amaury) | Philip Jenvey | 2012-10-27 | 1 | -3/+4 |
| | | |||||
* | | Check newly created consistency using _PyUnicode_CheckConsistency(str, 1) | Victor Stinner | 2012-04-27 | 1 | -4/+6 |
| | | | | | | | | | | | | * In debug mode, fill the string data with invalid characters * Simplify also reference counting in PyCodec_BackslashReplaceErrors() and PyCodec_XMLCharRefReplaceError() | ||||
* | | Issue #13722: Avoid silencing ImportErrors when initializing the codecs ↵ | Antoine Pitrou | 2012-01-18 | 1 | -9/+0 |
|\ \ | |/ | | | | | registry. | ||||
| * | Issue #13722: Avoid silencing ImportErrors when initializing the codecs ↵ | Antoine Pitrou | 2012-01-18 | 1 | -9/+0 |
| | | | | | | | | registry. |