[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d6bd32a56a8 by Benjamin Peterson in branch '2.7':
fix python 3 mod init function declaration (closes #26827)
https://hg.python.org/cpython/rev/8d6bd32a56a8

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 188af2b4945a by Benjamin Peterson in branch '3.5':
fix python 3 mod init function declaration (closes #26827)
https://hg.python.org/cpython/rev/188af2b4945a

New changeset df0e900b8860 by Benjamin Peterson in branch 'default':
merge 3.5 (#26827)
https://hg.python.org/cpython/rev/df0e900b8860

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-22 Thread Brett Cannon

Brett Cannon added the comment:

And in case my comment wasn't obvious, Herbert is right about the error in the 
docs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-22 Thread Brett Cannon

Brett Cannon added the comment:

https://docs.python.org/3/extending/extending.html#the-module-s-method-table-and-initialization-function
 documents what Herbert discovered wrong in the porting docs.

--
keywords: +easy
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-22 Thread Herbert

Herbert added the comment:

The exact error was:

ImportError: dynamic module does not define init function (PyInit_myextension)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26827] PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention

2016-04-22 Thread Herbert

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@python
components: Documentation
messages: 264005
nosy: docs@python, prinsherbert
priority: normal
severity: normal
status: open
title: PyObject *PyInit_myextention -> PyMODINIT_FUNC PyInit_myextention
versions: Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com