Antoine Pitrou
c198d0599b
Add a comment explaining this heuristic.
2011-10-13 18:07:37 +02:00
Antoine Pitrou
dda339e6d2
Simplify heuristic for when to use memchr
2011-10-13 17:58:11 +02:00
Nadeem Vawda
72d6a13413
Merge #13159 : Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one.
...
Also fix the bz2 module, which suffered from the same problem.
2011-10-13 13:38:14 +02:00
Nadeem Vawda
d41a98bdd9
Issue #13159 : Replace FileIO's quadratic-time buffer growth algorithm with a linear-time one.
...
Also fix the bz2 module, whose classes used the same algorithm.
2011-10-13 13:34:16 +02:00
Victor Stinner
55c991197b
Optimize unicode_subscript() for step != 1 and ascii strings
2011-10-13 01:17:06 +02:00
Victor Stinner
127226ba69
Don't use PyUnicode_MAX_CHAR_VALUE() macro in Py_MAX()
2011-10-13 01:12:34 +02:00
Victor Stinner
8813104e53
Simplify PyUnicode_MAX_CHAR_VALUE
...
Use PyUnicode_IS_ASCII instead of PyUnicode_IS_COMPACT_ASCII, so the following
test can be removed:
PyUnicode_DATA(op) == (((PyCompactUnicodeObject *)(op))->utf8)
2011-10-13 01:12:01 +02:00
Victor Stinner
9e7a1bcfd6
Optimize findchar() for PyUnicode_1BYTE_KIND: use memchr and memrchr
2011-10-13 00:18:12 +02:00
Antoine Pitrou
dd4e2f0153
Issue #13155 : Optimize finding the optimal character width of an unicode string
2011-10-13 00:02:27 +02:00
Victor Stinner
49a0a21f37
Unicode replace() avoids calling unicode_adjust_maxchar() when it's useless
...
Add also a special case if the result is an empty string.
2011-10-12 23:46:10 +02:00
Victor Stinner
69f55cc033
Issue #13157 : Fix building Python outside its source tree
2011-10-12 22:09:40 +02:00
Victor Stinner
21d29c377b
Issue #12367 : Add a test on error attribute of select.error
...
Thanks to the PEP 3151, select.error (which is just an alias to OSError) has
now an error attribute.
2011-10-12 21:01:46 +02:00
Victor Stinner
a1bf298454
What's New in Python 3.3: mention the PEP 3151
2011-10-12 20:35:02 +02:00
Antoine Pitrou
62ab10a05a
Replace mentions of IOError
2011-10-12 20:10:51 +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
1e4fe702f6
This shameful limitation of the fileinput module is not relevant anymore.
2011-10-12 19:11:12 +02:00
Antoine Pitrou
4272d6a315
Fix some mentions of IOError
2011-10-12 19:10:10 +02:00
Antoine Pitrou
a787b650d4
Fix mentions of IOError in the io module docs
2011-10-12 19:02:52 +02:00
Antoine Pitrou
f55011f8b6
Update doc for BlockingIOError and its alias in the io module
2011-10-12 18:57:23 +02:00
Antoine Pitrou
442ee03d35
Replace mentions of WindowsError
2011-10-12 18:53:23 +02:00
Antoine Pitrou
771dea7755
Replace a mention of EnvironmentError in the distutils docs.
2011-10-12 18:35:18 +02:00
Antoine Pitrou
23a580fd78
Update index entries
2011-10-12 18:33:15 +02:00
Antoine Pitrou
9a4a342b78
Update the C-API docs for exception types
2011-10-12 18:28:01 +02:00
Antoine Pitrou
5574c3012d
Replace mentions of socket.error.
2011-10-12 17:53:43 +02:00
Antoine Pitrou
195e702831
Mention the merging of other exceptions into OSError.
2011-10-12 16:46:46 +02:00
Antoine Pitrou
9b7fcf8c2e
Minimal update of select docs for PEP 3151.
2011-10-12 16:23:02 +02:00
Antoine Pitrou
70fa31c936
Minimal update of socket docs for PEP 3151.
...
More editing is probably desirable.
2011-10-12 16:20:53 +02:00
Antoine Pitrou
f9c774696e
Update exceptions doc for PEP 3151
2011-10-12 16:02:00 +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
983b1434bd
Backed out changeset 952d91a7d376
...
If maxchar == PyUnicode_MAX_CHAR_VALUE(unicode), we do an useless copy.
2011-10-12 00:54:35 +02:00
Antoine Pitrou
e55ad2dff0
Relax condition
2011-10-12 00:36:51 +02:00
Victor Stinner
d218bf14cc
stringlib: Fix STRINGLIB_STR for UCS2/UCS4
2011-10-12 00:14:32 +02:00
Victor Stinner
4e10100dee
Fix compiler warning in _PyUnicode_FromUCS2()
2011-10-11 23:27:52 +02:00
Victor Stinner
8cc70dcf70
Fix fastsearch for UCS2 and UCS4
...
* If needle is 0, try (p[0] >> 16) & 0xff for UCS4
* Disable fastsearch_memchr_1char() if needle is zero for UCS2 and UCS4
2011-10-11 23:22:22 +02:00
Victor Stinner
c5af7730e3
Fix FileIO.readall() (new_buffersize()) for large files
...
Truncate the buffer size to PY_SSIZE_T_MAX.
2011-10-11 23:00:31 +02:00
Antoine Pitrou
950468e553
Use _PyUnicode_CONVERT_BYTES() where applicable.
2011-10-11 22:45:48 +02:00
Antoine Pitrou
b896001377
Merge
2011-10-11 22:43:51 +02:00
Victor Stinner
a2a6477ba0
Fix io.FileIO.readall() on Windows 64 bits
...
Use Py_off_t type (64 bits) instead of off_t (32 bits).
2011-10-11 22:45:02 +02:00
Antoine Pitrou
ffa547e139
Fix deprecation warning
2011-10-11 22:43:37 +02:00
Victor Stinner
2c5d3cbfb8
Fix a compiler warning in _locale
2011-10-11 22:35:52 +02:00
Victor Stinner
3f528f0c1b
Fix a compiler warning in zipimport
2011-10-11 22:28:56 +02:00
Victor Stinner
8c9818980b
Fix typo in import.c
2011-10-11 22:27:13 +02:00
Victor Stinner
577db2c9f0
PyUnicode_AsUnicodeCopy() now checks if PyUnicode_AsUnicode() failed
2011-10-11 22:12:48 +02:00
Victor Stinner
d9c0631d77
Strip trailing spaces in _json.c
2011-10-11 21:56:19 +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
ed2682be2f
Reuse PyUnicode_Copy() in validate_and_copy_tuple()
2011-10-11 21:53:24 +02:00
Victor Stinner
beac78bb24
Use PyUnicode_AsUnicodeAndSize() instead of PyUnicode_GET_SIZE()
2011-10-11 21:55:01 +02:00
Antoine Pitrou
e459a0877e
Issue #13136 : speed up conversion between different character widths.
2011-10-11 20:58:41 +02:00
Antoine Pitrou
2c3b2302ad
Issue #13134 : optimize finding single-character strings using memchr
2011-10-11 20:29:21 +02:00
Antoine Pitrou
60dd7dc23c
Merge
2011-10-11 19:54:03 +02:00