X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c3c1cebed3db1aa23fec3aa9f97777f647f0cdce..bd2fdefea21af2a5f41c173f2950a074ac28b1c2:/utils/wxPython/src/gtk/utils.cpp diff --git a/utils/wxPython/src/gtk/utils.cpp b/utils/wxPython/src/gtk/utils.cpp index 6511963db4..aa2af0a105 100644 --- a/utils/wxPython/src/gtk/utils.cpp +++ b/utils/wxPython/src/gtk/utils.cpp @@ -3,7 +3,7 @@ * * This file was automatically generated by : * Simplified Wrapper and Interface Generator (SWIG) - * Version 1.1 (Patch 5) + * Version 1.1 (Patch 6) * * Portions Copyright (c) 1995-1998 * The University of Utah and The Regents of the University of California. @@ -24,16 +24,16 @@ /* Definitions for Windows/Unix exporting */ #if defined(__WIN32__) # if defined(_MSC_VER) -# define SWIGEXPORT(a,b) __declspec(dllexport) a b +# define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a,b) a _export b +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a,b) a b +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a,b) a b +# define SWIGEXPORT(a) a #endif #ifdef __cplusplus @@ -43,12 +43,12 @@ extern "C" { extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); +extern char *SWIG_GetPtrObj(PyObject *, void **, char *); extern void SWIG_addvarlink(PyObject *, char *, PyObject *(*)(void), int (*)(PyObject *)); extern PyObject *SWIG_newvarlink(void); #ifdef __cplusplus } #endif - #define SWIG_init initutilsc #define SWIG_name "utilsc" @@ -117,7 +117,7 @@ extern wxAcceleratorEntry* wxAcceleratorEntry_LIST_helper(PyObject* source); static char* wxStringErrorMsg = "string type is required for parameter"; #ifdef SEPARATE - static wxString wxPyEmptyStr(""); + wxString wxPyEmptyStr(""); #endif static PyObject* __EnumerationHelper(bool flag, wxString& str, long index) { @@ -129,15 +129,18 @@ static char* wxStringErrorMsg = "string type is required for parameter"; } return ret; } +#ifdef __cplusplus +extern "C" { +#endif #define new_wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4) (new wxConfig(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4)) static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args) { PyObject * _resultobj; wxConfig * _result; - wxString * _arg0 = &wxPyEmptyStr; - wxString * _arg1 = &wxPyEmptyStr; - wxString * _arg2 = &wxPyEmptyStr; - wxString * _arg3 = &wxPyEmptyStr; - long _arg4 = 0; + wxString * _arg0 = (wxString *) &wxPyEmptyStr; + wxString * _arg1 = (wxString *) &wxPyEmptyStr; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + wxString * _arg3 = (wxString *) &wxPyEmptyStr; + long _arg4 = (long ) 0; PyObject * _obj0 = 0; PyObject * _obj1 = 0; PyObject * _obj2 = 0; @@ -153,7 +156,7 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg0 = new wxString(PyString_AsString(_obj0)); + _arg0 = new wxString(PyString_AsString(_obj0), PyString_Size(_obj0)); } if (_obj1) { @@ -161,7 +164,7 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } if (_obj2) { @@ -169,7 +172,7 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2)); + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); } if (_obj3) { @@ -177,11 +180,20 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg3 = new wxString(PyString_AsString(_obj3)); + _arg3 = new wxString(PyString_AsString(_obj3), PyString_Size(_obj3)); } - _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); - SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfig_p"); - _resultobj = Py_BuildValue("s",_ptemp); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfig_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } { if (_obj0) delete _arg0; @@ -205,19 +217,24 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args) { static PyObject *_wrap_delete_wxConfig(PyObject *self, PyObject *args) { PyObject * _resultobj; wxConfig * _arg0; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:delete_wxConfig",&_argc0)) + if(!PyArg_ParseTuple(args,"O:delete_wxConfig",&_argo0)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxConfig. Expected _wxConfig_p."); return NULL; } } - delete_wxConfig(_arg0); - Py_INCREF(Py_None); +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxConfig(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } @@ -226,19 +243,24 @@ static PyObject *_wrap_delete_wxConfig(PyObject *self, PyObject *args) { static PyObject *_wrap_wxConfig_DontCreateOnDemand(PyObject *self, PyObject *args) { PyObject * _resultobj; wxConfig * _arg0; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxConfig_DontCreateOnDemand",&_argc0)) + if(!PyArg_ParseTuple(args,"O:wxConfig_DontCreateOnDemand",&_argo0)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DontCreateOnDemand. Expected _wxConfig_p."); return NULL; } } - wxConfig_DontCreateOnDemand(_arg0); - Py_INCREF(Py_None); +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfig_DontCreateOnDemand(_arg0); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } @@ -248,19 +270,24 @@ static PyObject *_wrap_wxConfig_DeleteAll(PyObject *self, PyObject *args) { PyObject * _resultobj; bool _result; wxConfig * _arg0; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxConfig_DeleteAll",&_argc0)) + if(!PyArg_ParseTuple(args,"O:wxConfig_DeleteAll",&_argo0)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteAll. Expected _wxConfig_p."); return NULL; } } - _result = (bool )wxConfig_DeleteAll(_arg0); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_DeleteAll(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -270,16 +297,17 @@ static PyObject *_wrap_wxConfig_DeleteEntry(PyObject *self, PyObject *args) { bool _result; wxConfig * _arg0; wxString * _arg1; - bool _arg2 = TRUE; - char * _argc0 = 0; + bool _arg2 = (bool ) TRUE; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; - int tempbool2; + int tempbool2 = (int) TRUE; self = self; - if(!PyArg_ParseTuple(args,"sO|i:wxConfig_DeleteEntry",&_argc0,&_obj1,&tempbool2)) + if(!PyArg_ParseTuple(args,"OO|i:wxConfig_DeleteEntry",&_argo0,&_obj1,&tempbool2)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteEntry. Expected _wxConfig_p."); return NULL; } @@ -289,11 +317,15 @@ static PyObject *_wrap_wxConfig_DeleteEntry(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } _arg2 = (bool ) tempbool2; - _result = (bool )wxConfig_DeleteEntry(_arg0,*_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_DeleteEntry(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; @@ -307,14 +339,15 @@ static PyObject *_wrap_wxConfig_DeleteGroup(PyObject *self, PyObject *args) { bool _result; wxConfig * _arg0; wxString * _arg1; - char * _argc0 = 0; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; self = self; - if(!PyArg_ParseTuple(args,"sO:wxConfig_DeleteGroup",&_argc0,&_obj1)) + if(!PyArg_ParseTuple(args,"OO:wxConfig_DeleteGroup",&_argo0,&_obj1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_DeleteGroup. Expected _wxConfig_p."); return NULL; } @@ -324,10 +357,14 @@ static PyObject *_wrap_wxConfig_DeleteGroup(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } - _result = (bool )wxConfig_DeleteGroup(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_DeleteGroup(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; @@ -341,14 +378,15 @@ static PyObject *_wrap_wxConfig_Exists(PyObject *self, PyObject *args) { bool _result; wxConfig * _arg0; wxString * _arg1; - char * _argc0 = 0; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; self = self; - if(!PyArg_ParseTuple(args,"sO:wxConfig_Exists",&_argc0,&_obj1)) + if(!PyArg_ParseTuple(args,"OO:wxConfig_Exists",&_argo0,&_obj1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Exists. Expected _wxConfig_p."); return NULL; } @@ -358,10 +396,14 @@ static PyObject *_wrap_wxConfig_Exists(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } - _result = (bool )wxConfig_Exists(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_Exists(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; @@ -374,22 +416,27 @@ static PyObject *_wrap_wxConfig_Flush(PyObject *self, PyObject *args) { PyObject * _resultobj; bool _result; wxConfig * _arg0; - bool _arg1 = FALSE; - char * _argc0 = 0; - int tempbool1; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; self = self; - if(!PyArg_ParseTuple(args,"s|i:wxConfig_Flush",&_argc0,&tempbool1)) + if(!PyArg_ParseTuple(args,"O|i:wxConfig_Flush",&_argo0,&tempbool1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Flush. Expected _wxConfig_p."); return NULL; } } _arg1 = (bool ) tempbool1; - _result = (bool )wxConfig_Flush(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_Flush(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -398,19 +445,24 @@ static PyObject *_wrap_wxConfig_GetAppName(PyObject *self, PyObject *args) { PyObject * _resultobj; wxString * _result; wxConfig * _arg0; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxConfig_GetAppName",&_argc0)) + if(!PyArg_ParseTuple(args,"O:wxConfig_GetAppName",&_argo0)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetAppName. Expected _wxConfig_p."); return NULL; } } - _result = new wxString (wxConfig_GetAppName(_arg0)); { + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfig_GetAppName(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); } { @@ -431,19 +483,24 @@ static PyObject *_wrap_wxConfig_GetFirstGroup(PyObject *self, PyObject *args) { PyObject * _resultobj; PyObject * _result; wxConfig * _arg0; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxConfig_GetFirstGroup",&_argc0)) + if(!PyArg_ParseTuple(args,"O:wxConfig_GetFirstGroup",&_argo0)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetFirstGroup. Expected _wxConfig_p."); return NULL; } } - _result = (PyObject *)wxConfig_GetFirstGroup(_arg0); { + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfig_GetFirstGroup(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = _result; } return _resultobj; @@ -461,19 +518,24 @@ static PyObject *_wrap_wxConfig_GetFirstEntry(PyObject *self, PyObject *args) { PyObject * _resultobj; PyObject * _result; wxConfig * _arg0; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxConfig_GetFirstEntry",&_argc0)) + if(!PyArg_ParseTuple(args,"O:wxConfig_GetFirstEntry",&_argo0)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetFirstEntry. Expected _wxConfig_p."); return NULL; } } - _result = (PyObject *)wxConfig_GetFirstEntry(_arg0); { + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfig_GetFirstEntry(_arg0); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = _result; } return _resultobj; @@ -491,19 +553,24 @@ static PyObject *_wrap_wxConfig_GetNextGroup(PyObject *self, PyObject *args) { PyObject * _result; wxConfig * _arg0; long _arg1; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"sl:wxConfig_GetNextGroup",&_argc0,&_arg1)) + if(!PyArg_ParseTuple(args,"Ol:wxConfig_GetNextGroup",&_argo0,&_arg1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNextGroup. Expected _wxConfig_p."); return NULL; } } - _result = (PyObject *)wxConfig_GetNextGroup(_arg0,_arg1); { + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfig_GetNextGroup(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = _result; } return _resultobj; @@ -521,19 +588,24 @@ static PyObject *_wrap_wxConfig_GetNextEntry(PyObject *self, PyObject *args) { PyObject * _result; wxConfig * _arg0; long _arg1; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"sl:wxConfig_GetNextEntry",&_argc0,&_arg1)) + if(!PyArg_ParseTuple(args,"Ol:wxConfig_GetNextEntry",&_argo0,&_arg1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNextEntry. Expected _wxConfig_p."); return NULL; } } - _result = (PyObject *)wxConfig_GetNextEntry(_arg0,_arg1); { + wxPy_BEGIN_ALLOW_THREADS; + _result = (PyObject *)wxConfig_GetNextEntry(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = _result; } return _resultobj; @@ -544,22 +616,27 @@ static PyObject *_wrap_wxConfig_GetNumberOfEntries(PyObject *self, PyObject *arg PyObject * _resultobj; int _result; wxConfig * _arg0; - bool _arg1 = FALSE; - char * _argc0 = 0; - int tempbool1; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; self = self; - if(!PyArg_ParseTuple(args,"s|i:wxConfig_GetNumberOfEntries",&_argc0,&tempbool1)) + if(!PyArg_ParseTuple(args,"O|i:wxConfig_GetNumberOfEntries",&_argo0,&tempbool1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNumberOfEntries. Expected _wxConfig_p."); return NULL; } } _arg1 = (bool ) tempbool1; - _result = (int )wxConfig_GetNumberOfEntries(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxConfig_GetNumberOfEntries(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -568,22 +645,27 @@ static PyObject *_wrap_wxConfig_GetNumberOfGroups(PyObject *self, PyObject *args PyObject * _resultobj; int _result; wxConfig * _arg0; - bool _arg1 = FALSE; - char * _argc0 = 0; - int tempbool1; + bool _arg1 = (bool ) FALSE; + PyObject * _argo0 = 0; + int tempbool1 = (int) FALSE; self = self; - if(!PyArg_ParseTuple(args,"s|i:wxConfig_GetNumberOfGroups",&_argc0,&tempbool1)) + if(!PyArg_ParseTuple(args,"O|i:wxConfig_GetNumberOfGroups",&_argo0,&tempbool1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetNumberOfGroups. Expected _wxConfig_p."); return NULL; } } _arg1 = (bool ) tempbool1; - _result = (int )wxConfig_GetNumberOfGroups(_arg0,_arg1); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (int )wxConfig_GetNumberOfGroups(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -592,19 +674,24 @@ static PyObject *_wrap_wxConfig_GetPath(PyObject *self, PyObject *args) { PyObject * _resultobj; wxString * _result; wxConfig * _arg0; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxConfig_GetPath",&_argc0)) + if(!PyArg_ParseTuple(args,"O:wxConfig_GetPath",&_argo0)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetPath. Expected _wxConfig_p."); return NULL; } } - _result = new wxString (wxConfig_GetPath(_arg0)); { + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfig_GetPath(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); } { @@ -618,19 +705,24 @@ static PyObject *_wrap_wxConfig_GetVendorName(PyObject *self, PyObject *args) { PyObject * _resultobj; wxString * _result; wxConfig * _arg0; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxConfig_GetVendorName",&_argc0)) + if(!PyArg_ParseTuple(args,"O:wxConfig_GetVendorName",&_argo0)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_GetVendorName. Expected _wxConfig_p."); return NULL; } } - _result = new wxString (wxConfig_GetVendorName(_arg0)); { + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfig_GetVendorName(_arg0)); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); } { @@ -645,14 +737,15 @@ static PyObject *_wrap_wxConfig_HasEntry(PyObject *self, PyObject *args) { bool _result; wxConfig * _arg0; wxString * _arg1; - char * _argc0 = 0; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; self = self; - if(!PyArg_ParseTuple(args,"sO:wxConfig_HasEntry",&_argc0,&_obj1)) + if(!PyArg_ParseTuple(args,"OO:wxConfig_HasEntry",&_argo0,&_obj1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_HasEntry. Expected _wxConfig_p."); return NULL; } @@ -662,10 +755,14 @@ static PyObject *_wrap_wxConfig_HasEntry(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } - _result = (bool )wxConfig_HasEntry(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_HasEntry(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; @@ -679,14 +776,15 @@ static PyObject *_wrap_wxConfig_HasGroup(PyObject *self, PyObject *args) { bool _result; wxConfig * _arg0; wxString * _arg1; - char * _argc0 = 0; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; self = self; - if(!PyArg_ParseTuple(args,"sO:wxConfig_HasGroup",&_argc0,&_obj1)) + if(!PyArg_ParseTuple(args,"OO:wxConfig_HasGroup",&_argo0,&_obj1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_HasGroup. Expected _wxConfig_p."); return NULL; } @@ -696,10 +794,14 @@ static PyObject *_wrap_wxConfig_HasGroup(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } - _result = (bool )wxConfig_HasGroup(_arg0,*_arg1); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_HasGroup(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; @@ -712,19 +814,24 @@ static PyObject *_wrap_wxConfig_IsExpandingEnvVars(PyObject *self, PyObject *arg PyObject * _resultobj; bool _result; wxConfig * _arg0; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxConfig_IsExpandingEnvVars",&_argc0)) + if(!PyArg_ParseTuple(args,"O:wxConfig_IsExpandingEnvVars",&_argo0)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_IsExpandingEnvVars. Expected _wxConfig_p."); return NULL; } } - _result = (bool )wxConfig_IsExpandingEnvVars(_arg0); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_IsExpandingEnvVars(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -733,19 +840,24 @@ static PyObject *_wrap_wxConfig_IsRecordingDefaults(PyObject *self, PyObject *ar PyObject * _resultobj; bool _result; wxConfig * _arg0; - char * _argc0 = 0; + PyObject * _argo0 = 0; self = self; - if(!PyArg_ParseTuple(args,"s:wxConfig_IsRecordingDefaults",&_argc0)) + if(!PyArg_ParseTuple(args,"O:wxConfig_IsRecordingDefaults",&_argo0)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_IsRecordingDefaults. Expected _wxConfig_p."); return NULL; } } - _result = (bool )wxConfig_IsRecordingDefaults(_arg0); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_IsRecordingDefaults(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } @@ -755,16 +867,17 @@ static PyObject *_wrap_wxConfig_Read(PyObject *self, PyObject *args) { wxString * _result; wxConfig * _arg0; wxString * _arg1; - wxString * _arg2 = &wxPyEmptyStr; - char * _argc0 = 0; + wxString * _arg2 = (wxString *) &wxPyEmptyStr; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; PyObject * _obj2 = 0; self = self; - if(!PyArg_ParseTuple(args,"sO|O:wxConfig_Read",&_argc0,&_obj1,&_obj2)) + if(!PyArg_ParseTuple(args,"OO|O:wxConfig_Read",&_argo0,&_obj1,&_obj2)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Read. Expected _wxConfig_p."); return NULL; } @@ -774,7 +887,7 @@ static PyObject *_wrap_wxConfig_Read(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } if (_obj2) { @@ -782,10 +895,14 @@ static PyObject *_wrap_wxConfig_Read(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2)); + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); } - _result = new wxString (wxConfig_Read(_arg0,*_arg1,*_arg2)); { + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxString (wxConfig_Read(_arg0,*_arg1,*_arg2)); + + wxPy_END_ALLOW_THREADS; +}{ _resultobj = PyString_FromString(WXSTRINGCAST *(_result)); } { @@ -808,15 +925,16 @@ static PyObject *_wrap_wxConfig_ReadInt(PyObject *self, PyObject *args) { long _result; wxConfig * _arg0; wxString * _arg1; - long _arg2 = 0; - char * _argc0 = 0; + long _arg2 = (long ) 0; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; self = self; - if(!PyArg_ParseTuple(args,"sO|l:wxConfig_ReadInt",&_argc0,&_obj1,&_arg2)) + if(!PyArg_ParseTuple(args,"OO|l:wxConfig_ReadInt",&_argo0,&_obj1,&_arg2)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_ReadInt. Expected _wxConfig_p."); return NULL; } @@ -826,10 +944,14 @@ static PyObject *_wrap_wxConfig_ReadInt(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } - _result = (long )wxConfig_ReadInt(_arg0,*_arg1,_arg2); - _resultobj = Py_BuildValue("l",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (long )wxConfig_ReadInt(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("l",_result); { if (_obj1) delete _arg1; @@ -843,15 +965,16 @@ static PyObject *_wrap_wxConfig_ReadFloat(PyObject *self, PyObject *args) { double _result; wxConfig * _arg0; wxString * _arg1; - double _arg2 = 0.0; - char * _argc0 = 0; + double _arg2 = (double ) 0.0; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; self = self; - if(!PyArg_ParseTuple(args,"sO|d:wxConfig_ReadFloat",&_argc0,&_obj1,&_arg2)) + if(!PyArg_ParseTuple(args,"OO|d:wxConfig_ReadFloat",&_argo0,&_obj1,&_arg2)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_ReadFloat. Expected _wxConfig_p."); return NULL; } @@ -861,44 +984,14 @@ static PyObject *_wrap_wxConfig_ReadFloat(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } - _result = (double )wxConfig_ReadFloat(_arg0,*_arg1,_arg2); - _resultobj = Py_BuildValue("d",_result); { - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxConfig_SetAppName(_swigobj,_swigarg0) (_swigobj->SetAppName(_swigarg0)) -static PyObject *_wrap_wxConfig_SetAppName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxConfig * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; + wxPy_BEGIN_ALLOW_THREADS; + _result = (double )wxConfig_ReadFloat(_arg0,*_arg1,_arg2); - self = self; - if(!PyArg_ParseTuple(args,"sO:wxConfig_SetAppName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetAppName. Expected _wxConfig_p."); - return NULL; - } - } -{ - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxConfig_SetAppName(_arg0,*_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("d",_result); { if (_obj1) delete _arg1; @@ -910,22 +1003,27 @@ static PyObject *_wrap_wxConfig_SetAppName(PyObject *self, PyObject *args) { static PyObject *_wrap_wxConfig_SetExpandEnvVars(PyObject *self, PyObject *args) { PyObject * _resultobj; wxConfig * _arg0; - bool _arg1 = TRUE; - char * _argc0 = 0; - int tempbool1; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; self = self; - if(!PyArg_ParseTuple(args,"s|i:wxConfig_SetExpandEnvVars",&_argc0,&tempbool1)) + if(!PyArg_ParseTuple(args,"O|i:wxConfig_SetExpandEnvVars",&_argo0,&tempbool1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetExpandEnvVars. Expected _wxConfig_p."); return NULL; } } _arg1 = (bool ) tempbool1; - wxConfig_SetExpandEnvVars(_arg0,_arg1); - Py_INCREF(Py_None); +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfig_SetExpandEnvVars(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); _resultobj = Py_None; return _resultobj; } @@ -935,14 +1033,15 @@ static PyObject *_wrap_wxConfig_SetPath(PyObject *self, PyObject *args) { PyObject * _resultobj; wxConfig * _arg0; wxString * _arg1; - char * _argc0 = 0; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; self = self; - if(!PyArg_ParseTuple(args,"sO:wxConfig_SetPath",&_argc0,&_obj1)) + if(!PyArg_ParseTuple(args,"OO:wxConfig_SetPath",&_argo0,&_obj1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetPath. Expected _wxConfig_p."); return NULL; } @@ -952,10 +1051,14 @@ static PyObject *_wrap_wxConfig_SetPath(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } - wxConfig_SetPath(_arg0,*_arg1); - Py_INCREF(Py_None); +{ + wxPy_BEGIN_ALLOW_THREADS; + wxConfig_SetPath(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); _resultobj = Py_None; { if (_obj1) @@ -968,57 +1071,28 @@ static PyObject *_wrap_wxConfig_SetPath(PyObject *self, PyObject *args) { static PyObject *_wrap_wxConfig_SetRecordDefaults(PyObject *self, PyObject *args) { PyObject * _resultobj; wxConfig * _arg0; - bool _arg1 = TRUE; - char * _argc0 = 0; - int tempbool1; + bool _arg1 = (bool ) TRUE; + PyObject * _argo0 = 0; + int tempbool1 = (int) TRUE; self = self; - if(!PyArg_ParseTuple(args,"s|i:wxConfig_SetRecordDefaults",&_argc0,&tempbool1)) + if(!PyArg_ParseTuple(args,"O|i:wxConfig_SetRecordDefaults",&_argo0,&tempbool1)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetRecordDefaults. Expected _wxConfig_p."); return NULL; } } _arg1 = (bool ) tempbool1; - wxConfig_SetRecordDefaults(_arg0,_arg1); - Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxConfig_SetVendorName(_swigobj,_swigarg0) (_swigobj->SetVendorName(_swigarg0)) -static PyObject *_wrap_wxConfig_SetVendorName(PyObject *self, PyObject *args) { - PyObject * _resultobj; - wxConfig * _arg0; - wxString * _arg1; - char * _argc0 = 0; - PyObject * _obj1 = 0; - - self = self; - if(!PyArg_ParseTuple(args,"sO:wxConfig_SetVendorName",&_argc0,&_obj1)) - return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_SetVendorName. Expected _wxConfig_p."); - return NULL; - } - } { - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AsString(_obj1)); -} - wxConfig_SetVendorName(_arg0,*_arg1); - Py_INCREF(Py_None); + wxPy_BEGIN_ALLOW_THREADS; + wxConfig_SetRecordDefaults(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} return _resultobj; } @@ -1029,15 +1103,16 @@ static PyObject *_wrap_wxConfig_Write(PyObject *self, PyObject *args) { wxConfig * _arg0; wxString * _arg1; wxString * _arg2; - char * _argc0 = 0; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; PyObject * _obj2 = 0; self = self; - if(!PyArg_ParseTuple(args,"sOO:wxConfig_Write",&_argc0,&_obj1,&_obj2)) + if(!PyArg_ParseTuple(args,"OOO:wxConfig_Write",&_argo0,&_obj1,&_obj2)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_Write. Expected _wxConfig_p."); return NULL; } @@ -1047,17 +1122,21 @@ static PyObject *_wrap_wxConfig_Write(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } { if (!PyString_Check(_obj2)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg2 = new wxString(PyString_AsString(_obj2)); + _arg2 = new wxString(PyString_AsString(_obj2), PyString_Size(_obj2)); } - _result = (bool )wxConfig_Write(_arg0,*_arg1,*_arg2); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_Write(_arg0,*_arg1,*_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; @@ -1076,14 +1155,15 @@ static PyObject *_wrap_wxConfig_WriteInt(PyObject *self, PyObject *args) { wxConfig * _arg0; wxString * _arg1; long _arg2; - char * _argc0 = 0; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; self = self; - if(!PyArg_ParseTuple(args,"sOl:wxConfig_WriteInt",&_argc0,&_obj1,&_arg2)) + if(!PyArg_ParseTuple(args,"OOl:wxConfig_WriteInt",&_argo0,&_obj1,&_arg2)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_WriteInt. Expected _wxConfig_p."); return NULL; } @@ -1093,10 +1173,14 @@ static PyObject *_wrap_wxConfig_WriteInt(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } - _result = (bool )wxConfig_WriteInt(_arg0,*_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_WriteInt(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; @@ -1111,14 +1195,15 @@ static PyObject *_wrap_wxConfig_WriteFloat(PyObject *self, PyObject *args) { wxConfig * _arg0; wxString * _arg1; double _arg2; - char * _argc0 = 0; + PyObject * _argo0 = 0; PyObject * _obj1 = 0; self = self; - if(!PyArg_ParseTuple(args,"sOd:wxConfig_WriteFloat",&_argc0,&_obj1,&_arg2)) + if(!PyArg_ParseTuple(args,"OOd:wxConfig_WriteFloat",&_argo0,&_obj1,&_arg2)) return NULL; - if (_argc0) { - if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_wxConfig_p")) { + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxConfig_p")) { PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxConfig_WriteFloat. Expected _wxConfig_p."); return NULL; } @@ -1128,10 +1213,14 @@ static PyObject *_wrap_wxConfig_WriteFloat(PyObject *self, PyObject *args) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AsString(_obj1)); + _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1)); } - _result = (bool )wxConfig_WriteFloat(_arg0,*_arg1,_arg2); - _resultobj = Py_BuildValue("i",_result); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxConfig_WriteFloat(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); { if (_obj1) delete _arg1; @@ -1140,65 +1229,78 @@ static PyObject *_wrap_wxConfig_WriteFloat(PyObject *self, PyObject *args) { } static PyMethodDef utilscMethods[] = { - { "wxConfig_WriteFloat", _wrap_wxConfig_WriteFloat, 1 }, - { "wxConfig_WriteInt", _wrap_wxConfig_WriteInt, 1 }, - { "wxConfig_Write", _wrap_wxConfig_Write, 1 }, - { "wxConfig_SetVendorName", _wrap_wxConfig_SetVendorName, 1 }, - { "wxConfig_SetRecordDefaults", _wrap_wxConfig_SetRecordDefaults, 1 }, - { "wxConfig_SetPath", _wrap_wxConfig_SetPath, 1 }, - { "wxConfig_SetExpandEnvVars", _wrap_wxConfig_SetExpandEnvVars, 1 }, - { "wxConfig_SetAppName", _wrap_wxConfig_SetAppName, 1 }, - { "wxConfig_ReadFloat", _wrap_wxConfig_ReadFloat, 1 }, - { "wxConfig_ReadInt", _wrap_wxConfig_ReadInt, 1 }, - { "wxConfig_Read", _wrap_wxConfig_Read, 1 }, - { "wxConfig_IsRecordingDefaults", _wrap_wxConfig_IsRecordingDefaults, 1 }, - { "wxConfig_IsExpandingEnvVars", _wrap_wxConfig_IsExpandingEnvVars, 1 }, - { "wxConfig_HasGroup", _wrap_wxConfig_HasGroup, 1 }, - { "wxConfig_HasEntry", _wrap_wxConfig_HasEntry, 1 }, - { "wxConfig_GetVendorName", _wrap_wxConfig_GetVendorName, 1 }, - { "wxConfig_GetPath", _wrap_wxConfig_GetPath, 1 }, - { "wxConfig_GetNumberOfGroups", _wrap_wxConfig_GetNumberOfGroups, 1 }, - { "wxConfig_GetNumberOfEntries", _wrap_wxConfig_GetNumberOfEntries, 1 }, - { "wxConfig_GetNextEntry", _wrap_wxConfig_GetNextEntry, 1 }, - { "wxConfig_GetNextGroup", _wrap_wxConfig_GetNextGroup, 1 }, - { "wxConfig_GetFirstEntry", _wrap_wxConfig_GetFirstEntry, 1 }, - { "wxConfig_GetFirstGroup", _wrap_wxConfig_GetFirstGroup, 1 }, - { "wxConfig_GetAppName", _wrap_wxConfig_GetAppName, 1 }, - { "wxConfig_Flush", _wrap_wxConfig_Flush, 1 }, - { "wxConfig_Exists", _wrap_wxConfig_Exists, 1 }, - { "wxConfig_DeleteGroup", _wrap_wxConfig_DeleteGroup, 1 }, - { "wxConfig_DeleteEntry", _wrap_wxConfig_DeleteEntry, 1 }, - { "wxConfig_DeleteAll", _wrap_wxConfig_DeleteAll, 1 }, - { "wxConfig_DontCreateOnDemand", _wrap_wxConfig_DontCreateOnDemand, 1 }, - { "delete_wxConfig", _wrap_delete_wxConfig, 1 }, - { "new_wxConfig", _wrap_new_wxConfig, 1 }, + { "wxConfig_WriteFloat", _wrap_wxConfig_WriteFloat, METH_VARARGS }, + { "wxConfig_WriteInt", _wrap_wxConfig_WriteInt, METH_VARARGS }, + { "wxConfig_Write", _wrap_wxConfig_Write, METH_VARARGS }, + { "wxConfig_SetRecordDefaults", _wrap_wxConfig_SetRecordDefaults, METH_VARARGS }, + { "wxConfig_SetPath", _wrap_wxConfig_SetPath, METH_VARARGS }, + { "wxConfig_SetExpandEnvVars", _wrap_wxConfig_SetExpandEnvVars, METH_VARARGS }, + { "wxConfig_ReadFloat", _wrap_wxConfig_ReadFloat, METH_VARARGS }, + { "wxConfig_ReadInt", _wrap_wxConfig_ReadInt, METH_VARARGS }, + { "wxConfig_Read", _wrap_wxConfig_Read, METH_VARARGS }, + { "wxConfig_IsRecordingDefaults", _wrap_wxConfig_IsRecordingDefaults, METH_VARARGS }, + { "wxConfig_IsExpandingEnvVars", _wrap_wxConfig_IsExpandingEnvVars, METH_VARARGS }, + { "wxConfig_HasGroup", _wrap_wxConfig_HasGroup, METH_VARARGS }, + { "wxConfig_HasEntry", _wrap_wxConfig_HasEntry, METH_VARARGS }, + { "wxConfig_GetVendorName", _wrap_wxConfig_GetVendorName, METH_VARARGS }, + { "wxConfig_GetPath", _wrap_wxConfig_GetPath, METH_VARARGS }, + { "wxConfig_GetNumberOfGroups", _wrap_wxConfig_GetNumberOfGroups, METH_VARARGS }, + { "wxConfig_GetNumberOfEntries", _wrap_wxConfig_GetNumberOfEntries, METH_VARARGS }, + { "wxConfig_GetNextEntry", _wrap_wxConfig_GetNextEntry, METH_VARARGS }, + { "wxConfig_GetNextGroup", _wrap_wxConfig_GetNextGroup, METH_VARARGS }, + { "wxConfig_GetFirstEntry", _wrap_wxConfig_GetFirstEntry, METH_VARARGS }, + { "wxConfig_GetFirstGroup", _wrap_wxConfig_GetFirstGroup, METH_VARARGS }, + { "wxConfig_GetAppName", _wrap_wxConfig_GetAppName, METH_VARARGS }, + { "wxConfig_Flush", _wrap_wxConfig_Flush, METH_VARARGS }, + { "wxConfig_Exists", _wrap_wxConfig_Exists, METH_VARARGS }, + { "wxConfig_DeleteGroup", _wrap_wxConfig_DeleteGroup, METH_VARARGS }, + { "wxConfig_DeleteEntry", _wrap_wxConfig_DeleteEntry, METH_VARARGS }, + { "wxConfig_DeleteAll", _wrap_wxConfig_DeleteAll, METH_VARARGS }, + { "wxConfig_DontCreateOnDemand", _wrap_wxConfig_DontCreateOnDemand, METH_VARARGS }, + { "delete_wxConfig", _wrap_delete_wxConfig, METH_VARARGS }, + { "new_wxConfig", _wrap_new_wxConfig, METH_VARARGS }, { NULL, NULL } }; +#ifdef __cplusplus +} +#endif +/* + * This table is used by the pointer type-checker + */ +static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { + { "_signed_long","_long",0}, + { "_long","_unsigned_long",0}, + { "_long","_signed_long",0}, + { "_wxConfig","_class_wxConfig",0}, + { "_unsigned_long","_long",0}, + { "_signed_int","_int",0}, + { "_unsigned_short","_short",0}, + { "_signed_short","_short",0}, + { "_unsigned_int","_int",0}, + { "_short","_unsigned_short",0}, + { "_short","_signed_short",0}, + { "_int","_unsigned_int",0}, + { "_int","_signed_int",0}, + { "_class_wxConfig","_wxConfig",0}, +{0,0,0}}; + static PyObject *SWIG_globals; #ifdef __cplusplus extern "C" #endif -SWIGEXPORT(void,initutilsc)() { +SWIGEXPORT(void) initutilsc() { PyObject *m, *d; SWIG_globals = SWIG_newvarlink(); m = Py_InitModule("utilsc", utilscMethods); d = PyModule_GetDict(m); -/* - * These are the pointer type-equivalency mappings. - * (Used by the SWIG pointer type-checker). - */ - SWIG_RegisterMapping("_signed_long","_long",0); - SWIG_RegisterMapping("_long","_unsigned_long",0); - SWIG_RegisterMapping("_long","_signed_long",0); - SWIG_RegisterMapping("_wxConfig","_class_wxConfig",0); - SWIG_RegisterMapping("_unsigned_long","_long",0); - SWIG_RegisterMapping("_signed_int","_int",0); - SWIG_RegisterMapping("_unsigned_short","_short",0); - SWIG_RegisterMapping("_signed_short","_short",0); - SWIG_RegisterMapping("_unsigned_int","_int",0); - SWIG_RegisterMapping("_short","_unsigned_short",0); - SWIG_RegisterMapping("_short","_signed_short",0); - SWIG_RegisterMapping("_int","_unsigned_int",0); - SWIG_RegisterMapping("_int","_signed_int",0); - SWIG_RegisterMapping("_class_wxConfig","_wxConfig",0); + + + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); + +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} }