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).
* Version 2.0.8
* Version 3.0.0
*
* 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
......@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() {
/* Python.h has to appear first */
#include <Python.h>
#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#endif
/* -----------------------------------------------------------------------------
* swigrun.swg
......@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
# define SWIG_AddCast
# define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif
......@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/*
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
SWIG_TypeEquiv(const char *nb, const char *tb) {
int equiv = 0;
SWIG_TypeCmp(const char *nb, const char *tb) {
int equiv = 1;
const char* te = tb + strlen(tb);
const char* ne = nb;
while (!equiv && *ne) {
while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) {
if (*ne == '|') break;
}
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne;
}
return equiv;
......@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
/*
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
SWIG_TypeCompare(const char *nb, const char *tb) {
int equiv = 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;
SWIG_TypeEquiv(const char *nb, const char *tb) {
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}
/*
Check the typename
*/
......@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
swig_module_info *iter = start;
do {
if (iter->size) {
register size_t l = 0;
register size_t r = iter->size - 1;
size_t l = 0;
size_t r = iter->size - 1;
do {
/* 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;
if (iname) {
register int compare = strcmp(name, iname);
int compare = strcmp(name, iname);
if (compare == 0) {
return iter->types[i];
} else if (compare < 0) {
......@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
of the str field (the human readable name) */
swig_module_info *iter = start;
do {
register size_t i = 0;
size_t i = 0;
for (; i < iter->size; ++i) {
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
return iter->types[i];
......@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef";
register const unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz;
const unsigned char *u = (unsigned char *) ptr;
const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
register unsigned char uu = *u;
unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf];
}
......@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
register unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz;
unsigned char *u = (unsigned char *) ptr;
const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
register char d = *(c++);
register unsigned char uu;
char d = *(c++);
unsigned char uu;
if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f'))
......@@ -927,6 +922,10 @@ static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
}
#endif
#if PY_VERSION_HEX < 0x02050000
#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
#endif
#if PY_VERSION_HEX < 0x02040000
#define Py_VISIT(op) \
do { \
......@@ -1198,7 +1197,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
/* 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_NewClientData(obj) SwigPyClientData_New(obj)
......@@ -1328,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
}
if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) {
register int i;
int i;
objs[0] = args;
for (i = 1; i < max; ++i) {
objs[i] = 0;
......@@ -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");
return 0;
} else {
register Py_ssize_t l = PyTuple_GET_SIZE(args);
Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
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
name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
register int i;
int i;
for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i);
}
......@@ -1602,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
}
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)
{
void *i = v->ptr;
......@@ -1821,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args)
static PyMethodDef
swigobject_methods[] = {
{(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 *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
......@@ -1914,7 +1885,7 @@ SwigPyObject_TypeOnce(void) {
sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */
(printfunc)SwigPyObject_print, /* tp_print */
0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else
......@@ -1932,7 +1903,7 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_as_mapping */
(hashfunc)0, /* tp_hash */
(ternaryfunc)0, /* tp_call */
(reprfunc)SwigPyObject_str, /* tp_str */
0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
......@@ -2309,10 +2280,11 @@ SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
int res;
SwigPyObject *sobj;
int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
if (!obj)
return SWIG_ERROR;
if (obj == Py_None) {
if (obj == Py_None && !implicit_conv) {
if (ptr)
*ptr = 0;
return SWIG_OK;
......@@ -2361,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
}
res = SWIG_OK;
} else {
if (flags & SWIG_POINTER_IMPLICIT_CONV) {
if (implicit_conv) {
SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
if (data && !data->implicitconv) {
PyObject *klass = data->klass;
......@@ -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;
}
......@@ -2483,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
}
} else {
#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) {
PyObject_SetAttr(inst, SWIG_This(), swig_this);
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
......@@ -2637,7 +2616,7 @@ void *SWIG_ReturnGlobalTypeList(void *);
#endif
SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void) {
SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
static void *type_pointer = (void *)0;
/* first check if module already created */
if (!type_pointer) {
......@@ -2763,7 +2742,7 @@ SWIG_Python_TypeQuery(const char *type)
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
#endif
} 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);
if (descriptor) {
#ifdef SWIGPY_USE_CAPSULE
......@@ -2895,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
PyObject *descr;
PyObject *encoded_name;
descrsetfunc f;
int res;
int res = -1;
# ifdef Py_USING_UNICODE
if (PyString_Check(name)) {
......@@ -2918,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
goto done;
}
res = -1;
descr = _PyType_Lookup(tp, name);
f = NULL;
if (descr != NULL)
......@@ -2987,7 +2965,7 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
#endif
#define SWIG_name "_pyUConnector"
#define SWIGVERSION 0x020008
#define SWIGVERSION 0x030000
#define SWIG_VERSION SWIGVERSION
......@@ -3485,7 +3463,7 @@ SWIGINTERN PyObject *_wrap_Params_argv_set(PyObject *SWIGUNUSEDPARM(self), PyObj
{
if (arg2) {
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 {
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[] = {
* array with the correct data and linking the correct swig_cast_info
* 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.
* 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
......@@ -4158,7 +4136,6 @@ SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
int found, init;
(void *)clientdata;
/* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) {
......@@ -4197,7 +4174,7 @@ SWIG_InitializeModule(void *clientdata) {
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.
In this case, we do not want to continue adding types... everything should be
set up already */
......@@ -4444,7 +4421,7 @@ extern "C" {
var = var->next;
}
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;
}
......@@ -4461,7 +4438,7 @@ extern "C" {
var = var->next;
}
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;
}
......
/* ----------------------------------------------------------------------------
* 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
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() {
/* Python.h has to appear first */
#include <Python.h>
#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#endif
/* -----------------------------------------------------------------------------
* swigrun.swg
......@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
# define SWIG_AddCast
# define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif
......@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/*
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
SWIG_TypeEquiv(const char *nb, const char *tb) {
int equiv = 0;
SWIG_TypeCmp(const char *nb, const char *tb) {
int equiv = 1;
const char* te = tb + strlen(tb);
const char* ne = nb;
while (!equiv && *ne) {
while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) {
if (*ne == '|') break;
}
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne;
}
return equiv;
......@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
/*
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
SWIG_TypeCompare(const char *nb, const char *tb) {
int equiv = 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;
SWIG_TypeEquiv(const char *nb, const char *tb) {
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}
/*
Check the typename
*/
......@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
swig_module_info *iter = start;
do {
if (iter->size) {
register size_t l = 0;
register size_t r = iter->size - 1;
size_t l = 0;
size_t r = iter->size - 1;
do {
/* 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;
if (iname) {
register int compare = strcmp(name, iname);
int compare = strcmp(name, iname);
if (compare == 0) {
return iter->types[i];
} else if (compare < 0) {
......@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
of the str field (the human readable name) */
swig_module_info *iter = start;
do {
register size_t i = 0;
size_t i = 0;
for (; i < iter->size; ++i) {
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
return iter->types[i];
......@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef";
register const unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz;
const unsigned char *u = (unsigned char *) ptr;
const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
register unsigned char uu = *u;
unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf];
}
......@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
register unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz;
unsigned char *u = (unsigned char *) ptr;
const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
register char d = *(c++);
register unsigned char uu;
char d = *(c++);
unsigned char uu;
if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f'))
......@@ -1332,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
}
if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) {
register int i;
int i;
objs[0] = args;
for (i = 1; i < max; ++i) {
objs[i] = 0;
......@@ -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");
return 0;
} else {
register Py_ssize_t l = PyTuple_GET_SIZE(args);
Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
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
name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
register int i;
int i;
for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i);
}
......@@ -1606,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
}
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)
{
void *i = v->ptr;
......@@ -1825,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args)
static PyMethodDef
swigobject_methods[] = {
{(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 *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
......@@ -1918,7 +1885,7 @@ SwigPyObject_TypeOnce(void) {
sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */
(printfunc)SwigPyObject_print, /* tp_print */
0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else
......@@ -1936,7 +1903,7 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_as_mapping */
(hashfunc)0, /* tp_hash */
(ternaryfunc)0, /* tp_call */
(reprfunc)SwigPyObject_str, /* tp_str */
0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
......@@ -2313,10 +2280,11 @@ SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
int res;
SwigPyObject *sobj;
int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
if (!obj)
return SWIG_ERROR;
if (obj == Py_None) {
if (obj == Py_None && !implicit_conv) {
if (ptr)
*ptr = 0;
return SWIG_OK;
......@@ -2365,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
}
res = SWIG_OK;
} else {
if (flags & SWIG_POINTER_IMPLICIT_CONV) {
if (implicit_conv) {
SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
if (data && !data->implicitconv) {
PyObject *klass = data->klass;
......@@ -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;
}
......@@ -2487,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
}
} else {
#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) {
PyObject_SetAttr(inst, SWIG_This(), swig_this);
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
......@@ -2899,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
PyObject *descr;
PyObject *encoded_name;
descrsetfunc f;
int res;
int res = -1;
# ifdef Py_USING_UNICODE
if (PyString_Check(name)) {
......@@ -2922,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
goto done;
}
res = -1;
descr = _PyType_Lookup(tp, name);
f = NULL;
if (descr != NULL)
......@@ -2991,7 +2965,7 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
#endif
#define SWIG_name "_pyUExceptions"
#define SWIGVERSION 0x020009
#define SWIGVERSION 0x030000
#define SWIG_VERSION SWIGVERSION
......@@ -3672,7 +3646,7 @@ static swig_const_info swig_const_table[] = {
* array with the correct data and linking the correct swig_cast_info
* 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.
* 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
......@@ -3755,7 +3729,7 @@ SWIG_InitializeModule(void *clientdata) {
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.
In this case, we do not want to continue adding types... everything should be
set up already */
......@@ -4002,7 +3976,7 @@ extern "C" {
var = var->next;
}
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;
}
......@@ -4019,7 +3993,7 @@ extern "C" {
var = var->next;
}
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;
}
......
/* ----------------------------------------------------------------------------
* 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
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() {
/* Python.h has to appear first */
#include <Python.h>
#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#endif
/* -----------------------------------------------------------------------------
* swigrun.swg
......@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
# define SWIG_AddCast
# define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif
......@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/*
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
SWIG_TypeEquiv(const char *nb, const char *tb) {
int equiv = 0;
SWIG_TypeCmp(const char *nb, const char *tb) {
int equiv = 1;
const char* te = tb + strlen(tb);
const char* ne = nb;
while (!equiv && *ne) {
while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) {
if (*ne == '|') break;
}
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne;
}
return equiv;
......@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
/*
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
SWIG_TypeCompare(const char *nb, const char *tb) {
int equiv = 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;
SWIG_TypeEquiv(const char *nb, const char *tb) {
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}
/*
Check the typename
*/
......@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
swig_module_info *iter = start;
do {
if (iter->size) {
register size_t l = 0;
register size_t r = iter->size - 1;
size_t l = 0;
size_t r = iter->size - 1;
do {
/* 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;
if (iname) {
register int compare = strcmp(name, iname);
int compare = strcmp(name, iname);
if (compare == 0) {
return iter->types[i];
} else if (compare < 0) {
......@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
of the str field (the human readable name) */
swig_module_info *iter = start;
do {
register size_t i = 0;
size_t i = 0;
for (; i < iter->size; ++i) {
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
return iter->types[i];
......@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef";
register const unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz;
const unsigned char *u = (unsigned char *) ptr;
const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
register unsigned char uu = *u;
unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf];
}
......@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
register unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz;
unsigned char *u = (unsigned char *) ptr;
const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
register char d = *(c++);
register unsigned char uu;
char d = *(c++);
unsigned char uu;
if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f'))
......@@ -927,6 +922,10 @@ static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
}
#endif
#if PY_VERSION_HEX < 0x02050000
#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
#endif
#if PY_VERSION_HEX < 0x02040000
#define Py_VISIT(op) \
do { \
......@@ -1198,7 +1197,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
/* 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_NewClientData(obj) SwigPyClientData_New(obj)
......@@ -1328,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
}
if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) {
register int i;
int i;
objs[0] = args;
for (i = 1; i < max; ++i) {
objs[i] = 0;
......@@ -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");
return 0;
} else {
register Py_ssize_t l = PyTuple_GET_SIZE(args);
Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
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
name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
register int i;
int i;
for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i);
}
......@@ -1602,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
}
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)
{
void *i = v->ptr;
......@@ -1821,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args)
static PyMethodDef
swigobject_methods[] = {
{(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 *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
......@@ -1914,7 +1885,7 @@ SwigPyObject_TypeOnce(void) {
sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */
(printfunc)SwigPyObject_print, /* tp_print */
0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else
......@@ -1932,7 +1903,7 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_as_mapping */
(hashfunc)0, /* tp_hash */
(ternaryfunc)0, /* tp_call */
(reprfunc)SwigPyObject_str, /* tp_str */
0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
......@@ -2309,10 +2280,11 @@ SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
int res;
SwigPyObject *sobj;
int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
if (!obj)
return SWIG_ERROR;
if (obj == Py_None) {
if (obj == Py_None && !implicit_conv) {
if (ptr)
*ptr = 0;
return SWIG_OK;
......@@ -2361,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
}
res = SWIG_OK;
} else {
if (flags & SWIG_POINTER_IMPLICIT_CONV) {
if (implicit_conv) {
SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
if (data && !data->implicitconv) {
PyObject *klass = data->klass;
......@@ -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;
}
......@@ -2483,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
}
} else {
#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) {
PyObject_SetAttr(inst, SWIG_This(), swig_this);
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
......@@ -2637,7 +2616,7 @@ void *SWIG_ReturnGlobalTypeList(void *);
#endif
SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void) {
SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
static void *type_pointer = (void *)0;
/* first check if module already created */
if (!type_pointer) {
......@@ -2763,7 +2742,7 @@ SWIG_Python_TypeQuery(const char *type)
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
#endif
} 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);
if (descriptor) {
#ifdef SWIGPY_USE_CAPSULE
......@@ -2895,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
PyObject *descr;
PyObject *encoded_name;
descrsetfunc f;
int res;
int res = -1;
# ifdef Py_USING_UNICODE
if (PyString_Check(name)) {
......@@ -2918,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
goto done;
}
res = -1;
descr = _PyType_Lookup(tp, name);
f = NULL;
if (descr != NULL)
......@@ -2989,7 +2967,7 @@ static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
#endif
#define SWIG_name "_pyUniSet"
#define SWIGVERSION 0x020008
#define SWIGVERSION 0x030000
#define SWIG_VERSION SWIGVERSION
......@@ -3742,7 +3720,7 @@ SWIGINTERN PyObject *_wrap_Params_argv_set(PyObject *SWIGUNUSEDPARM(self), PyObj
{
if (arg2) {
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 {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""argv""' of type '""char *[UTypes::Params::max]""'");
}
......@@ -3832,27 +3810,22 @@ fail:
SWIGINTERN PyObject *_wrap_new_UException__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
std::string arg1 ;
void *argp1 ;
std::string *arg1 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
UException *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:new_UException",&obj0)) SWIG_fail;
{
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0);
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) {
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;
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UException" "', argument " "1"" of type '" "std::string const &""'");
}
}
result = (UException *)new UException(arg1);
arg1 = reinterpret_cast< std::string * >(argp1);
result = (UException *)new UException((std::string const &)*arg1);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_UException, SWIG_POINTER_NEW | 0 );
return resultobj;
fail:
......@@ -3919,7 +3892,7 @@ fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_UException'.\n"
" Possible C/C++ prototypes are:\n"
" UException::UException()\n"
" UException::UException(std::string const)\n"
" UException::UException(std::string const &)\n"
" UException::UException(char const *)\n");
return 0;
}
......@@ -4050,27 +4023,22 @@ fail:
SWIGINTERN PyObject *_wrap_new_UTimeOut__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
std::string arg1 ;
void *argp1 ;
std::string *arg1 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
UTimeOut *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:new_UTimeOut",&obj0)) SWIG_fail;
{
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0);
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) {
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;
}
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UTimeOut" "', argument " "1"" of type '" "std::string const &""'");
}
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 );
return resultobj;
fail:
......@@ -4104,7 +4072,7 @@ fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_UTimeOut'.\n"
" Possible C/C++ prototypes are:\n"
" UTimeOut::UTimeOut()\n"
" UTimeOut::UTimeOut(std::string const)\n");
" UTimeOut::UTimeOut(std::string const &)\n");
return 0;
}
......@@ -4152,27 +4120,22 @@ fail:
SWIGINTERN PyObject *_wrap_new_USysError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
std::string arg1 ;
void *argp1 ;
std::string *arg1 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
USysError *result = 0 ;
if (!PyArg_ParseTuple(args,(char *)"O:new_USysError",&obj0)) SWIG_fail;
{
res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__string, 0 | 0);
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) {
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;
}
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_USysError" "', argument " "1"" of type '" "std::string const &""'");
}
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 );
return resultobj;
fail:
......@@ -4206,7 +4169,7 @@ fail:
SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_USysError'.\n"
" Possible C/C++ prototypes are:\n"
" USysError::USysError()\n"
" USysError::USysError(std::string const)\n");
" USysError::USysError(std::string const &)\n");
return 0;
}
......@@ -4341,7 +4304,7 @@ static swig_const_info swig_const_table[] = {
* array with the correct data and linking the correct swig_cast_info
* 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.
* 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
......@@ -4386,7 +4349,6 @@ SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
int found, init;
(void *)clientdata;
/* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) {
......@@ -4425,7 +4387,7 @@ SWIG_InitializeModule(void *clientdata) {
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.
In this case, we do not want to continue adding types... everything should be
set up already */
......@@ -4672,7 +4634,7 @@ extern "C" {
var = var->next;
}
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;
}
......@@ -4689,7 +4651,7 @@ extern "C" {
var = var->next;
}
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;
}
......
/* ----------------------------------------------------------------------------
* 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
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -146,8 +146,14 @@ template <typename T> T SwigValueInit() {
/* Python.h has to appear first */
#include <Python.h>
#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#endif
/* -----------------------------------------------------------------------------
* swigrun.swg
......@@ -319,7 +325,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
# define SWIG_AddCast
# define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif
......@@ -383,18 +389,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/*
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
SWIG_TypeEquiv(const char *nb, const char *tb) {
int equiv = 0;
SWIG_TypeCmp(const char *nb, const char *tb) {
int equiv = 1;
const char* te = tb + strlen(tb);
const char* ne = nb;
while (!equiv && *ne) {
while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) {
if (*ne == '|') break;
}
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne;
}
return equiv;
......@@ -402,24 +408,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
/*
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
SWIG_TypeCompare(const char *nb, const char *tb) {
int equiv = 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;
SWIG_TypeEquiv(const char *nb, const char *tb) {
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}
/*
Check the typename
*/
......@@ -566,14 +561,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start,
swig_module_info *iter = start;
do {
if (iter->size) {
register size_t l = 0;
register size_t r = iter->size - 1;
size_t l = 0;
size_t r = iter->size - 1;
do {
/* 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;
if (iname) {
register int compare = strcmp(name, iname);
int compare = strcmp(name, iname);
if (compare == 0) {
return iter->types[i];
} else if (compare < 0) {
......@@ -617,7 +612,7 @@ SWIG_TypeQueryModule(swig_module_info *start,
of the str field (the human readable name) */
swig_module_info *iter = start;
do {
register size_t i = 0;
size_t i = 0;
for (; i < iter->size; ++i) {
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
return iter->types[i];
......@@ -636,10 +631,10 @@ SWIG_TypeQueryModule(swig_module_info *start,
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
static const char hex[17] = "0123456789abcdef";
register const unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz;
const unsigned char *u = (unsigned char *) ptr;
const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
register unsigned char uu = *u;
unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf];
}
......@@ -651,11 +646,11 @@ SWIG_PackData(char *c, void *ptr, size_t sz) {
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
register unsigned char *u = (unsigned char *) ptr;
register const unsigned char *eu = u + sz;
unsigned char *u = (unsigned char *) ptr;
const unsigned char *eu = u + sz;
for (; u != eu; ++u) {
register char d = *(c++);
register unsigned char uu;
char d = *(c++);
unsigned char uu;
if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f'))
......@@ -927,6 +922,10 @@ static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
}
#endif
#if PY_VERSION_HEX < 0x02050000
#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
#endif
#if PY_VERSION_HEX < 0x02040000
#define Py_VISIT(op) \
do { \
......@@ -1198,7 +1197,7 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
/* 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_NewClientData(obj) SwigPyClientData_New(obj)
......@@ -1328,7 +1327,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
}
if (!PyTuple_Check(args)) {
if (min <= 1 && max >= 1) {
register int i;
int i;
objs[0] = args;
for (i = 1; i < max; ++i) {
objs[i] = 0;
......@@ -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");
return 0;
} else {
register Py_ssize_t l = PyTuple_GET_SIZE(args);
Py_ssize_t l = PyTuple_GET_SIZE(args);
if (l < min) {
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
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
name, (min == max ? "" : "at most "), (int)max, (int)l);
return 0;
} else {
register int i;
int i;
for (i = 0; i < l; ++i) {
objs[i] = PyTuple_GET_ITEM(args, i);
}
......@@ -1602,34 +1601,6 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
}
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)
{
void *i = v->ptr;
......@@ -1821,7 +1792,7 @@ SwigPyObject_own(PyObject *v, PyObject *args)
static PyMethodDef
swigobject_methods[] = {
{(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 *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
......@@ -1914,7 +1885,7 @@ SwigPyObject_TypeOnce(void) {
sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */
(printfunc)SwigPyObject_print, /* tp_print */
0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else
......@@ -1932,7 +1903,7 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_as_mapping */
(hashfunc)0, /* tp_hash */
(ternaryfunc)0, /* tp_call */
(reprfunc)SwigPyObject_str, /* tp_str */
0, /* tp_str */
PyObject_GenericGetAttr, /* tp_getattro */
0, /* tp_setattro */
0, /* tp_as_buffer */
......@@ -2309,10 +2280,11 @@ SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
int res;
SwigPyObject *sobj;
int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
if (!obj)
return SWIG_ERROR;
if (obj == Py_None) {
if (obj == Py_None && !implicit_conv) {
if (ptr)
*ptr = 0;
return SWIG_OK;
......@@ -2361,7 +2333,7 @@ SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int
}
res = SWIG_OK;
} else {
if (flags & SWIG_POINTER_IMPLICIT_CONV) {
if (implicit_conv) {
SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
if (data && !data->implicitconv) {
PyObject *klass = data->klass;
......@@ -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;
}
......@@ -2483,7 +2462,7 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
}
} else {
#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) {
PyObject_SetAttr(inst, SWIG_This(), swig_this);
Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
......@@ -2637,7 +2616,7 @@ void *SWIG_ReturnGlobalTypeList(void *);
#endif
SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void) {
SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
static void *type_pointer = (void *)0;
/* first check if module already created */
if (!type_pointer) {
......@@ -2763,7 +2742,7 @@ SWIG_Python_TypeQuery(const char *type)
descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
#endif
} 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);
if (descriptor) {
#ifdef SWIGPY_USE_CAPSULE
......@@ -2895,7 +2874,7 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
PyObject *descr;
PyObject *encoded_name;
descrsetfunc f;
int res;
int res = -1;
# ifdef Py_USING_UNICODE
if (PyString_Check(name)) {
......@@ -2918,7 +2897,6 @@ SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
goto done;
}
res = -1;
descr = _PyType_Lookup(tp, name);
f = NULL;
if (descr != NULL)
......@@ -2988,7 +2966,7 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0};
#endif
#define SWIG_name "_pyUModbus"
#define SWIGVERSION 0x020008
#define SWIGVERSION 0x030000
#define SWIG_VERSION SWIGVERSION
......@@ -5141,7 +5119,7 @@ SWIGINTERN PyObject *_wrap_Params_argv_set(PyObject *SWIGUNUSEDPARM(self), PyObj
{
if (arg2) {
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 {
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[] = {
* array with the correct data and linking the correct swig_cast_info
* 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.
* 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
......@@ -5348,7 +5326,6 @@ SWIG_InitializeModule(void *clientdata) {
size_t i;
swig_module_info *module_head, *iter;
int found, init;
(void *)clientdata;
/* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) {
......@@ -5387,7 +5364,7 @@ SWIG_InitializeModule(void *clientdata) {
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.
In this case, we do not want to continue adding types... everything should be
set up already */
......@@ -5634,7 +5611,7 @@ extern "C" {
var = var->next;
}
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;
}
......@@ -5651,7 +5628,7 @@ extern "C" {
var = var->next;
}
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;
}
......
# 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
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
......
# 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
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
......
# 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
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
......
# 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
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
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