Reverted back the ( i ) parameters for python, applied the PyGILState_Ensure from Dick into his PyLOCK class

This commit is contained in:
Miguel Angel Ajo
2013-03-12 01:37:45 +01:00
parent 98a77ee649
commit 0163e4b4e4
3 changed files with 11 additions and 12 deletions
+4 -5
View File
@@ -44,14 +44,13 @@ public:
#else
class PyLOCK
{
PyGILState_STATE gil_state;
public:
// @todo: this is wrong, python docs clearly say we need the GIL,
// irrespective of wxPython.
PyLOCK() {}
~PyLOCK() {}
PyLOCK() { gil_state = PyGILState_Ensure(); }
~PyLOCK() { PyGILState_Release( gil_state ); }
};
#endif