Files
macports-ports/python/py-clawpack/files/patch-python3.diff
T

27 lines
848 B
Diff
Raw Normal View History

2021-04-15 08:22:58 -07:00
See https://github.com/clawpack/pyclaw/pull/667
--- pyclaw/src/pyclaw/limiters/weno/reconstruct.c.orig 2020-04-27 00:20:31.000000000 -0700
+++ pyclaw/src/pyclaw/limiters/weno/reconstruct.c 2021-04-15 07:06:02.000000000 -0700
@@ -5263,6 +5263,21 @@
PyMODINIT_FUNC
initreconstruct (void)
{
+#if PY_MAJOR_VERSION >= 3
+ static struct PyModuleDef moduledef = {
+ PyModuleDef_HEAD_INIT,
+ "reconstruct", /* m_name */
+ NULL, /* m_doc */
+ -1, /* m_size */
+ reconstructmethods, /* m_methods */
+ NULL, /* m_reload */
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL /* m_free */
+ };
+ PyModule_Create(&moduledef);
+#else
(void) Py_InitModule ("reconstruct", reconstructmethods);
+#endif
import_array ();
}