[Python-checkins] r70551 - in python/branches/py3k: Objects/dictobject.c Objects/tupleobject.c

antoine.pitrou python-checkins at python.org
Mon Mar 23 20:19:56 CET 2009


Author: antoine.pitrou
Date: Mon Mar 23 20:19:54 2009
New Revision: 70551

Log:
Merged revisions 70550 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70550 | antoine.pitrou | 2009-03-23 20:17:00 +0100 (lun., 23 mars 2009) | 3 lines
  
  The tracking statistics were actually too pessimistic
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Objects/dictobject.c
   python/branches/py3k/Objects/tupleobject.c

Modified: python/branches/py3k/Objects/dictobject.c
==============================================================================
--- python/branches/py3k/Objects/dictobject.c	(original)
+++ python/branches/py3k/Objects/dictobject.c	Mon Mar 23 20:19:54 2009
@@ -500,6 +500,7 @@
 			_PyObject_GC_MAY_BE_TRACKED(ep[i].me_key))
 			return;
 	}
+	DECREASE_TRACK_COUNT
 	_PyObject_GC_UNTRACK(op);
 }
 

Modified: python/branches/py3k/Objects/tupleobject.c
==============================================================================
--- python/branches/py3k/Objects/tupleobject.c	(original)
+++ python/branches/py3k/Objects/tupleobject.c	Mon Mar 23 20:19:54 2009
@@ -50,9 +50,6 @@
 {
 	register PyTupleObject *op;
 	Py_ssize_t i;
-#ifdef SHOW_TRACK_COUNT
-	count_tracked++;
-#endif
 	if (size < 0) {
 		PyErr_BadInternalCall();
 		return NULL;
@@ -104,6 +101,9 @@
 		Py_INCREF(op);	/* extra INCREF so that this is never freed */
 	}
 #endif
+#ifdef SHOW_TRACK_COUNT
+	count_tracked++;
+#endif
 	_PyObject_GC_TRACK(op);
 	return (PyObject *) op;
 }


More information about the Python-checkins mailing list