Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | PyUnicode_FromWideChar() and PyUnicode_FromUnicode() raise a ValueError if a | Victor Stinner | 2011-12-08 | 1 | -33/+34 |
| | | | | character in not in range [U+0000; U+10ffff]. | ||||
* | Issue #13503: Use a more efficient reduction format for bytearrays with | Antoine Pitrou | 2011-12-05 | 1 | -10/+42 |
| | | | | | | | pickle protocol >= 3. The old reduction format is kept with older protocols in order to allow unpickling under Python 2. Patch by Irmen de Jong. | ||||
* | Fix PyObject_Repr(): don't call PyUnicode_READY() if res is NULL | Victor Stinner | 2011-12-01 | 1 | -1/+3 |
| | |||||
* | Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0) | Victor Stinner | 2011-12-01 | 1 | -1/+1 |
| | | | | Create an empty string with the new Unicode API. | ||||
* | PyObject_Repr() ensures that the result is a ready Unicode string | Victor Stinner | 2011-12-01 | 1 | -0/+8 |
| | | | | | And PyObject_Str() and PyObject_Repr() don't make strings ready in debug mode to ensure that the caller makes the string ready before using it. | ||||
* | Py_UNICODE_HIGH_SURROGATE() and Py_UNICODE_LOW_SURROGATE() macros | Victor Stinner | 2011-11-29 | 1 | -26/+19 |
| | | | | And use surrogates macros everywhere in unicodeobject.c | ||||
* | Merge heads | Antoine Pitrou | 2011-11-26 | 3 | -118/+113 |
|\ | |||||
| * | Close #13093: PyUnicode_EncodeDecimal() doesn't support error handlers | Victor Stinner | 2011-11-25 | 1 | -113/+18 |
| | | | | | | | | | | different than "strict" anymore. The caller was unable to compute the size of the output buffer: it depends on the error handler. | ||||
| * | PEP 3155 / issue #13448: Qualified name for classes and functions. | Antoine Pitrou | 2011-11-25 | 2 | -5/+95 |
| | | |||||
* | | Better resolution for issue #11849: Ensure that free()d memory arenas are ↵ | Antoine Pitrou | 2011-11-26 | 1 | -15/+22 |
|/ | | | | | | really released on POSIX systems supporting anonymous memory mappings. Patch by Charles-François Natali. | ||||
* | and back to the "magic" formula (with a comment) it is | Benjamin Peterson | 2011-11-23 | 1 | -15/+3 |
| | |||||
* | cave to those who like readable code | Benjamin Peterson | 2011-11-23 | 1 | -1/+15 |
| | |||||
* | fix compiler warning by implementing this more cleverly | Benjamin Peterson | 2011-11-22 | 1 | -6/+1 |
| | |||||
* | find_maxchar_surrogates() reuses surrogate macros | Victor Stinner | 2011-11-22 | 1 | -4/+4 |
| | |||||
* | Issue #13441: Disable temporary the check on the maximum character until | Victor Stinner | 2011-11-22 | 1 | -20/+12 |
| | | | | | | | | | | the Solaris issue is solved. But add assertion on the maximum character in various encoders: UTF-7, UTF-8, wide character (wchar_t*, Py_UNICODE*), unicode-escape, raw-unicode-escape. Fix also unicode_encode_ucs1() for backslashreplace error handler: Python is now always "wide". | ||||
* | Fix compiler warnings | Victor Stinner | 2011-11-22 | 1 | -1/+2 |
| | |||||
* | Use the new Unicode API | Victor Stinner | 2011-11-22 | 1 | -1/+1 |
| | | | | | | | | * Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0) * Replce PyUnicode_FromUnicode(str, len) by PyUnicode_FromWideChar(str, len) * Replace Py_UNICODE by wchar_t * posix_putenv() uses PyUnicode_FromFormat() to create the string, instead of PyUnicode_FromUnicode() + _snwprintf() | ||||
* | (Merge 3.2) Issue #13093: Fix error handling on PyUnicode_EncodeDecimal() | Victor Stinner | 2011-11-22 | 1 | -4/+8 |
| | |||||
* | PyUnicode_FromKindAndData() fails with a ValueError if size < 0 | Victor Stinner | 2011-11-22 | 1 | -1/+4 |
| | |||||
* | UTF-8 decoder: set consumed value in the latin1 fast-path | Victor Stinner | 2011-11-22 | 1 | -0/+3 |
| | |||||
* | Replace _PyUnicode_READY_REPLACE() and _PyUnicode_ReadyReplace() with ↵ | Victor Stinner | 2011-11-22 | 1 | -143/+150 |
| | | | | | | | | | | unicode_ready() * unicode_ready() has a simpler API * try to reuse unicode_empty and latin1_char singleton everywhere * Fix a reference leak in _PyUnicode_TranslateCharmap() * PyUnicode_InternInPlace() doesn't try to get a singleton anymore, to avoid having to handle a failure | ||||
* | Rewrite PyUnicode_TransformDecimalToASCII() to use the new Unicode API | Victor Stinner | 2011-11-21 | 1 | -17/+26 |
| | |||||
* | Remove an unused variable from PyUnicode_Copy() | Victor Stinner | 2011-11-21 | 1 | -2/+0 |
| | |||||
* | Simplify PyUnicode_Copy() | Victor Stinner | 2011-11-21 | 1 | -26/+7 |
| | | | | USe PyUnicode_Copy() in fixup() | ||||
* | Fix a compiler warning in _PyUnicode_CheckConsistency() | Victor Stinner | 2011-11-21 | 1 | -1/+1 |
| | |||||
* | Rewrite PyUnicode_EncodeDecimal() to use the new Unicode API | Victor Stinner | 2011-11-21 | 1 | -44/+53 |
| | | | | | Add tests for PyUnicode_EncodeDecimal() and PyUnicode_TransformDecimalToASCII(). | ||||
* | Issue #13411: memoryview objects are now hashable when the underlying object ↵ | Antoine Pitrou | 2011-11-21 | 3 | -17/+53 |
| | | | | is hashable. | ||||
* | Issue #13417: speed up utf-8 decoding by around 2x for the non-fully-ASCII case. | Antoine Pitrou | 2011-11-21 | 2 | -107/+277 |
| | | | | | This almost catches up with pre-PEP 393 performance, when decoding needed only one pass. | ||||
* | Issue #13441: _PyUnicode_CheckConsistency() dumps the string if the maximum | Victor Stinner | 2011-11-21 | 1 | -0/+13 |
| | | | | | | | character is bigger than U+10FFFF and locale.localeconv() dumps the string before decoding it. Temporary hack to debug the issue #13441. | ||||
* | Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH() | Victor Stinner | 2011-11-21 | 3 | -5/+5 |
| | | | | And PyUnicode_GetSize() => PyUnicode_GetLength() | ||||
* | UnicodeTranslateError uses the new Unicode API | Victor Stinner | 2011-11-21 | 1 | -3/+3 |
| | | | | The index is a character index, not a index in a Py_UNICODE* string. | ||||
* | UnicodeEncodeError uses the new Unicode API | Victor Stinner | 2011-11-20 | 1 | -3/+3 |
| | | | | The index is a character index, not a index in a Py_UNICODE* string. | ||||
* | PyObject_Str() ensures that the result string is ready | Victor Stinner | 2011-11-20 | 2 | -2/+5 |
| | | | | | | | and check the string consistency. _PyUnicode_CheckConsistency() doesn't check the hash anymore. It should be possible to call this function even if hash(str) was already called. | ||||
* | stringlib: remove unused STRINGLIB_FILL | Victor Stinner | 2011-11-20 | 6 | -6/+0 |
| | |||||
* | PyUnicode_AsUTF32String() calls directly _PyUnicode_EncodeUTF32(), | Victor Stinner | 2011-11-20 | 1 | -6/+1 |
| | | | | instead of calling the deprecated PyUnicode_EncodeUTF32() function | ||||
* | _PyUnicode_CheckConsistency() also checks maxchar maximum value, | Victor Stinner | 2011-11-20 | 1 | -3/+9 |
| | | | | not only its minimum value | ||||
* | Remove the two ugly and unused WRITE_ASCII_OR_WSTR and WRITE_WSTR macros | Victor Stinner | 2011-11-20 | 1 | -18/+0 |
| | |||||
* | Reuse surrogate macros in UTF-16 decoder | Victor Stinner | 2011-11-20 | 1 | -5/+4 |
| | |||||
* | charmap_encoding_error() uses the new Unicode API | Victor Stinner | 2011-11-20 | 1 | -3/+13 |
| | |||||
* | Use PyUnicode_EncodeCodePage() instead of PyUnicode_EncodeMBCS() with | Victor Stinner | 2011-11-20 | 1 | -16/+3 |
| | | | | PyUnicode_AsUnicodeAndSize() | ||||
* | charmap encoders uses Py_UCS4, not Py_UNICODE | Victor Stinner | 2011-11-20 | 1 | -7/+4 |
| | |||||
* | Issue #10227: Add an allocation cache for a single slice object. | Antoine Pitrou | 2011-11-18 | 1 | -7/+29 |
| | | | | Patch by Stefan Behnel. | ||||
* | Catch PyUnicode_AS_UNICODE() errors | Victor Stinner | 2011-11-16 | 1 | -11/+22 |
| | |||||
* | #13406: silence deprecation warnings in test_codecs. | Ezio Melotti | 2011-11-16 | 1 | -1/+1 |
| | |||||
* | Issue #13333: The UTF-7 decoder now accepts lone surrogates | Antoine Pitrou | 2011-11-15 | 1 | -9/+7 |
|\ | | | | | | | (the encoder already accepts them). | ||||
| * | Issue #13333: The UTF-7 decoder now accepts lone surrogates | Antoine Pitrou | 2011-11-15 | 1 | -9/+5 |
| | | | | | | | | (the encoder already accepts them). | ||||
* | | Issue #13389: Full garbage collection passes now clear the freelists for | Antoine Pitrou | 2011-11-14 | 2 | -6/+20 |
| | | | | | | | | | | list and dict objects. They already cleared other freelists in the interpreter. | ||||
* | | Use the small object allocator for small bytearrays | Antoine Pitrou | 2011-11-12 | 1 | -5/+5 |
| | | |||||
* | | Sanitize reference management in the utf-8 encoder | Antoine Pitrou | 2011-11-12 | 1 | -5/+4 |
| | | |||||
* | | Issue #13161: fix doc strings of __i*__ operators. Closes #13161 | Eli Bendersky | 2011-11-11 | 1 | -10/+10 |
|\ \ | |/ |