summaryrefslogtreecommitdiffstats
path: root/Objects/cellobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Another problem reported by Coverity. Backport candidate.Neal Norwitz2006-06-301-0/+2
|
* Use Py_VISIT in all tp_traverse methods, instead of traversing manually orThomas Wouters2006-04-151-2/+1
| | | | | | | | using a custom, nearly-identical macro. This probably changes how some of these functions are compiled, which may result in fractionally slower (or faster) execution. Considering the nature of traversal, visiting much of the address space in unpredictable patterns, I'd argue the code readability and maintainability is well worth it ;P
* Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, forThomas Wouters2006-04-151-2/+1
| | | | tp_clear methods.
* Previously, Python code had no easy way to access the contents of aGeorg Brandl2006-03-181-0/+19
| | | | | cell object. Now, a ``cell_contents`` attribute has been added (closes patch #1170323).
* Use new GC API.Neil Schemenauer2001-08-291-6/+6
|
* repr's converted to using PyString_FromFormat() instead of sprintf'ingBarry Warsaw2001-08-241-7/+5
| | | | | | into a hardcoded char* buffer. Closes patch #454743.
* Merge of descr-branch back into trunk.Tim Peters2001-08-021-1/+1
|
* Variety of small INC/DECREF patches that fix reported memory leaksJeremy Hylton2001-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | with free variables. Thanks to Martin v. Loewis for finding two of the problems. This fixes SF buf 405583. There is also a C API change: PyFrame_New() is reverting to its pre-2.1 signature. The change introduced by nested scopes was a mistake. XXX Is this okay between beta releases? cell_clear(), the GC helper, must decref its reference to break cycles. frame_dealloc() must dealloc all cell vars and free vars in addition to locals. eval_code2() setup code must INCREF cells it copies out of the closure. The STORE_DEREF opcode implementation must DECREF the object it passes to PyCell_Set().
* PEP 227 implementationJeremy Hylton2001-01-251-0/+115
A cell contains a reference to a single PyObject. It could be implemented as a mutable, one-element sequence, but the separate type has less overhead.