Ticket #47125: kubuntu_kpythonpluginfactory_3.2support.diff
File kubuntu_kpythonpluginfactory_3.2support.diff, 1.1 KB (added by RJVB (René Bertin), 10 years ago) |
---|
-
kpythonpluginfactory/kpythonpluginfactory.cpp
old new 33 33 #define PY3 34 34 #endif 35 35 36 #if PY_MAJOR_VERSION >= 3 37 #if PY_MINOR_VERSION >= 2 38 #define PY3.2 39 #endif 40 #endif 41 36 42 /* 37 43 This implements a plugin factory for running Python plugins. It also 38 44 supports io-slaves with a kdemain() entry point. … … void KPythonPluginFactory::initialize() 106 112 kDebug() << "Initializing Python interpreter."; 107 113 pythonLib = LoadPythonLibrary(); 108 114 115 #ifdef PY3.2 116 Py_Initialize (); 117 PyEval_InitThreads (); 118 #else 109 119 PyEval_InitThreads (); 110 120 Py_Initialize (); 121 #endif 111 122 if (!Py_IsInitialized ()) 112 123 { 113 124 //pythonInit = 0; … … void KPythonPluginFactory::initialize() 117 128 kDebug() << "Succesfully initialized Python interpreter."; 118 129 119 130 threadState = PyThreadState_GET(); 131 #ifndef PY3.2 120 132 // free the lock 121 133 PyEval_ReleaseLock(); 134 #endif 122 135 } 123 136 } 124 137