1. 15 Apr, 2006 5 commits
    • Tim Peters's avatar
      frame_traverse(): Use the standard Py_VISIT macro. · de2acf65
      Tim Peters authored
      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).
      de2acf65
    • Tim Peters's avatar
      Trimmed trailing whitespace. · a13131cf
      Tim Peters authored
      a13131cf
    • Tim Peters's avatar
      There were no comments explaining what Py_CLEAR() did or · 9d2ced8f
      Tim Peters authored
      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.
      9d2ced8f
    • Tim Peters's avatar
      Changed comments to make sense now that the LazyList-based · 7f098112
      Tim Peters authored
      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)).
      7f098112
    • Phillip J. Eby's avatar
      Fix SF#1470508: crash in generator cycle finalization. There were two · 8ebb28df
      Phillip J. Eby authored
      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.
      8ebb28df
  2. 14 Apr, 2006 28 commits
  3. 13 Apr, 2006 7 commits