|
|
@ -42,8 +42,12 @@ Pythonize::Pythonize ()
|
|
|
|
|
|
|
|
|
|
|
|
if (!Py_IsInitialized ())
|
|
|
|
if (!Py_IsInitialized ())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PyEval_InitThreads ();
|
|
|
|
|
|
|
|
Py_Initialize();
|
|
|
|
Py_Initialize();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 6
|
|
|
|
|
|
|
|
// initialize thread support
|
|
|
|
|
|
|
|
PyEval_InitThreads();
|
|
|
|
|
|
|
|
#endif
|
|
|
|
if (!Py_IsInitialized ())
|
|
|
|
if (!Py_IsInitialized ())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
pythonInit = 0;
|
|
|
|
pythonInit = 0;
|
|
|
@ -51,9 +55,6 @@ Pythonize::Pythonize ()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (debug) printf ("Python interpreter initialized!\n\n");
|
|
|
|
if (debug) printf ("Python interpreter initialized!\n\n");
|
|
|
|
|
|
|
|
|
|
|
|
// free the lock
|
|
|
|
|
|
|
|
PyEval_ReleaseLock();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|