$NetBSD: patch-ai,v 1.1 2009/08/06 23:21:31 joerg Exp $ --- src/gtk/xrc_wrap.cpp.orig 2009-08-06 08:28:11.000000000 +0200 +++ src/gtk/xrc_wrap.cpp @@ -6361,163 +6361,6 @@ fail: } -SWIGINTERN PyObject *_wrap_XmlNode_GetAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxXmlNode *arg1 = (wxXmlNode *) 0 ; - wxString *arg2 = 0 ; - wxString *arg3 = 0 ; - wxString result; - void *argp1 = 0 ; - int res1 = 0 ; - bool temp2 = false ; - bool temp3 = false ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "attrName",(char *) "defaultVal", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:XmlNode_GetAttribute",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxXmlNode, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlNode_GetAttribute" "', expected argument " "1"" of type '" "wxXmlNode const *""'"); - } - arg1 = reinterpret_cast< wxXmlNode * >(argp1); - { - arg2 = wxString_in_helper(obj1); - if (arg2 == NULL) SWIG_fail; - temp2 = true; - } - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = true; - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = ((wxXmlNode const *)arg1)->GetAttribute((wxString const &)*arg2,(wxString const &)*arg3); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { -#if wxUSE_UNICODE - resultobj = PyUnicode_FromWideChar((&result)->c_str(), (&result)->Len()); -#else - resultobj = PyString_FromStringAndSize((&result)->c_str(), (&result)->Len()); -#endif - } - { - if (temp2) - delete arg2; - } - { - if (temp3) - delete arg3; - } - return resultobj; -fail: - { - if (temp2) - delete arg2; - } - { - if (temp3) - delete arg3; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XmlNode_AddAttribute(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { - PyObject *resultobj = 0; - wxXmlNode *arg1 = (wxXmlNode *) 0 ; - wxString *arg2 = 0 ; - wxString *arg3 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - bool temp2 = false ; - bool temp3 = false ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char * kwnames[] = { - (char *) "self",(char *) "attrName",(char *) "value", NULL - }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:XmlNode_AddAttribute",kwnames,&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_wxXmlNode, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlNode_AddAttribute" "', expected argument " "1"" of type '" "wxXmlNode *""'"); - } - arg1 = reinterpret_cast< wxXmlNode * >(argp1); - { - arg2 = wxString_in_helper(obj1); - if (arg2 == NULL) SWIG_fail; - temp2 = true; - } - { - arg3 = wxString_in_helper(obj2); - if (arg3 == NULL) SWIG_fail; - temp3 = true; - } - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->AddAttribute((wxString const &)*arg2,(wxString const &)*arg3); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_Py_Void(); - { - if (temp2) - delete arg2; - } - { - if (temp3) - delete arg3; - } - return resultobj; -fail: - { - if (temp2) - delete arg2; - } - { - if (temp3) - delete arg3; - } - return NULL; -} - - -SWIGINTERN PyObject *_wrap_XmlNode_GetAttributes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - wxXmlNode *arg1 = (wxXmlNode *) 0 ; - wxXmlProperty *result = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject *swig_obj[1] ; - - if (!args) SWIG_fail; - swig_obj[0] = args; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_wxXmlNode, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "XmlNode_GetAttributes" "', expected argument " "1"" of type '" "wxXmlNode const *""'"); - } - arg1 = reinterpret_cast< wxXmlNode * >(argp1); - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxXmlProperty *)((wxXmlNode const *)arg1)->GetAttributes(); - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wxXmlProperty, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - SWIGINTERN PyObject *XmlNode_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *obj; if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL; @@ -9050,9 +8893,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"XmlNode_SetNext", (PyCFunction) _wrap_XmlNode_SetNext, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"XmlNode_SetChildren", (PyCFunction) _wrap_XmlNode_SetChildren, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"XmlNode_SetProperties", (PyCFunction) _wrap_XmlNode_SetProperties, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"XmlNode_GetAttribute", (PyCFunction) _wrap_XmlNode_GetAttribute, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"XmlNode_AddAttribute", (PyCFunction) _wrap_XmlNode_AddAttribute, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"XmlNode_GetAttributes", (PyCFunction)_wrap_XmlNode_GetAttributes, METH_O, NULL}, { (char *)"XmlNode_swigregister", XmlNode_swigregister, METH_VARARGS, NULL}, { (char *)"XmlNode_swiginit", XmlNode_swiginit, METH_VARARGS, NULL}, { (char *)"new_XmlDocument", (PyCFunction) _wrap_new_XmlDocument, METH_VARARGS | METH_KEYWORDS, NULL},