X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bf5d46efb26ab22575ca9bc0d0ca5d32d6b77a3..bd2fdefea21af2a5f41c173f2950a074ac28b1c2:/utils/wxPython/src/msw/utils.cpp diff --git a/utils/wxPython/src/msw/utils.cpp b/utils/wxPython/src/msw/utils.cpp index 80a4facf79..739ee9841c 100644 --- a/utils/wxPython/src/msw/utils.cpp +++ b/utils/wxPython/src/msw/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. @@ -21,579 +21,34 @@ #define SWIGPYTHON #include #include -/*********************************************************************** - * $Header$ - * swig_lib/python/python.cfg - * - * This file contains coded needed to add variable linking to the - * Python interpreter. C variables are added as a new kind of Python - * datatype. - * - * Also contains supporting code for building python under Windows - * and things like that. - * - * $Log$ - * Revision 1.8 1999/07/31 07:56:02 RD - * wxPython 2.1b1: - * - * Added the missing wxWindow.GetUpdateRegion() method. - * - * Made a new change in SWIG (update your patches everybody) that - * provides a fix for global shadow objects that get an exception in - * their __del__ when their extension module has already been deleted. - * It was only a 1 line change in .../SWIG/Modules/pycpp.cxx at about - * line 496 if you want to do it by hand. - * - * It is now possible to run through MainLoop more than once in any one - * process. The cleanup that used to happen as MainLoop completed (and - * prevented it from running again) has been delayed until the wxc module - * is being unloaded by Python. - * - * wxWindow.PopupMenu() now takes a wxPoint instead of x,y. Added - * wxWindow.PopupMenuXY to be consistent with some other methods. - * - * Added wxGrid.SetEditInPlace and wxGrid.GetEditInPlace. - * - * You can now provide your own app.MainLoop method. See - * wxPython/demo/demoMainLoop.py for an example and some explaination. - * - * Got the in-place-edit for the wxTreeCtrl fixed and added some demo - * code to show how to use it. - * - * Put the wxIcon constructor back in for GTK as it now has one that - * matches MSW's. - * - * Added wxGrid.GetCells - * - * Added wxSystemSettings static methods as functions with names like - * wxSystemSettings_GetSystemColour. - * - * Removed wxPyMenu since using menu callbacks have been depreciated in - * wxWindows. Use wxMenu and events instead. - * - * Added alternate wxBitmap constructor (for MSW only) as - * wxBitmapFromData(data, type, width, height, depth = 1) - * - * Added a helper function named wxPyTypeCast that can convert shadow - * objects of one type into shadow objects of another type. (Like doing - * a down-cast.) See the implementation in wx.py for some docs. - * - ************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif -#include "Python.h" -#ifdef __cplusplus -} -#endif - /* 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 SWIG_GLOBAL #ifdef __cplusplus -#define SWIGSTATIC extern "C" -#else -#define SWIGSTATIC -#endif -#endif - -#ifndef SWIGSTATIC -#define SWIGSTATIC static +extern "C" { #endif - -typedef struct { - char *name; - PyObject *(*get_attr)(void); - int (*set_attr)(PyObject *); -} swig_globalvar; - -typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar **vars; - int nvars; - int maxvars; -} swig_varlinkobject; - -/* ---------------------------------------------------------------------- - swig_varlink_repr() - - Function for python repr method - ---------------------------------------------------------------------- */ - -static PyObject * -swig_varlink_repr(swig_varlinkobject *v) -{ - v = v; - return PyString_FromString(""); -} - -/* --------------------------------------------------------------------- - swig_varlink_print() - - Print out all of the global variable names - --------------------------------------------------------------------- */ - -static int -swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) -{ - - int i = 0; - flags = flags; - fprintf(fp,"Global variables { "); - while (v->vars[i]) { - fprintf(fp,"%s", v->vars[i]->name); - i++; - if (v->vars[i]) fprintf(fp,", "); - } - fprintf(fp," }\n"); - return 0; -} - -/* -------------------------------------------------------------------- - swig_varlink_getattr - - This function gets the value of a variable and returns it as a - PyObject. In our case, we'll be looking at the datatype and - converting into a number or string - -------------------------------------------------------------------- */ - -static PyObject * -swig_varlink_getattr(swig_varlinkobject *v, char *n) -{ - int i = 0; - char temp[128]; - - while (v->vars[i]) { - if (strcmp(v->vars[i]->name,n) == 0) { - return (*v->vars[i]->get_attr)(); - } - i++; - } - sprintf(temp,"C global variable %s not found.", n); - PyErr_SetString(PyExc_NameError,temp); - return NULL; -} - -/* ------------------------------------------------------------------- - swig_varlink_setattr() - - This function sets the value of a variable. - ------------------------------------------------------------------- */ - -static int -swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) -{ - char temp[128]; - int i = 0; - while (v->vars[i]) { - if (strcmp(v->vars[i]->name,n) == 0) { - return (*v->vars[i]->set_attr)(p); - } - i++; - } - sprintf(temp,"C global variable %s not found.", n); - PyErr_SetString(PyExc_NameError,temp); - return 1; -} - -statichere PyTypeObject varlinktype = { -/* PyObject_HEAD_INIT(&PyType_Type) Note : This doesn't work on some machines */ - PyObject_HEAD_INIT(0) - 0, - "varlink", /* Type name */ - sizeof(swig_varlinkobject), /* Basic size */ - 0, /* Itemsize */ - 0, /* Deallocator */ - (printfunc) swig_varlink_print, /* Print */ - (getattrfunc) swig_varlink_getattr, /* get attr */ - (setattrfunc) swig_varlink_setattr, /* Set attr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_mapping*/ - 0, /* tp_hash */ -}; - -/* Create a variable linking object for use later */ - -SWIGSTATIC PyObject * -SWIG_newvarlink(void) -{ - swig_varlinkobject *result = 0; - result = PyMem_NEW(swig_varlinkobject,1); - varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */ - result->ob_type = &varlinktype; - /* _Py_NewReference(result); Does not seem to be necessary */ - result->nvars = 0; - result->maxvars = 64; - result->vars = (swig_globalvar **) malloc(64*sizeof(swig_globalvar *)); - result->vars[0] = 0; - result->ob_refcnt = 0; - Py_XINCREF((PyObject *) result); - return ((PyObject*) result); -} - -SWIGSTATIC void -SWIG_addvarlink(PyObject *p, char *name, - PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) -{ - swig_varlinkobject *v; - v= (swig_varlinkobject *) p; - - if (v->nvars >= v->maxvars -1) { - v->maxvars = 2*v->maxvars; - v->vars = (swig_globalvar **) realloc(v->vars,v->maxvars*sizeof(swig_globalvar *)); - if (v->vars == NULL) { - fprintf(stderr,"SWIG : Fatal error in initializing Python module.\n"); - exit(1); - } - } - v->vars[v->nvars] = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - v->vars[v->nvars]->name = (char *) malloc(strlen(name)+1); - strcpy(v->vars[v->nvars]->name,name); - v->vars[v->nvars]->get_attr = get_attr; - v->vars[v->nvars]->set_attr = set_attr; - v->nvars++; - v->vars[v->nvars] = 0; -} - - - -/***************************************************************************** - * $Header$ - * - * swigptr.swg - * - * This file contains supporting code for the SWIG run-time type checking - * mechanism. The following functions are available : - * - * SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)); - * - * Registers a new type-mapping with the type-checker. origtype is the - * original datatype and newtype is an equivalent type. cast is optional - * pointer to a function to cast pointer values between types (this - * is typically used to cast pointers from derived classes to base classes in C++) - * - * SWIG_MakePtr(char *buffer, void *ptr, char *typestring); - * - * Makes a pointer string from a pointer and typestring. The result is returned - * in buffer which is assumed to hold enough space for the result. - * - * char * SWIG_GetPtr(char *buffer, void **ptr, char *type) - * - * Gets a pointer value from a string. If there is a type-mismatch, returns - * a character string to the received type. On success, returns NULL. - * - * - * You can remap these functions by making a file called "swigptr.swg" in - * your the same directory as the interface file you are wrapping. - * - * These functions are normally declared static, but this file can be - * can be used in a multi-module environment by redefining the symbol - * SWIGSTATIC. - *****************************************************************************/ - -#include - -#ifdef SWIG_GLOBAL +#include "Python.h" +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 -#define SWIGSTATIC extern "C" -#else -#define SWIGSTATIC -#endif -#endif - -#ifndef SWIGSTATIC -#define SWIGSTATIC static -#endif - - -/* SWIG pointer structure */ - -typedef struct SwigPtrType { - char *name; /* Datatype name */ - int len; /* Length (used for optimization) */ - void *(*cast)(void *); /* Pointer casting function */ - struct SwigPtrType *next; /* Linked list pointer */ -} SwigPtrType; - -/* Pointer cache structure */ - -typedef struct { - int stat; /* Status (valid) bit */ - SwigPtrType *tp; /* Pointer to type structure */ - char name[256]; /* Given datatype name */ - char mapped[256]; /* Equivalent name */ -} SwigCacheType; - -/* Some variables */ - -static int SwigPtrMax = 64; /* Max entries that can be currently held */ - /* This value may be adjusted dynamically */ -static int SwigPtrN = 0; /* Current number of entries */ -static int SwigPtrSort = 0; /* Status flag indicating sort */ -static int SwigStart[256]; /* Starting positions of types */ - -/* Pointer table */ -static SwigPtrType *SwigPtrTable = 0; /* Table containing pointer equivalences */ - -/* Cached values */ - -#define SWIG_CACHESIZE 8 -#define SWIG_CACHEMASK 0x7 -static SwigCacheType SwigCache[SWIG_CACHESIZE]; -static int SwigCacheIndex = 0; -static int SwigLastCache = 0; - -/* Sort comparison function */ -static int swigsort(const void *data1, const void *data2) { - SwigPtrType *d1 = (SwigPtrType *) data1; - SwigPtrType *d2 = (SwigPtrType *) data2; - return strcmp(d1->name,d2->name); -} - -/* Binary Search function */ -static int swigcmp(const void *key, const void *data) { - char *k = (char *) key; - SwigPtrType *d = (SwigPtrType *) data; - return strncmp(k,d->name,d->len); -} - -/* Register a new datatype with the type-checker */ - -SWIGSTATIC -void SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)) { - - int i; - SwigPtrType *t = 0,*t1; - - /* Allocate the pointer table if necessary */ - - if (!SwigPtrTable) { - SwigPtrTable = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType)); - SwigPtrN = 0; - } - /* Grow the table */ - if (SwigPtrN >= SwigPtrMax) { - SwigPtrMax = 2*SwigPtrMax; - SwigPtrTable = (SwigPtrType *) realloc((char *) SwigPtrTable,SwigPtrMax*sizeof(SwigPtrType)); - } - for (i = 0; i < SwigPtrN; i++) - if (strcmp(SwigPtrTable[i].name,origtype) == 0) { - t = &SwigPtrTable[i]; - break; - } - if (!t) { - t = &SwigPtrTable[SwigPtrN]; - t->name = origtype; - t->len = strlen(t->name); - t->cast = 0; - t->next = 0; - SwigPtrN++; - } - - /* Check for existing entry */ - - while (t->next) { - if ((strcmp(t->name,newtype) == 0)) { - if (cast) t->cast = cast; - return; - } - t = t->next; - } - - /* Now place entry (in sorted order) */ - - t1 = (SwigPtrType *) malloc(sizeof(SwigPtrType)); - t1->name = newtype; - t1->len = strlen(t1->name); - t1->cast = cast; - t1->next = 0; - t->next = t1; - SwigPtrSort = 0; -} - -/* Make a pointer value string */ - -SWIGSTATIC -void SWIG_MakePtr(char *_c, const void *_ptr, char *type) { - static char _hex[16] = - {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'a', 'b', 'c', 'd', 'e', 'f'}; - unsigned long _p, _s; - char _result[20], *_r; /* Note : a 64-bit hex number = 16 digits */ - _r = _result; - _p = (unsigned long) _ptr; - if (_p > 0) { - while (_p > 0) { - _s = _p & 0xf; - *(_r++) = _hex[_s]; - _p = _p >> 4; - } - *_r = '_'; - while (_r >= _result) - *(_c++) = *(_r--); - } else { - strcpy (_c, "NULL"); - } - if (_ptr) - strcpy (_c, type); -} - -/* Define for backwards compatibility */ - -#define _swig_make_hex SWIG_MakePtr - -/* Function for getting a pointer value */ - -SWIGSTATIC -char *SWIG_GetPtr(char *_c, void **ptr, char *_t) -{ - unsigned long _p; - char temp_type[256]; - char *name; - int i, len; - SwigPtrType *sp,*tp; - SwigCacheType *cache; - int start, end; - _p = 0; - - /* Pointer values must start with leading underscore */ - if (*_c == '_') { - _c++; - /* Extract hex value from pointer */ - while (*_c) { - if ((*_c >= '0') && (*_c <= '9')) - _p = (_p << 4) + (*_c - '0'); - else if ((*_c >= 'a') && (*_c <= 'f')) - _p = (_p << 4) + ((*_c - 'a') + 10); - else - break; - _c++; - } - - if (_t) { - if (strcmp(_t,_c)) { - if (!SwigPtrSort) { - qsort((void *) SwigPtrTable, SwigPtrN, sizeof(SwigPtrType), swigsort); - for (i = 0; i < 256; i++) { - SwigStart[i] = SwigPtrN; - } - for (i = SwigPtrN-1; i >= 0; i--) { - SwigStart[(int) (SwigPtrTable[i].name[1])] = i; - } - for (i = 255; i >= 1; i--) { - if (SwigStart[i-1] > SwigStart[i]) - SwigStart[i-1] = SwigStart[i]; - } - SwigPtrSort = 1; - for (i = 0; i < SWIG_CACHESIZE; i++) - SwigCache[i].stat = 0; - } - - /* First check cache for matches. Uses last cache value as starting point */ - cache = &SwigCache[SwigLastCache]; - for (i = 0; i < SWIG_CACHESIZE; i++) { - if (cache->stat) { - if (strcmp(_t,cache->name) == 0) { - if (strcmp(_c,cache->mapped) == 0) { - cache->stat++; - *ptr = (void *) _p; - if (cache->tp->cast) *ptr = (*(cache->tp->cast))(*ptr); - return (char *) 0; - } - } - } - SwigLastCache = (SwigLastCache+1) & SWIG_CACHEMASK; - if (!SwigLastCache) cache = SwigCache; - else cache++; - } - /* We have a type mismatch. Will have to look through our type - mapping table to figure out whether or not we can accept this datatype */ - - start = SwigStart[(int) _t[1]]; - end = SwigStart[(int) _t[1]+1]; - sp = &SwigPtrTable[start]; - while (start < end) { - if (swigcmp(_t,sp) == 0) break; - sp++; - start++; - } - if (start >= end) sp = 0; - /* Try to find a match for this */ - if (sp) { - while (swigcmp(_t,sp) == 0) { - name = sp->name; - len = sp->len; - tp = sp->next; - /* Try to find entry for our given datatype */ - while(tp) { - if (tp->len >= 255) { - return _c; - } - strcpy(temp_type,tp->name); - strncat(temp_type,_t+len,255-tp->len); - if (strcmp(_c,temp_type) == 0) { - - strcpy(SwigCache[SwigCacheIndex].mapped,_c); - strcpy(SwigCache[SwigCacheIndex].name,_t); - SwigCache[SwigCacheIndex].stat = 1; - SwigCache[SwigCacheIndex].tp = tp; - SwigCacheIndex = SwigCacheIndex & SWIG_CACHEMASK; - - /* Get pointer value */ - *ptr = (void *) _p; - if (tp->cast) *ptr = (*(tp->cast))(*ptr); - return (char *) 0; - } - tp = tp->next; - } - sp++; - /* Hmmm. Didn't find it this time */ - } - } - /* Didn't find any sort of match for this data. - Get the pointer value and return the received type */ - *ptr = (void *) _p; - return _c; - } else { - /* Found a match on the first try. Return pointer value */ - *ptr = (void *) _p; - return (char *) 0; - } - } else { - /* No type specified. Good luck */ - *ptr = (void *) _p; - return (char *) 0; - } - } else { - if (strcmp (_c, "NULL") == 0) { - *ptr = (void *) 0; - return (char *) 0; - } - *ptr = (void *) 0; - return _c; - } } - -/* Compatibility mode */ - -#define _swig_get_hex SWIG_GetPtr - +#endif #define SWIG_init initutilsc #define SWIG_name "utilsc" @@ -603,12 +58,13 @@ char *SWIG_GetPtr(char *_c, void **ptr, char *_t) static PyObject* l_output_helper(PyObject* target, PyObject* o) { PyObject* o2; - if (!target) { + PyObject* o3; + 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); @@ -625,23 +81,23 @@ 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; @@ -673,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; @@ -728,8 +187,13 @@ static PyObject *_wrap_new_wxConfig(PyObject *self, PyObject *args) { _result = (wxConfig *)new_wxConfig(*_arg0,*_arg1,*_arg2,*_arg3,_arg4); wxPy_END_ALLOW_THREADS; -} SWIG_MakePtr(_ptemp, (char *) _result,"_wxConfig_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} 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; @@ -753,13 +217,14 @@ 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; } @@ -778,13 +243,14 @@ 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; } @@ -804,13 +270,14 @@ 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; } @@ -830,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; } @@ -871,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; } @@ -909,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; } @@ -946,15 +416,16 @@ 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; } @@ -974,13 +445,14 @@ 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; } @@ -1011,13 +483,14 @@ 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; } @@ -1045,13 +518,14 @@ 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; } @@ -1079,13 +553,14 @@ 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; } @@ -1113,13 +588,14 @@ 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; } @@ -1140,15 +616,16 @@ 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; } @@ -1168,15 +645,16 @@ 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; } @@ -1196,13 +674,14 @@ 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; } @@ -1226,13 +705,14 @@ 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; } @@ -1257,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; } @@ -1295,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; } @@ -1332,13 +814,14 @@ 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; } @@ -1357,13 +840,14 @@ 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; } @@ -1383,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; } @@ -1440,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; } @@ -1479,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; } @@ -1516,15 +1003,16 @@ static PyObject *_wrap_wxConfig_ReadFloat(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; } @@ -1545,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; } @@ -1582,15 +1071,16 @@ 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; } @@ -1613,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; } @@ -1664,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; } @@ -1703,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; } @@ -1736,43 +1229,66 @@ 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_SetRecordDefaults", _wrap_wxConfig_SetRecordDefaults, 1 }, - { "wxConfig_SetPath", _wrap_wxConfig_SetPath, 1 }, - { "wxConfig_SetExpandEnvVars", _wrap_wxConfig_SetExpandEnvVars, 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); @@ -1782,22 +1298,9 @@ SWIGEXPORT(void,initutilsc)() { wxClassInfo::CleanUpClasses(); wxClassInfo::InitializeClasses(); -/* - * 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); +{ + int i; + for (i = 0; _swig_mapping[i].n1; i++) + SWIG_RegisterMapping(_swig_mapping[i].n1,_swig_mapping[i].n2,_swig_mapping[i].pcnv); +} }