summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use Py_VISIT in all tp_traverse methods, instead of traversing manually orThomas Wouters2006-04-1520-340/+109
| | | | | | | | 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
* - Whitespace normalizationThomas Wouters2006-04-151-12/+14
| | | | | | - In functions where we already hold the same object in differently typed pointers, use the correctly typed pointer instead of casting the other pointer a second time.
* Fix typo.Thomas Heller2006-04-151-1/+1
|
* Fix for FreeBSD. Fixes http://python.org/sf/1470353.Thomas Heller2006-04-151-2/+2
| | | | Looks like a libffi bug.
* Zap ZAP.Martin v. Löwis2006-04-151-25/+18
|
* Patch #1470875: Building Python with MS Free Compiler.Martin v. Löwis2006-04-154-0/+171
|
* Remove partial change (don't edit, commit and think at the same time :P)Thomas Wouters2006-04-151-1/+0
|
* Re-instate backward compatibility by defining Py_CLEAR if it isn'tThomas Wouters2006-04-151-0/+14
| | | | available.
* Use Py_CLEAR instead of in-place DECREF/XDECREF or custom macros, forThomas Wouters2006-04-158-57/+30
| | | | tp_clear methods.
* Clear dummy and emptyfrozenset, so that we don't haveMartin v. Löwis2006-04-151-2/+2
| | | | | dangling references in case of a Py_Initialize/Py_Finalize cycle.
* Fix sys.getobjects(0): we get a reference to theMartin v. Löwis2006-04-151-0/+3
| | | | | arena's "private" list of objects, so there might be two references to that list.
* Unlink the structseq type from the global list ofMartin v. Löwis2006-04-151-0/+8
| | | | | | | objects before initializing it. It might be linked already if there was a Py_Initialize/Py_Finalize cycle earlier; not unlinking it would break the global list.
* Patch #1191700: Adjust column alignment in bdb breakpoint lists.Martin v. Löwis2006-04-152-3/+5
| | | | Backported to 2.4.
* Patch #1191065: Fix preprocessor problems on systems where recvfromMartin v. Löwis2006-04-152-6/+11
| | | | is a macro.
* Patch #1161914: Add python-config.Martin v. Löwis2006-04-153-0/+56
|
* frame_clear(): Explain why it's important to make the frameTim Peters2006-04-151-18/+11
| | | | | look dead right at the start. Use Py_CLEAR for four more frame members.
* frame_traverse(): Use the standard Py_VISIT macro.Tim Peters2006-04-152-23/+21
| | | | | | | Py_VISIT: cast the `op` argument to PyObject* when calling `visit()`. Else the caller has to pay too much attention to this silly detail (e.g., frame_traverse needs to traverse `struct _frame *` and `PyCodeObject *` pointers too).
* Trimmed trailing whitespace.Tim Peters2006-04-151-13/+12
|
* There were no comments explaining what Py_CLEAR() did orTim Peters2006-04-151-0/+34
| | | | | | | why it's important. Now there are ;-) If someone else hasn't already, I'll add a Py_CLEAR cleanup task to the TODO Wiki next.
* Changed comments to make sense now that the LazyList-basedTim Peters2006-04-151-4/+6
| | | | | | | | | | | | | | | | | examples no longer require any explicit closing to avoid leaking. That the tee-based examples still do is (I think) still a mystery. Part of the mystery is that gc.garbage remains empty: if it were the case that some generator in a trash cycle said it needed finalization, suppressing collection of that cycle, that generator _would_ show up in gc.garbage. So this is acting more like, e.g., some tp_traverse slot isn't visiting all the pointers it should (in which case the skipped pointer(s) would act like an external root, silently suppressing collection of everything reachable from it(them)).
* Fix SF#1470508: crash in generator cycle finalization. There were twoPhillip J. Eby2006-04-153-26/+22
| | | | | | | | | | | problems: first, PyGen_NeedsFinalizing() had an off-by-one bug that prevented it from ever saying a generator didn't need finalizing, and second, frame objects cleared themselves in a way that caused their owning generator to think they were still executable, causing a double deallocation of objects on the value stack if there was still a loop on the block stack. This revision also removes some unnecessary close() operations from test_generators that are now appropriately handled by the cycle collector.
* Coverity-found bug: datetime_strptime() failed to check for NULL return fromThomas Wouters2006-04-141-0/+4
| | | | | | PySequence_GetItem of the time.strptime() result. Not a high probability bug, but not inconceivable either, considering people can provide their own 'time' module.
* Add an item; better crediting; fix error in SQL example; minor editsAndrew M. Kuchling2006-04-141-32/+29
|
* Typo fixAndrew M. Kuchling2006-04-141-1/+1
|
* Whitespace normalization.Tim Peters2006-04-141-16/+16
|
* Add a BufferedIncrementalEncoder class that can be used for implementingWalter Dörwald2006-04-143-9/+169
| | | | | | | | | an incremental encoder that must retain part of the data between calls to the encode() method. Fix the incremental encoder and decoder for the IDNA encoding. This closes SF patch #1453235.
* Make error message less misleading for u"a..b".encode("idna").Walter Dörwald2006-04-141-3/+3
|
* Patch #702933: Undocument PyObject_NEW, PyObject_NEW_VAR,Martin v. Löwis2006-04-142-20/+1
| | | | and PyObject_DEL.
* Fix wrong attribute name.Walter Dörwald2006-04-141-1/+1
|
* Make raise statements PEP 8 compatible.Walter Dörwald2006-04-141-11/+11
|
* Patch #1045620: Prepend Modules/ before Setup in stdout.Martin v. Löwis2006-04-142-5/+5
|
* Patch #1470300: Port _hotshot to QNX4.25 port.Martin v. Löwis2006-04-141-2/+2
|
* Patch #1355883: Build Python-ast.c and Python-ast.hMartin v. Löwis2006-04-142-35/+40
| | | | independently. Fixes #1355883.
* Show case: reference cycles involving only the ob_type field are ratherArmin Rigo2006-04-141-0/+13
| | | | uncommon but possible. Inspired by SF bug 1469629.
* Typo fixAndrew M. Kuchling2006-04-141-1/+1
|
* Patch #1324762: Change --with-cxx to --with-cxx-main.Martin v. Löwis2006-04-146-356/+281
|
* Call encode()/decode() with final==True as the last call in theWalter Dörwald2006-04-141-0/+4
| | | | incremental codec tests.
* Typo fixesAndrew M. Kuchling2006-04-141-2/+2
|
* Add more itemsAndrew M. Kuchling2006-04-141-10/+70
|
* Typo fixAndrew M. Kuchling2006-04-141-1/+1
|
* Add an item and a reminderAndrew M. Kuchling2006-04-141-0/+9
|
* Make Py_BuildValue, PyObject_CallFunction andMartin v. Löwis2006-04-148-65/+172
| | | | PyObject_CallMethod aware of PY_SSIZE_T_CLEAN.
* Copy note from leakers README here too. We want to keep all test cases.Neal Norwitz2006-04-141-0/+5
|
* Restore test tee with some modifications.Neal Norwitz2006-04-141-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test case came from test_generators, not test_itertools. Ensure there's no cyclic garbage we are counting. This is weird because it leaks, then reaches a limit: python.exe -i test_tee.py >>> leak() 0 [26633 refs] >>> leak() 0 [26658 refs] >>> leak() 0 [26683 refs] >>> leak() 0 [26708 refs] >>> leak() 0 [26708 refs] >>> leak() 0 [26708 refs] >>> leak() 0
* Move the old test_generator_cycle.py which leaked but was removed into the testNeal Norwitz2006-04-141-0/+17
|
* Update notes to address cyclic garbage and what should happen when a test is ↵Neal Norwitz2006-04-141-0/+13
| | | | fixed.
* SF Bug #1454485, array.array('u') could crash the interpreter whenNeal Norwitz2006-04-142-5/+9
| | | | | | | | passing a string. Martin already fixed the actual crash by ensuring Py_UNICODE is unsigned. As discussed on python-dev, this fix removes the possibility of creating a unicode string from a raw buffer. There is an outstanding question of how to fix the crash in 2.4.
* Added George Yoshida.Tim Peters2006-04-141-0/+6
|
* ALIGNMENT_SHIFT is not usedNeal Norwitz2006-04-141-1/+0
|
* When using -R, lots of "*** DocTestRunner.merge:" nuisance messagesTim Peters2006-04-131-1/+3
| | | | | | | appear. Get rid of them by nuking doctest's default DocTestRunner instance as part of cleanup(). Also cleanup() before running the first test repetition (the test was run once before we get into the -R branch).