X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0625ef6849f4069540a05ccfb6a42f5fd87a97cb..40e5ebbf98728d627e4d3c9e3a57f28f5bb8fcb9:/wxPython/samples/embedded/embedded.cpp diff --git a/wxPython/samples/embedded/embedded.cpp b/wxPython/samples/embedded/embedded.cpp index 2805a649cf..1b6ebabf74 100644 --- a/wxPython/samples/embedded/embedded.cpp +++ b/wxPython/samples/embedded/embedded.cpp @@ -190,7 +190,7 @@ void MyFrame::OnPyFrame(wxCommandEvent& event) // First, whenever you do anything with Python objects or code, you // *MUST* aquire the Global Interpreter Lock and block other // Python threads from running. - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); // Execute the code in the __main__ module PyRun_SimpleString(python_code1); @@ -211,7 +211,7 @@ import wx\n\ output = wx.PyOnDemandOutputWindow()\n\ sys.stdin = sys.stderr = output\n\ "; - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); PyRun_SimpleString(python_redirect); wxPyEndBlockThreads(blocked); } @@ -242,7 +242,7 @@ wxWindow* MyFrame::DoPythonStuff(wxWindow* parent) PyObject* result; // As always, first grab the GIL - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); // Now make a dictionary to serve as the global namespace when the code is // executed. Put a reference to the builtins module in it. (Yes, the @@ -270,7 +270,7 @@ wxWindow* MyFrame::DoPythonStuff(wxWindow* parent) // Now build an argument tuple and call the Python function. Notice the // use of another wxPython API to take a wxWindows object and build a // wxPython object that wraps it. - PyObject* arg = wxPyMake_wxObject(parent); + PyObject* arg = wxPyMake_wxObject(parent, false); wxASSERT(arg != NULL); PyObject* tuple = PyTuple_New(1); PyTuple_SET_ITEM(tuple, 0, arg); @@ -299,9 +299,3 @@ wxWindow* MyFrame::DoPythonStuff(wxWindow* parent) //---------------------------------------------------------------------- - - - - - -