Antoine Pitrou
6e6cc830c4
Issue #9757 : memoryview objects get a release() method to release the
...
underlying buffer (previously this was only done when deallocating the
memoryview), and gain support for the context management protocol.
2010-09-09 12:59:39 +00:00
Senthil Kumaran
9a9dd1c140
Revert the doc change done in r83880. str.replace with negative count value is not a feature.
2010-09-08 12:50:29 +00:00
Victor Stinner
46408606d8
Rename PyUnicode_strdup() to PyUnicode_AsUnicodeCopy()
2010-09-03 16:18:00 +00:00
Georg Brandl
2d444496b3
Reindent.
2010-09-03 10:52:55 +00:00
Raymond Hettinger
faf7b7f4ec
Issue 8420: Fix obscure set crashers.
2010-09-03 10:00:50 +00:00
Daniel Stutzbach
045b3ba184
Issue #9212 : Added the missing isdisjoint method to the dict_keys and
...
dict_items views. The method is required by the collections.Set ABC,
which the views register as supporting.
2010-09-02 15:06:06 +00:00
Daniel Stutzbach
928d4eeee8
Removed an extraneous semicolon
2010-09-02 15:06:03 +00:00
Victor Stinner
71133ff368
Create PyUnicode_strdup() function
2010-09-01 23:43:53 +00:00
Victor Stinner
c4eb765fc1
Create Py_UNICODE_strcat() function
2010-09-01 23:43:50 +00:00
Antoine Pitrou
c73b909a2b
Fix a compilation warning
2010-09-01 21:14:46 +00:00
Antoine Pitrou
e0793ba992
Issue #9737 : Fix a crash when trying to delete a slice or an item from
...
a memoryview object.
2010-09-01 21:14:16 +00:00
Victor Stinner
42cb462682
Remove unicode_default_encoding constant
...
Inline its value in PyUnicode_GetDefaultEncoding(). The comment is now outdated
(we will not change its value anymore).
2010-09-01 19:39:01 +00:00
Antoine Pitrou
fce7fd6426
Issue #9549 : sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()
...
are now removed, since their effect was inexistent in 3.x (the default
encoding is hardcoded to utf-8 and cannot be changed).
2010-09-01 18:54:56 +00:00
Antoine Pitrou
b0fa831d1e
Issue #7415 : PyUnicode_FromEncodedObject() now uses the new buffer API
...
properly. Patch by Stefan Behnel.
2010-09-01 15:10:12 +00:00
Antoine Pitrou
f68c2a701b
Issue #3101 : Helper functions _add_one_to_C() and _add_one_to_F() become
...
_Py_add_one_to_C() and _Py_add_one_to_F(), respectively.
2010-09-01 12:58:21 +00:00
Antoine Pitrou
1a9a9d5433
Issue #1868 : Eliminate subtle timing issues in thread-local objects by
...
getting rid of the cached copy of thread-local attribute dictionary.
2010-08-28 18:17:03 +00:00
Benjamin Peterson
0e10206f2c
basicsize and itemsize are Py_ssize_t #9688
2010-08-25 23:13:17 +00:00
Daniel Stutzbach
8515eaefda
Issue 8781: On systems a signed 4-byte wchar_t and a 4-byte Py_UNICODE, use memcpy to convert between the two (as already done when wchar_t is unsigned)
2010-08-24 21:57:33 +00:00
Benjamin Peterson
0538064554
reorder and save a comparison
2010-08-23 19:35:39 +00:00
Victor Stinner
3119ed73aa
Fix PyUnicode_EncodeFSDefault() indentation
2010-08-18 22:26:50 +00:00
Amaury Forgeot d'Arc
324ac65ceb
#5127 : Even on narrow unicode builds, the C functions that access the Unicode
...
Database (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others) now accept
and return characters from the full Unicode range (Py_UCS4).
The differences from Python code are few:
- unicodedata.numeric(), unicodedata.decimal() and unicodedata.digit()
now return the correct value for large code points
- repr() may consider more characters as printable.
2010-08-18 20:44:58 +00:00
Victor Stinner
6c00c1464f
Issue #9425 : Create PyModule_GetFilenameObject() function
...
... to get the filename as a unicode object, instead of a byte string. Function
needed to support unencodable filenames. Deprecate PyModule_GetFilename() in
favor on the new function.
2010-08-17 23:37:11 +00:00
Antoine Pitrou
671b4d948e
Issue #9612 : The set object is now 64-bit clean under Windows.
2010-08-17 17:55:07 +00:00
Victor Stinner
ef8d95c498
Issue #9425 : Create Py_UNICODE_strncmp() function
...
The code is based on strncmp() of the libiberty library,
function in the public domain.
2010-08-16 22:03:11 +00:00
Alexander Belopolsky
977a684c94
Issue #8983 : Corrected docstrings.
2010-08-16 20:17:07 +00:00
Antoine Pitrou
47019e500c
Fix (harmless) warning with MSVC.
2010-08-15 17:41:31 +00:00
Antoine Pitrou
9b491923b8
Fix indentation and remove dead code.
2010-08-15 17:38:46 +00:00
Antoine Pitrou
0010d37a43
Fix some compilation warnings under 64-bit Windows (issue #9566 ).
...
Some of these are genuine bugs with objects bigger than 2GB, but
my system doesn't allow me to write tests for it.
2010-08-15 17:12:55 +00:00
Victor Stinner
47fcb5b4c3
Issue #9542 : Create PyUnicode_FSDecoder() function
...
It's a ParseTuple converter: decode bytes objects to unicode using
PyUnicode_DecodeFSDefaultAndSize(); str objects are output as-is.
* Don't specify surrogateescape error handler in the comments nor the
documentation, but PyUnicode_DecodeFSDefaultAndSize() and
PyUnicode_EncodeFSDefault() because these functions use strict error handler
for the mbcs encoding (on Windows).
* Remove PyUnicode_FSConverter() comment in unicodeobject.c to avoid
inconsistency with unicodeobject.h.
2010-08-13 23:59:58 +00:00
Victor Stinner
4a2b7a1b14
Issue #9425 : Create PyErr_WarnFormat() function
...
Similar to PyErr_WarnEx() but use PyUnicode_FromFormatV() to format the warning
message.
Strip also some trailing spaces.
2010-08-13 14:03:48 +00:00
Victor Stinner
3603cc5fdb
Issue #9425 : PyFile_FromFd() ignores the name argument
...
This function is only by imp.find_module() which does return the filename in a
separated variable.
2010-08-13 13:34:52 +00:00
Alexander Belopolsky
f0f45142d5
Issue #2443 : Added a new macro, Py_VA_COPY, which is equivalent to C99
...
va_copy, but available on all python platforms. Untabified a few
unrelated files.
2010-08-11 17:31:17 +00:00
Mark Dickinson
cf940c701f
Issue #9530 : Fix undefined-behaviour-inducing overflow checks in bytes and bytearray implementations.
2010-08-10 18:35:01 +00:00
Victor Stinner
331ea92ade
Issue #9425 : create Py_UNICODE_strrchr() function
2010-08-10 16:37:20 +00:00
Senthil Kumaran
f2de1ffc88
spelling mistake.
2010-08-09 09:03:57 +00:00
Senthil Kumaran
77210b4fa9
Fix Issue5416 - explain negative value for count in bytes object replace.
2010-08-09 08:56:25 +00:00
Florent Xicluna
eb6f3ead00
Fix #8530 : Prevent stringlib fastsearch from reading beyond the front of an array.
2010-08-08 22:07:16 +00:00
Raymond Hettinger
1b66996281
Fix nit (sentinel on lhs of comparison).
2010-08-07 05:54:08 +00:00
Mark Dickinson
7e3b948cfe
Issue #9530 : Fix a couple of places where undefined behaviour can
...
occur, as a result of signed integer overflow.
2010-08-06 21:33:18 +00:00
Mark Dickinson
e6fc7401a9
In PySlice_IndicesEx, clip the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX] rather than [PY_SSIZE_T_MIN, PY_SSIZE_T_MAX].
2010-08-06 18:55:26 +00:00
Raymond Hettinger
38bf2ccf4c
Issue8757: Implicit set-to-frozenset conversion not thread-safe.
2010-08-06 09:52:17 +00:00
Mark Dickinson
388122d43b
Issue #9337 : Make float.__str__ identical to float.__repr__.
...
(And similarly for complex numbers.)
2010-08-04 20:56:28 +00:00
Georg Brandl
78eef3de88
Revert r83395, it introduces test failures and is not necessary anyway since we now have to nul-terminate the string anyway.
2010-08-01 20:51:02 +00:00
Mark Dickinson
5b65df7ce2
Issue #9416 : Fix some issues with complex formatting where the
...
output with no type specifier failed to match the str output:
- format(complex(-0.0, 2.0), '-') omitted the real part from the output,
- format(complex(0.0, 2.0), '-') included a sign and parentheses.
2010-08-01 10:41:49 +00:00
Georg Brandl
bd534f0349
#8821 : do not rely on Unicode strings being terminated with a \u0000, rather explicitly check range before looking for a second surrogate character.
2010-08-01 08:49:18 +00:00
Georg Brandl
8ee604b989
Use Py_CLEAR().
2010-07-29 14:23:06 +00:00
Antoine Pitrou
c47bd4a09a
Issue #9294 : remove dead code in Objects/object.c. Patch by Grant Limberg.
2010-07-27 22:08:27 +00:00
Benjamin Peterson
20f9c3c50f
revert unintended changes
2010-07-20 22:39:34 +00:00
Benjamin Peterson
013783c529
move test_trace.py so as not to conflict with future tests for the trace module
2010-07-20 22:37:19 +00:00
Stefan Krah
99212f61db
Sub-issue of #9036 : Fix incorrect use of Py_CHARMASK.
2010-07-19 17:58:26 +00:00