- 23 Jun, 2002 2 commits
-
-
Tim Peters authored
returning X, contradicting the docs and common sense. difference(None, X) continues to return None.
-
Tim Peters authored
Noted that the way difference() treats None doesn't match the docs and is almost certainly wrong.
-
- 22 Jun, 2002 1 commit
-
-
Tim Peters authored
nextBTreeItems() and nextTreeSetItems(): ditto.
-
- 21 Jun, 2002 3 commits
-
-
Tim Peters authored
the recursion (iteration is quite natural here -- it was tail-recursive).
-
Shane Hathaway authored
self, which effectively turned the error into a fatal error. Fixed.
-
Tim Peters authored
code, are bogus when PERSISTENCE is #define'd. Repair them.
-
- 20 Jun, 2002 3 commits
-
-
Jeremy Hylton authored
-
Tim Peters authored
-
Tim Peters authored
a BTree is empty if and only if its firstbucket pointer is NULL, so there's no need to keep checking nonzero inside the loop. Also, the pointers here are all local, so there's no need to incref and decref them -- the apparent necessity was just an artifact of using the bucket assignment macros. So stopped using those macros, and the need for incref/decref operations went away too. PyVar_AssignB(), ASSIGNB(), ASSIGNBC(): Turned out these are no longer used anywhere anymore, so removed them. PER_UNUSE(): New macro to capture the endlessly repeated PER_ALLOW_DEACTIVATION + PER_ACCESSED pair. As the comment says, so sue me <wink>. Bucket_deleteNextBucket(): Documented & simplified.
-
- 19 Jun, 2002 2 commits
-
-
Tim Peters authored
of verifying that BTree invariants are satisfied, raising AssertionError if they're not. Nothing calls this method by magic; it's for debugging.
-
Jeremy Hylton authored
-
- 18 Jun, 2002 6 commits
-
-
Tim Peters authored
some of this code is needed, and to help track down an odd bug Guido is seeing. assert()s won't trigger except in a debug build.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
The old ZEO test suite does not accept description as a keyword arg. Luckily the description is only there to help debug problems; it isn't required for successful completion of the test.
-
Tim Peters authored
PyMalloc(), PyRealloc(): Call malloc() and realloc() directly instead of PyMem_Malloc() and PyMem_Realloc(). If the latter are used, then memory must be freed via PyMem_Free(), but PyMem_Free() isn't called anywhere -- memory is released via raw system free(). It would probably be better to change all uses of free() instead, but that's A Project (well, compared to this ...).
-
Tim Peters authored
is now almost as simple as it's been trying to be <wink>.
-
Tim Peters authored
mean any of no error, an expected index error, or an unexpected error; naturally, callers conflated those. The return value now distinguishes among the cases. BTreeItems_seek(): Use the new form of PreviousBucket().
-
- 17 Jun, 2002 9 commits
-
-
Tim Peters authored
-
Tim Peters authored
purpose wasn't clear, and the few places that bothered to call them seemed to be trying to cater to empty buckets. But empty buckets aren't legitimate in a BTree (or, if they are, lots of BTree code is broken). BTreeItems struct: finished figuring out what's in this, and documented it. BTreeItems_seek(): rewrote and simplified, to avoid use of the now- removed XYZBucketOffset() functions. Repaired places where bucket access time wasn't getting updated. There are still insecurities in its use of PreviousBucket() (for another day). BTreeItems_slice(): now that I know what it is <wink>, create an empty slice in the intended way. NewBTreeItems(): documented its calling sequence, and added code to protect against a NULL highbucket argument. BTree_maxminKey(): no longer calls the XYZBucketOffset() functions.
-
Tim Peters authored
a BTree in an invalid state. Normally, _BTree_set() repairs this before return, but in case of error may not. Now it does.
-
Tim Peters authored
-
Tim Peters authored
an error return leaked references.
-
Tim Peters authored
-
Tim Peters authored
a BTree in an invalid state when called with an empty BTree. I still need to change callers to ensure that the BTree is never left in that invalid state (it can be now).
-
Tim Peters authored
between the Zope2 and Zope3 versions.
-
Tim Peters authored
deletion endcases uncovered by the new degenerate-BTree tests. The degenerate testDeletes() and testEmptyFirstBucketReportedByGuido() are enabled now.
-
- 14 Jun, 2002 6 commits
-
-
Jeremy Hylton authored
-
Tim Peters authored
disabled for now, because it dies in lots of ways. I hope, but don't know, that they're all related to "Guido's bug". Also backported the "Guido's bug" test case from the Zope3 project. This is also disabled for now.
-
Jeremy Hylton authored
-
Jeremy Hylton authored
changed() in cPersistence.c now calls the jar's register() method. Connection's register() method just calls get_transaction().register(). This redirection would allow specialized Connection's to change the default policy on how the transaction manager is selected without hacking the Transaction module. The cPersistence.c code is based on _PyPersist_RegisterDataManager() from the Zope3 code.
-
Jeremy Hylton authored
XXX Should start still do path munging?
-
Jeremy Hylton authored
-
- 13 Jun, 2002 8 commits
-
-
Tim Peters authored
search returned a seemingly random slice of the tree. A new test on the painfully constructed highly-degenerate BTree turned up lots of these. It turns out that BTree_rangeSearch had a much harder job than it thought it had <0.7 wink>.
-
Tim Peters authored
for lo > hi either, except if they happened to be in the same bucket. All sorts of strange results followed (the range should be empty if lo > hi, and is after this patch).
-
Tim Peters authored
passed in, it was quite possible for this to return *low > *high, and the caller could crash due to trying to create a list with "negative length". Changed the routine to consider a range empty if min>max on input, and added test cases that fail before this patch.
-
Tim Peters authored
-
Tim Peters authored
legitimate) BTree. New test testDegenerateBasicOps() does basic sanity checks on it. More tests against this tree will follow.
-
Tim Peters authored
classes entirely (like for IITreeSets), and to run other test classes twice.
-
Tim Peters authored
plus cleanup of a previous such fix.
-
Tim Peters authored
bucket reference. BTree_rangeSearch(): Fixed one place likewise.
-