[Zope-Checkins] CVS: Zope/lib/Components/ExtensionClass/src - Acquisition.h:1.1.32.1
Jim Fulton
jim@zope.com
Mon, 15 Oct 2001 17:23:14 -0400
Update of /cvs-repository/Zope/lib/Components/ExtensionClass/src
In directory cvs.zope.org:/tmp/cvs-serv21338/lib/Components/ExtensionClass/src
Modified Files:
Tag: cAccessControl-review-branch
Acquisition.h
Log Message:
Checking in changes made during review of new cAccessControl
implementation. The changes fall into two classes:
- Changes made to C code
- Switching to use of Unauthorized class exception.
This one is especially significant. :)
=== Zope/lib/Components/ExtensionClass/src/Acquisition.h 1.1 => 1.1.32.1 ===
#define aq_init() { \
- PyObject *module; \
- PyObject *api; \
- if ((module = PyImport_ImportModule("Acquisition")) == NULL) \
- Py_FatalError("Acquisition CAPI failed to load Acquisition"); \
- if ((api = PyObject_GetAttrString(module,"AcquisitionCAPI")) \
- == NULL) Py_FatalError("Acquisition CAPI failed to load AcquistionCAPI"); \
- Py_DECREF(module); \
- AcquisitionCAPI = PyCObject_AsVoidPtr(api); \
- Py_DECREF(api); \
+ PyObject *module; \
+ PyObject *api; \
+ if (! (module = PyImport_ImportModule("Acquisition"))) return; \
+ if (! (api = PyObject_GetAttrString(module,"AcquisitionCAPI"))) return; \
+ Py_DECREF(module); \
+ AcquisitionCAPI = PyCObject_AsVoidPtr(api); \
+ Py_DECREF(api); \
}