Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Remove buggy assertion in PyUnicode_Substring() | Victor Stinner | 2012-05-03 | 1 | -2/+2 | |
| | | | | | | | | Use also directly unicode_empty, instead of PyUnicode_New(0,0). | |||||
* | | Fix PyUnicode_Substring() for start >= length and start > end | Victor Stinner | 2012-05-03 | 1 | -6/+8 | |
| | | | | | | | | | | Remove the fast-path for 1-character string: unicode_fromascii() and _PyUnicode_FromUCS*() now have their own fast-path for 1-character strings. | |||||
* | | Unicode: optimize creating of 1-character strings | Victor Stinner | 2012-05-03 | 1 | -8/+50 | |
| | | ||||||
* | | Issue #14687: Optimize str%tuple for the "%(name)s" syntax | Victor Stinner | 2012-05-02 | 1 | -2/+3 | |
| | | | | | | | | Avoid an useless and expensive call to PyUnicode_READ(). | |||||
* | | unicodeobject.c: Add MAX_MAXCHAR() macro to (micro-)optimize the computation | Victor Stinner | 2012-05-01 | 1 | -48/+49 | |
| | | | | | | | | | | | | | | | | of the second argument of PyUnicode_New(). * Create also align_maxchar() function * Optimize fix_decimal_and_space_to_ascii(): don't compute the maximum character when ch <= 127 (it is ASCII) | |||||
* | | Issue #14687: Cleanup PyUnicode_Format() | Victor Stinner | 2012-05-01 | 1 | -2/+4 | |
| | | ||||||
* | | Issue #14687: Optimize str%args | Victor Stinner | 2012-05-01 | 1 | -2/+2 | |
| | | | | | | | | | | | | | | | | | | * formatfloat() uses unicode_fromascii() instead of PyUnicode_DecodeASCII() to not have to check characters, we know that it is really ASCII * Use PyUnicode_FromOrdinal() instead of _PyUnicode_FromUCS4() to format a character: if avoids a call to ucs4lib_find_max_char() to compute the maximum character (whereas we already know it, it is just the character itself) | |||||
* | | Issue #14687: Avoid an useless duplicated string in PyUnicode_Format() | Victor Stinner | 2012-04-30 | 1 | -11/+7 | |
| | | ||||||
* | | Issue #14687: Cleanup PyUnicode_Format() | Victor Stinner | 2012-04-30 | 1 | -54/+28 | |
| | | ||||||
* | | Fix my previous commit: bool is a long, restore the specical case for bool | Victor Stinner | 2012-04-27 | 1 | -1/+4 | |
| | | ||||||
* | | Simplify and optimize formatlong() | Victor Stinner | 2012-04-27 | 1 | -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 strings | Victor Stinner | 2012-04-27 | 1 | -0/+3 | |
| | | ||||||
* | | Check newly created consistency using _PyUnicode_CheckConsistency(str, 1) | Victor Stinner | 2012-04-27 | 1 | -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 a | Victor Stinner | 2012-04-25 | 1 | -2/+6 | |
| | | | | | | | | null character | |||||
* | | make pointer arith c89 | Benjamin Peterson | 2012-04-24 | 1 | -2/+2 | |
| | | ||||||
* | | use correct base ptr | Benjamin Peterson | 2012-04-23 | 1 | -1/+2 | |
| | | ||||||
* | | simplify and reformat | Benjamin Peterson | 2012-04-23 | 1 | -9/+11 | |
| | | ||||||
* | | Close #14648: Compute correctly maxchar in str.format() for substrin | Victor Stinner | 2012-04-23 | 1 | -0/+31 | |
| | | ||||||
* | | merge 3.2 (#14509) | Benjamin Peterson | 2012-04-09 | 1 | -0/+2 | |
|\ \ | |/ | ||||||
| * | merge 3.1 (#14509) | Benjamin Peterson | 2012-04-09 | 1 | -0/+2 | |
| |\ | ||||||
| | * | fix build without Py_DEBUG and DNDEBUG (closes #14509) | Benjamin Peterson | 2012-04-09 | 1 | -0/+2 | |
| | | | ||||||
* | | | Close #14249: Use bit shifts instead of an union, it's more efficient. | Victor Stinner | 2012-04-05 | 1 | -27/+34 | |
| | | | | | | | | | | | | Patch written by Serhiy Storchaka | |||||
* | | | Close #14249: Use an union instead of a long to short pointer to avoid aliasing | Victor Stinner | 2012-04-05 | 1 | -19/+25 | |
| | | | | | | | | | | | | issue. Speed up UTF-16 by 20%. | |||||
* | | | Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in ↵ | Antoine Pitrou | 2012-04-04 | 1 | -2/+2 | |
| | | | | | | | | | | | | the stable ABI. | |||||
* | | | Issue #14288: Serialization support for builtin iterators. | Kristján Valur Jónsson | 2012-04-03 | 1 | -0/+34 | |
| | | | ||||||
* | | | grammar | Benjamin Peterson | 2012-03-26 | 1 | -1/+1 | |
| | | | ||||||
* | | | merge 3.2 | Benjamin Peterson | 2012-03-26 | 1 | -4/+0 | |
|\ \ \ | |/ / | ||||||
| * | | kill this terribly outdated comment | Benjamin Peterson | 2012-03-26 | 1 | -4/+0 | |
| | | | ||||||
* | | | Remove an unused variable | Victor Stinner | 2012-03-06 | 1 | -1/+0 | |
| | | | ||||||
* | | | Close #14085: remove assertions from PyUnicode_WRITE macro | Victor Stinner | 2012-03-04 | 1 | -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 Melotti | 2012-02-26 | 1 | -8/+12 | |
| | | | | | | | | | | | | bytearray.split may now be passed as keyword arguments. | |||||
* | | | Oops, revert unwanted changes | Victor Stinner | 2012-02-24 | 1 | -18/+6 | |
| | | | ||||||
* | | | Issue #14107: fix bigmem tests on str.capitalize(), str.swapcase() and | Victor Stinner | 2012-02-24 | 1 | -6/+18 | |
| | | | | | | | | | | | | | | | str.title(). Compute correctly how much memory is required for the test (memuse). | |||||
* | | | Fix compilation error under Windows (and warnings too). | Antoine Pitrou | 2012-02-24 | 1 | -9/+9 | |
| | | | ||||||
* | | | Issue #13706: Fix format(float, "n") for locale with non-ASCII decimal point ↵ | Victor Stinner | 2012-02-24 | 1 | -5/+16 | |
| | | | | | | | | | | | | (e.g. ps_aF) | |||||
* | | | Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separator | Victor Stinner | 2012-02-23 | 1 | -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 Stinner | 2012-02-22 | 1 | -2/+3 | |
| | | | ||||||
* | | | Fix compile failure under Windows | Antoine Pitrou | 2012-02-22 | 1 | -1/+1 | |
| | | | ||||||
* | | | Optimize str%arg for number formats: %i, %d, %u, %x, %p | Victor Stinner | 2012-02-22 | 1 | -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 Stinner | 2012-02-22 | 1 | -2/+2 | |
| | | | ||||||
* | | | Micro-optimize unicode_expandtabs(): use FILL() macro to write N spaces | Victor Stinner | 2012-02-22 | 1 | -5/+2 | |
| | | | ||||||
* | | | PyUnicode_New() and unicode_putchar() check for MAX_UNICODE maximum (U+10FFFF) | Victor Stinner | 2012-02-22 | 1 | -0/+2 | |
| | | | ||||||
* | | | merge 3.2 | Benjamin Peterson | 2012-02-21 | 1 | -0/+1 | |
|\ \ \ | |/ / | ||||||
| * | | merge 3.2 | Benjamin Peterson | 2012-02-21 | 1 | -0/+1 | |
| |\ \ | | |/ | ||||||
| | * | ensure no one tries to hash things before the random seed is found | Benjamin Peterson | 2012-02-21 | 1 | -0/+1 | |
| | | | ||||||
* | | | Forgot the "empty string -> hash == 0" special case for strings. | Georg Brandl | 2012-02-20 | 1 | -0/+8 | |
| | | | ||||||
* | | | Merge 3.2: Issue #13703 plus some related test suite fixes. | Georg Brandl | 2012-02-20 | 1 | -5/+7 | |
|\ \ \ | |/ / | ||||||
| * | | Merge from 3.1: Issue #13703: add a way to randomize the hash values of ↵ | Georg Brandl | 2012-02-20 | 1 | -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 Brandl | 2012-02-20 | 1 | -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 decoder | Victor Stinner | 2012-02-14 | 1 | -1/+1 | |
|\ \ \ | |/ / |