[pypy-svn] r72964 - pypy/branch/cpython-extension/pypy/module/cpyext/test

xoraxax at codespeak.net xoraxax at codespeak.net
Sat Mar 27 19:34:28 CET 2010


Author: xoraxax
Date: Sat Mar 27 19:34:27 2010
New Revision: 72964

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/test/foo.c
Log:
Add tp_call func.

Modified: pypy/branch/cpython-extension/pypy/module/cpyext/test/foo.c
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/test/foo.c	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/test/foo.c	Sat Mar 27 19:34:27 2010
@@ -76,6 +76,12 @@
     return format;
 }
 
+static PyObject *
+foo_call(PyObject *self, PyObject *args, PyObject *kwds)
+{
+    Py_INCREF(kwds);
+    return kwds;
+}
 
 static PyTypeObject footype = {
 	PyVarObject_HEAD_INIT(NULL, 0)
@@ -93,7 +99,7 @@
 	0,                        /*tp_as_sequence*/
 	0,			  /*tp_as_mapping*/
 	0, 			  /*tp_hash*/
-	0,			  /*tp_call*/
+	foo_call,			  /*tp_call*/
 	0,			  /*tp_str*/
 	0,			  /*tp_getattro*/
 	0,			  /*tp_setattro*/



More information about the Pypy-commit mailing list