return 1;
}else{
// Complete and correct text. We evaluate it.
-#ifndef WNT
+#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));
#include <Python.h> // must be before qt includes ...
-#ifndef WNT
+#if PY_VERSION_HEX < 0x02040000 // python version earlier than 2.4.0
extern "C" PyObject * PyEval_EvalCode(PyObject *co, PyObject *g, PyObject *l);
#endif
PyErr_Print();
return -1;
}
+#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