Skip to content

Conversation

@stukowski
Copy link
Contributor

The PYBIND11_PLUGIN_IMPL macro defines an initXXX() function with a wrong signature. Under Python 2.x it should have return type void instead of PyObject*, see

https://docs.python.org/2/extending/extending.html#the-module-s-method-table-and-initialization-function
and
https://docs.python.org/2.7/c-api/import.html#c.PyImport_AppendInittab

This pull request corrects this by wrapping the existing init function with PyObject* return type in a function with void return type.

@wjakob
Copy link
Member

wjakob commented Jan 13, 2017

Nice catch, thanks!

@wjakob wjakob merged commit 05bc1ff into pybind:master Jan 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants