Fix ISO C90 errors.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12619 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8f876a6287
commit
7a0726c8b6
3 changed files with 133 additions and 68 deletions
|
|
@ -7,7 +7,8 @@ wrapper##_closure(PyObject *a) { \
|
||||||
#define SWIGPY_DESTRUCTOR_CLOSURE(wrapper) \
|
#define SWIGPY_DESTRUCTOR_CLOSURE(wrapper) \
|
||||||
SWIGINTERN void \
|
SWIGINTERN void \
|
||||||
wrapper##_closure(PyObject *a) { \
|
wrapper##_closure(PyObject *a) { \
|
||||||
SwigPyObject *sobj = (SwigPyObject *)a; \
|
SwigPyObject *sobj; \
|
||||||
|
sobj = (SwigPyObject *)a; \
|
||||||
if (sobj->own) { \
|
if (sobj->own) { \
|
||||||
PyObject *o = wrapper(a, NULL); \
|
PyObject *o = wrapper(a, NULL); \
|
||||||
Py_XDECREF(o); \
|
Py_XDECREF(o); \
|
||||||
|
|
@ -17,8 +18,10 @@ wrapper##_closure(PyObject *a) { \
|
||||||
#define SWIGPY_INQUIRY_CLOSURE(wrapper) \
|
#define SWIGPY_INQUIRY_CLOSURE(wrapper) \
|
||||||
SWIGINTERN int \
|
SWIGINTERN int \
|
||||||
wrapper##_closure(PyObject *a) { \
|
wrapper##_closure(PyObject *a) { \
|
||||||
PyObject *pyresult = wrapper(a, NULL); \
|
PyObject *pyresult; \
|
||||||
int result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; \
|
int result; \
|
||||||
|
pyresult = wrapper(a, NULL); \
|
||||||
|
result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0; \
|
||||||
Py_XDECREF(pyresult); \
|
Py_XDECREF(pyresult); \
|
||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
|
|
@ -26,11 +29,12 @@ wrapper##_closure(PyObject *a) { \
|
||||||
#define SWIGPY_BINARYFUNC_CLOSURE(wrapper) \
|
#define SWIGPY_BINARYFUNC_CLOSURE(wrapper) \
|
||||||
SWIGINTERN PyObject * \
|
SWIGINTERN PyObject * \
|
||||||
wrapper##_closure(PyObject *a, PyObject *b) { \
|
wrapper##_closure(PyObject *a, PyObject *b) { \
|
||||||
PyObject *tuple = PyTuple_New(1); \
|
PyObject *tuple, *result; \
|
||||||
|
tuple = PyTuple_New(1); \
|
||||||
assert(tuple); \
|
assert(tuple); \
|
||||||
PyTuple_SET_ITEM(tuple, 0, b); \
|
PyTuple_SET_ITEM(tuple, 0, b); \
|
||||||
Py_XINCREF(b); \
|
Py_XINCREF(b); \
|
||||||
PyObject *result = wrapper(a, tuple); \
|
result = wrapper(a, tuple); \
|
||||||
Py_DECREF(tuple); \
|
Py_DECREF(tuple); \
|
||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
|
|
@ -38,13 +42,14 @@ wrapper##_closure(PyObject *a, PyObject *b) { \
|
||||||
#define SWIGPY_TERNARYFUNC_CLOSURE(wrapper) \
|
#define SWIGPY_TERNARYFUNC_CLOSURE(wrapper) \
|
||||||
SWIGINTERN PyObject * \
|
SWIGINTERN PyObject * \
|
||||||
wrapper##_closure(PyObject *a, PyObject *b, PyObject *c) { \
|
wrapper##_closure(PyObject *a, PyObject *b, PyObject *c) { \
|
||||||
PyObject *tuple = PyTuple_New(2); \
|
PyObject *tuple, *result; \
|
||||||
|
tuple = PyTuple_New(2); \
|
||||||
assert(tuple); \
|
assert(tuple); \
|
||||||
PyTuple_SET_ITEM(tuple, 0, b); \
|
PyTuple_SET_ITEM(tuple, 0, b); \
|
||||||
PyTuple_SET_ITEM(tuple, 1, c); \
|
PyTuple_SET_ITEM(tuple, 1, c); \
|
||||||
Py_XINCREF(b); \
|
Py_XINCREF(b); \
|
||||||
Py_XINCREF(c); \
|
Py_XINCREF(c); \
|
||||||
PyObject *result = wrapper(a, tuple); \
|
result = wrapper(a, tuple); \
|
||||||
Py_DECREF(tuple); \
|
Py_DECREF(tuple); \
|
||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
|
|
@ -52,8 +57,10 @@ wrapper##_closure(PyObject *a, PyObject *b, PyObject *c) { \
|
||||||
#define SWIGPY_LENFUNC_CLOSURE(wrapper) \
|
#define SWIGPY_LENFUNC_CLOSURE(wrapper) \
|
||||||
SWIGINTERN Py_ssize_t \
|
SWIGINTERN Py_ssize_t \
|
||||||
wrapper##_closure(PyObject *a) { \
|
wrapper##_closure(PyObject *a) { \
|
||||||
PyObject *resultobj = wrapper(a, NULL); \
|
PyObject *resultobj; \
|
||||||
Py_ssize_t result = PyNumber_AsSsize_t(resultobj, NULL); \
|
Py_ssize_t result; \
|
||||||
|
resultobj = wrapper(a, NULL); \
|
||||||
|
result = PyNumber_AsSsize_t(resultobj, NULL); \
|
||||||
Py_DECREF(resultobj); \
|
Py_DECREF(resultobj); \
|
||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
|
|
@ -61,11 +68,12 @@ wrapper##_closure(PyObject *a) { \
|
||||||
#define SWIGPY_SSIZESSIZEARGFUNC_CLOSURE(wrapper) \
|
#define SWIGPY_SSIZESSIZEARGFUNC_CLOSURE(wrapper) \
|
||||||
SWIGINTERN PyObject * \
|
SWIGINTERN PyObject * \
|
||||||
wrapper##_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c) { \
|
wrapper##_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c) { \
|
||||||
PyObject *tuple = PyTuple_New(2); \
|
PyObject *tuple, *result; \
|
||||||
|
tuple = PyTuple_New(2); \
|
||||||
assert(tuple); \
|
assert(tuple); \
|
||||||
PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \
|
PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \
|
||||||
PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); \
|
PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); \
|
||||||
PyObject *result = wrapper(a, tuple); \
|
result = wrapper(a, tuple); \
|
||||||
Py_DECREF(tuple); \
|
Py_DECREF(tuple); \
|
||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
|
|
@ -73,7 +81,9 @@ wrapper##_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c) { \
|
||||||
#define SWIGPY_SSIZESSIZEOBJARGPROC_CLOSURE(wrapper) \
|
#define SWIGPY_SSIZESSIZEOBJARGPROC_CLOSURE(wrapper) \
|
||||||
SWIGINTERN int \
|
SWIGINTERN int \
|
||||||
wrapper##_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) { \
|
wrapper##_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) { \
|
||||||
PyObject *tuple = PyTuple_New(d ? 3 : 2); \
|
PyObject *tuple, *resultobj; \
|
||||||
|
int result; \
|
||||||
|
tuple = PyTuple_New(d ? 3 : 2); \
|
||||||
assert(tuple); \
|
assert(tuple); \
|
||||||
PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \
|
PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \
|
||||||
PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); \
|
PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c)); \
|
||||||
|
|
@ -81,8 +91,8 @@ wrapper##_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) { \
|
||||||
PyTuple_SET_ITEM(tuple, 2, d); \
|
PyTuple_SET_ITEM(tuple, 2, d); \
|
||||||
Py_INCREF(d); \
|
Py_INCREF(d); \
|
||||||
} \
|
} \
|
||||||
PyObject *resultobj = wrapper(a, tuple); \
|
resultobj = wrapper(a, tuple); \
|
||||||
int result = resultobj ? 0 : -1; \
|
result = resultobj ? 0 : -1; \
|
||||||
Py_DECREF(tuple); \
|
Py_DECREF(tuple); \
|
||||||
Py_XDECREF(resultobj); \
|
Py_XDECREF(resultobj); \
|
||||||
return result; \
|
return result; \
|
||||||
|
|
@ -91,10 +101,11 @@ wrapper##_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) { \
|
||||||
#define SWIGPY_SSIZEARGFUNC_CLOSURE(wrapper) \
|
#define SWIGPY_SSIZEARGFUNC_CLOSURE(wrapper) \
|
||||||
SWIGINTERN PyObject * \
|
SWIGINTERN PyObject * \
|
||||||
wrapper##_closure(PyObject *a, Py_ssize_t b) { \
|
wrapper##_closure(PyObject *a, Py_ssize_t b) { \
|
||||||
PyObject *tuple = PyTuple_New(1); \
|
PyObject *tuple, *result; \
|
||||||
|
tuple = PyTuple_New(1); \
|
||||||
assert(tuple); \
|
assert(tuple); \
|
||||||
PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \
|
PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \
|
||||||
PyObject *result = wrapper(a, tuple); \
|
result = wrapper(a, tuple); \
|
||||||
Py_DECREF(tuple); \
|
Py_DECREF(tuple); \
|
||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
|
|
@ -102,8 +113,9 @@ wrapper##_closure(PyObject *a, Py_ssize_t b) { \
|
||||||
#define SWIGPY_FUNPACK_SSIZEARGFUNC_CLOSURE(wrapper) \
|
#define SWIGPY_FUNPACK_SSIZEARGFUNC_CLOSURE(wrapper) \
|
||||||
SWIGINTERN PyObject * \
|
SWIGINTERN PyObject * \
|
||||||
wrapper##_closure(PyObject *a, Py_ssize_t b) { \
|
wrapper##_closure(PyObject *a, Py_ssize_t b) { \
|
||||||
PyObject *arg = _PyLong_FromSsize_t(b); \
|
PyObject *arg, *result; \
|
||||||
PyObject *result = wrapper(a, arg); \
|
arg = _PyLong_FromSsize_t(b); \
|
||||||
|
result = wrapper(a, arg); \
|
||||||
Py_DECREF(arg); \
|
Py_DECREF(arg); \
|
||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
|
|
@ -111,13 +123,15 @@ wrapper##_closure(PyObject *a, Py_ssize_t b) { \
|
||||||
#define SWIGPY_SSIZEOBJARGPROC_CLOSURE(wrapper) \
|
#define SWIGPY_SSIZEOBJARGPROC_CLOSURE(wrapper) \
|
||||||
SWIGINTERN int \
|
SWIGINTERN int \
|
||||||
wrapper##_closure(PyObject *a, Py_ssize_t b, PyObject *c) { \
|
wrapper##_closure(PyObject *a, Py_ssize_t b, PyObject *c) { \
|
||||||
PyObject *tuple = PyTuple_New(2); \
|
PyObject *tuple, *resultobj; \
|
||||||
|
int result; \
|
||||||
|
tuple = PyTuple_New(2); \
|
||||||
assert(tuple); \
|
assert(tuple); \
|
||||||
PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \
|
PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b)); \
|
||||||
PyTuple_SET_ITEM(tuple, 1, c); \
|
PyTuple_SET_ITEM(tuple, 1, c); \
|
||||||
Py_XINCREF(c); \
|
Py_XINCREF(c); \
|
||||||
PyObject *resultobj = wrapper(a, tuple); \
|
resultobj = wrapper(a, tuple); \
|
||||||
int result = resultobj ? 0 : -1; \
|
result = resultobj ? 0 : -1; \
|
||||||
Py_XDECREF(resultobj); \
|
Py_XDECREF(resultobj); \
|
||||||
Py_DECREF(tuple); \
|
Py_DECREF(tuple); \
|
||||||
return result; \
|
return result; \
|
||||||
|
|
@ -126,7 +140,9 @@ wrapper##_closure(PyObject *a, Py_ssize_t b, PyObject *c) { \
|
||||||
#define SWIGPY_OBJOBJARGPROC_CLOSURE(wrapper) \
|
#define SWIGPY_OBJOBJARGPROC_CLOSURE(wrapper) \
|
||||||
SWIGINTERN int \
|
SWIGINTERN int \
|
||||||
wrapper##_closure(PyObject *a, PyObject *b, PyObject *c) { \
|
wrapper##_closure(PyObject *a, PyObject *b, PyObject *c) { \
|
||||||
PyObject *tuple = PyTuple_New(c ? 2 : 1); \
|
PyObject *tuple, *resultobj; \
|
||||||
|
int result; \
|
||||||
|
tuple = PyTuple_New(c ? 2 : 1); \
|
||||||
assert(tuple); \
|
assert(tuple); \
|
||||||
PyTuple_SET_ITEM(tuple, 0, b); \
|
PyTuple_SET_ITEM(tuple, 0, b); \
|
||||||
Py_XINCREF(b); \
|
Py_XINCREF(b); \
|
||||||
|
|
@ -134,8 +150,8 @@ wrapper##_closure(PyObject *a, PyObject *b, PyObject *c) { \
|
||||||
PyTuple_SET_ITEM(tuple, 1, c); \
|
PyTuple_SET_ITEM(tuple, 1, c); \
|
||||||
Py_XINCREF(c); \
|
Py_XINCREF(c); \
|
||||||
} \
|
} \
|
||||||
PyObject *resultobj = wrapper(a, tuple); \
|
resultobj = wrapper(a, tuple); \
|
||||||
int result = resultobj ? 0 : -1; \
|
result = resultobj ? 0 : -1; \
|
||||||
Py_XDECREF(resultobj); \
|
Py_XDECREF(resultobj); \
|
||||||
Py_DECREF(tuple); \
|
Py_DECREF(tuple); \
|
||||||
return result; \
|
return result; \
|
||||||
|
|
@ -150,10 +166,12 @@ wrapper##_closure(PyObject *a) { \
|
||||||
#define SWIGPY_HASHFUNC_CLOSURE(wrapper) \
|
#define SWIGPY_HASHFUNC_CLOSURE(wrapper) \
|
||||||
SWIGINTERN long \
|
SWIGINTERN long \
|
||||||
wrapper##_closure(PyObject *a) { \
|
wrapper##_closure(PyObject *a) { \
|
||||||
PyObject *pyresult = wrapper(a, NULL); \
|
PyObject *pyresult; \
|
||||||
|
long result; \
|
||||||
|
pyresult = wrapper(a, NULL); \
|
||||||
if (!pyresult || !PyLong_Check(pyresult)) \
|
if (!pyresult || !PyLong_Check(pyresult)) \
|
||||||
return -1; \
|
return -1; \
|
||||||
long result = PyLong_AsLong(pyresult); \
|
result = PyLong_AsLong(pyresult); \
|
||||||
Py_DECREF(pyresult); \
|
Py_DECREF(pyresult); \
|
||||||
return result; \
|
return result; \
|
||||||
}
|
}
|
||||||
|
|
@ -161,7 +179,8 @@ wrapper##_closure(PyObject *a) { \
|
||||||
#define SWIGPY_ITERNEXT_CLOSURE(wrapper) \
|
#define SWIGPY_ITERNEXT_CLOSURE(wrapper) \
|
||||||
SWIGINTERN PyObject * \
|
SWIGINTERN PyObject * \
|
||||||
wrapper##_closure(PyObject *a) { \
|
wrapper##_closure(PyObject *a) { \
|
||||||
PyObject *result = wrapper(a, NULL); \
|
PyObject *result; \
|
||||||
|
result = wrapper(a, NULL); \
|
||||||
if (result && result == Py_None) { \
|
if (result && result == Py_None) { \
|
||||||
Py_DECREF(result); \
|
Py_DECREF(result); \
|
||||||
result = NULL; \
|
result = NULL; \
|
||||||
|
|
@ -177,7 +196,8 @@ SwigPyBuiltin_BadInit(PyObject *self, PyObject *SWIGUNUSEDPARM(args), PyObject *
|
||||||
|
|
||||||
SWIGINTERN void
|
SWIGINTERN void
|
||||||
SwigPyBuiltin_BadDealloc(PyObject *pyobj) {
|
SwigPyBuiltin_BadDealloc(PyObject *pyobj) {
|
||||||
SwigPyObject *sobj = (SwigPyObject *)pyobj;
|
SwigPyObject *sobj;
|
||||||
|
sobj = (SwigPyObject *)pyobj;
|
||||||
if (sobj->own) {
|
if (sobj->own) {
|
||||||
PyErr_Format(PyExc_TypeError, "Swig detected a memory leak in type '%.300s': no callable destructor found.", pyobj->ob_type->tp_name);
|
PyErr_Format(PyExc_TypeError, "Swig detected a memory leak in type '%.300s': no callable destructor found.", pyobj->ob_type->tp_name);
|
||||||
}
|
}
|
||||||
|
|
@ -190,45 +210,51 @@ typedef struct {
|
||||||
|
|
||||||
SWIGINTERN PyObject *
|
SWIGINTERN PyObject *
|
||||||
SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) {
|
SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) {
|
||||||
|
SwigPyGetSet *getset;
|
||||||
|
PyObject *tuple, *result;
|
||||||
if (!closure)
|
if (!closure)
|
||||||
return SWIG_Py_Void();
|
return SWIG_Py_Void();
|
||||||
SwigPyGetSet *getset = (SwigPyGetSet *)closure;
|
getset = (SwigPyGetSet *)closure;
|
||||||
if (!getset->get)
|
if (!getset->get)
|
||||||
return SWIG_Py_Void();
|
return SWIG_Py_Void();
|
||||||
PyObject *tuple = PyTuple_New(0);
|
tuple = PyTuple_New(0);
|
||||||
assert(tuple);
|
assert(tuple);
|
||||||
PyObject *result = (*getset->get)(obj, tuple);
|
result = (*getset->get)(obj, tuple);
|
||||||
Py_DECREF(tuple);
|
Py_DECREF(tuple);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGINTERN PyObject *
|
SWIGINTERN PyObject *
|
||||||
SwigPyBuiltin_FunpackGetterClosure (PyObject *obj, void *closure) {
|
SwigPyBuiltin_FunpackGetterClosure (PyObject *obj, void *closure) {
|
||||||
|
SwigPyGetSet *getset;
|
||||||
|
PyObject *result;
|
||||||
if (!closure)
|
if (!closure)
|
||||||
return SWIG_Py_Void();
|
return SWIG_Py_Void();
|
||||||
SwigPyGetSet *getset = (SwigPyGetSet *)closure;
|
getset = (SwigPyGetSet *)closure;
|
||||||
if (!getset->get)
|
if (!getset->get)
|
||||||
return SWIG_Py_Void();
|
return SWIG_Py_Void();
|
||||||
PyObject *result = (*getset->get)(obj, NULL);
|
result = (*getset->get)(obj, NULL);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWIGINTERN int
|
SWIGINTERN int
|
||||||
SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) {
|
SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) {
|
||||||
|
SwigPyGetSet *getset;
|
||||||
|
PyObject *tuple, *result;
|
||||||
if (!closure) {
|
if (!closure) {
|
||||||
PyErr_Format(PyExc_TypeError, "Missing getset closure");
|
PyErr_Format(PyExc_TypeError, "Missing getset closure");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
SwigPyGetSet *getset = (SwigPyGetSet *)closure;
|
getset = (SwigPyGetSet *)closure;
|
||||||
if (!getset->set) {
|
if (!getset->set) {
|
||||||
PyErr_Format(PyExc_TypeError, "Illegal member variable assignment in type '%.300s'", obj->ob_type->tp_name);
|
PyErr_Format(PyExc_TypeError, "Illegal member variable assignment in type '%.300s'", obj->ob_type->tp_name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
PyObject *tuple = PyTuple_New(1);
|
tuple = PyTuple_New(1);
|
||||||
assert(tuple);
|
assert(tuple);
|
||||||
PyTuple_SET_ITEM(tuple, 0, val);
|
PyTuple_SET_ITEM(tuple, 0, val);
|
||||||
Py_XINCREF(val);
|
Py_XINCREF(val);
|
||||||
PyObject *result = (*getset->set)(obj, tuple);
|
result = (*getset->set)(obj, tuple);
|
||||||
Py_DECREF(tuple);
|
Py_DECREF(tuple);
|
||||||
Py_XDECREF(result);
|
Py_XDECREF(result);
|
||||||
return result ? 0 : -1;
|
return result ? 0 : -1;
|
||||||
|
|
@ -236,16 +262,18 @@ SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) {
|
||||||
|
|
||||||
SWIGINTERN int
|
SWIGINTERN int
|
||||||
SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) {
|
SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) {
|
||||||
|
SwigPyGetSet *getset;
|
||||||
|
PyObject *result;
|
||||||
if (!closure) {
|
if (!closure) {
|
||||||
PyErr_Format(PyExc_TypeError, "Missing getset closure");
|
PyErr_Format(PyExc_TypeError, "Missing getset closure");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
SwigPyGetSet *getset = (SwigPyGetSet *)closure;
|
getset = (SwigPyGetSet *)closure;
|
||||||
if (!getset->set) {
|
if (!getset->set) {
|
||||||
PyErr_Format(PyExc_TypeError, "Illegal member variable assignment in type '%.300s'", obj->ob_type->tp_name);
|
PyErr_Format(PyExc_TypeError, "Illegal member variable assignment in type '%.300s'", obj->ob_type->tp_name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
PyObject *result = (*getset->set)(obj, val);
|
result = (*getset->set)(obj, val);
|
||||||
Py_XDECREF(result);
|
Py_XDECREF(result);
|
||||||
return result ? 0 : -1;
|
return result ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
@ -269,7 +297,8 @@ SwigPyStaticVar_repr(PyGetSetDescrObject *descr) {
|
||||||
|
|
||||||
SWIGINTERN int
|
SWIGINTERN int
|
||||||
SwigPyStaticVar_traverse(PyObject *self, visitproc visit, void *arg) {
|
SwigPyStaticVar_traverse(PyObject *self, visitproc visit, void *arg) {
|
||||||
PyDescrObject *descr = (PyDescrObject *)self;
|
PyDescrObject *descr;
|
||||||
|
descr = (PyDescrObject *)self;
|
||||||
Py_VISIT((PyObject*) descr->d_type);
|
Py_VISIT((PyObject*) descr->d_type);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -362,10 +391,12 @@ SWIGINTERN PyTypeObject SwigPyStaticVar_Type = {
|
||||||
|
|
||||||
SWIGINTERN int
|
SWIGINTERN int
|
||||||
SwigPyObjectType_setattro(PyTypeObject *type, PyObject *name, PyObject *value) {
|
SwigPyObjectType_setattro(PyTypeObject *type, PyObject *name, PyObject *value) {
|
||||||
PyObject *attribute = _PyType_Lookup(type, name);
|
PyObject *attribute;
|
||||||
|
descrsetfunc local_set;
|
||||||
|
attribute = _PyType_Lookup(type, name);
|
||||||
if (attribute != NULL) {
|
if (attribute != NULL) {
|
||||||
/* Implement descriptor functionality, if any */
|
/* Implement descriptor functionality, if any */
|
||||||
descrsetfunc local_set = attribute->ob_type->tp_descr_set;
|
local_set = attribute->ob_type->tp_descr_set;
|
||||||
if (local_set != NULL)
|
if (local_set != NULL)
|
||||||
return local_set(attribute, (PyObject *)type, value);
|
return local_set(attribute, (PyObject *)type, value);
|
||||||
#if PY_VERSION_HEX >= 0x03000000
|
#if PY_VERSION_HEX >= 0x03000000
|
||||||
|
|
@ -386,7 +417,8 @@ SwigPyObjectType_setattro(PyTypeObject *type, PyObject *name, PyObject *value) {
|
||||||
|
|
||||||
SWIGINTERN PyGetSetDescrObject *
|
SWIGINTERN PyGetSetDescrObject *
|
||||||
SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) {
|
SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) {
|
||||||
PyGetSetDescrObject *descr = (PyGetSetDescrObject *)PyType_GenericAlloc(&SwigPyStaticVar_Type, 0);
|
PyGetSetDescrObject *descr;
|
||||||
|
descr = (PyGetSetDescrObject *)PyType_GenericAlloc(&SwigPyStaticVar_Type, 0);
|
||||||
assert(descr);
|
assert(descr);
|
||||||
Py_XINCREF(type);
|
Py_XINCREF(type);
|
||||||
descr->d_type = type;
|
descr->d_type = type;
|
||||||
|
|
@ -403,6 +435,7 @@ SWIGINTERN void
|
||||||
SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) {
|
SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) {
|
||||||
int base_count = 0;
|
int base_count = 0;
|
||||||
PyTypeObject **b;
|
PyTypeObject **b;
|
||||||
|
PyObject *tuple;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!bases[0]) {
|
if (!bases[0]) {
|
||||||
|
|
@ -413,7 +446,7 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) {
|
||||||
Py_INCREF((PyObject *)bases[0]);
|
Py_INCREF((PyObject *)bases[0]);
|
||||||
for (b = bases; *b != NULL; ++b)
|
for (b = bases; *b != NULL; ++b)
|
||||||
++base_count;
|
++base_count;
|
||||||
PyObject *tuple = PyTuple_New(base_count);
|
tuple = PyTuple_New(base_count);
|
||||||
for (i = 0; i < base_count; ++i) {
|
for (i = 0; i < base_count; ++i) {
|
||||||
PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]);
|
PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]);
|
||||||
Py_INCREF((PyObject *)bases[i]);
|
Py_INCREF((PyObject *)bases[i]);
|
||||||
|
|
@ -423,7 +456,8 @@ SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) {
|
||||||
|
|
||||||
SWIGINTERN PyObject *
|
SWIGINTERN PyObject *
|
||||||
SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) {
|
SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) {
|
||||||
PyObject *result = (PyObject *)SWIG_Python_GetSwigThis(self);
|
PyObject *result;
|
||||||
|
result = (PyObject *)SWIG_Python_GetSwigThis(self);
|
||||||
Py_XINCREF(result);
|
Py_XINCREF(result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -338,11 +338,28 @@ SWIG_init(void) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SWIGPYTHON_BUILTIN)
|
#if defined(SWIGPYTHON_BUILTIN)
|
||||||
PyTypeObject *builtin_pytype = 0;
|
static SwigPyClientData SwigPyObject_clientdata = {0, 0, 0, 0, 0, 0, 0};
|
||||||
int builtin_base_count = 0;
|
static PyGetSetDef this_getset_def = {
|
||||||
swig_type_info *builtin_basetype = 0;
|
(char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
|
||||||
PyObject *tuple = NULL;
|
};
|
||||||
PyGetSetDescrObject *static_getset = NULL;
|
static SwigPyGetSet thisown_getset_closure = {
|
||||||
|
(PyCFunction) SwigPyObject_own,
|
||||||
|
(PyCFunction) SwigPyObject_own
|
||||||
|
};
|
||||||
|
static PyGetSetDef thisown_getset_def = {
|
||||||
|
(char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
|
||||||
|
};
|
||||||
|
PyObject *metatype_args;
|
||||||
|
PyTypeObject *builtin_pytype;
|
||||||
|
int builtin_base_count;
|
||||||
|
swig_type_info *builtin_basetype;
|
||||||
|
PyObject *tuple;
|
||||||
|
PyGetSetDescrObject *static_getset;
|
||||||
|
PyTypeObject *metatype;
|
||||||
|
SwigPyClientData *cd;
|
||||||
|
PyObject *public_interface, *public_symbol;
|
||||||
|
PyObject *this_descr;
|
||||||
|
PyObject *thisown_descr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
(void)builtin_pytype;
|
(void)builtin_pytype;
|
||||||
|
|
@ -352,9 +369,9 @@ SWIG_init(void) {
|
||||||
(void)static_getset;
|
(void)static_getset;
|
||||||
|
|
||||||
/* metatype is used to implement static member variables. */
|
/* metatype is used to implement static member variables. */
|
||||||
PyObject *metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
|
metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
|
||||||
assert(metatype_args);
|
assert(metatype_args);
|
||||||
PyTypeObject *metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
|
metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
|
||||||
assert(metatype);
|
assert(metatype);
|
||||||
Py_DECREF(metatype_args);
|
Py_DECREF(metatype_args);
|
||||||
metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
|
metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
|
||||||
|
|
@ -374,10 +391,9 @@ SWIG_init(void) {
|
||||||
SWIG_InitializeModule(0);
|
SWIG_InitializeModule(0);
|
||||||
|
|
||||||
#ifdef SWIGPYTHON_BUILTIN
|
#ifdef SWIGPYTHON_BUILTIN
|
||||||
static SwigPyClientData SwigPyObject_clientdata = {0, 0, 0, 0, 0, 0, 0};
|
|
||||||
SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
|
SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
|
||||||
assert(SwigPyObject_stype);
|
assert(SwigPyObject_stype);
|
||||||
SwigPyClientData *cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
|
cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
|
||||||
if (!cd) {
|
if (!cd) {
|
||||||
SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
|
SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
|
||||||
SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
|
SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
|
||||||
|
|
@ -391,25 +407,15 @@ SWIG_init(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All objects have a 'this' attribute */
|
/* All objects have a 'this' attribute */
|
||||||
static PyGetSetDef this_getset_def = {
|
this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
|
||||||
(char *)"this", SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
|
|
||||||
};
|
|
||||||
PyObject *this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
|
|
||||||
(void)this_descr;
|
(void)this_descr;
|
||||||
|
|
||||||
/* All objects have a 'thisown' attribute */
|
/* All objects have a 'thisown' attribute */
|
||||||
static SwigPyGetSet thisown_getset_closure = {
|
thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
|
||||||
(PyCFunction) SwigPyObject_own,
|
|
||||||
(PyCFunction) SwigPyObject_own
|
|
||||||
};
|
|
||||||
static PyGetSetDef thisown_getset_def = {
|
|
||||||
(char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
|
|
||||||
};
|
|
||||||
PyObject *thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
|
|
||||||
(void)thisown_descr;
|
(void)thisown_descr;
|
||||||
|
|
||||||
PyObject *public_interface = PyList_New(0);
|
public_interface = PyList_New(0);
|
||||||
PyObject *public_symbol = 0;
|
public_symbol = 0;
|
||||||
(void)public_symbol;
|
(void)public_symbol;
|
||||||
|
|
||||||
PyDict_SetItemString(md, "__all__", public_interface);
|
PyDict_SetItemString(md, "__all__", public_interface);
|
||||||
|
|
|
||||||
|
|
@ -216,6 +216,8 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
|
||||||
#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
|
#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SWIG_PYTHON_CAPSULE_NAME (char*) "swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* Pointer declarations
|
* Pointer declarations
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
@ -503,8 +505,9 @@ SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
|
||||||
static swig_type_info *SwigPyObject_stype = 0;
|
static swig_type_info *SwigPyObject_stype = 0;
|
||||||
SWIGRUNTIME PyTypeObject*
|
SWIGRUNTIME PyTypeObject*
|
||||||
SwigPyObject_type(void) {
|
SwigPyObject_type(void) {
|
||||||
|
SwigPyClientData *cd;
|
||||||
assert(SwigPyObject_stype);
|
assert(SwigPyObject_stype);
|
||||||
SwigPyClientData *cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
|
cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
|
||||||
assert(cd);
|
assert(cd);
|
||||||
assert(cd->pytype);
|
assert(cd->pytype);
|
||||||
return cd->pytype;
|
return cd->pytype;
|
||||||
|
|
@ -1477,8 +1480,12 @@ SWIG_Python_GetModule(void) {
|
||||||
#ifdef SWIG_LINK_RUNTIME
|
#ifdef SWIG_LINK_RUNTIME
|
||||||
type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
|
type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
|
||||||
#else
|
#else
|
||||||
|
# if PY_VERSION_HEX >= 0x02070000
|
||||||
|
type_pointer = PyCapsule_Import(SWIG_PYTHON_CAPSULE_NAME, 0);
|
||||||
|
# else
|
||||||
type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
|
type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
|
||||||
(char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
|
(char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
|
||||||
|
# endif
|
||||||
if (PyErr_Occurred()) {
|
if (PyErr_Occurred()) {
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
type_pointer = (void *)0;
|
type_pointer = (void *)0;
|
||||||
|
|
@ -1521,9 +1528,15 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SWIGRUNTIME void
|
SWIGRUNTIME void
|
||||||
|
#if PY_VERSION_HEX >= 0x02070000
|
||||||
|
SWIG_Python_DestroyModule(PyObject *obj)
|
||||||
|
{
|
||||||
|
swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIG_PYTHON_CAPSULE_NAME);
|
||||||
|
#else
|
||||||
SWIG_Python_DestroyModule(void *vptr)
|
SWIG_Python_DestroyModule(void *vptr)
|
||||||
{
|
{
|
||||||
swig_module_info *swig_module = (swig_module_info *) vptr;
|
swig_module_info *swig_module = (swig_module_info *) vptr;
|
||||||
|
#endif
|
||||||
swig_type_info **types = swig_module->types;
|
swig_type_info **types = swig_module->types;
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i =0; i < swig_module->size; ++i) {
|
for (i =0; i < swig_module->size; ++i) {
|
||||||
|
|
@ -1546,7 +1559,11 @@ SWIG_Python_SetModule(swig_module_info *swig_module) {
|
||||||
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
|
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
|
||||||
PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
|
PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
|
||||||
#endif
|
#endif
|
||||||
|
#if PY_VERSION_HEX >= 0x02070000
|
||||||
|
PyObject *pointer = PyCapsule_New((void *) swig_module, SWIG_PYTHON_CAPSULE_NAME, SWIG_Python_DestroyModule);
|
||||||
|
#else
|
||||||
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
|
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
|
||||||
|
#endif
|
||||||
if (pointer && module) {
|
if (pointer && module) {
|
||||||
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
|
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1569,12 +1586,20 @@ SWIG_Python_TypeQuery(const char *type)
|
||||||
PyObject *obj = PyDict_GetItem(cache, key);
|
PyObject *obj = PyDict_GetItem(cache, key);
|
||||||
swig_type_info *descriptor;
|
swig_type_info *descriptor;
|
||||||
if (obj) {
|
if (obj) {
|
||||||
|
#if PY_VERSION_HEX >= 0x02070000
|
||||||
|
descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
|
||||||
|
#else
|
||||||
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
|
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
swig_module_info *swig_module = SWIG_Python_GetModule();
|
swig_module_info *swig_module = SWIG_Python_GetModule();
|
||||||
descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
|
descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
|
||||||
if (descriptor) {
|
if (descriptor) {
|
||||||
|
#if PY_VERSION_HEX >= 0x02070000
|
||||||
|
obj = PyCapsule_New((void*) descriptor, NULL, NULL);
|
||||||
|
#else
|
||||||
obj = PyCObject_FromVoidPtr(descriptor, NULL);
|
obj = PyCObject_FromVoidPtr(descriptor, NULL);
|
||||||
|
#endif
|
||||||
PyDict_SetItem(cache, key, obj);
|
PyDict_SetItem(cache, key, obj);
|
||||||
Py_DECREF(obj);
|
Py_DECREF(obj);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue