Commit Graph

3541 Commits

Author SHA1 Message Date
Martin v. Löwis
bd928fef42 Rename _Py_identifier to _Py_IDENTIFIER. 2011-10-14 10:20:37 +02:00
Victor Stinner
f5cff56a1b Issue #13088: Add shared Py_hexdigits constant to format a number into base 16 2011-10-14 02:13:11 +02:00
Victor Stinner
9d663d0788 convertsimple(): "str without bytes" => "str without characters" 2011-10-13 23:25:03 +02:00
Antoine Pitrou
5d6fbe8207 Instantiate the OS-related exception as soon as we raise it, so that
"except" works properly.
2011-10-12 19:39:57 +02:00
Antoine Pitrou
6b4883dec0 PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy. 2011-10-12 02:54:14 +02:00
Victor Stinner
8c9818980b Fix typo in import.c 2011-10-11 22:27:13 +02:00
Victor Stinner
c4f281eba3 Fix misuse of PyUnicode_GET_SIZE, use PyUnicode_GET_LENGTH instead 2011-10-11 22:11:42 +02:00
Victor Stinner
beac78bb24 Use PyUnicode_AsUnicodeAndSize() instead of PyUnicode_GET_SIZE() 2011-10-11 21:55:01 +02:00
Martin v. Löwis
1ee1b6fe0d Use identifier API for PyObject_GetAttrString. 2011-10-10 18:11:30 +02:00
Martin v. Löwis
afe55bba33 Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
2011-10-09 10:38:36 +02:00
Martin v. Löwis
c47adb04b3 Change PyUnicode_KIND to 1,2,4. Drop _KIND_SIZE and _CHARACTER_SIZE. 2011-10-07 20:55:35 +02:00
Victor Stinner
46084bad88 Fix find_module_path(): make the string ready 2011-10-06 02:39:42 +02:00
Victor Stinner
b62a7b268a Fix _warnings.c: make the filename string ready 2011-10-06 02:34:51 +02:00
Victor Stinner
fb9ea8c57e Don't check for the maximum character when copying from unicodeobject.c
* Create copy_characters() function which doesn't check for the maximum
   character in release mode
 * _PyUnicode_CheckConsistency() is no more static to be able to use it
   in _PyUnicode_FormatAdvanced() (in formatter_unicode.c)
 * _PyUnicode_CheckConsistency() checks the string hash
2011-10-06 01:45:57 +02:00
Victor Stinner
a336de7ae1 traceback: fix dump_ascii() for string with kind=PyUnicode_WCHAR_KIND 2011-10-05 22:44:12 +02:00
Victor Stinner
c3cec7868b Add asciilib: similar to ucs1, ucs2 and ucs4 library, but specialized to ASCII
ucs1, ucs2 and ucs4 libraries have to scan created substring to find the
maximum character, whereas it is not need to ASCII strings. Because ASCII
strings are common, it is useful to optimize ASCII.
2011-10-05 21:24:08 +02:00
Victor Stinner
e1335c711c Fix usage og PyUnicode_READY() 2011-10-04 20:53:03 +02:00
Victor Stinner
d2a915dbf6 ceval.c: restore str+=str optimization 2011-10-02 20:34:20 +02:00
Victor Stinner
67002af323 Check error when calling PyUnicode_AppendAndDel() 2011-10-02 20:35:10 +02:00
Victor Stinner
1a15aba71d PyCodec_ReplaceErrors() uses "C" format instead of "u#" to build result 2011-10-02 19:00:15 +02:00
Benjamin Peterson
014cc42db8 remove unused label 2011-10-02 13:19:16 -04:00
Martin v. Löwis
0b1d348990 Issue 13085: Fix some memory leaks. Patch by Stefan Krah. 2011-10-01 16:35:40 +02:00
Benjamin Peterson
811c2f1369 remove "fast-path" for (i)adding strings
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.
2011-09-30 21:31:21 -04:00
Victor Stinner
bec0fda264 Remove commented code: str+=str is no more super-optimized 2011-10-01 01:26:08 +02:00
Victor Stinner
d9c563e84d modsupport.c reuses Py_UNICODE_strlen() 2011-09-29 04:01:43 +02:00