[Python-checkins] r67925 - in python/branches/py3k/Doc: extending/extending.rst includes/noddy.c includes/noddy2.c includes/noddy3.c includes/noddy4.c

benjamin.peterson python-checkins at python.org
Wed Dec 24 17:27:25 CET 2008


Author: benjamin.peterson
Date: Wed Dec 24 17:27:25 2008
New Revision: 67925

Log:
return the module object from PyMODINIT_FUNC

Modified:
   python/branches/py3k/Doc/extending/extending.rst
   python/branches/py3k/Doc/includes/noddy.c
   python/branches/py3k/Doc/includes/noddy2.c
   python/branches/py3k/Doc/includes/noddy3.c
   python/branches/py3k/Doc/includes/noddy4.c

Modified: python/branches/py3k/Doc/extending/extending.rst
==============================================================================
--- python/branches/py3k/Doc/extending/extending.rst	(original)
+++ python/branches/py3k/Doc/extending/extending.rst	Wed Dec 24 17:27:25 2008
@@ -326,8 +326,8 @@
        return PyModule_Create(&spammodule);
    }
 
-Note that PyMODINIT_FUNC declares the function as ``void`` return type,
-declares any special linkage declarations required by the platform, and for  C++
+Note that PyMODINIT_FUNC declares the function as ``PyObject *`` return type,
+declares any special linkage declarations required by the platform, and for C++
 declares the function as ``extern "C"``.
 
 When the Python program imports module :mod:`spam` for the first time,

Modified: python/branches/py3k/Doc/includes/noddy.c
==============================================================================
--- python/branches/py3k/Doc/includes/noddy.c	(original)
+++ python/branches/py3k/Doc/includes/noddy.c	Wed Dec 24 17:27:25 2008
@@ -52,4 +52,5 @@
 
     Py_INCREF(&noddy_NoddyType);
     PyModule_AddObject(m, "Noddy", (PyObject *)&noddy_NoddyType);
+    return m;
 }

Modified: python/branches/py3k/Doc/includes/noddy2.c
==============================================================================
--- python/branches/py3k/Doc/includes/noddy2.c	(original)
+++ python/branches/py3k/Doc/includes/noddy2.c	Wed Dec 24 17:27:25 2008
@@ -186,4 +186,5 @@
 
     Py_INCREF(&NoddyType);
     PyModule_AddObject(m, "Noddy", (PyObject *)&NoddyType);
+    return m;
 }

Modified: python/branches/py3k/Doc/includes/noddy3.c
==============================================================================
--- python/branches/py3k/Doc/includes/noddy3.c	(original)
+++ python/branches/py3k/Doc/includes/noddy3.c	Wed Dec 24 17:27:25 2008
@@ -239,4 +239,5 @@
 
     Py_INCREF(&NoddyType);
     PyModule_AddObject(m, "Noddy", (PyObject *)&NoddyType);
+    return m;
 }

Modified: python/branches/py3k/Doc/includes/noddy4.c
==============================================================================
--- python/branches/py3k/Doc/includes/noddy4.c	(original)
+++ python/branches/py3k/Doc/includes/noddy4.c	Wed Dec 24 17:27:25 2008
@@ -221,4 +221,5 @@
 
     Py_INCREF(&NoddyType);
     PyModule_AddObject(m, "Noddy", (PyObject *)&NoddyType);
+    return m;
 }


More information about the Python-checkins mailing list