193a194,196
> #if PY_MAJOR_VERSION >= 3
> PyObject *
> #else
194a198
> #endif
228a233,236
>
> #if PY_MAJOR_VERSION >= 3
> return m_m5.ptr();
> #endif
231,232c239,240
< int
< initM5Python()
---
> void
> registerNativeModules()
234,235c242,244
< EmbeddedPyBind::initAll();
< return EmbeddedPython::initAll();
---
> auto result = PyImport_AppendInittab("_m5", EmbeddedPyBind::initAll);
> if (result == -1)
> panic("Failed to add _m5 to Python's inittab\n");
310,316d318
<
< PyMODINIT_FUNC
< initm5(void)
< {
< initM5Python();
< PyImport_ImportModule(PyCC("m5"));
< }