]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/my_typemaps.i
test wxString's char<->wchar_t ctors
[wxWidgets.git] / wxPython / src / my_typemaps.i
index 78ea572224b99d683a288bf27ea384b3eced6d27..f1bfc3cd7d5f12debab316ece71830acee2fd957 100644 (file)
 /////////////////////////////////////////////////////////////////////////////
 
 
-//---------------------------------------------------------------------------
-// Tell SWIG to wrap all the wrappers with our thread protection
-
-%exception {
-    PyThreadState* __tstate = wxPyBeginAllowThreads();
-    $action
-    wxPyEndAllowThreads(__tstate);
-    if (PyErr_Occurred()) SWIG_fail;
-}
-
-
 //----------------------------------------------------------------------
 // Typemaps to convert a list of items to an int (size) and an array
 
     $1 = new wxMemoryBuffer(len);
     temp = True;
     memcpy($1->GetData(), str, len);
+    $1->SetDataLen(len);
 }
 
 %typemap(freearg) wxMemoryBuffer& {
 %#else
         PyObject* str  = PyObject_Str(item);
 %#endif
+        if (PyErr_Occurred())  SWIG_fail;
         $1->Add(Py2wxString(str));
         Py_DECREF(item);
         Py_DECREF(str);
@@ -390,6 +381,8 @@ SWIG_AsDouble(PyObject *obj)
 %typemap(out) wxHtmlWindow*             { $result = wxPyMake_wxObject($1); }
 %typemap(out) wxPyHtmlWindow*           { $result = wxPyMake_wxObject($1); }
 %typemap(out) wxWizardPage*             { $result = wxPyMake_wxObject($1); }
+%typemap(out) wxPanel*                  { $result = wxPyMake_wxObject($1); }
+%typemap(out) wxDialog*                 { $result = wxPyMake_wxObject($1); }
 
 %typemap(out) wxSizer*                  { $result = wxPyMake_wxSizer($1); }