Victor Stinner
829c0adca9
Add _PyUnicode_HAS_UTF8_MEMORY() macro
2011-10-03 01:08:02 +02:00
Victor Stinner
37943769ef
PyUnicode_READ_CHAR() ensures that the string is ready
2011-10-02 20:33:18 +02:00
Victor Stinner
fe0c155c4f
Write _PyUnicode_Dump() to help debugging
2011-10-03 02:59:31 +02:00
Victor Stinner
f42dc448e0
PyUnicode_CopyCharacters() fails when copying latin1 into ascii
2011-10-02 23:33:16 +02:00
Victor Stinner
c53be96c54
unicode_convert_wchar_to_ucs4() cannot fail
2011-10-02 21:33:54 +02:00
Victor Stinner
c3c7415639
Add _PyUnicode_DATA_ANY(op) private macro
2011-10-02 20:39:55 +02:00
Victor Stinner
a464fc141d
unicode_empty and unicode_latin1 are PyObject* objects, not PyUnicodeObject*
2011-10-02 20:39:30 +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
Senthil Kumaran
0069be19e5
merge from 3.2 - Document message_body arg in HTTPConnection.endheaders
2011-10-03 07:28:00 +08:00
Antoine Pitrou
22cd021656
Fix ResourceWarnings in the TIPC socket tests.
2011-10-02 23:37:41 +02:00
Benjamin Peterson
a8726c4d96
merge heads
2011-10-02 13:19:30 -04:00
Benjamin Peterson
014cc42db8
remove unused label
2011-10-02 13:19:16 -04:00
Charles-François Natali
027f9a3600
Issue #13084 : Fix a test_signal failure: the delivery order is only defined for
...
real-time signals.
2011-10-02 18:36:05 +02:00
Ezio Melotti
6fe679f011
#13076 : merge with 3.2.
2011-10-02 12:47:10 +03:00
Ezio Melotti
35ec7f771b
#13076 : fix links to datetime.time and datetime.datetime.
2011-10-02 12:44:50 +03:00
Victor Stinner
267aa24365
PyUnicode_FindChar() raises a IndexError on invalid index
2011-10-02 01:08:37 +02:00
Victor Stinner
bc603d12b7
Optimize _PyUnicode_AsKind() for UCS1->UCS4 and UCS2->UCS4
...
* Ensure that the input string is ready
* Raise a ValueError instead of of a fatal error
2011-10-02 01:00:40 +02:00
Victor Stinner
7a48ff7e06
Use Py_UCS1 instead of unsigned char in unicodeobject.h
2011-10-02 00:55:25 +02:00
Victor Stinner
5a706cf8c0
Fix usage of PyUnicode_READY() in PyUnicode_GetLength()
2011-10-02 00:36:53 +02:00
Victor Stinner
cd9950fd09
PyUnicode_WriteChar() raises IndexError on invalid index
...
PyUnicode_WriteChar() raises also a ValueError if the string has more than 1
reference.
2011-10-02 00:34:53 +02:00
Victor Stinner
2fe5ced752
PyUnicode_ReadChar() raises a IndexError if the index in invalid
...
unicode_getitem() reuses PyUnicode_ReadChar()
2011-10-02 00:25:40 +02:00
Victor Stinner
202b62bd90
PyUnicode_FromKindAndData() raises a ValueError if the kind is unknown
2011-10-01 23:48:37 +02:00
R David Murray
1d30db459d
merge #4147 : minidom's toprettyxml no longer adds whitespace to text nodes.
2011-10-01 16:22:35 -04:00
R David Murray
791744b070
#4147 : minidom's toprettyxml no longer adds whitespace to text nodes.
...
Patch by Dan Kenigsberg.
2011-10-01 16:19:51 -04:00
Antoine Pitrou
a02a12c517
Issue #13034 : When decoding some SSL certificates, the subjectAltName extension could be unreported.
2011-10-01 19:22:30 +02:00
Antoine Pitrou
d8c347a8de
Issue #13034 : When decoding some SSL certificates, the subjectAltName extension could be unreported.
2011-10-01 19:20:25 +02:00
Victor Stinner
07ac3ebd7b
Optimize unicode_subtype_new(): don't encode to wchar_t and decode from wchar_t
...
Rewrite unicode_subtype_new(): allocate directly the right type.
2011-10-01 16:16:43 +02:00
Victor Stinner
e90fe6a8f4
Add _PyUnicode_UTF8() and _PyUnicode_UTF8_LENGTH() macros
...
* Rename existing _PyUnicode_UTF8() macro to PyUnicode_UTF8()
* Rename existing _PyUnicode_UTF8_LENGTH() macro to PyUnicode_UTF8_LENGTH()
* PyUnicode_UTF8() and PyUnicode_UTF8_LENGTH() are more strict
2011-10-01 16:48:13 +02:00
Antoine Pitrou
87ae0a2804
Backout of changeset 228fd2bd83a5 by Nadeem Vawda in branch 'default':
...
Issue #12804 : Prevent "make test" from using network resources.
2011-10-01 16:41:48 +02: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
5c0fb00ad8
merge heads
2011-10-01 00:12:20 -04:00
Benjamin Peterson
31616ea2ff
remove reference to non-existent file
2011-10-01 00:11:09 -04:00
Victor Stinner
de636f3c34
PyUnicode_Substring() now accepts end bigger than string length
...
Fix also a bug: call PyUnicode_READY() before reading string length.
2011-10-01 03:55:54 +02:00
Victor Stinner
9f789e7f63
_PyUnicode_AsKind() is *not* part of the stable ABI
2011-10-01 03:57:28 +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
c759f3e7ec
Ooops, avoid a division by zero in unicode_repeat()
2011-10-01 03:09:58 +02:00
Victor Stinner
d3a83d5eb3
PyUnicode_FromObject() ensures that its output is a ready string
2011-10-01 03:09:33 +02:00
Victor Stinner
67ca64ce54
I want a super fast 'a' * n!
...
* Optimize unicode_repeat() for a special case with memset()
* Simplify integer overflow checking; remove the second check because
PyUnicode_New() already does it and uses a smaller limit (Py_ssize_t vs
size_t)
2011-10-01 02:47:29 +02:00
Victor Stinner
4584a5ba1a
PyUnicode_CHARACTER_SIZE(): add a reference to PyUnicode_KIND_SIZE()
2011-10-01 02:39:37 +02:00
Victor Stinner
e9a2935c1f
Fix usage of PyUnicode_READY in unicodeobject.c
2011-10-01 02:14:59 +02:00
Victor Stinner
12bab6dace
Remove private substring() function, reuse public PyUnicode_Substring()
...
* PyUnicode_Substring() now fails if start or end is invalid
* PyUnicode_Substring() reuses PyUnicode_Copy() for non-exact strings
2011-10-01 01:53:49 +02:00
Victor Stinner
c841e7db1f
Optimize PyUnicode_Copy(): don't recompute maximum character
2011-10-01 01:34:32 +02:00
Victor Stinner
bec0fda264
Remove commented code: str+=str is no more super-optimized
2011-10-01 01:26:08 +02:00
Victor Stinner
2219e0a37e
PyUnicode_FromObject() reuses PyUnicode_Copy()
...
* PyUnicode_Copy() is faster than substring()
* Fix also a compiler warning
2011-10-01 01:16:59 +02:00
Victor Stinner
9e5bd6c544
pyexat uses the new Unicode API
2011-10-01 01:05:40 +02:00
Ezio Melotti
2a1e926d63
Fix ResourceWarnings in makeunicodedata.py.
2011-09-30 08:46:25 +03:00
Victor Stinner
034f6cf10c
Add PyUnicode_Copy() function, include it to the public API
2011-09-30 02:26:44 +02:00
Victor Stinner
b153615008
PyUnicode_CopyCharacters() uses exceptions instead of assertions
...
Call PyErr_BadInternalCall() if inputs are not unicode strings.
2011-09-30 02:26:10 +02:00
Victor Stinner
1fe99a2ea7
Fix a compiler warning
2011-09-30 01:55:49 +02:00