[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/security/_zope_security_checker.c Added check for the possibility that __Security_checker__ hase a value

Jim Fulton jim at zope.com
Fri Jul 2 18:17:11 EDT 2004


Log message for revision 26079:
Added check for the possibility that __Security_checker__ hase a value
of None.



-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/security/_zope_security_checker.c
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/security/_zope_security_checker.c	2004-07-02 22:11:26 UTC (rev 26078)
+++ Zope3/branches/ZopeX3-3.0/src/zope/security/_zope_security_checker.c	2004-07-02 22:17:11 UTC (rev 26079)
@@ -227,6 +227,11 @@
 /*         checker = getattr(value, '__Security_checker__', None) */
   checker = PyObject_GetAttr(value, str___Security_checker__);
 /*         if checker is None: */
+  if (checker == Py_None)
+    {
+      Py_DECREF(checker);
+      checker = NULL;
+    }
   if (checker == NULL)
     {
       PyErr_Clear();



More information about the Zope3-Checkins mailing list