summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #14687: Avoid an useless duplicated string in PyUnicode_Format()Victor Stinner2012-04-301-11/+7
|
* Issue #14687: Cleanup PyUnicode_Format()Victor Stinner2012-04-301-54/+28
|
* Fix my previous commit: bool is a long, restore the specical case for boolVictor Stinner2012-04-271-1/+4
|
* Simplify and optimize formatlong()Victor Stinner2012-04-271-7/+128
| | | | | | | * Remove _PyBytes_FormatLong(): inline it into formatlong() * the input type is always a long, so remove the code for bool * don't duplicate the string if the length does not change * Use PyUnicode_DATA() instead of _PyUnicode_AsString()
* Optimize _PyUnicode_FindMaxChar() find pure ASCII stringsVictor Stinner2012-04-271-0/+3
|
* Check newly created consistency using _PyUnicode_CheckConsistency(str, 1)Victor Stinner2012-04-271-10/+17
| | | | | | * In debug mode, fill the string data with invalid characters * Simplify also reference counting in PyCodec_BackslashReplaceErrors() and PyCodec_XMLCharRefReplaceError()
* _PyUnicode_CheckConsistency() ensures that the unicode string ends with aVictor Stinner2012-04-251-2/+6
| | | | null character
* make pointer arith c89Benjamin Peterson2012-04-241-2/+2
|
* use correct base ptrBenjamin Peterson2012-04-231-1/+2
|
* simplify and reformatBenjamin Peterson2012-04-231-9/+11
|
* Close #14648: Compute correctly maxchar in str.format() for substrinVictor Stinner2012-04-231-0/+31
|
* merge 3.2 (#14509)Benjamin Peterson2012-04-091-0/+2
|\
| * merge 3.1 (#14509)Benjamin Peterson2012-04-091-0/+2
| |\
| | * fix build without Py_DEBUG and DNDEBUG (closes #14509)Benjamin Peterson2012-04-091-0/+2
| | |
* | | Close #14249: Use bit shifts instead of an union, it's more efficient.Victor Stinner2012-04-051-27/+34
| | | | | | | | | | | | Patch written by Serhiy Storchaka
* | | Close #14249: Use an union instead of a long to short pointer to avoid aliasingVictor Stinner2012-04-051-19/+25
| | | | | | | | | | | | issue. Speed up UTF-16 by 20%.
* | | Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in ↵Antoine Pitrou2012-04-041-2/+2
| | | | | | | | | | | | the stable ABI.
* | | Issue #14288: Serialization support for builtin iterators.Kristján Valur Jónsson2012-04-031-0/+34
| | |
* | | grammarBenjamin Peterson2012-03-261-1/+1
| | |
* | | merge 3.2Benjamin Peterson2012-03-261-4/+0
|\ \ \ | |/ /
| * | kill this terribly outdated commentBenjamin Peterson2012-03-261-4/+0
| | |
* | | Remove an unused variableVictor Stinner2012-03-061-1/+0
| | |
* | | Close #14085: remove assertions from PyUnicode_WRITE macroVictor Stinner2012-03-041-1/+10
| | | | | | | | | | | | | | | Add checks in PyUnicode_WriteChar() and convert PyUnicode_New() assertion to a test raising a Python exception.
* | | #14081: The sep and maxsplit parameter to str.split, bytes.split, and ↵Ezio Melotti2012-02-261-8/+12
| | | | | | | | | | | | bytearray.split may now be passed as keyword arguments.
* | | Oops, revert unwanted changesVictor Stinner2012-02-241-18/+6
| | |
* | | Issue #14107: fix bigmem tests on str.capitalize(), str.swapcase() andVictor Stinner2012-02-241-6/+18
| | | | | | | | | | | | | | | str.title(). Compute correctly how much memory is required for the test (memuse).
* | | Fix compilation error under Windows (and warnings too).Antoine Pitrou2012-02-241-9/+9
| | |
* | | Issue #13706: Fix format(float, "n") for locale with non-ASCII decimal point ↵Victor Stinner2012-02-241-5/+16
| | | | | | | | | | | | (e.g. ps_aF)
* | | Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separatorVictor Stinner2012-02-231-17/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Decode thousands separator and decimal point using PyUnicode_DecodeLocale() (from the locale encoding), instead of decoding them implicitly from latin1 * Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used * Change _PyUnicode_InsertThousandsGrouping() API to return the maximum character if unicode is NULL * Replace MIN/MAX macros by Py_MIN/Py_MAX * stringlib/undef.h undefines STRINGLIB_IS_UNICODE * stringlib/localeutil.h only supports Unicode
* | | Fix doc of an internal function: unicode_write_cstr()Victor Stinner2012-02-221-2/+3
| | |
* | | Fix compile failure under WindowsAntoine Pitrou2012-02-221-1/+1
| | |
* | | Optimize str%arg for number formats: %i, %d, %u, %x, %pVictor Stinner2012-02-221-4/+52
| | | | | | | | | | | | | | | Write a specialized function to write an ASCII/latin1 C char* string into a Python Unicode string.
* | | Micro-optimize computation of maxchar in PyUnicode_TransformDecimalToASCII()Victor Stinner2012-02-221-2/+2
| | |
* | | Micro-optimize unicode_expandtabs(): use FILL() macro to write N spacesVictor Stinner2012-02-221-5/+2
| | |
* | | PyUnicode_New() and unicode_putchar() check for MAX_UNICODE maximum (U+10FFFF)Victor Stinner2012-02-221-0/+2
| | |
* | | merge 3.2Benjamin Peterson2012-02-211-0/+1
|\ \ \ | |/ /
| * | merge 3.2Benjamin Peterson2012-02-211-0/+1
| |\ \ | | |/
| | * ensure no one tries to hash things before the random seed is foundBenjamin Peterson2012-02-211-0/+1
| | |
* | | Forgot the "empty string -> hash == 0" special case for strings.Georg Brandl2012-02-201-0/+8
| | |
* | | Merge 3.2: Issue #13703 plus some related test suite fixes.Georg Brandl2012-02-201-5/+7
|\ \ \ | |/ /
| * | Merge from 3.1: Issue #13703: add a way to randomize the hash values of ↵Georg Brandl2012-02-201-1/+11
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | basic types (str, bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
| | * Issue #13703: add a way to randomize the hash values of basic types (str, ↵Georg Brandl2012-02-201-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | bytes, datetime) in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated. The environment variable PYTHONHASHSEED and the new command line flag -R control this behavior.
* | | (Merge 3.2) Issue #13913: normalize utf-8 codec name in UTF-8 decoderVictor Stinner2012-02-141-1/+1
|\ \ \ | |/ /
| * | Issue #13913: normalize utf-8 codec name in UTF-8 decoderVictor Stinner2012-02-141-1/+1
| | |
* | | Backout d2c1521ad0a1: _Py_IDENTIFIER() uses UTF-8 againVictor Stinner2012-02-071-2/+3
| | |
* | | _Py_Identifier are always ASCII stringsVictor Stinner2012-02-051-3/+2
| | |
* | | Issue #13848: open() and the FileIO constructor now check for NUL characters ↵Antoine Pitrou2012-01-291-0/+13
|\ \ \ | |/ / | | | | | | | | | | | | in the file name. Patch by Hynek Schlawack.
| * | Issue #13848: open() and the FileIO constructor now check for NUL characters ↵Antoine Pitrou2012-01-291-0/+13
| | | | | | | | | | | | | | | | | | in the file name. Patch by Hynek Schlawack.
* | | don't ready in case_operation, since most callers do it themselvesBenjamin Peterson2012-01-161-2/+5
| | |
* | | Consolidate the occurrances of the prime used as the multiplier when hashing.Gregory P. Smith2012-01-141-1/+1
|\ \ \ | |/ /