X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2cd2fac87f47fa01633ab9430d05c0a659325305..442d08ce743780b40895848a7d07c083e327aa2f:/wxPython/src/gtk/filesys.cpp diff --git a/wxPython/src/gtk/filesys.cpp b/wxPython/src/gtk/filesys.cpp index a64563adef..f4dd5de608 100644 --- a/wxPython/src/gtk/filesys.cpp +++ b/wxPython/src/gtk/filesys.cpp @@ -63,12 +63,12 @@ extern PyObject *SWIG_newvarlink(void); static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyList_Check(target)) { o2 = target; target = PyList_New(0); @@ -85,29 +85,33 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; } -static char* wxStringErrorMsg = "string type is required for parameter"; +#if PYTHON_API_VERSION >= 1009 + static char* wxStringErrorMsg = "String or Unicode type required"; +#else + static char* wxStringErrorMsg = "string type is required for parameter"; +#endif // wxPyFileSystemHandler will be the Python class wxFileSystemHandler and handling // the callback functions @@ -192,7 +196,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxImage(PyObject *self, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -243,7 +247,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_wxBitmap(PyObject *self, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -293,7 +297,7 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_Data(PyObject *self, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -324,6 +328,14 @@ static PyObject *_wrap___wxMemoryFSHandler_AddFile_Data(PyObject *self, PyObject return _resultobj; } +static void *SwigwxFSFileTowxObject(void *ptr) { + wxFSFile *src; + wxObject *dest; + src = (wxFSFile *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxFSFile(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -361,7 +373,7 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -379,7 +391,7 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -397,7 +409,7 @@ static PyObject *_wrap_new_wxFSFile(PyObject *self, PyObject *args, PyObject *kw #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) @@ -474,28 +486,7 @@ static PyObject *_wrap_wxFSFile_GetStream(PyObject *self, PyObject *args, PyObje if (_result) { _ptr = new wxPyInputStream(_result); } - if (_ptr) { - char swigptr[64]; - SWIG_MakePtr(swigptr, _ptr, "_wxPyInputStream_p"); - - PyObject* classobj = PyDict_GetItemString(wxPython_dict, "wxInputStreamPtr"); - if (! classobj) { - Py_INCREF(Py_None); - _resultobj = Py_None; - } else { - PyObject* arg = Py_BuildValue("(s)", swigptr); - _resultobj = PyInstance_New(classobj, arg, NULL); - Py_DECREF(arg); - - // set ThisOwn - PyObject* one = PyInt_FromLong(1); - PyObject_SetAttrString(_resultobj, "thisown", one); - Py_DECREF(one); - } - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } + _resultobj = wxPyConstructObject(_ptr, "wxInputStream", TRUE); } return _resultobj; } @@ -619,6 +610,14 @@ static PyObject *_wrap_wxFSFile_GetModificationTime(PyObject *self, PyObject *ar return _resultobj; } +static void *SwigwxFileSystemHandlerTowxObject(void *ptr) { + wxFileSystemHandler *src; + wxObject *dest; + src = (wxFileSystemHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + static void *SwigwxPyFileSystemHandlerTowxFileSystemHandler(void *ptr) { wxPyFileSystemHandler *src; wxFileSystemHandler *dest; @@ -627,6 +626,14 @@ static void *SwigwxPyFileSystemHandlerTowxFileSystemHandler(void *ptr) { return (void *) dest; } +static void *SwigwxPyFileSystemHandlerTowxObject(void *ptr) { + wxPyFileSystemHandler *src; + wxObject *dest; + src = (wxPyFileSystemHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFileSystemHandler() (new wxPyFileSystemHandler()) static PyObject *_wrap_new_wxFileSystemHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -713,7 +720,7 @@ static PyObject *_wrap_wxFileSystemHandler_CanOpen(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -751,7 +758,6 @@ static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *ar PyObject * _argo1 = 0; PyObject * _obj2 = 0; char *_kwnames[] = { "self","fs","location", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxFileSystemHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) @@ -774,7 +780,7 @@ static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -793,13 +799,7 @@ static PyObject *_wrap_wxFileSystemHandler_OpenFile(PyObject *self, PyObject *ar _result = (wxFSFile *)wxFileSystemHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj2) delete _arg2; @@ -832,7 +832,7 @@ static PyObject *_wrap_wxFileSystemHandler_FindFirst(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -920,7 +920,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetProtocol(PyObject *self, PyObject #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -976,7 +976,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetLeftLocation(PyObject *self, PyObj #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1032,7 +1032,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetAnchor(PyObject *self, PyObject *a #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1088,7 +1088,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetRightLocation(PyObject *self, PyOb #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1144,7 +1144,7 @@ static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1176,6 +1176,14 @@ static PyObject *_wrap_wxFileSystemHandler_GetMimeTypeFromExt(PyObject *self, Py return _resultobj; } +static void *SwigwxFileSystemTowxObject(void *ptr) { + wxFileSystem *src; + wxObject *dest; + src = (wxFileSystem *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxFileSystem() (new wxFileSystem()) static PyObject *_wrap_new_wxFileSystem(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1226,7 +1234,7 @@ static PyObject *_wrap_wxFileSystem_ChangePathTo(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1296,7 +1304,6 @@ static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyO PyObject * _argo0 = 0; PyObject * _obj1 = 0; char *_kwnames[] = { "self","location", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFileSystem_OpenFile",_kwnames,&_argo0,&_obj1)) @@ -1312,7 +1319,7 @@ static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyO #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1331,13 +1338,7 @@ static PyObject *_wrap_wxFileSystem_OpenFile(PyObject *self, PyObject *args, PyO _result = (wxFSFile *)wxFileSystem_OpenFile(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj1) delete _arg1; @@ -1370,7 +1371,7 @@ static PyObject *_wrap_wxFileSystem_FindFirst(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1485,6 +1486,14 @@ static void *SwigwxInternetFSHandlerTowxFileSystemHandler(void *ptr) { return (void *) dest; } +static void *SwigwxInternetFSHandlerTowxObject(void *ptr) { + wxInternetFSHandler *src; + wxObject *dest; + src = (wxInternetFSHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxInternetFSHandler() (new wxInternetFSHandler()) static PyObject *_wrap_new_wxInternetFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1534,7 +1543,7 @@ static PyObject *_wrap_wxInternetFSHandler_CanOpen(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1572,7 +1581,6 @@ static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *ar PyObject * _argo1 = 0; PyObject * _obj2 = 0; char *_kwnames[] = { "self","fs","location", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxInternetFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) @@ -1595,7 +1603,7 @@ static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1614,13 +1622,7 @@ static PyObject *_wrap_wxInternetFSHandler_OpenFile(PyObject *self, PyObject *ar _result = (wxFSFile *)wxInternetFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj2) delete _arg2; @@ -1636,6 +1638,14 @@ static void *SwigwxZipFSHandlerTowxFileSystemHandler(void *ptr) { return (void *) dest; } +static void *SwigwxZipFSHandlerTowxObject(void *ptr) { + wxZipFSHandler *src; + wxObject *dest; + src = (wxZipFSHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxZipFSHandler() (new wxZipFSHandler()) static PyObject *_wrap_new_wxZipFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1685,7 +1695,7 @@ static PyObject *_wrap_wxZipFSHandler_CanOpen(PyObject *self, PyObject *args, Py #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1723,7 +1733,6 @@ static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, P PyObject * _argo1 = 0; PyObject * _obj2 = 0; char *_kwnames[] = { "self","fs","location", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxZipFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) @@ -1746,7 +1755,7 @@ static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, P #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -1765,13 +1774,7 @@ static PyObject *_wrap_wxZipFSHandler_OpenFile(PyObject *self, PyObject *args, P _result = (wxFSFile *)wxZipFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj2) delete _arg2; @@ -1804,7 +1807,7 @@ static PyObject *_wrap_wxZipFSHandler_FindFirst(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -1876,6 +1879,14 @@ static void *SwigwxMemoryFSHandlerTowxFileSystemHandler(void *ptr) { return (void *) dest; } +static void *SwigwxMemoryFSHandlerTowxObject(void *ptr) { + wxMemoryFSHandler *src; + wxObject *dest; + src = (wxMemoryFSHandler *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + #define new_wxMemoryFSHandler() (new wxMemoryFSHandler()) static PyObject *_wrap_new_wxMemoryFSHandler(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -1914,7 +1925,7 @@ static PyObject *_wrap_wxMemoryFSHandler_RemoveFile(PyObject *self, PyObject *ar #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj0) && !PyUnicode_Check(_obj0)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj0, &tmpPtr, &tmpSize) == -1) @@ -1966,7 +1977,7 @@ static PyObject *_wrap_wxMemoryFSHandler_CanOpen(PyObject *self, PyObject *args, #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2004,7 +2015,6 @@ static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args PyObject * _argo1 = 0; PyObject * _obj2 = 0; char *_kwnames[] = { "self","fs","location", NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxMemoryFSHandler_OpenFile",_kwnames,&_argo0,&_argo1,&_obj2)) @@ -2027,7 +2037,7 @@ static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) @@ -2046,13 +2056,7 @@ static PyObject *_wrap_wxMemoryFSHandler_OpenFile(PyObject *self, PyObject *args _result = (wxFSFile *)wxMemoryFSHandler_OpenFile(_arg0,*_arg1,*_arg2); wxPy_END_ALLOW_THREADS; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFSFile_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } { if (_obj2) delete _arg2; @@ -2085,7 +2089,7 @@ static PyObject *_wrap_wxMemoryFSHandler_FindFirst(PyObject *self, PyObject *arg #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, "String or Unicode type required"); + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) @@ -2227,13 +2231,30 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPNGHandler","_class_wxPNGHandler",0}, { "_wxPen","_class_wxPen",0}, { "_byte","_unsigned_char",0}, + { "_wxColourDatabase","_class_wxColourDatabase",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxImageList","_class_wxImageList",0}, { "_class_wxTIFFHandler","_wxTIFFHandler",0}, { "_class_wxAcceleratorTable","_wxAcceleratorTable",0}, + { "_wxGDIObject","_class_wxGDIObject",0}, { "_wxDC","_class_wxDC",0}, { "_class_wxBMPHandler","_wxBMPHandler",0}, + { "_class_wxObject","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxObject}, + { "_class_wxObject","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxObject}, + { "_class_wxObject","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxObject}, + { "_class_wxObject","_wxZipFSHandler",SwigwxZipFSHandlerTowxObject}, + { "_class_wxObject","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxObject}, + { "_class_wxObject","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxObject}, + { "_class_wxObject","_class_wxFileSystem",SwigwxFileSystemTowxObject}, + { "_class_wxObject","_wxFileSystem",SwigwxFileSystemTowxObject}, + { "_class_wxObject","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxObject}, + { "_class_wxObject","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxObject}, + { "_class_wxObject","_class_wxFileSystemHandler",SwigwxFileSystemHandlerTowxObject}, + { "_class_wxObject","_wxFileSystemHandler",SwigwxFileSystemHandlerTowxObject}, + { "_class_wxObject","_class_wxFSFile",SwigwxFSFileTowxObject}, + { "_class_wxObject","_wxFSFile",SwigwxFSFileTowxObject}, + { "_class_wxObject","_wxObject",0}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -2265,11 +2286,13 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxZipFSHandler","_wxZipFSHandler",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, + { "_wxPenList","_class_wxPenList",0}, { "_wxWindowDC","_class_wxWindowDC",0}, { "_class_wxInternetFSHandler","_wxInternetFSHandler",0}, { "_class_wxIndividualLayoutConstraint","_wxIndividualLayoutConstraint",0}, { "_wxConfig","_class_wxConfig",0}, { "_class_wxFileConfig","_wxFileConfig",0}, + { "_class_wxColourDatabase","_wxColourDatabase",0}, { "_class_wxMemoryFSHandler","_wxMemoryFSHandler",0}, { "_EBool","_wxCoord",0}, { "_EBool","_wxPrintQuality",0}, @@ -2282,8 +2305,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_long","_long",0}, { "_class_wxRect","_wxRect",0}, { "_class_wxDC","_wxDC",0}, + { "_class_wxBrushList","_wxBrushList",0}, { "_wxPyInputStream","_class_wxPyInputStream",0}, { "_wxTimeSpan","_class_wxTimeSpan",0}, + { "_class_wxPenList","_wxPenList",0}, { "_class_wxOutputStream","_wxOutputStream",0}, { "_wxAcceleratorEntry","_class_wxAcceleratorEntry",0}, { "_signed_int","_wxCoord",0}, @@ -2304,7 +2329,23 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxDateSpan","_class_wxDateSpan",0}, { "_class_wxFont","_wxFont",0}, { "_wxBusyInfo","_class_wxBusyInfo",0}, + { "_wxFontList","_class_wxFontList",0}, { "_wxClientDC","_class_wxClientDC",0}, + { "_wxObject","_class_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxObject}, + { "_wxObject","_wxMemoryFSHandler",SwigwxMemoryFSHandlerTowxObject}, + { "_wxObject","_class_wxZipFSHandler",SwigwxZipFSHandlerTowxObject}, + { "_wxObject","_wxZipFSHandler",SwigwxZipFSHandlerTowxObject}, + { "_wxObject","_class_wxInternetFSHandler",SwigwxInternetFSHandlerTowxObject}, + { "_wxObject","_wxInternetFSHandler",SwigwxInternetFSHandlerTowxObject}, + { "_wxObject","_class_wxFileSystem",SwigwxFileSystemTowxObject}, + { "_wxObject","_wxFileSystem",SwigwxFileSystemTowxObject}, + { "_wxObject","_class_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxObject}, + { "_wxObject","_wxPyFileSystemHandler",SwigwxPyFileSystemHandlerTowxObject}, + { "_wxObject","_class_wxFileSystemHandler",SwigwxFileSystemHandlerTowxObject}, + { "_wxObject","_wxFileSystemHandler",SwigwxFileSystemHandlerTowxObject}, + { "_wxObject","_class_wxFSFile",SwigwxFSFileTowxObject}, + { "_wxObject","_wxFSFile",SwigwxFSFileTowxObject}, + { "_wxObject","_class_wxObject",0}, { "_class_wxPoint","_wxPoint",0}, { "_class_wxPyInputStream","_wxPyInputStream",0}, { "_wxRealPoint","_class_wxRealPoint",0}, @@ -2354,6 +2395,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxWindowID","_int",0}, { "_wxWindowID","_signed_int",0}, { "_wxWindowID","_unsigned_int",0}, + { "_class_wxGDIObject","_wxGDIObject",0}, { "_int","_wxCoord",0}, { "_int","_wxPrintQuality",0}, { "_int","_time_t",0}, @@ -2402,7 +2444,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_class_wxPCXHandler","_wxPCXHandler",0}, { "_wxTIFFHandler","_class_wxTIFFHandler",0}, { "_class_wxBusyInfo","_wxBusyInfo",0}, + { "_class_wxFontList","_wxFontList",0}, { "_class_wxClientDC","_wxClientDC",0}, + { "_wxBrushList","_class_wxBrushList",0}, { "_class_wxSize","_wxSize",0}, { "_class_wxBitmap","_wxBitmap",0}, { "_class_wxMemoryDC","_wxMemoryDC",0}, @@ -2430,6 +2474,8 @@ SWIGEXPORT(void) initfilesysc() { SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("filesysc", filesyscMethods); d = PyModule_GetDict(m); + + wxPyPtrTypeMap_Add("wxFileSystemHandler", "wxPyFileSystemHandler"); { int i; for (i = 0; _swig_mapping[i].n1; i++)