[Zope-Checkins] CVS: Zope/lib/python/AccessControl -
cAccessControl.c:1.17.6.7
Brian Lloyd
brian at zope.com
Tue Jan 27 12:10:55 EST 2004
Update of /cvs-repository/Zope/lib/python/AccessControl
In directory cvs.zope.org:/tmp/cvs-serv32520
Modified Files:
Tag: Zope-2_6-branch
cAccessControl.c
Log Message:
policy fixes
=== Zope/lib/python/AccessControl/cAccessControl.c 1.17.6.6 => 1.17.6.7 ===
--- Zope/lib/python/AccessControl/cAccessControl.c:1.17.6.6 Tue Jan 27 10:27:17 2004
+++ Zope/lib/python/AccessControl/cAccessControl.c Tue Jan 27 12:10:54 2004
@@ -799,7 +799,11 @@
Py_XINCREF(roles); /* Convert the borrowed ref to a real one */
/*| containerbase = aq_base(container)
- **| accessedbase = getattr(accessed, 'aq_base', container)
+ **| accessedbase = aq_base(accessed)
+ **| if accessedbase is accessed:
+ **| # accessed is not a wrapper, so assume that the
+ **| # value could not have been acquired.
+ **| accessedbase = container
*/
containerbase = aq_base(container);
@@ -852,7 +856,7 @@
**| if containerbase is not accessedbase: return 0
**| else:
**| # Try to acquire roles
- **| try: roles = aq('__roles__')
+ **| try: roles = container.aq_aquire('__roles__')
**| except AttributeError:
**| roles = _noroles
**| if containerbase is not accessedbase: return 0
@@ -1257,11 +1261,10 @@
else
rval = PyInt_FromLong(0);
err:
-
- Py_XDECREF(stack);
- Py_XDECREF(roles);
Py_XDECREF(containerbase);
Py_XDECREF(accessedbase);
+ Py_XDECREF(stack);
+ Py_XDECREF(roles);
return rval;
}
More information about the Zope-Checkins
mailing list