Commit Graph

51310 Commits

Author SHA1 Message Date
Victor Stinner ef17f12a39 Fix test_codeccallbacks for Windows: check size of wchar_t, not sys.maxunicode 2011-09-29 20:01:55 +02:00
Victor Stinner 182d90d9ee Fix test_codecs for Windows: check size of wchar_t, not sys.maxunicode 2011-09-29 19:53:55 +02:00
Charles-François Natali 734e159b12 Merge. 2011-09-29 19:51:46 +02:00
Charles-François Natali 9624a764ff Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
Jarosch.
2011-09-29 19:49:37 +02:00
Charles-François Natali 5a4a109694 Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by Thomas
Jarosch.
2011-09-29 19:46:37 +02:00
Victor Stinner d8f6510acc _PyUnicode_Ready() cannot be used on ready strings anymore
* Change its prototype: PyObject* instead of PyUnicodeoObject*.
 * Remove an old assertion, the result of PyUnicode_READY (_PyUnicode_Ready)
   must be checked instead
2011-09-29 19:43:17 +02:00
Victor Stinner bc8b81bc4e Move _PyUnicode_UTF8() and _PyUnicode_UTF8_LENGTH() outside unicodeobject.h
Move these macros to unicodeobject.c
2011-09-29 19:31:34 +02:00
Victor Stinner a0702ab1fe Add a note in PyUnicode_CopyCharacters() doc: it doesn't write null character
Cleanup also the code (avoid the goto).
2011-09-29 14:14:38 +02:00
Martin v. Löwis ff1ef074ed Re-enable test. 2011-09-29 13:49:10 +02:00
Martin v. Löwis 22970667da Port normalization to new API. 2011-09-29 13:39:38 +02:00
Victor Stinner f0ddadcf2e Rename Py_BUILD_ASSERT to Py_BUILD_ASSERT_EXPR
To make it clearer that Py_BUILD_ASSERT_EXPR(cond) cannot be used as
assert(cond).
2011-09-29 12:43:18 +02:00
Victor Stinner 573696a9ca pymacro.h: Inline _Py_ARRAY_LENGTH_CHECK() and add http://ccodearchive.net/ 2011-09-29 12:12:39 +02:00
Ezio Melotti 6f1ba077c0 Merge heads. 2011-09-29 08:36:23 +03:00
Ezio Melotti 397546ac2f Update and reorganize the whatsnew entry for PEP 393. 2011-09-29 08:34:36 +03:00
Victor Stinner 6430fd56b4 Fix hex_digit_to_int() prototype: expect Py_UCS4, not Py_UNICODE 2011-09-29 04:02:13 +02:00
Victor Stinner d9c563e84d modsupport.c reuses Py_UNICODE_strlen() 2011-09-29 04:01:43 +02:00
Ezio Melotti 9d3579b7d6 Remove now useless redefinition of chr/ord for narrow builds in test_multibytecodec_support.py. 2011-09-29 04:36:38 +03:00
Victor Stinner f7b8cb605d _io.textio: fix character type, use Py_UCS4 instead of Py_UNICODE 2011-09-29 03:28:17 +02:00
Victor Stinner 0058b8603f _sre: don't use Py_UNICODE anymore
* 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
2011-09-29 03:27:47 +02:00
Victor Stinner 7d637ab870 Complete What's New in 3.3 about PEP 393 2011-09-29 02:56:16 +02:00
Ezio Melotti f503673c4d Move UCS4-specific tests with the "normal" tests. 2011-09-29 03:14:56 +03:00
Victor Stinner dfb866d127 Enhance Py_ARRAY_LENGTH(): fail at build time if the argument is not an array
Move other various macros to pymcacro.h

Thanks Rusty Russell for having written these amazing C macros!
2011-09-29 01:12:24 +02:00
Victor Stinner 2bdc7f591b Move code related to compile from Python.h to compile.h 2011-09-29 01:04:08 +02:00
Victor Stinner 639418812f Use the new Py_ARRAY_LENGTH macro 2011-09-29 00:42:28 +02:00
Victor Stinner b9dcffb51e Fix 'c' format of PyUnicode_Format()
formatbuf is now an array of Py_UCS4, not of Py_UNICODE
2011-09-29 00:39:24 +02:00
Victor Stinner c17f540b7a Oops, fix my previous commit: unicode => to 2011-09-29 00:16:58 +02:00
Victor Stinner b15d4d899c PyUnicode_CopyCharacters() marks the string as dirty (reset the hash) 2011-09-28 23:59:20 +02:00
Victor Stinner f5ca1a21a5 PyUnicode_CopyCharacters() fails if 'to' has more than 1 reference 2011-09-28 23:54:59 +02:00
Ezio Melotti 7c8c1ea3ec Fix whitespace. 2011-09-29 01:00:19 +03:00
Ezio Melotti 2aa2b3b4d5 Clean up a few tabs that went in with PEP393. 2011-09-29 00:58:57 +03:00
Ezio Melotti 48a2f8fd97 #13054: sys.maxunicode is now always 0x10FFFF. 2011-09-29 00:18:19 +03:00
Victor Stinner 506f592769 Check size of wchar_t using the preprocessor 2011-09-28 22:34:18 +02:00
Victor Stinner 73f01c65c8 PyUnicode_CopyCharacters() initializes overflow 2011-09-28 22:28:04 +02:00
Victor Stinner e57b1c0da1 Mark PyUnicode_FromUCS[124] as private 2011-09-28 22:20:48 +02:00
Victor Stinner ff9e50fd04 Oops, fix Py_MIN/Py_MAX case 2011-09-28 22:17:19 +02:00
Victor Stinner 17222160e7 Mark _PyUnicode_FindMaxCharAndNumSurrogatePairs() as private 2011-09-28 22:15:37 +02:00
Victor Stinner fd85c3aa8d fill_number() and format_string_internal() check for PyUnicode_CopyCharacters() failure 2011-09-28 21:53:49 +02:00
Victor Stinner dba2deeca2 fill_number() ensures that the 'digits' string is ready 2011-09-28 21:50:42 +02:00
Victor Stinner afbaa20fb9 fill_char() can now propagate an error 2011-09-28 21:50:16 +02:00
Victor Stinner 157f83fcfc Strip trailing spaces in unicodeobject.[ch] 2011-09-28 21:41:31 +02:00
Victor Stinner 6c7a52a46f Check for PyUnicode_CopyCharacters() failure 2011-09-28 21:39:17 +02:00
Victor Stinner be78eaf2de PyUnicode_CopyCharacters() checks for buffer and character overflow
It now returns the number of written characters on success.
2011-09-28 21:37:03 +02:00
Victor Stinner fb5f5f2420 Mark PyUnicode_CONVERT_BYTES as private 2011-09-28 21:39:49 +02:00
Georg Brandl ee12f4429c Add versionadded directive to new API function. 2011-09-28 21:51:06 +02:00
Georg Brandl 4cb0de246c Rename new macros to conform to naming rules (function macros have "Py" prefix, not "PY"). 2011-09-28 21:49:49 +02:00
Victor Stinner 5ce1b0dbc0 Set Py_UNICODE_REPLACEMENT_CHARACTER type to Py_UCS4, instead of Py_UNICODE 2011-09-28 20:29:27 +02:00
Benjamin Peterson e56717c3d2 merge heads 2011-09-28 10:48:40 -04:00
Benjamin Peterson 19f6260710 this isn't fixed on windows yet... 2011-09-28 10:48:32 -04:00
Ezio Melotti d8b509b192 #13012: use splitlines(keepends=True/False) instead of splitlines(0/1). 2011-09-28 17:37:55 +03:00
Benjamin Peterson a6e50f589f this test works as expected now 2011-09-28 08:20:00 -04:00