[pypy-svn] r74329 - pypy/trunk/pypy/module/cpyext/test

fijal at codespeak.net fijal at codespeak.net
Mon May 3 02:04:49 CEST 2010


Author: fijal
Date: Mon May  3 02:04:47 2010
New Revision: 74329

Modified:
   pypy/trunk/pypy/module/cpyext/test/foo.c
Log:
This belongs to previous commit


Modified: pypy/trunk/pypy/module/cpyext/test/foo.c
==============================================================================
--- pypy/trunk/pypy/module/cpyext/test/foo.c	(original)
+++ pypy/trunk/pypy/module/cpyext/test/foo.c	Mon May  3 02:04:47 2010
@@ -175,6 +175,12 @@
     {NULL}  /* Sentinel */
 };
 
+static PyObject *
+Fuu_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds)
+{
+  return subtype->tp_alloc(subtype, 0);
+}
+
 PyTypeObject FuuType = {
     PyObject_HEAD_INIT(NULL)
     0,
@@ -224,7 +230,7 @@
 
     0,          /*tp_init*/
     0,          /*tp_alloc  will be set to PyType_GenericAlloc in module init*/
-    0,          /*tp_new*/
+    Fuu_new,    /*tp_new*/
     0,          /*tp_free  Low-level free-memory routine */
     0,          /*tp_is_gc For PyObject_IS_GC */
     0,          /*tp_bases*/
@@ -249,7 +255,6 @@
 	return (PyObject *)foop;
 }
 
-
 /* List of functions exported by this module */
 
 static PyMethodDef foo_functions[] = {



More information about the Pypy-commit mailing list