Improve Python builtin and %constant structs
Tweak to previous commit from issue #250 for C compatibility. Set self to zero too.
This commit is contained in:
parent
0ad384bb28
commit
1db561cf08
1 changed files with 2 additions and 5 deletions
|
|
@ -375,6 +375,7 @@ SWIG_init(void) {
|
||||||
PyObject *public_interface, *public_symbol;
|
PyObject *public_interface, *public_symbol;
|
||||||
PyObject *this_descr;
|
PyObject *this_descr;
|
||||||
PyObject *thisown_descr;
|
PyObject *thisown_descr;
|
||||||
|
PyObject *self = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
(void)builtin_pytype;
|
(void)builtin_pytype;
|
||||||
|
|
@ -382,6 +383,7 @@ SWIG_init(void) {
|
||||||
(void)builtin_basetype;
|
(void)builtin_basetype;
|
||||||
(void)tuple;
|
(void)tuple;
|
||||||
(void)static_getset;
|
(void)static_getset;
|
||||||
|
(void)self;
|
||||||
|
|
||||||
/* metatype is used to implement static member variables. */
|
/* metatype is used to implement static member variables. */
|
||||||
metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
|
metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
|
||||||
|
|
@ -402,11 +404,6 @@ SWIG_init(void) {
|
||||||
m = Py_InitModule((char *) SWIG_name, SwigMethods);
|
m = Py_InitModule((char *) SWIG_name, SwigMethods);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SWIGPYTHON_BUILTIN
|
|
||||||
PyObject *self = m;
|
|
||||||
(void)self;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
md = d = PyModule_GetDict(m);
|
md = d = PyModule_GetDict(m);
|
||||||
(void)md;
|
(void)md;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue