]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/misc2.i
Significantly changed how the Python interpreter lock and thread state
[wxWidgets.git] / wxPython / src / misc2.i
index ece14692a12a7be7f2c88dbf2b3bd3ff41273c16..7cea032de86071df22eaa95855cd14b29deb63f2 100644 (file)
@@ -813,14 +813,14 @@ class wxWave : public wxObject
 {
 public:
     wxWave(const wxString& fileName, bool isResource = FALSE) {
-        bool doSave = wxPyRestoreThread();
+        wxPyTState* state = wxPyBeginBlockThreads();
         PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
-        wxPySaveThread(doSave);
+        wxPyEndBlockThreads(state);
     }
     wxWave(int size, const wxByte* data) {
-        bool doSave = wxPyRestoreThread();
+        wxPyTState* state = wxPyBeginBlockThreads();
         PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
-        wxPySaveThread(doSave);
+        wxPyEndBlockThreads(state);
     }
 
     ~wxWave() {}