aq_parent and aq_inner work on non-wrappers as well now, no need to break out

of the loop here.
parent 64c3776a
...@@ -1878,13 +1878,11 @@ c_rolesForPermissionOn(PyObject *perm, PyObject *object, ...@@ -1878,13 +1878,11 @@ c_rolesForPermissionOn(PyObject *perm, PyObject *object,
/* /*
object = getattr(object, 'aq_inner', None) object = aq_inner(object)
if object is None: if object is None:
break break
object = object.aq_parent object = object.__parent__
*/ */
if (! aq_isWrapper(object))
break;
{ {
PyObject *tobj = aq_inner(object); PyObject *tobj = aq_inner(object);
if (tobj == NULL) if (tobj == NULL)
...@@ -1895,8 +1893,6 @@ c_rolesForPermissionOn(PyObject *perm, PyObject *object, ...@@ -1895,8 +1893,6 @@ c_rolesForPermissionOn(PyObject *perm, PyObject *object,
if (object == Py_None) if (object == Py_None)
break; break;
if (! aq_isWrapper(object))
break;
tobj = aq_parent(object); tobj = aq_parent(object);
if (tobj == NULL) if (tobj == NULL)
goto end; goto end;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment