Message78260
| Author |
exe |
| Recipients |
exe, georg.brandl |
| Date |
2008年12月24日.14:26:06 |
| SpamBayes Score |
4.851755e-07 |
| Marked as misclassified |
No |
| Message-id |
<1230128805.53.0.886805938361.issue4737@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2008年12月24日 14:26:45 | exe | set | recipients:
+ exe, georg.brandl |
| 2008年12月24日 14:26:45 | exe | set | messageid: <1230128805.53.0.886805938361.issue4737@psf.upfronthosting.co.za> |
| 2008年12月24日 14:26:08 | exe | link | issue4737 messages |
| 2008年12月24日 14:26:07 | exe | create |
|