[New-bugs-announce] [issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

Herbert report at bugs.python.org
Fri Apr 22 08:08:15 EDT 2016


New submission from Herbert:

I think 

PyObject *PyInit_myextention(void)

should be

PyMODINIT_FUNC PyInit_myextention(void)

on https://docs.python.org/3/howto/cporting.html#module-initialization-and-state

It didn't work for me until I replaced this with a message in the about 'undefined PyInit_myextention'. However, when I used nm to inspect the .so object file, I fond the PyInit_myextention (but probably with the wrong return type). Moreover, whenever I would remove the same .so importing resulted in a different error complaining that the module does not exist (strongly suggesting that I did not mix up .so files).

Good luck!

----------
assignee: docs at python
components: Documentation
messages: 264005
nosy: docs at python, prinsherbert
priority: normal
severity: normal
status: open
title: PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention
versions: Python 3.2

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


More information about the New-bugs-announce mailing list