X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/64e8a1f072f09865b57ce399fa4401009e08d314..42f8298f6f42d5d63bb3caf65682b7d9d9f8b702:/wxPython/src/_streams.i diff --git a/wxPython/src/_streams.i b/wxPython/src/_streams.i index df85f9914e..5d89908a07 100644 --- a/wxPython/src/_streams.i +++ b/wxPython/src/_streams.i @@ -27,15 +27,15 @@ %typemap(in) wxInputStream* (wxPyInputStream* temp, bool created) { if (wxPyConvertSwigPtr($input, (void **)&temp, wxT("wxPyInputStream"))) { $1 = temp->m_wxis; - created = False; + created = false; } else { PyErr_Clear(); // clear the failure of the wxPyConvert above - $1 = wxPyCBInputStream_create($input, False); + $1 = wxPyCBInputStream_create($input, false); if ($1 == NULL) { PyErr_SetString(PyExc_TypeError, "Expected wxInputStream or Python file-like object."); SWIG_fail; } - created = True; + created = true; } } %typemap(freearg) wxInputStream* { @@ -54,7 +54,7 @@ if ($1) { _ptr = new wxPyInputStream($1); } - $result = wxPyConstructObject(_ptr, wxT("wxPyInputStream"), True); + $result = wxPyConstructObject(_ptr, wxT("wxPyInputStream"), $owner); } @@ -68,7 +68,9 @@ enum wxSeekMode }; -%name(InputStream) class wxPyInputStream { +%rename(InputStream) wxPyInputStream; +class wxPyInputStream +{ public: %extend { wxPyInputStream(PyObject* p) { @@ -79,7 +81,8 @@ public: return NULL; } } - + ~wxPyInputStream(); + void close(); void flush(); bool eof();