[Zope-Checkins] CVS: Zope3/lib/python/Zope/ContextWrapper - wrapper.c:1.12.2.5

Jim Fulton jim@zope.com
Fri, 30 Nov 2001 16:08:34 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/ContextWrapper
In directory cvs.zope.org:/tmp/cvs-serv11283

Modified Files:
      Tag: Zope-3x-branch
	wrapper.c 
Log Message:
Added call slot.


=== Zope3/lib/python/Zope/ContextWrapper/wrapper.c 1.12.2.4 => 1.12.2.5 ===
 }
 
+static PyObject *
+wrap_call(PyObject *self, PyObject *args, PyObject *kw)
+{
+  if (kw)
+    return PyEval_CallObjectWithKeywords(Wrapper_GetObject(self), args, kw);
+  else
+    return PyObject_CallObject(Wrapper_GetObject(self), args);
+}
+
 /*
  *   Sequence methods
  */
@@ -290,7 +299,7 @@
     &wrap_as_sequence,			/* tp_as_sequence */
     &wrap_as_mapping,			/* tp_as_mapping */
     wrap_hash,				/* tp_hash */
-    0,					/* tp_call */
+    wrap_call,					/* tp_call */
     wrap_str,				/* tp_str */
     wrap_getattro,			/* tp_getattro */
     wrap_setattro,			/* tp_setattro */