[New-bugs-announce] [issue4737] documentation and noddy*.c

Kandalintsev Alexandre report at bugs.python.org
Wed Dec 24 15:26:45 CET 2008


New submission from Kandalintsev Alexandre <bug_hunter at messir.net>:

Hello!

1) In http://docs.python.org/3.0/extending/extending.html we see:
=========
Note that PyMODINIT_FUNC declares the function as void return type
=========

But thats not true, it's defined as PyObject*. I think this is outdated 
info in documentation.



2) In Doc/includes/noddy*.c assumed that PyMODINIT_FUNC returns nothing 
but this wrong. If you try "python3.1 -c 'import noddy'" you will see 
segfault. This patch will fix this problem:
--- ./noddy.c       2008-12-24 17:09:36.424870738 +0300
+++ ./noddy.c   2008-12-24 17:18:01.524869143 +0300
@@ -52,4 +52,6 @@
 
     Py_INCREF(&noddy_NoddyType);
     PyModule_AddObject(m, "Noddy", (PyObject *)&noddy_NoddyType);
+
+    return m;
 }


Other noddy*.c files are also requiring this patch.

----------
assignee: georg.brandl
components: Demos and Tools, Documentation
messages: 78260
nosy: exe, georg.brandl
severity: normal
status: open
title: documentation and noddy*.c
versions: Python 3.0, Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4737>
_______________________________________


More information about the New-bugs-announce mailing list