Aquire the GIL before raising the NotImplementedError exception
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -145,7 +145,8 @@ void wxPyEndBlockThreads();
|
|||||||
|
|
||||||
#endif // wxPyUSE_EXPORTED_API
|
#endif // wxPyUSE_EXPORTED_API
|
||||||
|
|
||||||
#define wxPyBLOCK_THREADS(stmt) wxPyBeginBlockThreads(); stmt; wxPyEndBlockThreads()
|
#define wxPyBLOCK_THREADS(stmt) { wxPyBeginBlockThreads(); stmt; wxPyEndBlockThreads(); }
|
||||||
|
#define wxPyRaiseNotImplemented() wxPyBLOCK_THREADS(PyErr_SetNone(PyExc_NotImplementedError))
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// These are helpers used by the typemaps
|
// These are helpers used by the typemaps
|
||||||
|
@@ -257,7 +257,7 @@ public:
|
|||||||
#else
|
#else
|
||||||
%extend {
|
%extend {
|
||||||
static int GetComCtl32Version()
|
static int GetComCtl32Version()
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); return 0; }
|
{ wxPyRaiseNotImplemented(); return 0; }
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@@ -445,7 +445,7 @@ public:
|
|||||||
class wxMetafileDataObject : public wxDataObjectSimple
|
class wxMetafileDataObject : public wxDataObjectSimple
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxMetafileDataObject() { PyErr_SetNone(PyExc_NotImplementedError); }
|
wxMetafileDataObject() { wxPyRaiseNotImplemented(); }
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@@ -705,13 +705,13 @@ public:
|
|||||||
class wxMetaFile : public wxObject {
|
class wxMetaFile : public wxObject {
|
||||||
public:
|
public:
|
||||||
wxMetaFile(const wxString&)
|
wxMetaFile(const wxString&)
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); }
|
{ wxPyRaiseNotImplemented(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
class wxMetaFileDC : public wxClientDC {
|
class wxMetaFileDC : public wxClientDC {
|
||||||
public:
|
public:
|
||||||
wxMetaFileDC(const wxString&, int, int, const wxString&)
|
wxMetaFileDC(const wxString&, int, int, const wxString&)
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); }
|
{ wxPyRaiseNotImplemented(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
%}
|
%}
|
||||||
@@ -751,10 +751,10 @@ public:
|
|||||||
class wxPrinterDC : public wxClientDC {
|
class wxPrinterDC : public wxClientDC {
|
||||||
public:
|
public:
|
||||||
wxPrinterDC(const wxPrintData&)
|
wxPrinterDC(const wxPrintData&)
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); }
|
{ wxPyRaiseNotImplemented(); }
|
||||||
|
|
||||||
// wxPrinterDC(const wxString&, const wxString&, const wxString&, bool, int)
|
// wxPrinterDC(const wxString&, const wxString&, const wxString&, bool, int)
|
||||||
// { PyErr_SetNone(PyExc_NotImplementedError); }
|
// { wxPyRaiseNotImplemented(); }
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@@ -268,10 +268,10 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info);
|
|||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
wxNativeEncodingInfo* wxGetNativeFontEncoding(wxFontEncoding encoding)
|
wxNativeEncodingInfo* wxGetNativeFontEncoding(wxFontEncoding encoding)
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); return NULL; }
|
{ wxPyRaiseNotImplemented(); return NULL; }
|
||||||
|
|
||||||
bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
|
bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); return False; }
|
{ wxPyRaiseNotImplemented(); return False; }
|
||||||
%}
|
%}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@ long wxGetFreeMemory();
|
|||||||
#else
|
#else
|
||||||
%inline %{
|
%inline %{
|
||||||
long wxGetFreeMemory()
|
long wxGetFreeMemory()
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); return 0; }
|
{ wxPyRaiseNotImplemented(); return 0; }
|
||||||
%}
|
%}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -214,6 +214,11 @@ wxWindow* wxGetTopLevelParent(wxWindow *win);
|
|||||||
// This is generally most useful getting the state of
|
// This is generally most useful getting the state of
|
||||||
// Caps Lock, Num Lock and Scroll Lock...
|
// Caps Lock, Num Lock and Scroll Lock...
|
||||||
bool wxGetKeyState(wxKeyCode key);
|
bool wxGetKeyState(wxKeyCode key);
|
||||||
|
#else
|
||||||
|
%inline %{
|
||||||
|
bool wxGetKeyState(wxKeyCode key)
|
||||||
|
{ wxPyRaiseNotImplemented(); return False; }
|
||||||
|
%}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@@ -49,7 +49,8 @@ class wxJoystick : public wxObject {
|
|||||||
public:
|
public:
|
||||||
wxJoystick(int joystick = wxJOYSTICK1) {
|
wxJoystick(int joystick = wxJOYSTICK1) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyErr_SetString(PyExc_NotImplementedError, "wxJoystick is not available on this platform.");
|
PyErr_SetString(PyExc_NotImplementedError,
|
||||||
|
"wxJoystick is not available on this platform.");
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
}
|
}
|
||||||
wxPoint GetPosition() { return wxPoint(-1,-1); }
|
wxPoint GetPosition() { return wxPoint(-1,-1); }
|
||||||
|
@@ -103,15 +103,15 @@ public:
|
|||||||
%{
|
%{
|
||||||
class wxPopupWindow : public wxWindow {
|
class wxPopupWindow : public wxWindow {
|
||||||
public:
|
public:
|
||||||
wxPopupWindow(wxWindow *, int) { PyErr_SetNone(PyExc_NotImplementedError); }
|
wxPopupWindow(wxWindow *, int) { wxPyRaiseNotImplemented(); }
|
||||||
wxPopupWindow() { PyErr_SetNone(PyExc_NotImplementedError); }
|
wxPopupWindow() { wxPyRaiseNotImplemented(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
class wxPyPopupTransientWindow : public wxPopupWindow
|
class wxPyPopupTransientWindow : public wxPopupWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxPyPopupTransientWindow(wxWindow *, int) { PyErr_SetNone(PyExc_NotImplementedError); }
|
wxPyPopupTransientWindow(wxWindow *, int) { wxPyRaiseNotImplemented(); }
|
||||||
wxPyPopupTransientWindow() { PyErr_SetNone(PyExc_NotImplementedError); }
|
wxPyPopupTransientWindow() { wxPyRaiseNotImplemented(); }
|
||||||
};
|
};
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
@@ -54,7 +54,7 @@ public:
|
|||||||
%extend {
|
%extend {
|
||||||
%name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
|
%name(RegionFromPoints)wxRegion(int points, wxPoint* points_array,
|
||||||
int fillStyle = wxWINDING_RULE) {
|
int fillStyle = wxWINDING_RULE) {
|
||||||
PyErr_SetNone(PyExc_NotImplementedError);
|
wxPyRaiseNotImplemented();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
class wxTaskBarIcon : public wxEvtHandler
|
class wxTaskBarIcon : public wxEvtHandler
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxTaskBarIcon() { PyErr_SetNone(PyExc_NotImplementedError); }
|
wxTaskBarIcon() { wxPyRaiseNotImplemented(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ class wxTaskBarIconEvent : public wxEvent
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxTaskBarIconEvent(wxEventType, wxTaskBarIcon *)
|
wxTaskBarIconEvent(wxEventType, wxTaskBarIcon *)
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); }
|
{ wxPyRaiseNotImplemented(); }
|
||||||
virtual wxEvent* Clone() const { return NULL; }
|
virtual wxEvent* Clone() const { return NULL; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -33,10 +33,10 @@ public:
|
|||||||
wxToggleButton(wxWindow *, wxWindowID, const wxString&,
|
wxToggleButton(wxWindow *, wxWindowID, const wxString&,
|
||||||
const wxPoint&, const wxSize&, long,
|
const wxPoint&, const wxSize&, long,
|
||||||
const wxValidator&, const wxString&)
|
const wxValidator&, const wxString&)
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); }
|
{ wxPyRaiseNotImplemented(); }
|
||||||
|
|
||||||
wxToggleButton()
|
wxToggleButton()
|
||||||
{ PyErr_SetNone(PyExc_NotImplementedError); }
|
{ wxPyRaiseNotImplemented(); }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
%}
|
%}
|
||||||
|
@@ -30,12 +30,14 @@ class wxWave : public wxObject
|
|||||||
public:
|
public:
|
||||||
wxWave(const wxString& fileName, bool isResource = False) {
|
wxWave(const wxString& fileName, bool isResource = False) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
|
PyErr_SetString(PyExc_NotImplementedError,
|
||||||
|
"wxWave is not available on this platform.");
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
}
|
}
|
||||||
wxWave(int size, const wxByte* data) {
|
wxWave(int size, const wxByte* data) {
|
||||||
wxPyBeginBlockThreads();
|
wxPyBeginBlockThreads();
|
||||||
PyErr_SetString(PyExc_NotImplementedError, "wxWave is not available on this platform.");
|
PyErr_SetString(PyExc_NotImplementedError,
|
||||||
|
"wxWave is not available on this platform.");
|
||||||
wxPyEndBlockThreads();
|
wxPyEndBlockThreads();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -807,7 +807,7 @@ wxWindow* wxFindWindowByLabel( const wxString& label,
|
|||||||
win->SubclassWin(hWnd);
|
win->SubclassWin(hWnd);
|
||||||
return win;
|
return win;
|
||||||
#else
|
#else
|
||||||
PyErr_SetNone(PyExc_NotImplementedError);
|
wxPyRaiseNotImplemented();
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user