]> granicus.if.org Git - python/commitdiff
Added some missing PyObject* casts in the deallocators.
authorJim Fulton <jim@zope.com>
Fri, 16 May 2003 13:53:43 +0000 (13:53 +0000)
committerJim Fulton <jim@zope.com>
Fri, 16 May 2003 13:53:43 +0000 (13:53 +0000)
Added some defines for PyMODINIT_FUNC so that the examples work
with Python 2.2.

I think I'm done hacking this documentation. Yippie! :)

Doc/ext/noddy.c
Doc/ext/noddy2.c
Doc/ext/noddy3.c

index 1988de693ba781493575f6a263d103ae7b97194b..849b3c91ba13c8d1b047eac32a460bd3b485b037 100644 (file)
@@ -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) 
 {
index 0408cf432a3c9fb77dbd0a7d2b405770ed65fea8..b1e620e24778e544cf308f10142b1afe2e703ffd 100644 (file)
@@ -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) 
 {
index f286cafe40dce79c2964506b2ac28342e89aeaa1..7b044d187d267cd06b6984beb0eefceee5e0fbc8 100644 (file)
@@ -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) 
 {