summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Optimize unicode_subtype_new(): don't encode to wchar_t and decode from wchar_tVictor Stinner2011-10-012-46/+84
| | | | Rewrite unicode_subtype_new(): allocate directly the right type.
* Add _PyUnicode_UTF8() and _PyUnicode_UTF8_LENGTH() macrosVictor Stinner2011-10-011-41/+54
| | | | | | * Rename existing _PyUnicode_UTF8() macro to PyUnicode_UTF8() * Rename existing _PyUnicode_UTF8_LENGTH() macro to PyUnicode_UTF8_LENGTH() * PyUnicode_UTF8() and PyUnicode_UTF8_LENGTH() are more strict
* Backout of changeset 228fd2bd83a5 by Nadeem Vawda in branch 'default':Antoine Pitrou2011-10-011-1/+1
| | | | Issue #12804: Prevent "make test" from using network resources.
* Issue 13085: Fix some memory leaks. Patch by Stefan Krah.Martin v. Löwis2011-10-012-11/+20
|
* merge headsBenjamin Peterson2011-10-012-3/+8
|\
| * PyUnicode_Substring() now accepts end bigger than string lengthVictor Stinner2011-10-011-3/+6
| | | | | | | | Fix also a bug: call PyUnicode_READY() before reading string length.
| * _PyUnicode_AsKind() is *not* part of the stable ABIVictor Stinner2011-10-011-0/+2
| |
* | remove reference to non-existent fileBenjamin Peterson2011-10-011-2/+1
|/
* remove "fast-path" for (i)adding stringsBenjamin Peterson2011-10-012-8/+14
| | | | | | These were just an artifact of the old unicode concatenation hack and likely just penalized other kinds of adding. Also, this fixes __(i)add__ on string subclasses.
* Ooops, avoid a division by zero in unicode_repeat()Victor Stinner2011-10-011-1/+1
|
* PyUnicode_FromObject() ensures that its output is a ready stringVictor Stinner2011-10-011-0/+2
|
* I want a super fast 'a' * n!Victor Stinner2011-10-011-15/+10
| | | | | | | * Optimize unicode_repeat() for a special case with memset() * Simplify integer overflow checking; remove the second check because PyUnicode_New() already does it and uses a smaller limit (Py_ssize_t vs size_t)
* PyUnicode_CHARACTER_SIZE(): add a reference to PyUnicode_KIND_SIZE()Victor Stinner2011-10-011-2/+5
|
* Fix usage of PyUnicode_READY in unicodeobject.cVictor Stinner2011-10-011-19/+12
|
* Remove private substring() function, reuse public PyUnicode_Substring()Victor Stinner2011-09-301-62/+22
| | | | | * PyUnicode_Substring() now fails if start or end is invalid * PyUnicode_Substring() reuses PyUnicode_Copy() for non-exact strings
* Optimize PyUnicode_Copy(): don't recompute maximum characterVictor Stinner2011-09-301-3/+28
|
* Remove commented code: str+=str is no more super-optimizedVictor Stinner2011-09-301-112/+6
|
* PyUnicode_FromObject() reuses PyUnicode_Copy()Victor Stinner2011-09-301-4/+2
| | | | | * PyUnicode_Copy() is faster than substring() * Fix also a compiler warning
* pyexat uses the new Unicode APIVictor Stinner2011-09-301-5/+7
|
* Fix ResourceWarnings in makeunicodedata.py.Ezio Melotti2011-09-301-81/+88
|
* Add PyUnicode_Copy() function, include it to the public APIVictor Stinner2011-09-303-21/+27
|
* PyUnicode_CopyCharacters() uses exceptions instead of assertionsVictor Stinner2011-09-301-2/+4
| | | | Call PyErr_BadInternalCall() if inputs are not unicode strings.
* Fix a compiler warningVictor Stinner2011-09-291-1/+1
|
* Fix array.array('u') constructorVictor Stinner2011-09-291-6/+12
|
* posix module catches PyUnicode_AsUnicode() failureVictor Stinner2011-09-291-96/+167
| | | | | | * Replace PyUnicode_AS_UNICODE by PyUnicode_AsUnicode, PyUnicode_AS_UNICODE is no more a real macro * Replace Py_UNICODE by wchar_t in code specific to Windows
* array module uses the new Unicode APIVictor Stinner2011-09-292-35/+36
| | | | | * Use Py_UCS4* buffer instead of Py_UNICODE* * Use "I" or "L" format, instead of "u" format
* array module stores the typecode in a char, instead of Py_UNICODEVictor Stinner2011-09-291-19/+16
|
* raw_unicode_escape() uses the new Unicode APIVictor Stinner2011-09-291-46/+21
|
* Strip trailing spaces of _pickle.cVictor Stinner2011-09-291-17/+17
|
* PyLocale_strxfrm() uses the new Unicode APIVictor Stinner2011-09-291-24/+15
|
* fileio_init() checks for failure on conversion to Py_UNICODE*Victor Stinner2011-09-291-4/+6
|
* Fix test_codeccallbacks for Windows: check size of wchar_t, not sys.maxunicodeVictor Stinner2011-09-291-4/+6
|
* Fix test_codecs for Windows: check size of wchar_t, not sys.maxunicodeVictor Stinner2011-09-291-41/+44
|
* Merge.Charles-François Natali2011-09-292-40/+32
|\
| * _PyUnicode_Ready() cannot be used on ready strings anymoreVictor Stinner2011-09-292-30/+24
| | | | | | | | | | | | * Change its prototype: PyObject* instead of PyUnicodeoObject*. * Remove an old assertion, the result of PyUnicode_READY (_PyUnicode_Ready) must be checked instead
| * Move _PyUnicode_UTF8() and _PyUnicode_UTF8_LENGTH() outside unicodeobject.hVictor Stinner2011-09-292-10/+8
| | | | | | | | Move these macros to unicodeobject.c
* | Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by ThomasCharles-François Natali2011-09-293-0/+5
|\ \ | |/ |/| | | Jarosch.
| * Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by ThomasCharles-François Natali2011-09-293-0/+5
| | | | | | | | Jarosch.
* | Add a note in PyUnicode_CopyCharacters() doc: it doesn't write null characterVictor Stinner2011-09-292-44/+47
| | | | | | | | Cleanup also the code (avoid the goto).
* | Re-enable test.Martin v. Löwis2011-09-291-4/+1
| |
* | Port normalization to new API.Martin v. Löwis2011-09-291-71/+119
| |
* | Rename Py_BUILD_ASSERT to Py_BUILD_ASSERT_EXPRVictor Stinner2011-09-291-6/+5
| | | | | | | | | | To make it clearer that Py_BUILD_ASSERT_EXPR(cond) cannot be used as assert(cond).
* | pymacro.h: Inline _Py_ARRAY_LENGTH_CHECK() and add http://ccodearchive.net/Victor Stinner2011-09-291-13/+12
| |
* | Merge heads.Ezio Melotti2011-09-291-21/+42
|\ \
| * | Update and reorganize the whatsnew entry for PEP 393.Ezio Melotti2011-09-291-21/+42
| | |
* | | Fix hex_digit_to_int() prototype: expect Py_UCS4, not Py_UNICODEVictor Stinner2011-09-292-4/+4
| | |
* | | modsupport.c reuses Py_UNICODE_strlen()Victor Stinner2011-09-291-10/+1
| | |
* | | _io.textio: fix character type, use Py_UCS4 instead of Py_UNICODEVictor Stinner2011-09-291-3/+3
| | |
* | | _sre: don't use Py_UNICODE anymoreVictor Stinner2011-09-291-9/+7
|/ / | | | | | | | | | | * Downcasting from Py_UCS4 to Py_UNICODE is wrong is Py_UNICODE is 16-bit wchar_t * Remove old special case in getstring(), unicode is now handled separetely
* | Remove now useless redefinition of chr/ord for narrow builds in ↵Ezio Melotti2011-09-291-15/+0
| | | | | | | | test_multibytecodec_support.py.