Commit 2ca62e1a authored by Jim Fulton's avatar Jim Fulton

Changed to use new-style ExtensionClass.

parent dbd3a4b3
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE. DAMAGE.
$Id: cAccessControl.c,v 1.22 2003/10/24 01:21:48 chrism Exp $ $Id: cAccessControl.c,v 1.23 2003/11/28 16:44:12 jim Exp $
If you have questions regarding this software, If you have questions regarding this software,
contact: contact:
...@@ -449,7 +449,7 @@ static PyExtensionClass ZopeSecurityPolicyType = { ...@@ -449,7 +449,7 @@ static PyExtensionClass ZopeSecurityPolicyType = {
NULL, /* tp_next */ NULL, /* tp_next */
#endif #endif
METHOD_CHAIN(ZopeSecurityPolicy_methods),/* methods */ METHOD_CHAIN(ZopeSecurityPolicy_methods),/* methods */
EXTENSIONCLASS_BINDABLE_FLAG, /* flags */ (void*)(EXTENSIONCLASS_BINDABLE_FLAG), /* flags */
}; };
...@@ -567,11 +567,8 @@ static PyExtensionClass PermissionRoleType = { ...@@ -567,11 +567,8 @@ static PyExtensionClass PermissionRoleType = {
NULL, /* tp_next */ NULL, /* tp_next */
#endif #endif
METHOD_CHAIN(PermissionRole_methods), /* methods */ METHOD_CHAIN(PermissionRole_methods), /* methods */
EXTENSIONCLASS_BINDABLE_FLAG/*| (void*)(EXTENSIONCLASS_BINDABLE_FLAG) /*|
EXTENSIONCLASS_INSTDICT_FLAG*/, /* flags */ EXTENSIONCLASS_INSTDICT_FLAG*/, /* flags */
NULL, /* Class dict */
NULL, /* bases */
NULL, /* reserved */
}; };
static char imPermissionRole__doc__[] = "imPermissionRole C implementation"; static char imPermissionRole__doc__[] = "imPermissionRole C implementation";
...@@ -632,7 +629,7 @@ static PyExtensionClass imPermissionRoleType = { ...@@ -632,7 +629,7 @@ static PyExtensionClass imPermissionRoleType = {
NULL, /* tp_next */ NULL, /* tp_next */
#endif #endif
METHOD_CHAIN(imPermissionRole_methods), /* methods */ METHOD_CHAIN(imPermissionRole_methods), /* methods */
EXTENSIONCLASS_BINDABLE_FLAG, /* flags */ (void*)(EXTENSIONCLASS_BINDABLE_FLAG), /* flags */
}; };
...@@ -2073,17 +2070,12 @@ void initcAccessControl(void) { ...@@ -2073,17 +2070,12 @@ void initcAccessControl(void) {
if (ZopeSecurityPolicy_setup() < 0) return; if (ZopeSecurityPolicy_setup() < 0) return;
ZopeSecurityPolicyType.tp_getattro =
(getattrofunc) PyExtensionClassCAPI->getattro;
ExtensionClassGetattro= PyExtensionClassCAPI->getattro; ExtensionClassGetattro= Py_FindAttr;
imPermissionRoleType.tp_getattro =
(getattrofunc) PyExtensionClassCAPI->getattro;
module = Py_InitModule3("cAccessControl", module = Py_InitModule3("cAccessControl",
cAccessControl_methods, cAccessControl_methods,
"$Id: cAccessControl.c,v 1.22 2003/10/24 01:21:48 chrism Exp $\n"); "$Id: cAccessControl.c,v 1.23 2003/11/28 16:44:12 jim Exp $\n");
aq_init(); /* For Python <= 2.1.1, aq_init() should be after aq_init(); /* For Python <= 2.1.1, aq_init() should be after
Py_InitModule(). */ Py_InitModule(). */
......
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