[Zope3-checkins] CVS: Zope3/src/zope/proxy/context - wrapper.c:1.11 wrapper.h:1.3

Steve Alexander steve@cat-box.net
Wed, 7 May 2003 11:50:41 -0400


Update of /cvs-repository/Zope3/src/zope/proxy/context
In directory cvs.zope.org:/tmp/cvs-serv5424/src/zope/proxy/context

Modified Files:
	wrapper.c wrapper.h 
Log Message:
Fixed up wrapper module FQN.
Exported WrapperType from wrapper.h.


=== Zope3/src/zope/proxy/context/wrapper.c 1.10 => 1.11 ===
--- Zope3/src/zope/proxy/context/wrapper.c:1.10	Wed May  7 05:32:59 2003
+++ Zope3/src/zope/proxy/context/wrapper.c	Wed May  7 11:50:40 2003
@@ -19,8 +19,7 @@
 static PyTypeObject WrapperType;
 static PyTypeObject ContextAwareType;
 
-static PyObject *
-empty_tuple = NULL;
+static PyObject *empty_tuple = NULL;
 
 /* We need to use PyStrings for the various python special method names,
  * such as __len__ and next and __getitem__.
@@ -1274,6 +1273,7 @@
 
 static WrapperInterface
 wrapper_capi = {
+    &WrapperType,
     api_check,
     api_create,
     api_getobject,
@@ -1504,9 +1504,7 @@
 associated with a reference to the basic object.  The wrapper objects\n\
 act as proxies for the original object.";
 
-static PyObject *
-api_object = NULL;
-
+static PyObject *api_object = NULL;
 
 void
 initwrapper(void)


=== Zope3/src/zope/proxy/context/wrapper.h 1.2 => 1.3 ===
--- Zope3/src/zope/proxy/context/wrapper.h:1.2	Wed Dec 25 09:15:16 2002
+++ Zope3/src/zope/proxy/context/wrapper.h	Wed May  7 11:50:40 2003
@@ -21,6 +21,7 @@
 } WrapperObject;
 
 typedef struct {
+    PyTypeObject *wrappertype;
     int (*check)(PyObject *obj);
     PyObject *(*create)(PyObject *object, PyObject *context);
     PyObject *(*getobject)(PyObject *wrapper);
@@ -48,7 +49,7 @@
 Wrapper_Import(void)
 {
     if (_wrapper_api == NULL) {
-        PyObject *m = PyImport_ImportModule("Zope.ContextWrapper.wrapper");
+        PyObject *m = PyImport_ImportModule("zope.proxy.context.wrapper");
         if (m != NULL) {
             PyObject *tmp = PyObject_GetAttrString(m, "_CAPI");
             if (tmp != NULL) {
@@ -62,6 +63,8 @@
     return (_wrapper_api == NULL) ? -1 : 0;
 }
 
+#define WrapperType                       \
+        (_wrapper_api->wrappertype)
 #define Wrapper_Check(obj)                   \
         (_wrapper_api->check((obj)))
 #define Wrapper_New(object, context)         \