An error occurred fetching the project authors.
- 10 Jun, 2002 2 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
In the TRACE_REFS version of the code, call _Py_NewReference() instead of INCREF to bump the refcount from zero to one. When exiting the function, don't DECREF the object back to zero refcount, as that will reinvoke the object's deallocation function. XXX Why did this ever work?
-
- 02 May, 2002 1 commit
-
-
Fred Drake authored
No need to generate code that is not needed!
-
- 18 Apr, 2002 3 commits
-
-
Toby Dickenson authored
-
Toby Dickenson authored
-
Toby Dickenson authored
-
- 17 Apr, 2002 1 commit
-
-
Toby Dickenson authored
fixed ZClass-related type-checking breakage introduced in reformatting in rev 1.45. I guess there are no unit tests for ZClasses?
-
- 16 Apr, 2002 1 commit
-
-
Toby Dickenson authored
-
- 15 Apr, 2002 3 commits
-
-
Jeremy Hylton authored
I think it's safe to run this code without extra checking.
-
Jeremy Hylton authored
constructor, since it is ignored and there is no current plan to support two caches with almost-but-not-quite-the-same arguments. This change has effects in many files. The Connection and DB don't pass this argument and don't bother setting it explicitly when it is reset via DB APIs like setCacheDeactivateAfter(). XXX These APIs remain, since existing code may depend on them, but they have no effect. New policy in cPersistence.c: A Persistent object can't have its _p_jar set or deleted once it is in a cache. Persistent already implemented this policy for _p_oid; it seems safer to do the same for the jar. Add ringlen() method to cache objects (implemented as cc_ringlen). This returns the length of the doubly linked list of non-ghost objects. Same as len(cache.lru_items()), but more efficient. Only used for testing at the moment. In ring_corrupt(), don't raise a new exception if one has already been set. The old behavior masked useful information about the original error / traceback.
-
Chris Withers authored
-
- 12 Apr, 2002 1 commit
-
-
Jeremy Hylton authored
Implement behavior for minimize() and full_sweep() as discussed on zodb-dev. minimize() ghostifies all unmodified objects. full_sweep() with age==0 is the same as minimize(), otherwise it's the same as incrgc(). Reformat and/or reindent lots of code. Use PyObject_Compare() instead of PyObject_Cmp() because it has a simpler return value. Fix a few more PyDict_SetItem() and PyDict_DelItem() calls to make correct check for error return.
-
- 05 Apr, 2002 1 commit
-
-
Jeremy Hylton authored
The rationale is that this is an internal detail of the cache implementation called by Per_dealloc(). It's nice to make it fast, and it's good to prevent it from being called with anything other than an about-to-be-freed object. As a result of it being in the C API, omit tests of refcounts. We would have been in Per_dealloc() otherwise. Initialize the percachdel slot of cPersistenceAPIstruct to NULL in cPersistence. In cPickleCache, import the CObject and fill in the struct. Also, reformat many of the comments so that all the text starts to the right of the /*. Fiddle the text of the placeholder comment. I think I understand it now :-). Add an XXX comment about the "old" cache API e.g. fullsweep and reallyfullsweep. Fix cc_get(). object_from_oid() doesn't ever set an exception. Remove a Py_FatalError() check from the end of a module init function. We don't do that anymore.
-
- 04 Apr, 2002 1 commit
-
-
Barry Warsaw authored
takes an exception object as its first argument, and the return value should be a -1 instead of NULL (this function's signature has an int return). I'm surprised no one else's build caught this compiler warning.
-
- 03 Apr, 2002 4 commits
-
-
Jeremy Hylton authored
(Thanks for the comments, Toby!)
-
Toby Dickenson authored
-
Toby Dickenson authored
-
Jeremy Hylton authored
Add check that argument to cc_ass_sub() is a string. The cache maps oids to objects, and oids must be strings for now. Re-indent a bunch of code. Replace an XXX comment about v->oid with a comment explaining why getattr is necessary.
-
- 02 Apr, 2002 5 commits
-
-
Barry Warsaw authored
check_ring() rename to ring_corrupt() since that matches the return semantics a bit better. scan_gc_items(): Get rid of the placeholder, which just seemed like a confusing way to stash here->next until after the PyObject_SetAttr() call.
-
Jeremy Hylton authored
-
Guido van Rossum authored
did you use?
-
Toby Dickenson authored
-
Jeremy Hylton authored
A few substantive changes: Split internals of cc_ass_sub() into two smaller function cc_add_item() and cc_del_item(), removing several levels of indentation in the process. Fix incorrect check for return value from PyDict_SetItem().
-
- 01 Apr, 2002 2 commits
-
-
Jeremy Hylton authored
Remove use of staticforward. Avoid forward reference to Cctype by defining newccobject after type struct.
-
Jeremy Hylton authored
Define the contents of ccobject_head_struct via CACHE_HEAD macro. Don't rely on two different files to define a struct with the same layout by convention. Remove many levels of parentheses from the HOME and NON_GHOST_COUNT macros. Replace KEEP_THIS_ONE_AROUND_FOR_A_WHILE() macro with a call to the accessed() function. (Who comes up with these names :-). Remove include of string.h in cPersistence.c. Expand cPersistent_HEAD macro so that it has one line for each attribute! Use typedef to define PerCache as "struct ccobject_head_struct" and use this for the entry cache slot in cPersistent_HEAD instead of PyObject *. In cPickleCache.c, reflow a bunch of long lines, add some whitespace, and an XXX comment explaining that I don't understand a different comment.
-
- 27 Mar, 2002 1 commit
-
-
Toby Dickenson authored
-
- 08 Mar, 2002 1 commit
-
-
Jeremy Hylton authored
Fix SF bug #516768 reported by Dave Wallace. Replace use of PyMem_DEL() with PyObject_Del() on object dealloc functions. The use of PyMem_DEL() is incorrect for object deallocation, because it only ever calls the low-level free(). If a custom allocator like pymalloc is used, it needs to be called to free the memory.
-
- 11 Feb, 2002 2 commits
-
-
Guido van Rossum authored
-
Jeremy Hylton authored
Summary of changes: - Add function gc_all_items() to call gc_item() on everything in dict. This factors out common code in all the gc methods. - Add check_size() function that factors out code to check cache size before starting a gc. - Simplify argument processing in cc_invalidate(), avoiding a second call to PyArg_ParseTuple() when argument is a sequence instead of a dictionary. - Chance code to reflect belief that NULL return from PyDict_GetItem() does not set exception, except in cases that don't apply for the pickle cache like comparing a string with high-order bit set to a Unicode object. - Use if (!expr) instead of UNLESS(). - Remove all statements from conditionals. - Reformat to 4 spaces and Python-style brace placement. - Put whitespace around operators and after commas.
-
- 25 Jan, 2002 1 commit
-
-
Guido van Rossum authored
-
- 28 Nov, 2001 1 commit
-
-
matt@zope.com authored
-
- 08 Nov, 2001 1 commit
-
-
Barry Warsaw authored
decref the revision string, added to the module dict with the keys "__version__". This fixes a small leaks detected by Insure. Also, at the end of the function, we do a PyErr_Occurred() check and throw a fatal error if true. This makes this module's init function more in line with other init functions in this package.
-
- 06 Nov, 2001 2 commits
-
-
Jeremy Hylton authored
-
Jeremy Hylton authored
DB.py: typo in comment cPickleCache.c: fix cache sweep logic cPersistence.c: small performance changes
-
- 28 Mar, 2001 2 commits
-
-
Jim Fulton authored
cPersistence.c to avoid compiler warnings in cPickleCache and coptimizations.
-
Jeremy Hylton authored
add parens and module doc string
-
- 13 Oct, 1999 1 commit
-
-
Jim Fulton authored
ignored and an indeterminate value used instead.
-
- 07 Oct, 1999 1 commit
-
-
Jim Fulton authored
a transaction could, in rare cases cause inconsistent computations. Also added argument to incrgc to allow more aggressive GC.
-
- 23 Sep, 1999 1 commit
-
-
Jim Fulton authored
moving parts. The minimize machinery didn;t use the correct time units. The incremental GC had some bugs that made it too conservative.
-
- 20 Jul, 1999 1 commit
-
-
Jim Fulton authored
used an incorrect variable name.
-