X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e8e4a2a4d4ef3347d296ad2ddf576fc3677f4cea..962162620ff8b78f4d25c7f4ccec88ce071dfb2b:/wxPython/src/_sound.i?ds=inline diff --git a/wxPython/src/_sound.i b/wxPython/src/_sound.i index c91c6a91eb..e120cf52a8 100644 --- a/wxPython/src/_sound.i +++ b/wxPython/src/_sound.i @@ -38,22 +38,22 @@ class wxSound : public wxObject { public: wxSound() { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); PyErr_SetString(PyExc_NotImplementedError, "wxSound is not available on this platform."); - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } wxSound(const wxString&, bool) { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); PyErr_SetString(PyExc_NotImplementedError, "wxSound is not available on this platform."); - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } wxSound(int, const wxByte*) { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); PyErr_SetString(PyExc_NotImplementedError, "wxSound is not available on this platform."); - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); } ~wxSound() {}; @@ -92,10 +92,11 @@ public: #else %extend { bool Create(int size, const wxByte* data) { - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); PyErr_SetString(PyExc_NotImplementedError, "Create from data is not available on this platform."); - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); + return False; } } #endif @@ -112,7 +113,8 @@ public: static void Stop(); #else %extend { - static void Stop() {} + static void Stop() + { wxPyRaiseNotImplemented(); } } #endif