| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Added test for second one.
|
| |
|
| |
|
|
|
|
| |
a prime size, which is in fact never true anymore ...).
|
| |
|
|
|
|
| |
Improved version coming soon to a Source Forge near you!
|
|
|
|
|
| |
Complete with docos and tests.
OKed by Guido.
|
|
|
|
| |
This should match the situation in the 1.6b1 tree.
|
|
|
|
|
|
|
|
| |
state for dictionaries that have only been indexed by string keys.
See the comments in SourceForge for more.
This closes SourceForge patch #101309.
|
|
|
|
|
|
|
|
|
|
| |
exception context. This avoids improperly propogating errors raised by
a user-defined __cmp__() by a subsequent lookup operation.
This patch does *not* include the performance enhancement patch for
dictionaries with string keys only; that will be checked in separately.
This closes SourceForge patch #101277 and bug #112558.
|
| |
|
|
|
|
|
| |
char**) and return an int even on PC platforms. If not, please fix
PC/utils/makesrc.c ;-P
|
|
|
|
|
|
|
|
|
|
| |
comments, docstrings or error messages. I fixed two minor things in
test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't").
There is a minor style issue involved: Guido seems to have preferred English
grammar (behaviour, honour) in a couple places. This patch changes that to
American, which is the more prominent style in the source. I prefer English
myself, so if English is preferred, I'd be happy to supply a patch myself ;)
|
|
|
|
|
|
|
| |
implementation. This was really to test whether my new CVS+SSH
setup is more usable than the old one -- and turns out it is (for
whatever reason, it was impossible to do a commit before that
involved more than one directory).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This patch modifies the type structures of objects that
participate in GC. The object's tp_basicsize is increased when
GC is enabled. GC information is prefixed to the object to
maintain binary compatibility. GC objects also define the
tp_flag Py_TPFLAGS_GC.
|
|
|
|
|
| |
This patch adds the type methods traverse and clear necessary for GC
implementation.
|
|
|
|
|
|
|
|
|
|
| |
For more comments, read the patches@python.org archives.
For documentation read the comments in mymalloc.h and objimpl.h.
(This is not exactly what Vladimir posted to the patches list; I've
made a few changes, and Vladimir sent me a fix in private email for a
problem that only occurs in debug mode. I'm also holding back on his
change to main.c, which seems unnecessary to me.)
|
|
|
|
| |
dictionary that contains the same key/value pairs as p.
|
|
|
|
|
|
|
|
| |
Added wrapping macros to dictobject.c, listobject.c, tupleobject.c,
frameobject.c, traceback.c that safely prevends core dumps
on stack overflow. Macros and functions in object.c, object.h.
The method is an "elevator destructor" that turns cascading
deletes into tail recursive behavior when some limit is hit.
|
|
|
|
| |
Andreas Jung <ajung@sz-sb.de>.
|
| |
|
| |
|
|
|
|
| |
make a common case slightly faster.
|
|
|
|
|
|
|
| |
Sparc Solaris 2.6 (fully patched!) that I don't want to dig into, but
which I suspect is a bug in the multithreaded malloc library that only
shows up when run on a multiprocessor. (The program wasn't using
threads, it was just using the multithreaded C library.)
|
|
|
|
|
| |
If the argument is not a dictionary, simply return NULL. If the
hash() on the key fails, clear the error.
|
|
|
|
| |
(Jeremy will hardly recognize his patch :-)
|
| |
|
|
|
|
| |
Also got rid of some unnecessary code.
|
|
|
|
|
|
|
|
|
| |
__getitem__(). This method never raises an exception; if the key is
not in the dictionary, the second (optional) argument is returned. If
the second argument is not provided and the key is missing, None is
returned.
mapp_methods: added "get" method.
|
| |
|
|
|
|
| |
improvement of pystone. Vladimir Marangozov.
|
|
|
|
| |
ones near the front.
|
| |
|
| |
|
|
|
|
|
| |
few places where we don't know how to test for them without losing
speed; don't know yet how to handle that.
|
|
|
|
| |
Fixed two 'return NULL' that should be 'return -1'.
|
|
|
|
|
|
|
| |
complexity saved much any more. A simple benchmark (grail) showed
that there were 3 times as many misses as hits, and the same number of
times again the code was bypassed altogether due to the existence of
setattro/getattro.
|
|
|
|
| |
(Sorry Jack, all your projects will have to be changed again. :-( )
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- remove bogus initialization using uninitialized i
- derive initial incr from hash
- copy mp->ma_table into a local variable
|
|
|
|
| |
Reindented the whole table.
|
|
|
|
|
|
|
|
|
| |
The table size is now constrained to be a power of two, and we use a
variable increment based on GF(2^n)-{0} (not that I have the faintest
idea what that is :-) which helps avoid the expensive '%' operation.
Some of the entries in the table of polynomials have been modified
according to a post by Tim Peters.
|
|
|
|
|
| |
string keys. Just doing a pointer compare before the string compare
(in fact before the hash compare!) is just as fast.
|