Skip to content

Commit

Permalink
Revise example/wrap.cpp for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
termoshtt authored and TallJimbo committed Nov 23, 2014
1 parent c404025 commit b0d351e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libs/numpy/example/wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,11 @@ BOOST_PYTHON_MODULE(example) {
int main(int argc, char **argv)
{
// This line makes our module available to the embedded Python intepreter.
PyImport_AppendInittab("example", &initexample);

# if PY_VERSION_HEX >= 0x03000000
PyImport_AppendInittab("example", &PyInit_example);
# else
PyImport_AppendInittab("example", &initexample);
# endif
// Initialize the Python runtime.
Py_Initialize();

Expand Down

0 comments on commit b0d351e

Please sign in to comment.