+%typemap(in) wxInputStream* (wxPyInputStream* temp) {
+ if (wxPyConvertSwigPtr($input, (void **)&temp, wxT("wxPyInputStream"))) {
+ $1 = wxPyCBInputStream_copy((wxPyCBInputStream*)temp->m_wxis);
+ } else {
+ PyErr_Clear(); // clear the failure of the wxPyConvert above
+ $1 = wxPyCBInputStream_create($input, true);
+ if ($1 == NULL) {
+ PyErr_SetString(PyExc_TypeError, "Expected wx.InputStream or Python file-like object.");
+ SWIG_fail;
+ }
+ }
+}
+