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

Jim Fulton jim at zope.com
Wed Feb 18 13:55:05 EST 2004


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

Modified Files:
	cAccessControl.c 
Log Message:
Added a missing INCREF. Dang, I can't believe I missed it.


=== Zope/lib/python/AccessControl/cAccessControl.c 1.29 => 1.30 ===
--- Zope/lib/python/AccessControl/cAccessControl.c:1.29	Wed Feb 18 12:55:43 2004
+++ Zope/lib/python/AccessControl/cAccessControl.c	Wed Feb 18 13:55:04 2004
@@ -200,22 +200,6 @@
   Py_DECREF(t);
   return r;
 }
-  
-
-static int 
-unpacktuple1(PyObject *args, char *name, int min, PyObject **a0)
-{ 
-  int l;
-  l=PyTuple_Size(args);
-  if (l < 0) return -1;
-  if (l < min) 
-    {
-      PyErr_Format(PyExc_TypeError, "expected %d arguments, got %d", min, l);
-      return -1;
-    }
-  if (l > 0) *a0=PyTuple_GET_ITEM(args, 0);
-  return 0;
-}
 
 static int 
 unpacktuple2(PyObject *args, char *name, int min, 
@@ -1899,8 +1883,6 @@
                     goto end;
                   result = PySequence_Concat(r, list_roles);
                   Py_DECREF(list_roles);
-		  if (result == NULL)
-		      goto end;
                 }
               goto end;
             }
@@ -1927,6 +1909,7 @@
                 {
                   Py_DECREF(roles);
                   result = _what_not_even_god_should_do;
+                  Py_INCREF(result);
                   goto end;
                 }
             }




More information about the Zope-Checkins mailing list