[pypy-commit] pypy default: Fix -A segfault
rlamy
pypy.commits at gmail.com
Wed Jun 15 19:14:33 EDT 2016
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch:
Changeset: r85185:54fc5ca89502
Date: 2016-06-16 00:13 +0100
http://bitbucket.org/pypy/pypy/changeset/54fc5ca89502/
Log: Fix -A segfault
diff --git a/pypy/module/cpyext/test/foo.c b/pypy/module/cpyext/test/foo.c
--- a/pypy/module/cpyext/test/foo.c
+++ b/pypy/module/cpyext/test/foo.c
@@ -43,15 +43,6 @@
/* foo methods */
-static void
-foo_dealloc(fooobject *foop)
-{
- PyObject_Del(foop);
-}
-
-
-/* foo methods-as-attributes */
-
static PyObject *
foo_copy(fooobject *self)
{
@@ -195,7 +186,7 @@
sizeof(fooobject), /*tp_size*/
0, /*tp_itemsize*/
/* methods */
- (destructor)foo_dealloc, /*tp_dealloc*/
+ 0, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
@@ -463,9 +454,9 @@
PyTypeObject InitErrType = {
PyObject_HEAD_INIT(NULL)
0,
- "foo.InitErr",
- sizeof(PyObject),
- 0,
+ "foo.InitErrType",
+ sizeof(PyObject),/*tp_basicsize*/
+ 0, /*tp_itemsize*/
0, /*tp_dealloc*/
0, /*tp_print*/
0, /*tp_getattr*/
@@ -508,12 +499,12 @@
0, /*tp_dictoffset*/
initerrtype_init, /*tp_init*/
- 0, /*tp_alloc will be set to PyType_GenericAlloc in module init*/
+ 0, /*tp_alloc*/
0, /*tp_new*/
- 0, /*tp_free Low-level free-memory routine */
- 0, /*tp_is_gc For PyObject_IS_GC */
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
0, /*tp_bases*/
- 0, /*tp_mro method resolution order */
+ 0, /*tp_mro*/
0, /*tp_cache*/
0, /*tp_subclasses*/
0 /*tp_weaklist*/
More information about the pypy-commit
mailing list