summaryrefslogtreecommitdiffstats
path: root/Include/unicodeobject.h
Commit message (Collapse)AuthorAgeFilesLines
* [3.6] bpo-13617: Reject embedded null characters in wchar* strings. ↵Serhiy Storchaka2017-06-281-3/+7
| | | | | | | | | | (GH-2302) (#2462) Based on patch by Victor Stinner. Add private C API function _PyUnicode_AsUnicode() which is similar to PyUnicode_AsUnicode(), but checks for null characters.. (cherry picked from commit f7eae0adfcd4c50034281b2c69f461b43b68db84)
* [3.6] bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). ↵Serhiy Storchaka2017-06-271-0/+6
| | | | | | | (GH-2285) (#2443) Raise a ValueError if the second argument is NULL and the wchar_t\* string contains null characters.. (cherry picked from commit e613e6add5f07ff6aad5802924596b631b707d2a)
* bpo-29941: Assert fixes (#886) (#955)T. Wouters2017-04-021-0/+4
| | | | | | | | | | Make a non-Py_DEBUG, asserts-enabled build of CPython possible. This means making sure helper functions are defined when NDEBUG is not defined, not just when Py_DEBUG is defined. Also fix a division-by-zero in obmalloc.c that went unnoticed because in Py_DEBUG mode, elsize is never zero. (cherry picked from commit a00c3fd12d421e41b769debd7df717d17b0deed5 and 06bb4873d6a9ac303701d08a851d6cd9a51e02a3)
* bpo-28749: Fixed the documentation of the mapping codec APIs. (#487) (#714)Serhiy Storchaka2017-03-191-27/+18
| | | | Added the documentation for PyUnicode_Translate(). (cherry picked from commit c85a26628ceb9624c96c3064e8b99033c026d8a3)
* Issue #29058: All stable API extensions added after Python 3.2 are nowSerhiy Storchaka2016-12-271-0/+18
| | | | | available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of the minimum Python version supporting this API.
* Issue #29009: Merge 3.5.Xiang Zhang2016-12-191-4/+0
|\
| * Issue #29009: Remove outdated doc of PyUnicode_RichCompare.Xiang Zhang2016-12-191-4/+0
| |
* | Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.Serhiy Storchaka2016-12-051-1/+1
|\ \ | |/
| * Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.Serhiy Storchaka2016-12-051-1/+1
| |
* | Issue #28701: _PyUnicode_EqualToASCIIId and _PyUnicode_EqualToASCIIString nowSerhiy Storchaka2016-11-161-2/+2
| | | | | | | | require ASCII right argument and assert this condition in debug build.
* | 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/+19
|\ \ | |/ | | | | | | | | 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/+19
| | | | | | | | | | | | 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/+11
|\ \ | |/ | | | | | | | | _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/+11
| | | | | | | | | | | | _PyUnicode_EqualToASCIIString. The latter function is more readable, faster and doesn't raise exceptions.
* | Issue 28128: Print out better error/warning messages for invalid string ↵Eric V. Smith2016-10-311-0/+11
| | | | | | | | escapes. Backport to 3.6.
* | Issue #28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(),Serhiy Storchaka2016-10-271-8/+25
| | | | | | | | | | PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and PyUnicode_AsEncodedUnicode().
* | Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4().Serhiy Storchaka2016-10-021-1/+1
|\ \ | |/ | | | | Original patch by Xiang Zhang.
| * Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4().Serhiy Storchaka2016-10-021-1/+1
| | | | | | | | Original patch by Xiang Zhang.
* | Issue #28139: Merge indentation fixes from 3.5 into 3.6Martin Panter2016-09-171-1/+1
|\ \ | |/
| * Issue #28139: Fix messed up indentationMartin Panter2016-09-171-1/+1
| | | | | | | | | | Also update the classmethod and staticmethod doc strings and comments to match the RST documentation.
* | Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly ↵Christian Heimes2016-09-131-1/+1
| | | | | | | | optimize memcpy().
* | Issue #26900: Excluded underscored names and other private API from limited API.Serhiy Storchaka2016-09-111-0/+2
| |
* | simplify Py_UCSN definitions with stdint typesBenjamin Peterson2016-09-081-15/+3
| |
* | Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)Steve Dower2016-09-081-6/+2
| |
* | Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec ↵Steve Dower2016-09-071-1/+1
| | | | | | | | lookup
* | Issue #27078: Added BUILD_STRING opcode. Optimized f-strings evaluation.Serhiy Storchaka2016-09-061-0/+8
| |
* | Merge spelling and grammar fixes from 3.5Martin Panter2016-08-051-1/+1
|\ \ | |/
| * Fix spelling and grammar in documentation and code commentsMartin Panter2016-08-041-1/+1
| |
* | Issue #26778: Fixed "a/an/and" typos in code comment, documentation and errorSerhiy Storchaka2016-04-171-1/+1
|\ \ | |/ | | | | messages.
| * Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
| |
* | Issue #15984: Merge PyUnicode doc from 3.5Martin Panter2016-04-151-18/+10
|\ \ | |/
| * Issue #15984: Correct PyUnicode_FromObject() and _FromEncodedObject() docsMartin Panter2016-04-151-16/+8
| |
| * Correct “an” → “a” with “Unicode”, “user”, “UTF”, etcMartin Panter2016-04-151-4/+4
| | | | | | | | This affects documentation, code comments, and a debugging messages.
* | Merge typo fixes from 3.5Martin Panter2016-04-051-1/+1
|\ \ | |/
| * Fix typos in documentation and commentsMartin Panter2016-04-051-1/+1
| |
* | Issue #25523: Merge a-to-an corrections from 3.5.Serhiy Storchaka2015-11-021-2/+2
|\ \ | |/
| * Issue #25523: Merge a-to-an corrections from 3.4.Serhiy Storchaka2015-11-021-2/+2
| |\
| | * Issue #25523: Further a-to-an corrections.Serhiy Storchaka2015-11-021-2/+2
| | |
* | | Issue #25318: Add _PyBytesWriter APIVictor Stinner2015-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new private API to optimize Unicode encoders. It uses a small buffer allocated on the stack and supports overallocation. Use _PyBytesWriter API for UCS1 (ASCII and Latin1) and UTF-8 encoders. Enable overallocation for the UTF-8 encoder with error handlers. unicode_encode_ucs1(): initialize collend to collstart+1 to not check the current character twice, we already know that it is not ASCII.
* | | Issue #24870: Add _PyUnicodeWriter_PrepareKind() macroVictor Stinner2015-09-211-0/+17
| | | | | | | | | | | | Add a macro which ensures that the writer has at least the requested kind.
* | | Make the unicode equality test an external function rather than in-lining it.Raymond Hettinger2015-07-041-0/+4
|/ / | | | | | | | | | | | | | | The real benefit of the unicode specialized function comes from bypassing the overhead of PyObject_RichCompareBool() and not from being in-lined (especially since there was almost no shared data between the caller and callee). Also, the in-lining was having a negative effect on code generation for the callee.
* | Issue #23908: os functions now reject paths with embedded null characterSerhiy Storchaka2015-04-201-6/+0
|\ \ | |/ | | | | | | | | on Windows instead of silently truncate them. Removed no longer used _PyUnicode_HasNULChars().
* | Merge 3.4 (typo)Victor Stinner2015-02-111-1/+1
|\ \ | |/
| * Fix typo: PyMem_Alloc => PyMem_MallocVictor Stinner2015-02-111-1/+1
| |
* | Issue20284: Implement PEP461Ethan Furman2015-01-241-0/+2
|/
* fix instances of consecutive articles (closes #23221)Benjamin Peterson2015-01-131-1/+1
| | | | Patch by Karan Goel.
* Issue #22581: Use more "bytes-like object" throughout the docs and comments.Serhiy Storchaka2014-12-051-1/+1
|
* Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by Andreas ↵Antoine Pitrou2014-03-231-0/+3
| | | | Schwab.
* Issue #19526: Exclude all new API from the stable ABI.Martin v. Löwis2014-01-031-0/+2
|