Commit a2b5974b authored by Pavel Vainerman's avatar Pavel Vainerman

(python): Перегенерировал файлы новым swig.

parent 3ef0ac3a
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.8 * Version 3.0.0
* *
* This file is not intended to be easily readable and contains a number of * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make * coding conventions designed to improve portability and efficiency. Do not make
...@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() { ...@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() {
/* Python.h has to appear first */ #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
#include <Python.h> /* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* swigrun.swg * swigrun.swg
...@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { ...@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
} }
#else /* no cast-rank mode */ #else /* no cast-rank mode */
# define SWIG_AddCast # define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif #endif
...@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, ...@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if not equal, 1 if equal Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) { SWIG_TypeCmp(const char *nb, const char *tb) {
int equiv = 0; int equiv = 1;
const char* te = tb + strlen(tb); const char* te = tb + strlen(tb);
const char* ne = nb; const char* ne = nb;
while (!equiv && *ne) { while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) { for (nb = ne; *ne; ++ne) {
if (*ne == '|') break; if (*ne == '|') break;
} }
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne; if (*ne) ++ne;
} }
return equiv; return equiv;
...@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { ...@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if equal, -1 if nb < tb, 1 if nb > tb Return 0 if not equal, 1 if equal
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeCompare(const char *nb, const char *tb) { SWIG_TypeEquiv(const char *nb, const char *tb) {
int equiv = 0; return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
const char* te = tb + strlen(tb);
const char* ne = nb;
while (!equiv && *ne) {
for (nb = ne; *ne; ++ne) {
if (*ne == '|') break;
}
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
if (*ne) ++ne;
}
return equiv;
} }
/* /*
Check the typename Check the typename
*/ */
...@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, ...@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
swig_module_info *iter = start; swig_module_info *iter = start;
do { do {
if (iter->size) { if (iter->size) {
register size_t l = 0; size_t l = 0;
register size_t r = iter->size - 1; size_t r = iter->size - 1;
do { do {
/* since l+r >= 0, we can (>> 1) instead (/ 2) */ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
register size_t i = (l + r) >> 1; size_t i = (l + r) >> 1;
const char *iname = iter->types[i]->name; const char *iname = iter->types[i]->name;
if (iname) { if (iname) {
register int compare = strcmp(name, iname); int compare = strcmp(name, iname);
if (compare == 0) { if (compare == 0) {
return iter->types[i]; return iter->types[i];
} else if (compare < 0) { } else if (compare < 0) {
...@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start, ...@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
of the str field (the human readable name) */ of the str field (the human readable name) */
swig_module_info *iter = start; swig_module_info *iter = start;
do { do {
register size_t i = 0; size_t i = 0;
for (; i < iter->size; ++i) { for (; i < iter->size; ++i) {
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
return iter->types[i]; return iter->types[i];
...@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start, ...@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
SWIGRUNTIME char * SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) { SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef"; static const char hex[17] = "0123456789abcdef";
register const unsigned char *u = (unsigned char *) ptr; const unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz; const unsigned char *eu = u + sz;
for (; u != eu; ++u) { for (; u != eu; ++u) {
register unsigned char uu = *u; unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf]; *(c++) = hex[uu & 0xf];
} }
...@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) { ...@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
*/ */
SWIGRUNTIME const char * SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) { SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
register unsigned char *u = (unsigned char *) ptr; unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz; const unsigned char *eu = u + sz;
for (; u != eu; ++u) { for (; u != eu; ++u) {
register char d = *(c++); char d = *(c++);
register unsigned char uu; unsigned char uu;
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4); uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
...@@ -927,6 +922,10 @@ static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) ...@@ -927,6 +922,10 @@ static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
} }
#endif #endif
#if PY_VERSION_HEX < 0x02050000
#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
#endif
#if PY_VERSION_HEX < 0x02040000 #if PY_VERSION_HEX < 0x02040000
#define Py_VISIT(op) \ #define Py_VISIT(op) \
do { \ do { \
...@@ -1198,7 +1197,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), ...@@ -1198,7 +1197,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
/* Runtime API */ /* Runtime API */
#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
...@@ -1328,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1328,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
} }
if (!PyTuple_Check(args)) { if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) { if (min <= 1 && max >= 1) {
register int i; int i;
objs[0] = args; objs[0] = args;
for (i = 1; i < max; ++i) { for (i = 1; i < max; ++i) {
objs[i] = 0; objs[i] = 0;
...@@ -1338,7 +1337,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1338,7 +1337,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
return 0; return 0;
} else { } else {
register Py_ssize_t l = PyTuple_GET_SIZE(args); Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) { if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
name, (min == max ? "" : "at least "), (int)min, (int)l); name, (min == max ? "" : "at least "), (int)min, (int)l);
...@@ -1348,7 +1347,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1348,7 +1347,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
name, (min == max ? "" : "at most "), (int)max, (int)l); name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0; return 0;
} else { } else {
register int i; int i;
for (i = 0; i < l; ++i) { for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i); objs[i] = PyTuple_GET_ITEM(args, i);
} }
...@@ -1602,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) ...@@ -1602,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
} }
SWIGRUNTIME int SWIGRUNTIME int
SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
char *str;
#ifdef METH_NOARGS
PyObject *repr = SwigPyObject_repr(v);
#else
PyObject *repr = SwigPyObject_repr(v, NULL);
#endif
if (repr) {
str = SWIG_Python_str_AsChar(repr);
fputs(str, fp);
SWIG_Python_str_DelForPy3(str);
Py_DECREF(repr);
return 0;
} else {
return 1;
}
}
SWIGRUNTIME PyObject *
SwigPyObject_str(SwigPyObject *v)
{
char result[SWIG_BUFFER_SIZE];
return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
SWIG_Python_str_FromChar(result) : 0;
}
SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{ {
void *i = v->ptr; void *i = v->ptr;
...@@ -1821,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args) ...@@ -1821,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args)
static PyMethodDef static PyMethodDef
swigobject_methods[] = { swigobject_methods[] = {
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
{(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
{(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
{(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
...@@ -1914,7 +1885,7 @@ SwigPyObject_TypeOnce(void) { ...@@ -1914,7 +1885,7 @@ SwigPyObject_TypeOnce(void) {
sizeof(SwigPyObject), /* tp_basicsize */ sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */
(printfunc)SwigPyObject_print, /* tp_print */ 0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000 #if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */ (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else #else
...@@ -1932,7 +1903,7 @@ SwigPyObject_TypeOnce(void) { ...@@ -1932,7 +1903,7 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_as_mapping */ 0, /* tp_as_mapping */
(hashfunc)0, /* tp_hash */ (hashfunc)0, /* tp_hash */
(ternaryfunc)0, /* tp_call */ (ternaryfunc)0, /* tp_call */
(reprfunc)SwigPyObject_str, /* tp_str */ 0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */ PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */ 0, /* tp_setattro */
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
...@@ -2309,10 +2280,11 @@ SWIGRUNTIME int ...@@ -2309,10 +2280,11 @@ SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
int res; int res;
SwigPyObject *sobj; SwigPyObject *sobj;
int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
if (!obj) if (!obj)
return SWIG_ERROR; return SWIG_ERROR;
if (obj == Py_None) { if (obj == Py_None && !implicit_conv) {
if (ptr) if (ptr)
*ptr = 0; *ptr = 0;
return SWIG_OK; return SWIG_OK;
...@@ -2361,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int ...@@ -2361,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
} }
res = SWIG_OK; res = SWIG_OK;
} else { } else {
if (flags & SWIG_POINTER_IMPLICIT_CONV) { if (implicit_conv) {
SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
if (data && !data->implicitconv) { if (data && !data->implicitconv) {
PyObject *klass = data->klass; PyObject *klass = data->klass;
...@@ -2396,6 +2368,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int ...@@ -2396,6 +2368,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
} }
} }
} }
if (!SWIG_IsOK(res) && obj == Py_None) {
if (ptr)
*ptr = 0;
if (PyErr_Occurred())
PyErr_Clear();
res = SWIG_OK;
}
} }
return res; return res;
} }
...@@ -2483,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) ...@@ -2483,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
} }
} else { } else {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
if (inst) { if (inst) {
PyObject_SetAttr(inst, SWIG_This(), swig_this); PyObject_SetAttr(inst, SWIG_This(), swig_this);
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
...@@ -2637,7 +2616,7 @@ void *SWIG_ReturnGlobalTypeList(void *); ...@@ -2637,7 +2616,7 @@ void *SWIG_ReturnGlobalTypeList(void *);
#endif #endif
SWIGRUNTIME swig_module_info * SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void) { SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
static void *type_pointer = (void *)0; static void *type_pointer = (void *)0;
/* first check if module already created */ /* first check if module already created */
if (!type_pointer) { if (!type_pointer) {
...@@ -2763,7 +2742,7 @@ SWIG_Python_TypeQuery(const char *type) ...@@ -2763,7 +2742,7 @@ SWIG_Python_TypeQuery(const char *type)
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
#endif #endif
} else { } else {
swig_module_info *swig_module = SWIG_Python_GetModule(); swig_module_info *swig_module = SWIG_GetModule(0);
descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
if (descriptor) { if (descriptor) {
#ifdef SWIGPY_USE_CAPSULE #ifdef SWIGPY_USE_CAPSULE
...@@ -2895,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { ...@@ -2895,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
PyObject *descr; PyObject *descr;
PyObject *encoded_name; PyObject *encoded_name;
descrsetfunc f; descrsetfunc f;
int res; int res = -1;
# ifdef Py_USING_UNICODE # ifdef Py_USING_UNICODE
if (PyString_Check(name)) { if (PyString_Check(name)) {
...@@ -2918,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { ...@@ -2918,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
goto done; goto done;
} }
res = -1;
descr = _PyType_Lookup(tp, name); descr = _PyType_Lookup(tp, name);
f = NULL; f = NULL;
if (descr != NULL) if (descr != NULL)
...@@ -2987,7 +2965,7 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0}; ...@@ -2987,7 +2965,7 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
#endif #endif
#define SWIG_name "_pyUConnector" #define SWIG_name "_pyUConnector"
#define SWIGVERSION 0x020008 #define SWIGVERSION 0x030000
#define SWIG_VERSION SWIGVERSION #define SWIG_VERSION SWIGVERSION
...@@ -3485,7 +3463,7 @@ SWIGINTERN PyObject *_wrap_Params_argv_set(PyObject *SWIGUNUSEDPARM(self), PyObj ...@@ -3485,7 +3463,7 @@ SWIGINTERN PyObject *_wrap_Params_argv_set(PyObject *SWIGUNUSEDPARM(self), PyObj
{ {
if (arg2) { if (arg2) {
size_t ii = 0; size_t ii = 0;
for (; ii < (size_t)UTypes::Params::max; ++ii) arg1->argv[ii] = arg2[ii]; for (; ii < (size_t)UTypes::Params::max; ++ii) *(char * *)&arg1->argv[ii] = *((char * *)arg2 + ii);
} else { } else {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""argv""' of type '""char *[UTypes::Params::max]""'"); SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""argv""' of type '""char *[UTypes::Params::max]""'");
} }
...@@ -4113,7 +4091,7 @@ static swig_const_info swig_const_table[] = { ...@@ -4113,7 +4091,7 @@ static swig_const_info swig_const_table[] = {
* array with the correct data and linking the correct swig_cast_info * array with the correct data and linking the correct swig_cast_info
* structures together. * structures together.
* *
* The generated swig_type_info structures are assigned staticly to an initial * The generated swig_type_info structures are assigned statically to an initial
* array. We just loop through that array, and handle each type individually. * array. We just loop through that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the * First we lookup if this type has been already loaded, and if so, use the
* loaded structure instead of the generated one. Then we have to fill in the * loaded structure instead of the generated one. Then we have to fill in the
...@@ -4158,7 +4136,6 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -4158,7 +4136,6 @@ SWIG_InitializeModule(void *clientdata) {
size_t i; size_t i;
swig_module_info *module_head, *iter; swig_module_info *module_head, *iter;
int found, init; int found, init;
(void *)clientdata;
/* check to see if the circular list has been setup, if not, set it up */ /* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) { if (swig_module.next==0) {
...@@ -4197,7 +4174,7 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -4197,7 +4174,7 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module; module_head->next = &swig_module;
} }
/* When multiple interpeters are used, a module could have already been initialized in /* When multiple interpreters are used, a module could have already been initialized in
a different interpreter, but not yet have a pointer in this interpreter. a different interpreter, but not yet have a pointer in this interpreter.
In this case, we do not want to continue adding types... everything should be In this case, we do not want to continue adding types... everything should be
set up already */ set up already */
...@@ -4444,7 +4421,7 @@ extern "C" { ...@@ -4444,7 +4421,7 @@ extern "C" {
var = var->next; var = var->next;
} }
if (res == NULL && !PyErr_Occurred()) { if (res == NULL && !PyErr_Occurred()) {
PyErr_SetString(PyExc_NameError,"Unknown C global variable"); PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
} }
return res; return res;
} }
...@@ -4461,7 +4438,7 @@ extern "C" { ...@@ -4461,7 +4438,7 @@ extern "C" {
var = var->next; var = var->next;
} }
if (res == 1 && !PyErr_Occurred()) { if (res == 1 && !PyErr_Occurred()) {
PyErr_SetString(PyExc_NameError,"Unknown C global variable"); PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
} }
return res; return res;
} }
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.9 * Version 3.0.0
* *
* This file is not intended to be easily readable and contains a number of * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make * coding conventions designed to improve portability and efficiency. Do not make
...@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() { ...@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() {
/* Python.h has to appear first */ #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
#include <Python.h> /* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* swigrun.swg * swigrun.swg
...@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { ...@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
} }
#else /* no cast-rank mode */ #else /* no cast-rank mode */
# define SWIG_AddCast # define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif #endif
...@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, ...@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if not equal, 1 if equal Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) { SWIG_TypeCmp(const char *nb, const char *tb) {
int equiv = 0; int equiv = 1;
const char* te = tb + strlen(tb); const char* te = tb + strlen(tb);
const char* ne = nb; const char* ne = nb;
while (!equiv && *ne) { while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) { for (nb = ne; *ne; ++ne) {
if (*ne == '|') break; if (*ne == '|') break;
} }
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne; if (*ne) ++ne;
} }
return equiv; return equiv;
...@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { ...@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if equal, -1 if nb < tb, 1 if nb > tb Return 0 if not equal, 1 if equal
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeCompare(const char *nb, const char *tb) { SWIG_TypeEquiv(const char *nb, const char *tb) {
int equiv = 0; return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
const char* te = tb + strlen(tb);
const char* ne = nb;
while (!equiv && *ne) {
for (nb = ne; *ne; ++ne) {
if (*ne == '|') break;
}
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
if (*ne) ++ne;
}
return equiv;
} }
/* /*
Check the typename Check the typename
*/ */
...@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, ...@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
swig_module_info *iter = start; swig_module_info *iter = start;
do { do {
if (iter->size) { if (iter->size) {
register size_t l = 0; size_t l = 0;
register size_t r = iter->size - 1; size_t r = iter->size - 1;
do { do {
/* since l+r >= 0, we can (>> 1) instead (/ 2) */ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
register size_t i = (l + r) >> 1; size_t i = (l + r) >> 1;
const char *iname = iter->types[i]->name; const char *iname = iter->types[i]->name;
if (iname) { if (iname) {
register int compare = strcmp(name, iname); int compare = strcmp(name, iname);
if (compare == 0) { if (compare == 0) {
return iter->types[i]; return iter->types[i];
} else if (compare < 0) { } else if (compare < 0) {
...@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start, ...@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
of the str field (the human readable name) */ of the str field (the human readable name) */
swig_module_info *iter = start; swig_module_info *iter = start;
do { do {
register size_t i = 0; size_t i = 0;
for (; i < iter->size; ++i) { for (; i < iter->size; ++i) {
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
return iter->types[i]; return iter->types[i];
...@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start, ...@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
SWIGRUNTIME char * SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) { SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef"; static const char hex[17] = "0123456789abcdef";
register const unsigned char *u = (unsigned char *) ptr; const unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz; const unsigned char *eu = u + sz;
for (; u != eu; ++u) { for (; u != eu; ++u) {
register unsigned char uu = *u; unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf]; *(c++) = hex[uu & 0xf];
} }
...@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) { ...@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
*/ */
SWIGRUNTIME const char * SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) { SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
register unsigned char *u = (unsigned char *) ptr; unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz; const unsigned char *eu = u + sz;
for (; u != eu; ++u) { for (; u != eu; ++u) {
register char d = *(c++); char d = *(c++);
register unsigned char uu; unsigned char uu;
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4); uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
...@@ -1332,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1332,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
} }
if (!PyTuple_Check(args)) { if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) { if (min <= 1 && max >= 1) {
register int i; int i;
objs[0] = args; objs[0] = args;
for (i = 1; i < max; ++i) { for (i = 1; i < max; ++i) {
objs[i] = 0; objs[i] = 0;
...@@ -1342,7 +1337,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1342,7 +1337,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
return 0; return 0;
} else { } else {
register Py_ssize_t l = PyTuple_GET_SIZE(args); Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) { if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
name, (min == max ? "" : "at least "), (int)min, (int)l); name, (min == max ? "" : "at least "), (int)min, (int)l);
...@@ -1352,7 +1347,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1352,7 +1347,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
name, (min == max ? "" : "at most "), (int)max, (int)l); name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0; return 0;
} else { } else {
register int i; int i;
for (i = 0; i < l; ++i) { for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i); objs[i] = PyTuple_GET_ITEM(args, i);
} }
...@@ -1606,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) ...@@ -1606,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
} }
SWIGRUNTIME int SWIGRUNTIME int
SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
char *str;
#ifdef METH_NOARGS
PyObject *repr = SwigPyObject_repr(v);
#else
PyObject *repr = SwigPyObject_repr(v, NULL);
#endif
if (repr) {
str = SWIG_Python_str_AsChar(repr);
fputs(str, fp);
SWIG_Python_str_DelForPy3(str);
Py_DECREF(repr);
return 0;
} else {
return 1;
}
}
SWIGRUNTIME PyObject *
SwigPyObject_str(SwigPyObject *v)
{
char result[SWIG_BUFFER_SIZE];
return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
SWIG_Python_str_FromChar(result) : 0;
}
SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{ {
void *i = v->ptr; void *i = v->ptr;
...@@ -1825,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args) ...@@ -1825,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args)
static PyMethodDef static PyMethodDef
swigobject_methods[] = { swigobject_methods[] = {
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
{(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
{(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
{(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
...@@ -1918,7 +1885,7 @@ SwigPyObject_TypeOnce(void) { ...@@ -1918,7 +1885,7 @@ SwigPyObject_TypeOnce(void) {
sizeof(SwigPyObject), /* tp_basicsize */ sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */
(printfunc)SwigPyObject_print, /* tp_print */ 0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000 #if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */ (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else #else
...@@ -1936,7 +1903,7 @@ SwigPyObject_TypeOnce(void) { ...@@ -1936,7 +1903,7 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_as_mapping */ 0, /* tp_as_mapping */
(hashfunc)0, /* tp_hash */ (hashfunc)0, /* tp_hash */
(ternaryfunc)0, /* tp_call */ (ternaryfunc)0, /* tp_call */
(reprfunc)SwigPyObject_str, /* tp_str */ 0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */ PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */ 0, /* tp_setattro */
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
...@@ -2313,10 +2280,11 @@ SWIGRUNTIME int ...@@ -2313,10 +2280,11 @@ SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
int res; int res;
SwigPyObject *sobj; SwigPyObject *sobj;
int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
if (!obj) if (!obj)
return SWIG_ERROR; return SWIG_ERROR;
if (obj == Py_None) { if (obj == Py_None && !implicit_conv) {
if (ptr) if (ptr)
*ptr = 0; *ptr = 0;
return SWIG_OK; return SWIG_OK;
...@@ -2365,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int ...@@ -2365,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
} }
res = SWIG_OK; res = SWIG_OK;
} else { } else {
if (flags & SWIG_POINTER_IMPLICIT_CONV) { if (implicit_conv) {
SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
if (data && !data->implicitconv) { if (data && !data->implicitconv) {
PyObject *klass = data->klass; PyObject *klass = data->klass;
...@@ -2400,6 +2368,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int ...@@ -2400,6 +2368,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
} }
} }
} }
if (!SWIG_IsOK(res) && obj == Py_None) {
if (ptr)
*ptr = 0;
if (PyErr_Occurred())
PyErr_Clear();
res = SWIG_OK;
}
} }
return res; return res;
} }
...@@ -2487,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) ...@@ -2487,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
} }
} else { } else {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
if (inst) { if (inst) {
PyObject_SetAttr(inst, SWIG_This(), swig_this); PyObject_SetAttr(inst, SWIG_This(), swig_this);
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
...@@ -2899,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { ...@@ -2899,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
PyObject *descr; PyObject *descr;
PyObject *encoded_name; PyObject *encoded_name;
descrsetfunc f; descrsetfunc f;
int res; int res = -1;
# ifdef Py_USING_UNICODE # ifdef Py_USING_UNICODE
if (PyString_Check(name)) { if (PyString_Check(name)) {
...@@ -2922,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { ...@@ -2922,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
goto done; goto done;
} }
res = -1;
descr = _PyType_Lookup(tp, name); descr = _PyType_Lookup(tp, name);
f = NULL; f = NULL;
if (descr != NULL) if (descr != NULL)
...@@ -2991,7 +2965,7 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0}; ...@@ -2991,7 +2965,7 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
#endif #endif
#define SWIG_name "_pyUExceptions" #define SWIG_name "_pyUExceptions"
#define SWIGVERSION 0x020009 #define SWIGVERSION 0x030000
#define SWIG_VERSION SWIGVERSION #define SWIG_VERSION SWIGVERSION
...@@ -3672,7 +3646,7 @@ static swig_const_info swig_const_table[] = { ...@@ -3672,7 +3646,7 @@ static swig_const_info swig_const_table[] = {
* array with the correct data and linking the correct swig_cast_info * array with the correct data and linking the correct swig_cast_info
* structures together. * structures together.
* *
* The generated swig_type_info structures are assigned staticly to an initial * The generated swig_type_info structures are assigned statically to an initial
* array. We just loop through that array, and handle each type individually. * array. We just loop through that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the * First we lookup if this type has been already loaded, and if so, use the
* loaded structure instead of the generated one. Then we have to fill in the * loaded structure instead of the generated one. Then we have to fill in the
...@@ -3755,7 +3729,7 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -3755,7 +3729,7 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module; module_head->next = &swig_module;
} }
/* When multiple interpeters are used, a module could have already been initialized in /* When multiple interpreters are used, a module could have already been initialized in
a different interpreter, but not yet have a pointer in this interpreter. a different interpreter, but not yet have a pointer in this interpreter.
In this case, we do not want to continue adding types... everything should be In this case, we do not want to continue adding types... everything should be
set up already */ set up already */
...@@ -4002,7 +3976,7 @@ extern "C" { ...@@ -4002,7 +3976,7 @@ extern "C" {
var = var->next; var = var->next;
} }
if (res == NULL && !PyErr_Occurred()) { if (res == NULL && !PyErr_Occurred()) {
PyErr_SetString(PyExc_NameError,"Unknown C global variable"); PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
} }
return res; return res;
} }
...@@ -4019,7 +3993,7 @@ extern "C" { ...@@ -4019,7 +3993,7 @@ extern "C" {
var = var->next; var = var->next;
} }
if (res == 1 && !PyErr_Occurred()) { if (res == 1 && !PyErr_Occurred()) {
PyErr_SetString(PyExc_NameError,"Unknown C global variable"); PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
} }
return res; return res;
} }
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.8 * Version 3.0.0
* *
* This file is not intended to be easily readable and contains a number of * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make * coding conventions designed to improve portability and efficiency. Do not make
...@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() { ...@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() {
/* Python.h has to appear first */ #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
#include <Python.h> /* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* swigrun.swg * swigrun.swg
...@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { ...@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
} }
#else /* no cast-rank mode */ #else /* no cast-rank mode */
# define SWIG_AddCast # define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif #endif
...@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, ...@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if not equal, 1 if equal Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) { SWIG_TypeCmp(const char *nb, const char *tb) {
int equiv = 0; int equiv = 1;
const char* te = tb + strlen(tb); const char* te = tb + strlen(tb);
const char* ne = nb; const char* ne = nb;
while (!equiv && *ne) { while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) { for (nb = ne; *ne; ++ne) {
if (*ne == '|') break; if (*ne == '|') break;
} }
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne; if (*ne) ++ne;
} }
return equiv; return equiv;
...@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { ...@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if equal, -1 if nb < tb, 1 if nb > tb Return 0 if not equal, 1 if equal
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeCompare(const char *nb, const char *tb) { SWIG_TypeEquiv(const char *nb, const char *tb) {
int equiv = 0; return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
const char* te = tb + strlen(tb);
const char* ne = nb;
while (!equiv && *ne) {
for (nb = ne; *ne; ++ne) {
if (*ne == '|') break;
}
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
if (*ne) ++ne;
}
return equiv;
} }
/* /*
Check the typename Check the typename
*/ */
...@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, ...@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
swig_module_info *iter = start; swig_module_info *iter = start;
do { do {
if (iter->size) { if (iter->size) {
register size_t l = 0; size_t l = 0;
register size_t r = iter->size - 1; size_t r = iter->size - 1;
do { do {
/* since l+r >= 0, we can (>> 1) instead (/ 2) */ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
register size_t i = (l + r) >> 1; size_t i = (l + r) >> 1;
const char *iname = iter->types[i]->name; const char *iname = iter->types[i]->name;
if (iname) { if (iname) {
register int compare = strcmp(name, iname); int compare = strcmp(name, iname);
if (compare == 0) { if (compare == 0) {
return iter->types[i]; return iter->types[i];
} else if (compare < 0) { } else if (compare < 0) {
...@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start, ...@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
of the str field (the human readable name) */ of the str field (the human readable name) */
swig_module_info *iter = start; swig_module_info *iter = start;
do { do {
register size_t i = 0; size_t i = 0;
for (; i < iter->size; ++i) { for (; i < iter->size; ++i) {
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
return iter->types[i]; return iter->types[i];
...@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start, ...@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
SWIGRUNTIME char * SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) { SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef"; static const char hex[17] = "0123456789abcdef";
register const unsigned char *u = (unsigned char *) ptr; const unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz; const unsigned char *eu = u + sz;
for (; u != eu; ++u) { for (; u != eu; ++u) {
register unsigned char uu = *u; unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf]; *(c++) = hex[uu & 0xf];
} }
...@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) { ...@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
*/ */
SWIGRUNTIME const char * SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) { SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
register unsigned char *u = (unsigned char *) ptr; unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz; const unsigned char *eu = u + sz;
for (; u != eu; ++u) { for (; u != eu; ++u) {
register char d = *(c++); char d = *(c++);
register unsigned char uu; unsigned char uu;
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4); uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
...@@ -927,6 +922,10 @@ static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) ...@@ -927,6 +922,10 @@ static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
} }
#endif #endif
#if PY_VERSION_HEX < 0x02050000
#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
#endif
#if PY_VERSION_HEX < 0x02040000 #if PY_VERSION_HEX < 0x02040000
#define Py_VISIT(op) \ #define Py_VISIT(op) \
do { \ do { \
...@@ -1198,7 +1197,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), ...@@ -1198,7 +1197,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
/* Runtime API */ /* Runtime API */
#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
...@@ -1328,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1328,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
} }
if (!PyTuple_Check(args)) { if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) { if (min <= 1 && max >= 1) {
register int i; int i;
objs[0] = args; objs[0] = args;
for (i = 1; i < max; ++i) { for (i = 1; i < max; ++i) {
objs[i] = 0; objs[i] = 0;
...@@ -1338,7 +1337,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1338,7 +1337,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
return 0; return 0;
} else { } else {
register Py_ssize_t l = PyTuple_GET_SIZE(args); Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) { if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
name, (min == max ? "" : "at least "), (int)min, (int)l); name, (min == max ? "" : "at least "), (int)min, (int)l);
...@@ -1348,7 +1347,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1348,7 +1347,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
name, (min == max ? "" : "at most "), (int)max, (int)l); name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0; return 0;
} else { } else {
register int i; int i;
for (i = 0; i < l; ++i) { for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i); objs[i] = PyTuple_GET_ITEM(args, i);
} }
...@@ -1602,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) ...@@ -1602,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
} }
SWIGRUNTIME int SWIGRUNTIME int
SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
char *str;
#ifdef METH_NOARGS
PyObject *repr = SwigPyObject_repr(v);
#else
PyObject *repr = SwigPyObject_repr(v, NULL);
#endif
if (repr) {
str = SWIG_Python_str_AsChar(repr);
fputs(str, fp);
SWIG_Python_str_DelForPy3(str);
Py_DECREF(repr);
return 0;
} else {
return 1;
}
}
SWIGRUNTIME PyObject *
SwigPyObject_str(SwigPyObject *v)
{
char result[SWIG_BUFFER_SIZE];
return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
SWIG_Python_str_FromChar(result) : 0;
}
SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{ {
void *i = v->ptr; void *i = v->ptr;
...@@ -1821,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args) ...@@ -1821,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args)
static PyMethodDef static PyMethodDef
swigobject_methods[] = { swigobject_methods[] = {
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
{(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
{(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
{(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
...@@ -1914,7 +1885,7 @@ SwigPyObject_TypeOnce(void) { ...@@ -1914,7 +1885,7 @@ SwigPyObject_TypeOnce(void) {
sizeof(SwigPyObject), /* tp_basicsize */ sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */
(printfunc)SwigPyObject_print, /* tp_print */ 0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000 #if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */ (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else #else
...@@ -1932,7 +1903,7 @@ SwigPyObject_TypeOnce(void) { ...@@ -1932,7 +1903,7 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_as_mapping */ 0, /* tp_as_mapping */
(hashfunc)0, /* tp_hash */ (hashfunc)0, /* tp_hash */
(ternaryfunc)0, /* tp_call */ (ternaryfunc)0, /* tp_call */
(reprfunc)SwigPyObject_str, /* tp_str */ 0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */ PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */ 0, /* tp_setattro */
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
...@@ -2309,10 +2280,11 @@ SWIGRUNTIME int ...@@ -2309,10 +2280,11 @@ SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
int res; int res;
SwigPyObject *sobj; SwigPyObject *sobj;
int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
if (!obj) if (!obj)
return SWIG_ERROR; return SWIG_ERROR;
if (obj == Py_None) { if (obj == Py_None && !implicit_conv) {
if (ptr) if (ptr)
*ptr = 0; *ptr = 0;
return SWIG_OK; return SWIG_OK;
...@@ -2361,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int ...@@ -2361,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
} }
res = SWIG_OK; res = SWIG_OK;
} else { } else {
if (flags & SWIG_POINTER_IMPLICIT_CONV) { if (implicit_conv) {
SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
if (data && !data->implicitconv) { if (data && !data->implicitconv) {
PyObject *klass = data->klass; PyObject *klass = data->klass;
...@@ -2396,6 +2368,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int ...@@ -2396,6 +2368,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
} }
} }
} }
if (!SWIG_IsOK(res) && obj == Py_None) {
if (ptr)
*ptr = 0;
if (PyErr_Occurred())
PyErr_Clear();
res = SWIG_OK;
}
} }
return res; return res;
} }
...@@ -2483,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) ...@@ -2483,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
} }
} else { } else {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
if (inst) { if (inst) {
PyObject_SetAttr(inst, SWIG_This(), swig_this); PyObject_SetAttr(inst, SWIG_This(), swig_this);
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
...@@ -2637,7 +2616,7 @@ void *SWIG_ReturnGlobalTypeList(void *); ...@@ -2637,7 +2616,7 @@ void *SWIG_ReturnGlobalTypeList(void *);
#endif #endif
SWIGRUNTIME swig_module_info * SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void) { SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
static void *type_pointer = (void *)0; static void *type_pointer = (void *)0;
/* first check if module already created */ /* first check if module already created */
if (!type_pointer) { if (!type_pointer) {
...@@ -2763,7 +2742,7 @@ SWIG_Python_TypeQuery(const char *type) ...@@ -2763,7 +2742,7 @@ SWIG_Python_TypeQuery(const char *type)
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
#endif #endif
} else { } else {
swig_module_info *swig_module = SWIG_Python_GetModule(); swig_module_info *swig_module = SWIG_GetModule(0);
descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
if (descriptor) { if (descriptor) {
#ifdef SWIGPY_USE_CAPSULE #ifdef SWIGPY_USE_CAPSULE
...@@ -2895,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { ...@@ -2895,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
PyObject *descr; PyObject *descr;
PyObject *encoded_name; PyObject *encoded_name;
descrsetfunc f; descrsetfunc f;
int res; int res = -1;
# ifdef Py_USING_UNICODE # ifdef Py_USING_UNICODE
if (PyString_Check(name)) { if (PyString_Check(name)) {
...@@ -2918,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { ...@@ -2918,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
goto done; goto done;
} }
res = -1;
descr = _PyType_Lookup(tp, name); descr = _PyType_Lookup(tp, name);
f = NULL; f = NULL;
if (descr != NULL) if (descr != NULL)
...@@ -2989,7 +2967,7 @@ static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0}; ...@@ -2989,7 +2967,7 @@ static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
#endif #endif
#define SWIG_name "_pyUniSet" #define SWIG_name "_pyUniSet"
#define SWIGVERSION 0x020008 #define SWIGVERSION 0x030000
#define SWIG_VERSION SWIGVERSION #define SWIG_VERSION SWIGVERSION
...@@ -3742,7 +3720,7 @@ SWIGINTERN PyObject *_wrap_Params_argv_set(PyObject *SWIGUNUSEDPARM(self), PyObj ...@@ -3742,7 +3720,7 @@ SWIGINTERN PyObject *_wrap_Params_argv_set(PyObject *SWIGUNUSEDPARM(self), PyObj
{ {
if (arg2) { if (arg2) {
size_t ii = 0; size_t ii = 0;
for (; ii < (size_t)UTypes::Params::max; ++ii) arg1->argv[ii] = arg2[ii]; for (; ii < (size_t)UTypes::Params::max; ++ii) *(char * *)&arg1->argv[ii] = *((char * *)arg2 + ii);
} else { } else {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""argv""' of type '""char *[UTypes::Params::max]""'"); SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""argv""' of type '""char *[UTypes::Params::max]""'");
} }
...@@ -3832,27 +3810,22 @@ fail: ...@@ -3832,27 +3810,22 @@ fail:
SWIGINTERN PyObject *_wrap_new_UException__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *_wrap_new_UException__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
std::string arg1 ; std::string *arg1 = 0 ;
void *argp1 ; void *argp1 = 0 ;
int res1 = 0 ; int res1 = 0 ;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
UException *result = 0 ; UException *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:new_UException",&obj0)) SWIG_fail; if (!PyArg_ParseTuple(args,(char *)"O:new_UException",&obj0)) SWIG_fail;
{
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0); res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0);
if (!SWIG_IsOK(res1)) { if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UException" "', argument " "1"" of type '" "std::string const""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UException" "', argument " "1"" of type '" "std::string const &""'");
} }
if (!argp1) { if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UException" "', argument " "1"" of type '" "std::string const""'"); SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UException" "', argument " "1"" of type '" "std::string const &""'");
} else {
std::string * temp = reinterpret_cast< std::string * >(argp1);
arg1 = *temp;
if (SWIG_IsNewObj(res1)) delete temp;
} }
} arg1 = reinterpret_cast< std::string * >(argp1);
result = (UException *)new UException(arg1); result = (UException *)new UException((std::string const &)*arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UException, SWIG_POINTER_NEW | 0 ); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UException, SWIG_POINTER_NEW | 0 );
return resultobj; return resultobj;
fail: fail:
...@@ -3919,7 +3892,7 @@ fail: ...@@ -3919,7 +3892,7 @@ fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_UException'.\n" SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_UException'.\n"
" Possible C/C++ prototypes are:\n" " Possible C/C++ prototypes are:\n"
" UException::UException()\n" " UException::UException()\n"
" UException::UException(std::string const)\n" " UException::UException(std::string const &)\n"
" UException::UException(char const *)\n"); " UException::UException(char const *)\n");
return 0; return 0;
} }
...@@ -4050,27 +4023,22 @@ fail: ...@@ -4050,27 +4023,22 @@ fail:
SWIGINTERN PyObject *_wrap_new_UTimeOut__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *_wrap_new_UTimeOut__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
std::string arg1 ; std::string *arg1 = 0 ;
void *argp1 ; void *argp1 = 0 ;
int res1 = 0 ; int res1 = 0 ;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
UTimeOut *result = 0 ; UTimeOut *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:new_UTimeOut",&obj0)) SWIG_fail; if (!PyArg_ParseTuple(args,(char *)"O:new_UTimeOut",&obj0)) SWIG_fail;
{
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0); res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0);
if (!SWIG_IsOK(res1)) { if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UTimeOut" "', argument " "1"" of type '" "std::string const""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UTimeOut" "', argument " "1"" of type '" "std::string const &""'");
} }
if (!argp1) { if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UTimeOut" "', argument " "1"" of type '" "std::string const""'"); SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UTimeOut" "', argument " "1"" of type '" "std::string const &""'");
} else {
std::string * temp = reinterpret_cast< std::string * >(argp1);
arg1 = *temp;
if (SWIG_IsNewObj(res1)) delete temp;
}
} }
result = (UTimeOut *)new UTimeOut(arg1); arg1 = reinterpret_cast< std::string * >(argp1);
result = (UTimeOut *)new UTimeOut((std::string const &)*arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UTimeOut, SWIG_POINTER_NEW | 0 ); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UTimeOut, SWIG_POINTER_NEW | 0 );
return resultobj; return resultobj;
fail: fail:
...@@ -4104,7 +4072,7 @@ fail: ...@@ -4104,7 +4072,7 @@ fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_UTimeOut'.\n" SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_UTimeOut'.\n"
" Possible C/C++ prototypes are:\n" " Possible C/C++ prototypes are:\n"
" UTimeOut::UTimeOut()\n" " UTimeOut::UTimeOut()\n"
" UTimeOut::UTimeOut(std::string const)\n"); " UTimeOut::UTimeOut(std::string const &)\n");
return 0; return 0;
} }
...@@ -4152,27 +4120,22 @@ fail: ...@@ -4152,27 +4120,22 @@ fail:
SWIGINTERN PyObject *_wrap_new_USysError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *_wrap_new_USysError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0; PyObject *resultobj = 0;
std::string arg1 ; std::string *arg1 = 0 ;
void *argp1 ; void *argp1 = 0 ;
int res1 = 0 ; int res1 = 0 ;
PyObject * obj0 = 0 ; PyObject * obj0 = 0 ;
USysError *result = 0 ; USysError *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:new_USysError",&obj0)) SWIG_fail; if (!PyArg_ParseTuple(args,(char *)"O:new_USysError",&obj0)) SWIG_fail;
{
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0); res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0);
if (!SWIG_IsOK(res1)) { if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_USysError" "', argument " "1"" of type '" "std::string const""'"); SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_USysError" "', argument " "1"" of type '" "std::string const &""'");
} }
if (!argp1) { if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_USysError" "', argument " "1"" of type '" "std::string const""'"); SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_USysError" "', argument " "1"" of type '" "std::string const &""'");
} else {
std::string * temp = reinterpret_cast< std::string * >(argp1);
arg1 = *temp;
if (SWIG_IsNewObj(res1)) delete temp;
}
} }
result = (USysError *)new USysError(arg1); arg1 = reinterpret_cast< std::string * >(argp1);
result = (USysError *)new USysError((std::string const &)*arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_USysError, SWIG_POINTER_NEW | 0 ); resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_USysError, SWIG_POINTER_NEW | 0 );
return resultobj; return resultobj;
fail: fail:
...@@ -4206,7 +4169,7 @@ fail: ...@@ -4206,7 +4169,7 @@ fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_USysError'.\n" SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_USysError'.\n"
" Possible C/C++ prototypes are:\n" " Possible C/C++ prototypes are:\n"
" USysError::USysError()\n" " USysError::USysError()\n"
" USysError::USysError(std::string const)\n"); " USysError::USysError(std::string const &)\n");
return 0; return 0;
} }
...@@ -4341,7 +4304,7 @@ static swig_const_info swig_const_table[] = { ...@@ -4341,7 +4304,7 @@ static swig_const_info swig_const_table[] = {
* array with the correct data and linking the correct swig_cast_info * array with the correct data and linking the correct swig_cast_info
* structures together. * structures together.
* *
* The generated swig_type_info structures are assigned staticly to an initial * The generated swig_type_info structures are assigned statically to an initial
* array. We just loop through that array, and handle each type individually. * array. We just loop through that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the * First we lookup if this type has been already loaded, and if so, use the
* loaded structure instead of the generated one. Then we have to fill in the * loaded structure instead of the generated one. Then we have to fill in the
...@@ -4386,7 +4349,6 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -4386,7 +4349,6 @@ SWIG_InitializeModule(void *clientdata) {
size_t i; size_t i;
swig_module_info *module_head, *iter; swig_module_info *module_head, *iter;
int found, init; int found, init;
(void *)clientdata;
/* check to see if the circular list has been setup, if not, set it up */ /* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) { if (swig_module.next==0) {
...@@ -4425,7 +4387,7 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -4425,7 +4387,7 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module; module_head->next = &swig_module;
} }
/* When multiple interpeters are used, a module could have already been initialized in /* When multiple interpreters are used, a module could have already been initialized in
a different interpreter, but not yet have a pointer in this interpreter. a different interpreter, but not yet have a pointer in this interpreter.
In this case, we do not want to continue adding types... everything should be In this case, we do not want to continue adding types... everything should be
set up already */ set up already */
...@@ -4672,7 +4634,7 @@ extern "C" { ...@@ -4672,7 +4634,7 @@ extern "C" {
var = var->next; var = var->next;
} }
if (res == NULL && !PyErr_Occurred()) { if (res == NULL && !PyErr_Occurred()) {
PyErr_SetString(PyExc_NameError,"Unknown C global variable"); PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
} }
return res; return res;
} }
...@@ -4689,7 +4651,7 @@ extern "C" { ...@@ -4689,7 +4651,7 @@ extern "C" {
var = var->next; var = var->next;
} }
if (res == 1 && !PyErr_Occurred()) { if (res == 1 && !PyErr_Occurred()) {
PyErr_SetString(PyExc_NameError,"Unknown C global variable"); PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
} }
return res; return res;
} }
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.8 * Version 3.0.0
* *
* This file is not intended to be easily readable and contains a number of * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make * coding conventions designed to improve portability and efficiency. Do not make
...@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() { ...@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() {
/* Python.h has to appear first */ #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
#include <Python.h> /* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* swigrun.swg * swigrun.swg
...@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { ...@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
} }
#else /* no cast-rank mode */ #else /* no cast-rank mode */
# define SWIG_AddCast # define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif #endif
...@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, ...@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if not equal, 1 if equal Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) { SWIG_TypeCmp(const char *nb, const char *tb) {
int equiv = 0; int equiv = 1;
const char* te = tb + strlen(tb); const char* te = tb + strlen(tb);
const char* ne = nb; const char* ne = nb;
while (!equiv && *ne) { while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) { for (nb = ne; *ne; ++ne) {
if (*ne == '|') break; if (*ne == '|') break;
} }
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne; if (*ne) ++ne;
} }
return equiv; return equiv;
...@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { ...@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if equal, -1 if nb < tb, 1 if nb > tb Return 0 if not equal, 1 if equal
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeCompare(const char *nb, const char *tb) { SWIG_TypeEquiv(const char *nb, const char *tb) {
int equiv = 0; return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
const char* te = tb + strlen(tb);
const char* ne = nb;
while (!equiv && *ne) {
for (nb = ne; *ne; ++ne) {
if (*ne == '|') break;
}
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
if (*ne) ++ne;
}
return equiv;
} }
/* /*
Check the typename Check the typename
*/ */
...@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, ...@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
swig_module_info *iter = start; swig_module_info *iter = start;
do { do {
if (iter->size) { if (iter->size) {
register size_t l = 0; size_t l = 0;
register size_t r = iter->size - 1; size_t r = iter->size - 1;
do { do {
/* since l+r >= 0, we can (>> 1) instead (/ 2) */ /* since l+r >= 0, we can (>> 1) instead (/ 2) */
register size_t i = (l + r) >> 1; size_t i = (l + r) >> 1;
const char *iname = iter->types[i]->name; const char *iname = iter->types[i]->name;
if (iname) { if (iname) {
register int compare = strcmp(name, iname); int compare = strcmp(name, iname);
if (compare == 0) { if (compare == 0) {
return iter->types[i]; return iter->types[i];
} else if (compare < 0) { } else if (compare < 0) {
...@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start, ...@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
of the str field (the human readable name) */ of the str field (the human readable name) */
swig_module_info *iter = start; swig_module_info *iter = start;
do { do {
register size_t i = 0; size_t i = 0;
for (; i < iter->size; ++i) { for (; i < iter->size; ++i) {
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
return iter->types[i]; return iter->types[i];
...@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start, ...@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
SWIGRUNTIME char * SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) { SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef"; static const char hex[17] = "0123456789abcdef";
register const unsigned char *u = (unsigned char *) ptr; const unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz; const unsigned char *eu = u + sz;
for (; u != eu; ++u) { for (; u != eu; ++u) {
register unsigned char uu = *u; unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf]; *(c++) = hex[uu & 0xf];
} }
...@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) { ...@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
*/ */
SWIGRUNTIME const char * SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) { SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
register unsigned char *u = (unsigned char *) ptr; unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz; const unsigned char *eu = u + sz;
for (; u != eu; ++u) { for (; u != eu; ++u) {
register char d = *(c++); char d = *(c++);
register unsigned char uu; unsigned char uu;
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4); uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
...@@ -927,6 +922,10 @@ static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) ...@@ -927,6 +922,10 @@ static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
} }
#endif #endif
#if PY_VERSION_HEX < 0x02050000
#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
#endif
#if PY_VERSION_HEX < 0x02040000 #if PY_VERSION_HEX < 0x02040000
#define Py_VISIT(op) \ #define Py_VISIT(op) \
do { \ do { \
...@@ -1198,7 +1197,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), ...@@ -1198,7 +1197,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
/* Runtime API */ /* Runtime API */
#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
...@@ -1328,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1328,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
} }
if (!PyTuple_Check(args)) { if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) { if (min <= 1 && max >= 1) {
register int i; int i;
objs[0] = args; objs[0] = args;
for (i = 1; i < max; ++i) { for (i = 1; i < max; ++i) {
objs[i] = 0; objs[i] = 0;
...@@ -1338,7 +1337,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1338,7 +1337,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
return 0; return 0;
} else { } else {
register Py_ssize_t l = PyTuple_GET_SIZE(args); Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) { if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
name, (min == max ? "" : "at least "), (int)min, (int)l); name, (min == max ? "" : "at least "), (int)min, (int)l);
...@@ -1348,7 +1347,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1348,7 +1347,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
name, (min == max ? "" : "at most "), (int)max, (int)l); name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0; return 0;
} else { } else {
register int i; int i;
for (i = 0; i < l; ++i) { for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i); objs[i] = PyTuple_GET_ITEM(args, i);
} }
...@@ -1602,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) ...@@ -1602,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
} }
SWIGRUNTIME int SWIGRUNTIME int
SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
char *str;
#ifdef METH_NOARGS
PyObject *repr = SwigPyObject_repr(v);
#else
PyObject *repr = SwigPyObject_repr(v, NULL);
#endif
if (repr) {
str = SWIG_Python_str_AsChar(repr);
fputs(str, fp);
SWIG_Python_str_DelForPy3(str);
Py_DECREF(repr);
return 0;
} else {
return 1;
}
}
SWIGRUNTIME PyObject *
SwigPyObject_str(SwigPyObject *v)
{
char result[SWIG_BUFFER_SIZE];
return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
SWIG_Python_str_FromChar(result) : 0;
}
SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{ {
void *i = v->ptr; void *i = v->ptr;
...@@ -1821,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args) ...@@ -1821,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args)
static PyMethodDef static PyMethodDef
swigobject_methods[] = { swigobject_methods[] = {
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
{(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
{(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
{(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
...@@ -1914,7 +1885,7 @@ SwigPyObject_TypeOnce(void) { ...@@ -1914,7 +1885,7 @@ SwigPyObject_TypeOnce(void) {
sizeof(SwigPyObject), /* tp_basicsize */ sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */
(printfunc)SwigPyObject_print, /* tp_print */ 0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000 #if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */ (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else #else
...@@ -1932,7 +1903,7 @@ SwigPyObject_TypeOnce(void) { ...@@ -1932,7 +1903,7 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_as_mapping */ 0, /* tp_as_mapping */
(hashfunc)0, /* tp_hash */ (hashfunc)0, /* tp_hash */
(ternaryfunc)0, /* tp_call */ (ternaryfunc)0, /* tp_call */
(reprfunc)SwigPyObject_str, /* tp_str */ 0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */ PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */ 0, /* tp_setattro */
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
...@@ -2309,10 +2280,11 @@ SWIGRUNTIME int ...@@ -2309,10 +2280,11 @@ SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
int res; int res;
SwigPyObject *sobj; SwigPyObject *sobj;
int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
if (!obj) if (!obj)
return SWIG_ERROR; return SWIG_ERROR;
if (obj == Py_None) { if (obj == Py_None && !implicit_conv) {
if (ptr) if (ptr)
*ptr = 0; *ptr = 0;
return SWIG_OK; return SWIG_OK;
...@@ -2361,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int ...@@ -2361,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
} }
res = SWIG_OK; res = SWIG_OK;
} else { } else {
if (flags & SWIG_POINTER_IMPLICIT_CONV) { if (implicit_conv) {
SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
if (data && !data->implicitconv) { if (data && !data->implicitconv) {
PyObject *klass = data->klass; PyObject *klass = data->klass;
...@@ -2396,6 +2368,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int ...@@ -2396,6 +2368,13 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
} }
} }
} }
if (!SWIG_IsOK(res) && obj == Py_None) {
if (ptr)
*ptr = 0;
if (PyErr_Occurred())
PyErr_Clear();
res = SWIG_OK;
}
} }
return res; return res;
} }
...@@ -2483,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) ...@@ -2483,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
} }
} else { } else {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
if (inst) { if (inst) {
PyObject_SetAttr(inst, SWIG_This(), swig_this); PyObject_SetAttr(inst, SWIG_This(), swig_this);
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
...@@ -2637,7 +2616,7 @@ void *SWIG_ReturnGlobalTypeList(void *); ...@@ -2637,7 +2616,7 @@ void *SWIG_ReturnGlobalTypeList(void *);
#endif #endif
SWIGRUNTIME swig_module_info * SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void) { SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
static void *type_pointer = (void *)0; static void *type_pointer = (void *)0;
/* first check if module already created */ /* first check if module already created */
if (!type_pointer) { if (!type_pointer) {
...@@ -2763,7 +2742,7 @@ SWIG_Python_TypeQuery(const char *type) ...@@ -2763,7 +2742,7 @@ SWIG_Python_TypeQuery(const char *type)
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
#endif #endif
} else { } else {
swig_module_info *swig_module = SWIG_Python_GetModule(); swig_module_info *swig_module = SWIG_GetModule(0);
descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
if (descriptor) { if (descriptor) {
#ifdef SWIGPY_USE_CAPSULE #ifdef SWIGPY_USE_CAPSULE
...@@ -2895,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { ...@@ -2895,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
PyObject *descr; PyObject *descr;
PyObject *encoded_name; PyObject *encoded_name;
descrsetfunc f; descrsetfunc f;
int res; int res = -1;
# ifdef Py_USING_UNICODE # ifdef Py_USING_UNICODE
if (PyString_Check(name)) { if (PyString_Check(name)) {
...@@ -2918,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { ...@@ -2918,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
goto done; goto done;
} }
res = -1;
descr = _PyType_Lookup(tp, name); descr = _PyType_Lookup(tp, name);
f = NULL; f = NULL;
if (descr != NULL) if (descr != NULL)
...@@ -2988,7 +2966,7 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0}; ...@@ -2988,7 +2966,7 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0};
#endif #endif
#define SWIG_name "_pyUModbus" #define SWIG_name "_pyUModbus"
#define SWIGVERSION 0x020008 #define SWIGVERSION 0x030000
#define SWIG_VERSION SWIGVERSION #define SWIG_VERSION SWIGVERSION
...@@ -5141,7 +5119,7 @@ SWIGINTERN PyObject *_wrap_Params_argv_set(PyObject *SWIGUNUSEDPARM(self), PyObj ...@@ -5141,7 +5119,7 @@ SWIGINTERN PyObject *_wrap_Params_argv_set(PyObject *SWIGUNUSEDPARM(self), PyObj
{ {
if (arg2) { if (arg2) {
size_t ii = 0; size_t ii = 0;
for (; ii < (size_t)UTypes::Params::max; ++ii) arg1->argv[ii] = arg2[ii]; for (; ii < (size_t)UTypes::Params::max; ++ii) *(char * *)&arg1->argv[ii] = *((char * *)arg2 + ii);
} else { } else {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""argv""' of type '""char *[UTypes::Params::max]""'"); SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""argv""' of type '""char *[UTypes::Params::max]""'");
} }
...@@ -5303,7 +5281,7 @@ static swig_const_info swig_const_table[] = { ...@@ -5303,7 +5281,7 @@ static swig_const_info swig_const_table[] = {
* array with the correct data and linking the correct swig_cast_info * array with the correct data and linking the correct swig_cast_info
* structures together. * structures together.
* *
* The generated swig_type_info structures are assigned staticly to an initial * The generated swig_type_info structures are assigned statically to an initial
* array. We just loop through that array, and handle each type individually. * array. We just loop through that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the * First we lookup if this type has been already loaded, and if so, use the
* loaded structure instead of the generated one. Then we have to fill in the * loaded structure instead of the generated one. Then we have to fill in the
...@@ -5348,7 +5326,6 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -5348,7 +5326,6 @@ SWIG_InitializeModule(void *clientdata) {
size_t i; size_t i;
swig_module_info *module_head, *iter; swig_module_info *module_head, *iter;
int found, init; int found, init;
(void *)clientdata;
/* check to see if the circular list has been setup, if not, set it up */ /* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) { if (swig_module.next==0) {
...@@ -5387,7 +5364,7 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -5387,7 +5364,7 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module; module_head->next = &swig_module;
} }
/* When multiple interpeters are used, a module could have already been initialized in /* When multiple interpreters are used, a module could have already been initialized in
a different interpreter, but not yet have a pointer in this interpreter. a different interpreter, but not yet have a pointer in this interpreter.
In this case, we do not want to continue adding types... everything should be In this case, we do not want to continue adding types... everything should be
set up already */ set up already */
...@@ -5634,7 +5611,7 @@ extern "C" { ...@@ -5634,7 +5611,7 @@ extern "C" {
var = var->next; var = var->next;
} }
if (res == NULL && !PyErr_Occurred()) { if (res == NULL && !PyErr_Occurred()) {
PyErr_SetString(PyExc_NameError,"Unknown C global variable"); PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
} }
return res; return res;
} }
...@@ -5651,7 +5628,7 @@ extern "C" { ...@@ -5651,7 +5628,7 @@ extern "C" {
var = var->next; var = var->next;
} }
if (res == 1 && !PyErr_Occurred()) { if (res == 1 && !PyErr_Occurred()) {
PyErr_SetString(PyExc_NameError,"Unknown C global variable"); PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
} }
return res; return res;
} }
......
# This file was automatically generated by SWIG (http://www.swig.org). # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.8 # Version 3.0.0
# #
# Do not make changes to this file unless you know what you are doing--modify # Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead. # the SWIG interface file instead.
from sys import version_info from sys import version_info
if version_info >= (2,6,0): if version_info >= (2,6,0):
def swig_import_helper(): def swig_import_helper():
......
# This file was automatically generated by SWIG (http://www.swig.org). # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.9 # Version 3.0.0
# #
# Do not make changes to this file unless you know what you are doing--modify # Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead. # the SWIG interface file instead.
from sys import version_info from sys import version_info
if version_info >= (2,6,0): if version_info >= (2,6,0):
def swig_import_helper(): def swig_import_helper():
......
# This file was automatically generated by SWIG (http://www.swig.org). # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.8 # Version 3.0.0
# #
# Do not make changes to this file unless you know what you are doing--modify # Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead. # the SWIG interface file instead.
from sys import version_info from sys import version_info
if version_info >= (2,6,0): if version_info >= (2,6,0):
def swig_import_helper(): def swig_import_helper():
......
# This file was automatically generated by SWIG (http://www.swig.org). # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.8 # Version 3.0.0
# #
# Do not make changes to this file unless you know what you are doing--modify # Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead. # the SWIG interface file instead.
from sys import version_info from sys import version_info
if version_info >= (2,6,0): if version_info >= (2,6,0):
def swig_import_helper(): def swig_import_helper():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment