[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ Forward port fix for Collector #1799.

Tres Seaver tseaver at palladion.com
Fri Jun 3 03:42:38 EDT 2005


Log message for revision 30617:
  Forward port fix for Collector #1799.

Changed:
  U   Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
  U   Zope/branches/Zope-2_8-branch/lib/python/Acquisition/_Acquisition.c

-=-
Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
===================================================================
--- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt	2005-06-02 22:05:14 UTC (rev 30616)
+++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt	2005-06-03 07:42:38 UTC (rev 30617)
@@ -26,6 +26,9 @@
 
     Bugs Fixed
 
+      - Collector #1799: Avoid lying about parent's refcount when
+        calling back into Python code.
+
       - Collector #889:  made 'and' operator for KeywordIndexes actually
         restrict results as expected (thanks to 'aroda' for the patch!).
 

Modified: Zope/branches/Zope-2_8-branch/lib/python/Acquisition/_Acquisition.c
===================================================================
--- Zope/branches/Zope-2_8-branch/lib/python/Acquisition/_Acquisition.c	2005-06-02 22:05:14 UTC (rev 30616)
+++ Zope/branches/Zope-2_8-branch/lib/python/Acquisition/_Acquisition.c	2005-06-03 07:42:38 UTC (rev 30617)
@@ -155,9 +155,9 @@
 
   UNLESS(r=PyObject_GetAttr(inst, py__of__)) return NULL;
   UNLESS(t=PyTuple_New(1)) goto err;
+  Py_INCREF(parent);
   PyTuple_SET_ITEM(t,0,parent);
   ASSIGN(r,PyObject_CallObject(r,t));
-  PyTuple_SET_ITEM(t,0,NULL);
   Py_DECREF(t);
 
   if (r != NULL



More information about the Zope-Checkins mailing list