From: Jim Fulton Date: Fri, 16 May 2003 13:53:43 +0000 (+0000) Subject: Added some missing PyObject* casts in the deallocators. X-Git-Tag: v2.3c1~704 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f325562f024132d3603c718966dd5d8c8be79ea;p=python Added some missing PyObject* casts in the deallocators. Added some defines for PyMODINIT_FUNC so that the examples work with Python 2.2. I think I'm done hacking this documentation. Yippie! :) --- diff --git a/Doc/ext/noddy.c b/Doc/ext/noddy.c index 1988de693b..849b3c91ba 100644 --- a/Doc/ext/noddy.c +++ b/Doc/ext/noddy.c @@ -51,6 +51,9 @@ static PyMethodDef noddy_methods[] = { {NULL} /* Sentinel */ }; +#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */ +#define PyMODINIT_FUNC void +#endif PyMODINIT_FUNC initnoddy(void) { diff --git a/Doc/ext/noddy2.c b/Doc/ext/noddy2.c index 0408cf432a..b1e620e247 100644 --- a/Doc/ext/noddy2.c +++ b/Doc/ext/noddy2.c @@ -13,7 +13,7 @@ Noddy_dealloc(Noddy* self) { Py_XDECREF(self->first); Py_XDECREF(self->last); - self->ob_type->tp_free(self); + self->ob_type->tp_free((PyObject*)self); } static PyObject * @@ -167,6 +167,9 @@ static PyMethodDef module_methods[] = { {NULL} /* Sentinel */ }; +#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */ +#define PyMODINIT_FUNC void +#endif PyMODINIT_FUNC initnoddy2(void) { diff --git a/Doc/ext/noddy3.c b/Doc/ext/noddy3.c index f286cafe40..7b044d187d 100644 --- a/Doc/ext/noddy3.c +++ b/Doc/ext/noddy3.c @@ -13,7 +13,7 @@ Noddy_dealloc(Noddy* self) { Py_XDECREF(self->first); Py_XDECREF(self->last); - self->ob_type->tp_free(self); + self->ob_type->tp_free((PyObject*)self); } static PyObject * @@ -220,6 +220,9 @@ static PyMethodDef module_methods[] = { {NULL} /* Sentinel */ }; +#ifndef PyMODINIT_FUNC /* declarations for DLL import/export */ +#define PyMODINIT_FUNC void +#endif PyMODINIT_FUNC initnoddy3(void) {