]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/html.cpp
SWIGged update for wxGTK (the last checkin was really for wxMSW...)
[wxWidgets.git] / wxPython / src / mac / html.cpp
index 37e1ac041091d15a3aa9ba8ef7ff539a72f75300..5925043ded7c25d6d06c763c28ada9c4dc422410 100644 (file)
@@ -55,7 +55,7 @@ extern PyObject *SWIG_newvarlink(void);
 
 #define SWIG_name    "htmlc"
 
-#include "export.h"
+#include "wxPython.h"
 #include <wx/html/htmlwin.h>
 #include <wx/html/htmprint.h>
 #include <wx/image.h>
@@ -264,7 +264,9 @@ wxHtmlOpeningStatus wxPyHtmlWindow::OnOpeningURL(wxHtmlURLType type,
     wxPyBeginBlockThreads();
     if ((found = wxPyCBH_findCallback(m_myInst, "OnOpeningURL"))) {
         PyObject* ro;
-        ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iO)", type, wx2PyString(url)));
+        PyObject* s = wx2PyString(url);
+        ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(iO)", type, s));
+        Py_DECREF(s);
         if (PyString_Check(ro)
 #if PYTHON_API_VERSION >= 1009
             || PyUnicode_Check(ro)