[Python-checkins] r46854 - python/trunk/Objects/frameobject.c

neal.norwitz python-checkins at python.org
Sun Jun 11 07:48:15 CEST 2006


Author: neal.norwitz
Date: Sun Jun 11 07:48:14 2006
New Revision: 46854

Modified:
   python/trunk/Objects/frameobject.c
Log:
f_code can't be NULL based on Frame_New and other code that derefs it.
So there doesn't seem to be much point to checking here.


Modified: python/trunk/Objects/frameobject.c
==============================================================================
--- python/trunk/Objects/frameobject.c	(original)
+++ python/trunk/Objects/frameobject.c	Sun Jun 11 07:48:14 2006
@@ -425,7 +425,7 @@
 	Py_CLEAR(f->f_exc_traceback);
 
         co = f->f_code;
-        if (co != NULL && co->co_zombieframe == NULL)
+        if (co->co_zombieframe == NULL)
                 co->co_zombieframe = f;
 	else if (numfree < MAXFREELIST) {
 		++numfree;
@@ -435,7 +435,7 @@
 	else 
 		PyObject_GC_Del(f);
 
-        Py_XDECREF(co);
+        Py_DECREF(co);
 	Py_TRASHCAN_SAFE_END(f)
 }
 


More information about the Python-checkins mailing list