| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
(Contributed by Niki W. Waibel.)
Simple renaming to avoid a conflict that prevented compilation on Solaris.
|
|
|
|
|
|
|
| |
(Contributed by Dima Dorfman.)
* Support pickling of dictionaries in instances of deque subclasses.
* Support pickling of recursive deques.
|
|
|
|
| |
memset() wrote one past the end of the buffer, which was likely to be unused padding or a yet-to-be-initialized local variable. This routine is already tested by test_socket.
|
| |
|
|
|
|
| |
Add function names to various PyArg_ParseTuple calls in bz2module.c.
|
|
|
|
|
|
| |
nothing in gc currently cares, the original coding could screw up if,
e.g., you tried to move a node to the list it's already in, and the node
was already the last in its list.
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced gc_list_move(), which captures the common gc_list_remove() +
gc_list_append() sequence. In fact, no uses of gc_list_append() remained
(they were all in a gc_list_move() sequence), so commented that one out.
gc_list_merge(): assert that `from` != `to`; that was an implicit
precondition, now verified in a debug build.
Others: added comments about their purpose.
|
|
|
|
| |
pass over the unreachable weakrefs-with-callbacks to unreachable objects.
|
|
|
|
|
|
|
|
| |
In cyclic gc, clear weakrefs to unreachable objects before allowing any
Python code (weakref callbacks or __del__ methods) to run.
This is a critical bugfix, affecting all versions of Python since weakrefs
were introduced. I'll backport to 2.3.
|
| |
|
| |
|
|
|
|
| |
was a mistake of mine in updating patch #975056 (I think).
|
| |
|
|
|
|
|
|
| |
73: Restore support for Python 2.1.
74: Factor the previous change differently
79: Conditionalize usage of PyTuple_Pack.
|
|
|
|
| |
detection to configure &c.
|
|
|
|
| |
a few remaining calls to signal() were converted to PyOS_setsig().
|
|
|
|
| |
arguments passed through tuples.
|
|
|
|
|
|
| |
[ 1030629 ] PyOS_InputHook broken
with a couple of utterly inconsequential changes by me.
|
|
|
|
| |
(Contributed by Nick Coghlan.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
deque_item(): a performance bug: the linked list of blocks was followed
from the left in most cases, because the test (i < (deque->len >> 1)) was
after "i %= BLOCKLEN".
deque_clear(): replaced a call to deque_len() with deque->len; not sure what
this call was here for, nor if all compilers under the sun would inline it.
deque_traverse(): I belive that it could be called by the GC when the deque
has leftblock==rightblock==NULL, because it is tracked before the first block
is allocated (though closely before). Still, a C extension module subclassing
deque could provide its own tp_alloc that could trigger a GC collection after
the PyObject_GC_Track()...
deque_richcompare(): rewrote to cleanly check for end-of-iterations instead of
relying on deque.__iter__().next() to succeed exactly len(deque) times -- an
assumption which can break if deques are subclassed. Added a test.
I wonder if the length should be explicitely bounded to INT_MAX, with
OverflowErrors, as in listobject.c. On 64-bit machines, adding more than
INT_MAX in the deque will result in trouble. (Note to anyone/me fixing
this: carefully check for overflows if len is close to INT_MAX in the
following functions: deque_rotate(), deque_item(), deque_ass_item())
|
| |
|
|
|
|
|
|
|
|
|
| |
The previous approach was too easily fooled (a rotate() sufficed).
* Use it->counter to determine when iteration is complete. The
previous approach was too complex.
* Strengthen an assertion and add a comment here or there.
|
| |
|
| |
|
|
|
|
|
|
| |
* Change the centering by one to make it possible to test the module
with BLOCKLEN's as low as two. Testing small blocks makes end-point
errors surface more readily.
|
|
|
|
|
| |
BLOCKLEN-1, this assert-failed in a debug build, or went wild with a
NULL pointer in a release build. Reported on c.l.py by Stefan Behnel.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
* Have groupby() be careful about decreffing structure members.
|
|
|
|
| |
the htons() function.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Treat comparing a date to a datetime like a mixed-type comparison.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
decoding incomplete input (when the input stream is temporarily exhausted).
codecs.StreamReader now implements buffering, which enables proper
readline support for the UTF-16 decoders. codecs.StreamReader.read()
has a new argument chars which specifies the number of characters to
return. codecs.StreamReader.readline() and codecs.StreamReader.readlines()
have a new argument keepends. Trailing "\n"s will be stripped from the lines
if keepends is false. Added C APIs PyUnicode_DecodeUTF8Stateful and
PyUnicode_DecodeUTF16Stateful.
|
|
|
|
| |
compilation on Solaris 2.6, HP-UX 11, AIX 5.1 and (possibly) some IRIX versions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several functions adopted the strategy of altering a full lengthed
string copy and resizing afterwards. That would fail if the initial
string was short enough (0 or 1) to be interned. Interning precluded
the subsequent resizing operation.
The solution was to make sure the initial string was at least two
characters long.
Added tests to verify that all binascii functions do not crater when
given an empty string argument.
|
| |
|
|
|
|
| |
ignoring their transaction (txn) argument.
|
|
|
|
|
| |
empty final matches with finditer(). New test cases included
for this bug and for #581080.
|
|
|
|
| |
(Contributed by Dima Dorfman)
|
| |
|
| |
|
|
|
|
|
| |
"from blah import (foo, bar
baz, bongo)"
|