Python builtin - warning suppression/fixes for 'gcc -Wall' and cosmetic changes in generated code.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12609 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-04-05 20:39:44 +00:00
commit b2b9e2eb91
4 changed files with 59 additions and 24 deletions

View file

@ -338,6 +338,26 @@ SWIGINTERN PyTypeObject SwigPyStaticVar_Type = {
0, /* tp_dict */
(descrgetfunc)SwigPyStaticVar_get, /* tp_descr_get */
(descrsetfunc)SwigPyStaticVar_set, /* tp_descr_set */
0, /* tp_dictoffset */
0, /* tp_init */
0, /* tp_alloc */
0, /* tp_new */
0, /* tp_free */
0, /* tp_is_gc */
0, /* tp_bases */
0, /* tp_mro */
0, /* tp_cache */
0, /* tp_subclasses */
0, /* tp_weaklist */
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version */
#endif
#ifdef COUNT_ALLOCS
0,0,0,0 /* tp_alloc -> tp_next */
#endif
};
SWIGINTERN int

View file

@ -344,9 +344,14 @@ SWIG_init(void) {
swig_type_info *builtin_basetype = 0;
PyObject *tuple = NULL;
PyGetSetDescrObject *static_getset = NULL;
int i;
(void)builtin_pytype;
(void)builtin_base_count;
(void)builtin_basetype;
(void)tuple;
(void)static_getset;
/* metatype is used to implement static member variables. */
PyObject *metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
assert(metatype_args);
@ -391,6 +396,7 @@ SWIG_init(void) {
(char *)"this", SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
};
PyObject *this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
(void)this_descr;
/* All objects have a 'thisown' attribute */
static SwigPyGetSet thisown_getset_closure = {
@ -401,9 +407,12 @@ SWIG_init(void) {
(char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
};
PyObject *thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
(void)thisown_descr;
PyObject *public_interface = PyList_New(0);
PyObject *public_symbol = 0;
(void)public_symbol;
PyDict_SetItemString(md, "__all__", public_interface);
Py_DECREF(public_interface);
for (i = 0; SwigMethods[i].ml_name != NULL; ++i)