PyErr_Print();
return;
}
+#if PY_VERSION_HEX < 0x02040000 // python version earlier than 2.4.0
PyObject *r = PyEval_EvalCode(code,_g,_g);
+#else
+ PyObject *r = PyEval_EvalCode((PyCodeObject*)code,_g,_g);
+#endif
Py_DECREF(code);
if(!r){
// Une erreur s est produite a l execution
return 1;
}else{
// Complete and correct text. We evaluate it.
+#if PY_VERSION_HEX < 0x02040000 // python version earlier than 2.4.0
PyObjWrapper r(PyEval_EvalCode(v,context,context));
+#else
+ PyObjWrapper r(PyEval_EvalCode((PyCodeObject *)(void *)v,context,context));
+#endif
if(!r){
// Execution error. We return -1
PyErr_Print();
class QSemaphore;
class QMutex;
+#if PY_VERSION_HEX < 0x02040000 // python version earlier than 2.4.0
extern "C" PyObject * PyEval_EvalCode(PyObject *co, PyObject *g, PyObject *l);
+#endif
#define TOP_HISTORY_PY "--- top of history ---"
#define BEGIN_HISTORY_PY "--- begin of history ---"