[Zope-Checkins] CVS: Zope/lib/python/AccessControl - cAccessControl.c:1.13.2.2

Matthew T. Kromer matt@zope.com
Fri, 12 Apr 2002 11:18:45 -0400


Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv4869

Modified Files:
      Tag: Zope-2_5-branch
	cAccessControl.c 
Log Message:
Change cAccessControl's PermissionRole deallocator to handle the case where
the object pointers aren't initialized (because the constructor was called
with an invalid number of arguments)  This just amounts to using the XDECREF
macro rather than DECREF.


=== Zope/lib/python/AccessControl/cAccessControl.c 1.13.2.1 => 1.13.2.2 ===
 static void PermissionRole_dealloc(PermissionRole *self) {
 
-	Py_DECREF(self->__name__);
+	Py_XDECREF(self->__name__);
 
-	Py_DECREF(self->_p);
+	Py_XDECREF(self->_p);
 
-	Py_DECREF(self->__roles__);
+	Py_XDECREF(self->__roles__);
 
-	Py_DECREF(self->ob_type);	/* Extensionclass init incref'd */
+	Py_XDECREF(self->ob_type);	/* Extensionclass init incref'd */
 
 	PyMem_DEL(self);  
 }