summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.Serhiy Storchaka2016-12-051-2/+16
| |\ \ | | |/
| | * Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.Serhiy Storchaka2016-12-051-2/+16
| | |
* | | Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-4/+6
| | | | | | | | | | | | | | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
* | | Replace PyObject_CallFunctionObjArgs() with fastcallVictor Stinner2016-12-011-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func) * PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg) PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires extra work to "parse" C arguments to build a C array of PyObject*. _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. This change is part of the fastcall project. The change on listsort() is related to the issue #23507.
* | | Issue #28774: Simplified encoding a str result of an error handler in ASCIISerhiy Storchaka2016-11-231-26/+12
| | | | | | | | | | | | and Latin1 encoders.
* | | Issue #28774: Fix start/end pos in unicode_encode_ucs1().Xiang Zhang2016-11-231-2/+2
| | | | | | | | | | | | | | | | | | | | | Fix error position of the unicode error in ASCII and Latin1 encoders when a string returned by the error handler contains multiple non-encodable characters (non-ASCII for the ASCII codec, characters out of the U+0000-U+00FF range for Latin1).
* | | Issue #28760: Clean up and fix comments in PyUnicode_AsUnicodeEscapeString().Serhiy Storchaka2016-11-211-10/+4
|\ \ \ | |/ / | | | | | | Patch by Xiang Zhang.
| * | Issue #28760: Clean up and fix comments in PyUnicode_AsUnicodeEscapeString().Serhiy Storchaka2016-11-211-10/+4
| | | | | | | | | | | | Patch by Xiang Zhang.
* | | Issue #19569: Compiler warnings are now emitted if use most of deprecatedSerhiy Storchaka2016-11-201-49/+45
| | | | | | | | | | | | functions.
* | | Issue #28701: _PyUnicode_EqualToASCIIId and _PyUnicode_EqualToASCIIString nowSerhiy Storchaka2016-11-161-0/+11
|\ \ \ | |/ / | | | | | | require ASCII right argument and assert this condition in debug build.
| * | Issue #28701: _PyUnicode_EqualToASCIIId and _PyUnicode_EqualToASCIIString nowSerhiy Storchaka2016-11-161-0/+11
| | | | | | | | | | | | require ASCII right argument and assert this condition in debug build.
* | | Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701).Serhiy Storchaka2016-11-161-1/+1
|\ \ \ | |/ /
| * | Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701).Serhiy Storchaka2016-11-161-1/+1
| |\ \ | | |/
| | * Fixed an off-by-one error in _PyUnicode_EqualToASCIIString (issue #28701).Serhiy Storchaka2016-11-161-1/+1
| | |
* | | Issue #21449: Removed private function _PyUnicode_CompareWithId.Serhiy Storchaka2016-11-161-9/+0
|\ \ \ | |/ /
| * | Issue #21449: Removed private function _PyUnicode_CompareWithId.Serhiy Storchaka2016-11-161-9/+0
| | |
* | | Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.Serhiy Storchaka2016-11-161-0/+38
|\ \ \ | |/ / | | | | | | | | | | | | The latter function is more readable, faster and doesn't raise exceptions. Based on patch by Xiang Zhang.
| * | Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.Serhiy Storchaka2016-11-161-0/+38
| |\ \ | | |/ | | | | | | | | | | | | The latter function is more readable, faster and doesn't raise exceptions. Based on patch by Xiang Zhang.
| | * Issue #28701: Replace _PyUnicode_CompareWithId with _PyUnicode_EqualToASCIIId.Serhiy Storchaka2016-11-161-0/+38
| | | | | | | | | | | | | | | | | | The latter function is more readable, faster and doesn't raise exceptions. Based on patch by Xiang Zhang.
* | | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-161-0/+35
|\ \ \ | |/ / | | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
| * | Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-161-0/+35
| |\ \ | | |/ | | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
| | * Issue #28701: Replace PyUnicode_CompareWithASCIIString with ↵Serhiy Storchaka2016-11-161-0/+35
| | | | | | | | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
* | | Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS XSerhiy Storchaka2016-11-121-1/+1
|\ \ \ | |/ / | | | | | | when decode astral characters.
| * | Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS XSerhiy Storchaka2016-11-121-1/+1
| |\ \ | | |/ | | | | | | when decode astral characters.
| | * Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS XSerhiy Storchaka2016-11-121-1/+1
| | |\ | | | | | | | | | | | | when decode astral characters.
| | | * Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS XSerhiy Storchaka2016-11-121-1/+1
| | | |\ | | | | | | | | | | | | | | | when decode astral characters.
| | | | * Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS XSerhiy Storchaka2016-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | when decode astral characters.
| | | | * Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache.Serhiy Storchaka2015-12-021-0/+5
| | | | |
* | | | | Closes #27781: Removes special cases for the experimental aspect of PEP 529Steve Dower2016-11-071-10/+1
|\ \ \ \ \ | |/ / / /
| * | | | Closes #27781: Removes special cases for the experimental aspect of PEP 529Steve Dower2016-11-071-10/+1
| | | | |
| * | | | Issue 28128: Print out better error/warning messages for invalid string ↵Eric V. Smith2016-10-311-6/+32
| | | | | | | | | | | | | | | | | | | | escapes. Backport to 3.6.
* | | | | Issue 28128: Print out better error/warning messages for invalid string escapes.Eric V. Smith2016-10-311-6/+32
| | | | |
* | | | | Issue #28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(),Serhiy Storchaka2016-10-271-0/+21
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and PyUnicode_AsEncodedUnicode().
| * | | | Issue #28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(),Serhiy Storchaka2016-10-271-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and PyUnicode_AsEncodedUnicode().
* | | | | Issue #28408: Fixed a leak and remove redundant code in ↵Serhiy Storchaka2016-10-251-18/+12
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | _PyUnicodeWriter_Finish(). Patch by Xiang Zhang.
| * | | | Issue #28408: Fixed a leak and remove redundant code in ↵Serhiy Storchaka2016-10-251-18/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _PyUnicodeWriter_Finish(). Patch by Xiang Zhang.
* | | | | Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug ↵Serhiy Storchaka2016-10-251-10/+2
|\ \ \ \ \ | |/ / / / | | | | | | | | | | build.
| * | | | Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug ↵Serhiy Storchaka2016-10-251-10/+2
| |\ \ \ \ | | |/ / / | | | | | | | | | | build.
| | * | | Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug ↵Serhiy Storchaka2016-10-251-10/+2
| | |\ \ \ | | | |/ / | | | | | | | | | | build.
| | | * | Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug ↵Serhiy Storchaka2016-10-251-10/+2
| | | | | | | | | | | | | | | | | | | | build.
* | | | | Issue #28439: Remove redundant checks in PyUnicode_EncodeLocale andSerhiy Storchaka2016-10-231-27/+20
| | | | | | | | | | | | | | | | | | | | PyUnicode_DecodeLocaleAndSize. Patch by Xiang Zhang.
* | | | | Issue #28511: Use the "U" format instead of "O!" in PyArg_Parse*.Serhiy Storchaka2016-10-231-3/+3
| | | | |
* | | | | Issue #28504: Cleanup unicode_decode_call_errorhandler_wchar/writer.Serhiy Storchaka2016-10-221-16/+8
| | | | | | | | | | | | | | | | | | | | Patch by Xiang Zhang.
* | | | | Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raisingSerhiy Storchaka2016-10-211-5/+2
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new exception with setting current exception as __cause__. _PyErr_FormatFromCause(exception, format, args...) is equivalent to Python raise exception(format % args) from sys.exc_info()[1]
| * | | | Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raisingSerhiy Storchaka2016-10-211-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new exception with setting current exception as __cause__. _PyErr_FormatFromCause(exception, format, args...) is equivalent to Python raise exception(format % args) from sys.exc_info()[1]
* | | | | merge 3.6 (#28454)Benjamin Peterson2016-10-161-4/+4
|\ \ \ \ \ | |/ / / /
| * | | | merge 3.5 (#28454)Benjamin Peterson2016-10-161-4/+4
| |\ \ \ \ | | |/ / /
| | * | | remove extra PyErr_Format arguments (closes #28454)Benjamin Peterson2016-10-161-4/+4
| | | | | | | | | | | | | | | | | | | | Patch from Xiang Zhang.
* | | | | Merge 3.6Victor Stinner2016-10-121-3/+3
|\ \ \ \ \ | |/ / / /
| * | | | Fix _Py_normalize_encoding() commandVictor Stinner2016-10-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | It's not exactly the same than encodings.normalize_encoding(): the C function also converts to lowercase.