Commit 8e396a36 authored by Pavel Vainerman's avatar Pavel Vainerman

fix ping test, upgrade python wrapper

parent 44975e25
...@@ -50,7 +50,7 @@ namespace uniset ...@@ -50,7 +50,7 @@ namespace uniset
* \note Вызывается через system()! Это может быть опасно с точки зрения безопасности.. * \note Вызывается через system()! Это может быть опасно с точки зрения безопасности..
* \todo Возможно стоит написать свою реализацию ping * \todo Возможно стоит написать свою реализацию ping
*/ */
static bool ping( const std::string& _ip, timeout_t tout = 1000, const std::string& ping_argc = "-c 1 -w 0.1 -q -n" ) noexcept; static bool ping( const std::string& _ip, timeout_t tout = 1100, const std::string& ping_argc = "-c 1 -w 1 -q -n" ) noexcept;
}; };
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
} // end of uniset namespace } // end of uniset namespace
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.8 * Version 3.0.12
* *
* 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
...@@ -107,10 +107,12 @@ template <typename T> T SwigValueInit() { ...@@ -107,10 +107,12 @@ template <typename T> T SwigValueInit() {
#endif #endif
/* exporting methods */ /* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) #if defined(__GNUC__)
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# ifndef GCC_HASCLASSVISIBILITY # ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY
# endif # endif
# endif
#endif #endif
#ifndef SWIGEXPORT #ifndef SWIGEXPORT
...@@ -669,16 +671,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { ...@@ -669,16 +671,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
char d = *(c++); char d = *(c++);
unsigned char uu; unsigned char uu;
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4); uu = (unsigned char)((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
uu = ((d - ('a'-10)) << 4); uu = (unsigned char)((d - ('a'-10)) << 4);
else else
return (char *) 0; return (char *) 0;
d = *(c++); d = *(c++);
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu |= (d - '0'); uu |= (unsigned char)(d - '0');
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
uu |= (d - ('a'-10)); uu |= (unsigned char)(d - ('a'-10));
else else
return (char *) 0; return (char *) 0;
*u = uu; *u = uu;
...@@ -833,152 +835,21 @@ SWIG_Python_str_FromChar(const char *c) ...@@ -833,152 +835,21 @@ SWIG_Python_str_FromChar(const char *c)
#endif #endif
} }
/* Add PyOS_snprintf for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
# define PyOS_snprintf _snprintf
# else
# define PyOS_snprintf snprintf
# endif
#endif
/* A crude PyString_FromFormat implementation for old Pythons */
#if PY_VERSION_HEX < 0x02020000
#ifndef SWIG_PYBUFFER_SIZE
# define SWIG_PYBUFFER_SIZE 1024
#endif
static PyObject *
PyString_FromFormat(const char *fmt, ...) {
va_list ap;
char buf[SWIG_PYBUFFER_SIZE * 2];
int res;
va_start(ap, fmt);
res = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
}
#endif
/* Add PyObject_Del for old Pythons */
#if PY_VERSION_HEX < 0x01060000
# define PyObject_Del(op) PyMem_DEL((op))
#endif
#ifndef PyObject_DEL #ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del # define PyObject_DEL PyObject_Del
#endif #endif
/* A crude PyExc_StopIteration exception for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# ifndef PyExc_StopIteration
# define PyExc_StopIteration PyExc_RuntimeError
# endif
# ifndef PyObject_GenericGetAttr
# define PyObject_GenericGetAttr 0
# endif
#endif
/* Py_NotImplemented is defined in 2.1 and up. */
#if PY_VERSION_HEX < 0x02010000
# ifndef Py_NotImplemented
# define Py_NotImplemented PyExc_RuntimeError
# endif
#endif
/* A crude PyString_AsStringAndSize implementation for old Pythons */
#if PY_VERSION_HEX < 0x02010000
# ifndef PyString_AsStringAndSize
# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
# endif
#endif
/* PySequence_Size for old Pythons */
#if PY_VERSION_HEX < 0x02000000
# ifndef PySequence_Size
# define PySequence_Size PySequence_Length
# endif
#endif
/* PyBool_FromLong for old Pythons */
#if PY_VERSION_HEX < 0x02030000
static
PyObject *PyBool_FromLong(long ok)
{
PyObject *result = ok ? Py_True : Py_False;
Py_INCREF(result);
return result;
}
#endif
/* Py_ssize_t for old Pythons */
/* This code is as recommended by: */
/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
typedef inquiry lenfunc;
typedef intargfunc ssizeargfunc;
typedef intintargfunc ssizessizeargfunc;
typedef intobjargproc ssizeobjargproc;
typedef intintobjargproc ssizessizeobjargproc;
typedef getreadbufferproc readbufferproc;
typedef getwritebufferproc writebufferproc;
typedef getsegcountproc segcountproc;
typedef getcharbufferproc charbufferproc;
static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
{
long result = 0;
PyObject *i = PyNumber_Int(x);
if (i) {
result = PyInt_AsLong(i);
Py_DECREF(i);
}
return result;
}
#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 { \
if (op) { \
int vret = visit((op), arg); \
if (vret) \
return vret; \
} \
} while (0)
#endif
#if PY_VERSION_HEX < 0x02030000
typedef struct {
PyTypeObject type;
PyNumberMethods as_number;
PyMappingMethods as_mapping;
PySequenceMethods as_sequence;
PyBufferProcs as_buffer;
PyObject *name, *slots;
} PyHeapTypeObject;
#endif
#if PY_VERSION_HEX < 0x02030000
typedef destructor freefunc;
#endif
#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
(PY_MAJOR_VERSION > 3)) (PY_MAJOR_VERSION > 3))
# define SWIGPY_USE_CAPSULE # define SWIGPY_USE_CAPSULE
# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
#endif #endif
#if PY_VERSION_HEX < 0x03020000 #if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#define Py_hash_t long
#endif #endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
...@@ -1059,10 +930,8 @@ SWIG_Python_AddErrorMsg(const char* mesg) ...@@ -1059,10 +930,8 @@ SWIG_Python_AddErrorMsg(const char* mesg)
#endif #endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
# define SWIG_PYTHON_USE_GIL # define SWIG_PYTHON_USE_GIL
# endif # endif
# endif
# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
# ifndef SWIG_PYTHON_INITIALIZE_THREADS # ifndef SWIG_PYTHON_INITIALIZE_THREADS
# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
...@@ -1176,6 +1045,10 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), ...@@ -1176,6 +1045,10 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
* *
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
#if PY_VERSION_HEX < 0x02060000 /* 2.6.0 */
# error "This version of SWIG only supports Python >= 2.6"
#endif
/* Common SWIG API */ /* Common SWIG API */
/* for raw pointers */ /* for raw pointers */
...@@ -1259,11 +1132,7 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { ...@@ -1259,11 +1132,7 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
#if PY_VERSION_HEX < 0x02030000
PyDict_SetItemString(d, (char *)name, obj);
#else
PyDict_SetItemString(d, name, obj); PyDict_SetItemString(d, name, obj);
#endif
Py_DECREF(obj); Py_DECREF(obj);
if (public_interface) if (public_interface)
SwigPyBuiltin_AddPublicSymbol(public_interface, name); SwigPyBuiltin_AddPublicSymbol(public_interface, name);
...@@ -1273,11 +1142,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam ...@@ -1273,11 +1142,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
#if PY_VERSION_HEX < 0x02030000
PyDict_SetItemString(d, (char *)name, obj);
#else
PyDict_SetItemString(d, name, obj); PyDict_SetItemString(d, name, obj);
#endif
Py_DECREF(obj); Py_DECREF(obj);
} }
...@@ -1377,11 +1242,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1377,11 +1242,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
} }
/* A functor is a function object with one single object argument */ /* A functor is a function object with one single object argument */
#if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, (char*)"O", obj);
#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
#else
#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
#endif
/* /*
Helper for static pointer initialization for both C and C++ code, for example Helper for static pointer initialization for both C and C++ code, for example
...@@ -1427,7 +1288,7 @@ extern "C" { ...@@ -1427,7 +1288,7 @@ extern "C" {
SWIGRUNTIMEINLINE PyObject * SWIGRUNTIMEINLINE PyObject *
_SWIG_Py_None(void) _SWIG_Py_None(void)
{ {
PyObject *none = Py_BuildValue((char*)""); PyObject *none = Py_BuildValue("");
Py_DECREF(none); Py_DECREF(none);
return none; return none;
} }
...@@ -1492,11 +1353,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1492,11 +1353,7 @@ SwigPyClientData_New(PyObject* obj)
data->newargs = obj; data->newargs = obj;
Py_INCREF(obj); Py_INCREF(obj);
} else { } else {
#if (PY_VERSION_HEX < 0x02020000) data->newraw = PyObject_GetAttrString(data->klass, "__new__");
data->newraw = 0;
#else
data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
#endif
if (data->newraw) { if (data->newraw) {
Py_INCREF(data->newraw); Py_INCREF(data->newraw);
data->newargs = PyTuple_New(1); data->newargs = PyTuple_New(1);
...@@ -1507,7 +1364,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1507,7 +1364,7 @@ SwigPyClientData_New(PyObject* obj)
Py_INCREF(data->newargs); Py_INCREF(data->newargs);
} }
/* the destroy method, aka as the C++ delete method */ /* the destroy method, aka as the C++ delete method */
data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
PyErr_Clear(); PyErr_Clear();
data->destroy = 0; data->destroy = 0;
...@@ -1516,11 +1373,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1516,11 +1373,7 @@ SwigPyClientData_New(PyObject* obj)
int flags; int flags;
Py_INCREF(data->destroy); Py_INCREF(data->destroy);
flags = PyCFunction_GET_FLAGS(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy);
#ifdef METH_O
data->delargs = !(flags & (METH_O)); data->delargs = !(flags & (METH_O));
#else
data->delargs = 0;
#endif
} else { } else {
data->delargs = 0; data->delargs = 0;
} }
...@@ -1608,20 +1461,12 @@ SwigPyObject_hex(SwigPyObject *v) ...@@ -1608,20 +1461,12 @@ SwigPyObject_hex(SwigPyObject *v)
} }
SWIGRUNTIME PyObject * SWIGRUNTIME PyObject *
#ifdef METH_NOARGS
SwigPyObject_repr(SwigPyObject *v) SwigPyObject_repr(SwigPyObject *v)
#else
SwigPyObject_repr(SwigPyObject *v, PyObject *args)
#endif
{ {
const char *name = SWIG_TypePrettyName(v->ty); const char *name = SWIG_TypePrettyName(v->ty);
PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v); PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
if (v->next) { if (v->next) {
# ifdef METH_NOARGS
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
# else
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
# endif
# if PY_VERSION_HEX >= 0x03000000 # if PY_VERSION_HEX >= 0x03000000
PyObject *joined = PyUnicode_Concat(repr, nrep); PyObject *joined = PyUnicode_Concat(repr, nrep);
Py_DecRef(repr); Py_DecRef(repr);
...@@ -1634,6 +1479,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) ...@@ -1634,6 +1479,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
return repr; return repr;
} }
/* We need a version taking two PyObject* parameters so it's a valid
* PyCFunction to use in swigobject_methods[]. */
static PyObject *
SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
return SwigPyObject_repr((SwigPyObject*)v);
}
SWIGRUNTIME int SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{ {
...@@ -1748,11 +1601,6 @@ SWIGRUNTIME PyObject* ...@@ -1748,11 +1601,6 @@ SWIGRUNTIME PyObject*
SwigPyObject_append(PyObject* v, PyObject* next) SwigPyObject_append(PyObject* v, PyObject* next)
{ {
SwigPyObject *sobj = (SwigPyObject *) v; SwigPyObject *sobj = (SwigPyObject *) v;
#ifndef METH_O
PyObject *tmp = 0;
if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
next = tmp;
#endif
if (!SwigPyObject_Check(next)) { if (!SwigPyObject_Check(next)) {
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
return NULL; return NULL;
...@@ -1763,11 +1611,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) ...@@ -1763,11 +1611,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
} }
SWIGRUNTIME PyObject* SWIGRUNTIME PyObject*
#ifdef METH_NOARGS
SwigPyObject_next(PyObject* v)
#else
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *) v; SwigPyObject *sobj = (SwigPyObject *) v;
if (sobj->next) { if (sobj->next) {
...@@ -1779,11 +1623,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) ...@@ -1779,11 +1623,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
} }
SWIGINTERN PyObject* SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_disown(PyObject *v)
#else
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
sobj->own = 0; sobj->own = 0;
...@@ -1791,11 +1631,7 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) ...@@ -1791,11 +1631,7 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
} }
SWIGINTERN PyObject* SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_acquire(PyObject *v)
#else
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
sobj->own = SWIG_POINTER_OWN; sobj->own = SWIG_POINTER_OWN;
...@@ -1806,13 +1642,7 @@ SWIGINTERN PyObject* ...@@ -1806,13 +1642,7 @@ SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args) SwigPyObject_own(PyObject *v, PyObject *args)
{ {
PyObject *val = 0; PyObject *val = 0;
#if (PY_VERSION_HEX < 0x02020000)
if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
#elif (PY_VERSION_HEX < 0x02050000)
if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
#else
if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
#endif
{ {
return NULL; return NULL;
} }
...@@ -1821,55 +1651,26 @@ SwigPyObject_own(PyObject *v, PyObject *args) ...@@ -1821,55 +1651,26 @@ SwigPyObject_own(PyObject *v, PyObject *args)
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
PyObject *obj = PyBool_FromLong(sobj->own); PyObject *obj = PyBool_FromLong(sobj->own);
if (val) { if (val) {
#ifdef METH_NOARGS
if (PyObject_IsTrue(val)) {
SwigPyObject_acquire(v);
} else {
SwigPyObject_disown(v);
}
#else
if (PyObject_IsTrue(val)) { if (PyObject_IsTrue(val)) {
SwigPyObject_acquire(v,args); SwigPyObject_acquire(v,args);
} else { } else {
SwigPyObject_disown(v,args); SwigPyObject_disown(v,args);
} }
#endif
} }
return obj; return obj;
} }
} }
#ifdef METH_O
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 *)"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"},
{(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
{0, 0, 0, 0}
};
#else
static PyMethodDef static PyMethodDef
swigobject_methods[] = { swigobject_methods[] = {
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
{(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
{(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
{(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
{(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
#endif
#if PY_VERSION_HEX < 0x02020000
SWIGINTERN PyObject *
SwigPyObject_getattr(SwigPyObject *sobj,char *name)
{
return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
}
#endif
SWIGRUNTIME PyTypeObject* SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) { SwigPyObject_TypeOnce(void) {
...@@ -1914,12 +1715,8 @@ SwigPyObject_TypeOnce(void) { ...@@ -1914,12 +1715,8 @@ SwigPyObject_TypeOnce(void) {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ #else
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif #endif
}; };
...@@ -1927,23 +1724,18 @@ SwigPyObject_TypeOnce(void) { ...@@ -1927,23 +1724,18 @@ SwigPyObject_TypeOnce(void) {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
PyObject_HEAD_INIT(NULL) PyObject_HEAD_INIT(NULL)
0, /* ob_size */ 0, /* ob_size */
#endif #endif
(char *)"SwigPyObject", /* tp_name */ "SwigPyObject", /* tp_name */
sizeof(SwigPyObject), /* tp_basicsize */ sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */
0, /* tp_print */ 0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else
(getattrfunc)0, /* tp_getattr */ (getattrfunc)0, /* tp_getattr */
#endif
(setattrfunc)0, /* tp_setattr */ (setattrfunc)0, /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
...@@ -1966,7 +1758,6 @@ SwigPyObject_TypeOnce(void) { ...@@ -1966,7 +1758,6 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_clear */ 0, /* tp_clear */
(richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0, /* tp_iter */ 0, /* tp_iter */
0, /* tp_iternext */ 0, /* tp_iternext */
swigobject_methods, /* tp_methods */ swigobject_methods, /* tp_methods */
...@@ -1987,13 +1778,8 @@ SwigPyObject_TypeOnce(void) { ...@@ -1987,13 +1778,8 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_cache */ 0, /* tp_cache */
0, /* tp_subclasses */ 0, /* tp_subclasses */
0, /* tp_weaklist */ 0, /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -2001,20 +1787,14 @@ SwigPyObject_TypeOnce(void) { ...@@ -2001,20 +1787,14 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
swigpyobject_type = tmp; swigpyobject_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
swigpyobject_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&swigpyobject_type) < 0) if (PyType_Ready(&swigpyobject_type) < 0)
return NULL; return NULL;
#endif
} }
return &swigpyobject_type; return &swigpyobject_type;
} }
...@@ -2119,14 +1899,13 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2119,14 +1899,13 @@ SwigPyPacked_TypeOnce(void) {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
PyObject_HEAD_INIT(NULL) PyObject_HEAD_INIT(NULL)
0, /* ob_size */ 0, /* ob_size */
#endif #endif
(char *)"SwigPyPacked", /* tp_name */ "SwigPyPacked", /* tp_name */
sizeof(SwigPyPacked), /* tp_basicsize */ sizeof(SwigPyPacked), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
...@@ -2154,7 +1933,6 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2154,7 +1933,6 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0, /* tp_iter */ 0, /* tp_iter */
0, /* tp_iternext */ 0, /* tp_iternext */
0, /* tp_methods */ 0, /* tp_methods */
...@@ -2175,13 +1953,8 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2175,13 +1953,8 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_cache */ 0, /* tp_cache */
0, /* tp_subclasses */ 0, /* tp_subclasses */
0, /* tp_weaklist */ 0, /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -2189,20 +1962,14 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2189,20 +1962,14 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
swigpypacked_type = tmp; swigpypacked_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
swigpypacked_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&swigpypacked_type) < 0) if (PyType_Ready(&swigpypacked_type) < 0)
return NULL; return NULL;
#endif
} }
return &swigpypacked_type; return &swigpypacked_type;
} }
...@@ -2288,7 +2055,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) ...@@ -2288,7 +2055,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
obj = 0; obj = 0;
#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
if (PyInstance_Check(pyobj)) { if (PyInstance_Check(pyobj)) {
obj = _PyInstance_Lookup(pyobj, SWIG_This()); obj = _PyInstance_Lookup(pyobj, SWIG_This());
} else { } else {
...@@ -2510,7 +2277,6 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t ...@@ -2510,7 +2277,6 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t
SWIGRUNTIME PyObject* SWIGRUNTIME PyObject*
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{ {
#if (PY_VERSION_HEX >= 0x02020000)
PyObject *inst = 0; PyObject *inst = 0;
PyObject *newraw = data->newraw; PyObject *newraw = data->newraw;
if (newraw) { if (newraw) {
...@@ -2548,45 +2314,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) ...@@ -2548,45 +2314,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
#endif #endif
} }
return inst; return inst;
#else
#if (PY_VERSION_HEX >= 0x02010000)
PyObject *inst = 0;
PyObject *dict = PyDict_New();
if (dict) {
PyDict_SetItem(dict, SWIG_This(), swig_this);
inst = PyInstance_NewRaw(data->newargs, dict);
Py_DECREF(dict);
}
return (PyObject *) inst;
#else
PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
if (inst == NULL) {
return NULL;
}
inst->in_class = (PyClassObject *)data->newargs;
Py_INCREF(inst->in_class);
inst->in_dict = PyDict_New();
if (inst->in_dict == NULL) {
Py_DECREF(inst);
return NULL;
}
#ifdef Py_TPFLAGS_HAVE_WEAKREFS
inst->in_weakreflist = NULL;
#endif
#ifdef Py_TPFLAGS_GC
PyObject_GC_Init(inst);
#endif
PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
return (PyObject *) inst;
#endif
#endif
} }
SWIGRUNTIME void SWIGRUNTIME void
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{ {
PyObject *dict; PyObject *dict;
#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
PyObject **dictptr = _PyObject_GetDictPtr(inst); PyObject **dictptr = _PyObject_GetDictPtr(inst);
if (dictptr != NULL) { if (dictptr != NULL) {
dict = *dictptr; dict = *dictptr;
...@@ -2598,7 +2332,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) ...@@ -2598,7 +2332,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
return; return;
} }
#endif #endif
dict = PyObject_GetAttrString(inst, (char*)"__dict__"); dict = PyObject_GetAttrString(inst, "__dict__");
PyDict_SetItem(dict, SWIG_This(), swig_this); PyDict_SetItem(dict, SWIG_This(), swig_this);
Py_DECREF(dict); Py_DECREF(dict);
} }
...@@ -2700,8 +2434,8 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { ...@@ -2700,8 +2434,8 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
# ifdef SWIGPY_USE_CAPSULE # ifdef SWIGPY_USE_CAPSULE
type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
# else # else
type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, type_pointer = PyCObject_Import((char *)"swig_runtime_data" SWIG_RUNTIME_VERSION,
(char*)"type_pointer" SWIG_TYPE_TABLE_NAME); (char *)"type_pointer" SWIG_TYPE_TABLE_NAME);
# endif # endif
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
PyErr_Clear(); PyErr_Clear();
...@@ -2771,22 +2505,22 @@ SWIGRUNTIME void ...@@ -2771,22 +2505,22 @@ SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) { SWIG_Python_SetModule(swig_module_info *swig_module) {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
/* Add a dummy module object into sys.modules */ /* Add a dummy module object into sys.modules */
PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
#else #else
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
#endif #endif
#ifdef SWIGPY_USE_CAPSULE #ifdef SWIGPY_USE_CAPSULE
PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
if (pointer && module) { if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
} else { } else {
Py_XDECREF(pointer); Py_XDECREF(pointer);
} }
#else #else
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
if (pointer && module) { if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); PyModule_AddObject(module, "type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
} else { } else {
Py_XDECREF(pointer); Py_XDECREF(pointer);
} }
...@@ -3020,11 +2754,6 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0}; ...@@ -3020,11 +2754,6 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0};
/* -------- TYPES TABLE (END) -------- */ /* -------- TYPES TABLE (END) -------- */
#if (PY_VERSION_HEX <= 0x02000000)
# if !defined(SWIG_PYTHON_CLASSIC)
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
/*----------------------------------------------- /*-----------------------------------------------
@(target):= _pyUConnector.so @(target):= _pyUConnector.so
...@@ -3038,7 +2767,7 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0}; ...@@ -3038,7 +2767,7 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0};
#endif #endif
#define SWIG_name "_pyUConnector" #define SWIG_name "_pyUConnector"
#define SWIGVERSION 0x030008 #define SWIGVERSION 0x030012
#define SWIG_VERSION SWIGVERSION #define SWIG_VERSION SWIGVERSION
...@@ -3125,7 +2854,7 @@ namespace swig { ...@@ -3125,7 +2854,7 @@ namespace swig {
#include "UConnector.h" #include "UConnector.h"
#define SWIG_From_long PyLong_FromLong #define SWIG_From_long PyInt_FromLong
SWIGINTERNINLINE PyObject* SWIGINTERNINLINE PyObject*
...@@ -3152,13 +2881,18 @@ SWIGINTERN int ...@@ -3152,13 +2881,18 @@ SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{ {
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
if (PyBytes_Check(obj))
#else
if (PyUnicode_Check(obj)) if (PyUnicode_Check(obj))
#endif
#else #else
if (PyString_Check(obj)) if (PyString_Check(obj))
#endif #endif
{ {
char *cstr; Py_ssize_t len; char *cstr; Py_ssize_t len;
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
if (!alloc && cptr) { if (!alloc && cptr) {
/* We can't allow converting without allocation, since the internal /* We can't allow converting without allocation, since the internal
representation of string in Python 3 is UCS-2/UCS-4 but we require representation of string in Python 3 is UCS-2/UCS-4 but we require
...@@ -3167,8 +2901,9 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3167,8 +2901,9 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
return SWIG_RuntimeError; return SWIG_RuntimeError;
} }
obj = PyUnicode_AsUTF8String(obj); obj = PyUnicode_AsUTF8String(obj);
PyBytes_AsStringAndSize(obj, &cstr, &len);
if(alloc) *alloc = SWIG_NEWOBJ; if(alloc) *alloc = SWIG_NEWOBJ;
#endif
PyBytes_AsStringAndSize(obj, &cstr, &len);
#else #else
PyString_AsStringAndSize(obj, &cstr, &len); PyString_AsStringAndSize(obj, &cstr, &len);
#endif #endif
...@@ -3189,26 +2924,34 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3189,26 +2924,34 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
if (*alloc == SWIG_NEWOBJ) if (*alloc == SWIG_NEWOBJ)
#endif #endif
{ {
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ; *alloc = SWIG_NEWOBJ;
} else { } else {
*cptr = cstr; *cptr = cstr;
*alloc = SWIG_OLDOBJ; *alloc = SWIG_OLDOBJ;
} }
} else { } else {
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */ #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#endif *cptr = PyBytes_AsString(obj);
#else
assert(0); /* Should never reach here with Unicode strings in Python 3 */
#endif
#else
*cptr = SWIG_Python_str_AsChar(obj); *cptr = SWIG_Python_str_AsChar(obj);
#endif
} }
} }
if (psize) *psize = len + 1; if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
Py_XDECREF(obj); Py_XDECREF(obj);
#endif #endif
return SWIG_OK; return SWIG_OK;
} else { } else {
#if defined(SWIG_PYTHON_2_UNICODE) #if defined(SWIG_PYTHON_2_UNICODE)
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
#endif
#if PY_VERSION_HEX<0x03000000 #if PY_VERSION_HEX<0x03000000
if (PyUnicode_Check(obj)) { if (PyUnicode_Check(obj)) {
char *cstr; Py_ssize_t len; char *cstr; Py_ssize_t len;
...@@ -3219,7 +2962,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3219,7 +2962,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
if (cptr) { if (cptr) {
if (alloc) *alloc = SWIG_NEWOBJ; if (alloc) *alloc = SWIG_NEWOBJ;
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
} }
if (psize) *psize = len + 1; if (psize) *psize = len + 1;
...@@ -3307,7 +3050,7 @@ SWIG_AsVal_double (PyObject *obj, double *val) ...@@ -3307,7 +3050,7 @@ SWIG_AsVal_double (PyObject *obj, double *val)
return SWIG_OK; return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000 #if PY_VERSION_HEX < 0x03000000
} else if (PyInt_Check(obj)) { } else if (PyInt_Check(obj)) {
if (val) *val = PyInt_AsLong(obj); if (val) *val = (double) PyInt_AsLong(obj);
return SWIG_OK; return SWIG_OK;
#endif #endif
} else if (PyLong_Check(obj)) { } else if (PyLong_Check(obj)) {
...@@ -3491,7 +3234,7 @@ SWIGINTERNINLINE PyObject* ...@@ -3491,7 +3234,7 @@ SWIGINTERNINLINE PyObject*
SWIG_From_unsigned_SS_long (unsigned long value) SWIG_From_unsigned_SS_long (unsigned long value)
{ {
return (value > LONG_MAX) ? return (value > LONG_MAX) ?
PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value)); PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
} }
...@@ -3505,11 +3248,15 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) ...@@ -3505,11 +3248,15 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
} else { } else {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#else
#if PY_VERSION_HEX >= 0x03010000 #if PY_VERSION_HEX >= 0x03010000
return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#else #else
return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif #endif
#endif
#else #else
return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif #endif
...@@ -3784,7 +3531,7 @@ fail: ...@@ -3784,7 +3531,7 @@ fail:
SWIGINTERN PyObject *Params_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *Params_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UTypes__Params, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UTypes__Params, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -4085,7 +3832,7 @@ fail: ...@@ -4085,7 +3832,7 @@ fail:
SWIGINTERN PyObject *ShortIOInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *ShortIOInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UTypes__ShortIOInfo, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UTypes__ShortIOInfo, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -5278,53 +5025,53 @@ fail: ...@@ -5278,53 +5025,53 @@ fail:
SWIGINTERN PyObject *UConnector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *UConnector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UConnector, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UConnector, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
static PyMethodDef SwigMethods[] = { static PyMethodDef SwigMethods[] = {
{ (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
{ (char *)"new_Params", _wrap_new_Params, METH_VARARGS, NULL}, { "new_Params", _wrap_new_Params, METH_VARARGS, NULL},
{ (char *)"Params_add", _wrap_Params_add, METH_VARARGS, NULL}, { "Params_add", _wrap_Params_add, METH_VARARGS, NULL},
{ (char *)"Params_add_str", _wrap_Params_add_str, METH_VARARGS, NULL}, { "Params_add_str", _wrap_Params_add_str, METH_VARARGS, NULL},
{ (char *)"Params_argc_set", _wrap_Params_argc_set, METH_VARARGS, NULL}, { "Params_argc_set", _wrap_Params_argc_set, METH_VARARGS, NULL},
{ (char *)"Params_argc_get", _wrap_Params_argc_get, METH_VARARGS, NULL}, { "Params_argc_get", _wrap_Params_argc_get, METH_VARARGS, NULL},
{ (char *)"Params_argv_set", _wrap_Params_argv_set, METH_VARARGS, NULL}, { "Params_argv_set", _wrap_Params_argv_set, METH_VARARGS, NULL},
{ (char *)"Params_argv_get", _wrap_Params_argv_get, METH_VARARGS, NULL}, { "Params_argv_get", _wrap_Params_argv_get, METH_VARARGS, NULL},
{ (char *)"Params_inst", _wrap_Params_inst, METH_VARARGS, NULL}, { "Params_inst", _wrap_Params_inst, METH_VARARGS, NULL},
{ (char *)"delete_Params", _wrap_delete_Params, METH_VARARGS, NULL}, { "delete_Params", _wrap_delete_Params, METH_VARARGS, NULL},
{ (char *)"Params_swigregister", Params_swigregister, METH_VARARGS, NULL}, { "Params_swigregister", Params_swigregister, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_value_set", _wrap_ShortIOInfo_value_set, METH_VARARGS, NULL}, { "ShortIOInfo_value_set", _wrap_ShortIOInfo_value_set, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_value_get", _wrap_ShortIOInfo_value_get, METH_VARARGS, NULL}, { "ShortIOInfo_value_get", _wrap_ShortIOInfo_value_get, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_tv_sec_set", _wrap_ShortIOInfo_tv_sec_set, METH_VARARGS, NULL}, { "ShortIOInfo_tv_sec_set", _wrap_ShortIOInfo_tv_sec_set, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_tv_sec_get", _wrap_ShortIOInfo_tv_sec_get, METH_VARARGS, NULL}, { "ShortIOInfo_tv_sec_get", _wrap_ShortIOInfo_tv_sec_get, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_tv_nsec_set", _wrap_ShortIOInfo_tv_nsec_set, METH_VARARGS, NULL}, { "ShortIOInfo_tv_nsec_set", _wrap_ShortIOInfo_tv_nsec_set, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_tv_nsec_get", _wrap_ShortIOInfo_tv_nsec_get, METH_VARARGS, NULL}, { "ShortIOInfo_tv_nsec_get", _wrap_ShortIOInfo_tv_nsec_get, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_supplier_set", _wrap_ShortIOInfo_supplier_set, METH_VARARGS, NULL}, { "ShortIOInfo_supplier_set", _wrap_ShortIOInfo_supplier_set, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_supplier_get", _wrap_ShortIOInfo_supplier_get, METH_VARARGS, NULL}, { "ShortIOInfo_supplier_get", _wrap_ShortIOInfo_supplier_get, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_supplier_node_set", _wrap_ShortIOInfo_supplier_node_set, METH_VARARGS, NULL}, { "ShortIOInfo_supplier_node_set", _wrap_ShortIOInfo_supplier_node_set, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_supplier_node_get", _wrap_ShortIOInfo_supplier_node_get, METH_VARARGS, NULL}, { "ShortIOInfo_supplier_node_get", _wrap_ShortIOInfo_supplier_node_get, METH_VARARGS, NULL},
{ (char *)"new_ShortIOInfo", _wrap_new_ShortIOInfo, METH_VARARGS, NULL}, { "new_ShortIOInfo", _wrap_new_ShortIOInfo, METH_VARARGS, NULL},
{ (char *)"delete_ShortIOInfo", _wrap_delete_ShortIOInfo, METH_VARARGS, NULL}, { "delete_ShortIOInfo", _wrap_delete_ShortIOInfo, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_swigregister", ShortIOInfo_swigregister, METH_VARARGS, NULL}, { "ShortIOInfo_swigregister", ShortIOInfo_swigregister, METH_VARARGS, NULL},
{ (char *)"new_UConnector", _wrap_new_UConnector, METH_VARARGS, NULL}, { "new_UConnector", _wrap_new_UConnector, METH_VARARGS, NULL},
{ (char *)"delete_UConnector", _wrap_delete_UConnector, METH_VARARGS, NULL}, { "delete_UConnector", _wrap_delete_UConnector, METH_VARARGS, NULL},
{ (char *)"UConnector_getUIType", _wrap_UConnector_getUIType, METH_VARARGS, NULL}, { "UConnector_getUIType", _wrap_UConnector_getUIType, METH_VARARGS, NULL},
{ (char *)"UConnector_getConfFileName", _wrap_UConnector_getConfFileName, METH_VARARGS, NULL}, { "UConnector_getConfFileName", _wrap_UConnector_getConfFileName, METH_VARARGS, NULL},
{ (char *)"UConnector_getValue", _wrap_UConnector_getValue, METH_VARARGS, NULL}, { "UConnector_getValue", _wrap_UConnector_getValue, METH_VARARGS, NULL},
{ (char *)"UConnector_setValue", _wrap_UConnector_setValue, METH_VARARGS, NULL}, { "UConnector_setValue", _wrap_UConnector_setValue, METH_VARARGS, NULL},
{ (char *)"UConnector_getTimeChange", _wrap_UConnector_getTimeChange, METH_VARARGS, NULL}, { "UConnector_getTimeChange", _wrap_UConnector_getTimeChange, METH_VARARGS, NULL},
{ (char *)"UConnector_getSensorID", _wrap_UConnector_getSensorID, METH_VARARGS, NULL}, { "UConnector_getSensorID", _wrap_UConnector_getSensorID, METH_VARARGS, NULL},
{ (char *)"UConnector_getNodeID", _wrap_UConnector_getNodeID, METH_VARARGS, NULL}, { "UConnector_getNodeID", _wrap_UConnector_getNodeID, METH_VARARGS, NULL},
{ (char *)"UConnector_getObjectID", _wrap_UConnector_getObjectID, METH_VARARGS, NULL}, { "UConnector_getObjectID", _wrap_UConnector_getObjectID, METH_VARARGS, NULL},
{ (char *)"UConnector_getShortName", _wrap_UConnector_getShortName, METH_VARARGS, NULL}, { "UConnector_getShortName", _wrap_UConnector_getShortName, METH_VARARGS, NULL},
{ (char *)"UConnector_getName", _wrap_UConnector_getName, METH_VARARGS, NULL}, { "UConnector_getName", _wrap_UConnector_getName, METH_VARARGS, NULL},
{ (char *)"UConnector_getTextName", _wrap_UConnector_getTextName, METH_VARARGS, NULL}, { "UConnector_getTextName", _wrap_UConnector_getTextName, METH_VARARGS, NULL},
{ (char *)"UConnector_getObjectInfo", _wrap_UConnector_getObjectInfo, METH_VARARGS, NULL}, { "UConnector_getObjectInfo", _wrap_UConnector_getObjectInfo, METH_VARARGS, NULL},
{ (char *)"UConnector_apiRequest", _wrap_UConnector_apiRequest, METH_VARARGS, NULL}, { "UConnector_apiRequest", _wrap_UConnector_apiRequest, METH_VARARGS, NULL},
{ (char *)"UConnector_activate_objects", _wrap_UConnector_activate_objects, METH_VARARGS, NULL}, { "UConnector_activate_objects", _wrap_UConnector_activate_objects, METH_VARARGS, NULL},
{ (char *)"UConnector_swigregister", UConnector_swigregister, METH_VARARGS, NULL}, { "UConnector_swigregister", UConnector_swigregister, METH_VARARGS, NULL},
{ NULL, NULL, 0, NULL } { NULL, NULL, 0, NULL }
}; };
...@@ -5740,7 +5487,6 @@ extern "C" { ...@@ -5740,7 +5487,6 @@ extern "C" {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
...@@ -5771,15 +5517,9 @@ extern "C" { ...@@ -5771,15 +5517,9 @@ extern "C" {
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -5787,20 +5527,14 @@ extern "C" { ...@@ -5787,20 +5527,14 @@ extern "C" {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
varlink_type = tmp; varlink_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
varlink_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&varlink_type) < 0) if (PyType_Ready(&varlink_type) < 0)
return NULL; return NULL;
#endif
} }
return &varlink_type; return &varlink_type;
} }
...@@ -5902,9 +5636,9 @@ extern "C" { ...@@ -5902,9 +5636,9 @@ extern "C" {
char *ndoc = (char*)malloc(ldoc + lptr + 10); char *ndoc = (char*)malloc(ldoc + lptr + 10);
if (ndoc) { if (ndoc) {
char *buff = ndoc; char *buff = ndoc;
strncpy(buff, methods[i].ml_doc, ldoc); memcpy(buff, methods[i].ml_doc, ldoc);
buff += ldoc; buff += ldoc;
strncpy(buff, "swig_ptr: ", 10); memcpy(buff, "swig_ptr: ", 10);
buff += 10; buff += 10;
SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
methods[i].ml_doc = ndoc; methods[i].ml_doc = ndoc;
...@@ -5966,19 +5700,19 @@ SWIG_init(void) { ...@@ -5966,19 +5700,19 @@ SWIG_init(void) {
(char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
}; };
static SwigPyGetSet thisown_getset_closure = { static SwigPyGetSet thisown_getset_closure = {
(PyCFunction) SwigPyObject_own, SwigPyObject_own,
(PyCFunction) SwigPyObject_own SwigPyObject_own
}; };
static PyGetSetDef thisown_getset_def = { static PyGetSetDef thisown_getset_def = {
(char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
}; };
PyObject *metatype_args;
PyTypeObject *builtin_pytype; PyTypeObject *builtin_pytype;
int builtin_base_count; int builtin_base_count;
swig_type_info *builtin_basetype; swig_type_info *builtin_basetype;
PyObject *tuple; PyObject *tuple;
PyGetSetDescrObject *static_getset; PyGetSetDescrObject *static_getset;
PyTypeObject *metatype; PyTypeObject *metatype;
PyTypeObject *swigpyobject;
SwigPyClientData *cd; SwigPyClientData *cd;
PyObject *public_interface, *public_symbol; PyObject *public_interface, *public_symbol;
PyObject *this_descr; PyObject *this_descr;
...@@ -5993,14 +5727,9 @@ SWIG_init(void) { ...@@ -5993,14 +5727,9 @@ SWIG_init(void) {
(void)static_getset; (void)static_getset;
(void)self; (void)self;
/* metatype is used to implement static member variables. */ /* Metaclass is used to implement static member variables */
metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); metatype = SwigPyObjectType();
assert(metatype_args);
metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
assert(metatype); assert(metatype);
Py_DECREF(metatype_args);
metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
assert(PyType_Ready(metatype) >= 0);
#endif #endif
/* Fix SwigMethods to carry the callback ptrs when needed */ /* Fix SwigMethods to carry the callback ptrs when needed */
...@@ -6018,13 +5747,15 @@ SWIG_init(void) { ...@@ -6018,13 +5747,15 @@ SWIG_init(void) {
SWIG_InitializeModule(0); SWIG_InitializeModule(0);
#ifdef SWIGPYTHON_BUILTIN #ifdef SWIGPYTHON_BUILTIN
swigpyobject = SwigPyObject_TypeOnce();
SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
assert(SwigPyObject_stype); assert(SwigPyObject_stype);
cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
if (!cd) { if (!cd) {
SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); SwigPyObject_clientdata.pytype = swigpyobject;
} else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
# if PY_VERSION_HEX >= 0x03000000 # if PY_VERSION_HEX >= 0x03000000
return NULL; return NULL;
...@@ -6055,9 +5786,9 @@ SWIG_init(void) { ...@@ -6055,9 +5786,9 @@ SWIG_init(void) {
SWIG_InstallConstants(d,swig_const_table); SWIG_InstallConstants(d,swig_const_table);
PyDict_SetItemString(md,(char*)"cvar", SWIG_globals()); PyDict_SetItemString(md,(char *)"cvar", SWIG_globals());
SWIG_addvarlink(SWIG_globals(),(char*)"DefaultID",Swig_var_DefaultID_get, Swig_var_DefaultID_set); SWIG_addvarlink(SWIG_globals(),(char *)"DefaultID",Swig_var_DefaultID_get, Swig_var_DefaultID_set);
SWIG_addvarlink(SWIG_globals(),(char*)"DefaultSupplerID",Swig_var_DefaultSupplerID_get, Swig_var_DefaultSupplerID_set); SWIG_addvarlink(SWIG_globals(),(char *)"DefaultSupplerID",Swig_var_DefaultSupplerID_get, Swig_var_DefaultSupplerID_set);
SWIG_Python_SetConstant(d, "Params_max",SWIG_From_int(static_cast< int >(UTypes::Params::max))); SWIG_Python_SetConstant(d, "Params_max",SWIG_From_int(static_cast< int >(UTypes::Params::max)));
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
return m; return m;
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.8 * Version 3.0.12
* *
* 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
...@@ -107,10 +107,12 @@ template <typename T> T SwigValueInit() { ...@@ -107,10 +107,12 @@ template <typename T> T SwigValueInit() {
#endif #endif
/* exporting methods */ /* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) #if defined(__GNUC__)
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# ifndef GCC_HASCLASSVISIBILITY # ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY
# endif # endif
# endif
#endif #endif
#ifndef SWIGEXPORT #ifndef SWIGEXPORT
...@@ -669,16 +671,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { ...@@ -669,16 +671,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
char d = *(c++); char d = *(c++);
unsigned char uu; unsigned char uu;
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4); uu = (unsigned char)((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
uu = ((d - ('a'-10)) << 4); uu = (unsigned char)((d - ('a'-10)) << 4);
else else
return (char *) 0; return (char *) 0;
d = *(c++); d = *(c++);
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu |= (d - '0'); uu |= (unsigned char)(d - '0');
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
uu |= (d - ('a'-10)); uu |= (unsigned char)(d - ('a'-10));
else else
return (char *) 0; return (char *) 0;
*u = uu; *u = uu;
...@@ -833,152 +835,21 @@ SWIG_Python_str_FromChar(const char *c) ...@@ -833,152 +835,21 @@ SWIG_Python_str_FromChar(const char *c)
#endif #endif
} }
/* Add PyOS_snprintf for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
# define PyOS_snprintf _snprintf
# else
# define PyOS_snprintf snprintf
# endif
#endif
/* A crude PyString_FromFormat implementation for old Pythons */
#if PY_VERSION_HEX < 0x02020000
#ifndef SWIG_PYBUFFER_SIZE
# define SWIG_PYBUFFER_SIZE 1024
#endif
static PyObject *
PyString_FromFormat(const char *fmt, ...) {
va_list ap;
char buf[SWIG_PYBUFFER_SIZE * 2];
int res;
va_start(ap, fmt);
res = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
}
#endif
/* Add PyObject_Del for old Pythons */
#if PY_VERSION_HEX < 0x01060000
# define PyObject_Del(op) PyMem_DEL((op))
#endif
#ifndef PyObject_DEL #ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del # define PyObject_DEL PyObject_Del
#endif #endif
/* A crude PyExc_StopIteration exception for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# ifndef PyExc_StopIteration
# define PyExc_StopIteration PyExc_RuntimeError
# endif
# ifndef PyObject_GenericGetAttr
# define PyObject_GenericGetAttr 0
# endif
#endif
/* Py_NotImplemented is defined in 2.1 and up. */
#if PY_VERSION_HEX < 0x02010000
# ifndef Py_NotImplemented
# define Py_NotImplemented PyExc_RuntimeError
# endif
#endif
/* A crude PyString_AsStringAndSize implementation for old Pythons */
#if PY_VERSION_HEX < 0x02010000
# ifndef PyString_AsStringAndSize
# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
# endif
#endif
/* PySequence_Size for old Pythons */
#if PY_VERSION_HEX < 0x02000000
# ifndef PySequence_Size
# define PySequence_Size PySequence_Length
# endif
#endif
/* PyBool_FromLong for old Pythons */
#if PY_VERSION_HEX < 0x02030000
static
PyObject *PyBool_FromLong(long ok)
{
PyObject *result = ok ? Py_True : Py_False;
Py_INCREF(result);
return result;
}
#endif
/* Py_ssize_t for old Pythons */
/* This code is as recommended by: */
/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
typedef inquiry lenfunc;
typedef intargfunc ssizeargfunc;
typedef intintargfunc ssizessizeargfunc;
typedef intobjargproc ssizeobjargproc;
typedef intintobjargproc ssizessizeobjargproc;
typedef getreadbufferproc readbufferproc;
typedef getwritebufferproc writebufferproc;
typedef getsegcountproc segcountproc;
typedef getcharbufferproc charbufferproc;
static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
{
long result = 0;
PyObject *i = PyNumber_Int(x);
if (i) {
result = PyInt_AsLong(i);
Py_DECREF(i);
}
return result;
}
#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 { \
if (op) { \
int vret = visit((op), arg); \
if (vret) \
return vret; \
} \
} while (0)
#endif
#if PY_VERSION_HEX < 0x02030000
typedef struct {
PyTypeObject type;
PyNumberMethods as_number;
PyMappingMethods as_mapping;
PySequenceMethods as_sequence;
PyBufferProcs as_buffer;
PyObject *name, *slots;
} PyHeapTypeObject;
#endif
#if PY_VERSION_HEX < 0x02030000
typedef destructor freefunc;
#endif
#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
(PY_MAJOR_VERSION > 3)) (PY_MAJOR_VERSION > 3))
# define SWIGPY_USE_CAPSULE # define SWIGPY_USE_CAPSULE
# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
#endif #endif
#if PY_VERSION_HEX < 0x03020000 #if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#define Py_hash_t long
#endif #endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
...@@ -1059,10 +930,8 @@ SWIG_Python_AddErrorMsg(const char* mesg) ...@@ -1059,10 +930,8 @@ SWIG_Python_AddErrorMsg(const char* mesg)
#endif #endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
# define SWIG_PYTHON_USE_GIL # define SWIG_PYTHON_USE_GIL
# endif # endif
# endif
# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
# ifndef SWIG_PYTHON_INITIALIZE_THREADS # ifndef SWIG_PYTHON_INITIALIZE_THREADS
# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
...@@ -1176,6 +1045,10 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), ...@@ -1176,6 +1045,10 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
* *
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
#if PY_VERSION_HEX < 0x02060000 /* 2.6.0 */
# error "This version of SWIG only supports Python >= 2.6"
#endif
/* Common SWIG API */ /* Common SWIG API */
/* for raw pointers */ /* for raw pointers */
...@@ -1259,11 +1132,7 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { ...@@ -1259,11 +1132,7 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
#if PY_VERSION_HEX < 0x02030000
PyDict_SetItemString(d, (char *)name, obj);
#else
PyDict_SetItemString(d, name, obj); PyDict_SetItemString(d, name, obj);
#endif
Py_DECREF(obj); Py_DECREF(obj);
if (public_interface) if (public_interface)
SwigPyBuiltin_AddPublicSymbol(public_interface, name); SwigPyBuiltin_AddPublicSymbol(public_interface, name);
...@@ -1273,11 +1142,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam ...@@ -1273,11 +1142,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
#if PY_VERSION_HEX < 0x02030000
PyDict_SetItemString(d, (char *)name, obj);
#else
PyDict_SetItemString(d, name, obj); PyDict_SetItemString(d, name, obj);
#endif
Py_DECREF(obj); Py_DECREF(obj);
} }
...@@ -1377,11 +1242,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1377,11 +1242,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
} }
/* A functor is a function object with one single object argument */ /* A functor is a function object with one single object argument */
#if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, (char*)"O", obj);
#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
#else
#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
#endif
/* /*
Helper for static pointer initialization for both C and C++ code, for example Helper for static pointer initialization for both C and C++ code, for example
...@@ -1427,7 +1288,7 @@ extern "C" { ...@@ -1427,7 +1288,7 @@ extern "C" {
SWIGRUNTIMEINLINE PyObject * SWIGRUNTIMEINLINE PyObject *
_SWIG_Py_None(void) _SWIG_Py_None(void)
{ {
PyObject *none = Py_BuildValue((char*)""); PyObject *none = Py_BuildValue("");
Py_DECREF(none); Py_DECREF(none);
return none; return none;
} }
...@@ -1492,11 +1353,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1492,11 +1353,7 @@ SwigPyClientData_New(PyObject* obj)
data->newargs = obj; data->newargs = obj;
Py_INCREF(obj); Py_INCREF(obj);
} else { } else {
#if (PY_VERSION_HEX < 0x02020000) data->newraw = PyObject_GetAttrString(data->klass, "__new__");
data->newraw = 0;
#else
data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
#endif
if (data->newraw) { if (data->newraw) {
Py_INCREF(data->newraw); Py_INCREF(data->newraw);
data->newargs = PyTuple_New(1); data->newargs = PyTuple_New(1);
...@@ -1507,7 +1364,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1507,7 +1364,7 @@ SwigPyClientData_New(PyObject* obj)
Py_INCREF(data->newargs); Py_INCREF(data->newargs);
} }
/* the destroy method, aka as the C++ delete method */ /* the destroy method, aka as the C++ delete method */
data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
PyErr_Clear(); PyErr_Clear();
data->destroy = 0; data->destroy = 0;
...@@ -1516,11 +1373,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1516,11 +1373,7 @@ SwigPyClientData_New(PyObject* obj)
int flags; int flags;
Py_INCREF(data->destroy); Py_INCREF(data->destroy);
flags = PyCFunction_GET_FLAGS(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy);
#ifdef METH_O
data->delargs = !(flags & (METH_O)); data->delargs = !(flags & (METH_O));
#else
data->delargs = 0;
#endif
} else { } else {
data->delargs = 0; data->delargs = 0;
} }
...@@ -1608,20 +1461,12 @@ SwigPyObject_hex(SwigPyObject *v) ...@@ -1608,20 +1461,12 @@ SwigPyObject_hex(SwigPyObject *v)
} }
SWIGRUNTIME PyObject * SWIGRUNTIME PyObject *
#ifdef METH_NOARGS
SwigPyObject_repr(SwigPyObject *v) SwigPyObject_repr(SwigPyObject *v)
#else
SwigPyObject_repr(SwigPyObject *v, PyObject *args)
#endif
{ {
const char *name = SWIG_TypePrettyName(v->ty); const char *name = SWIG_TypePrettyName(v->ty);
PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v); PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
if (v->next) { if (v->next) {
# ifdef METH_NOARGS
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
# else
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
# endif
# if PY_VERSION_HEX >= 0x03000000 # if PY_VERSION_HEX >= 0x03000000
PyObject *joined = PyUnicode_Concat(repr, nrep); PyObject *joined = PyUnicode_Concat(repr, nrep);
Py_DecRef(repr); Py_DecRef(repr);
...@@ -1634,6 +1479,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) ...@@ -1634,6 +1479,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
return repr; return repr;
} }
/* We need a version taking two PyObject* parameters so it's a valid
* PyCFunction to use in swigobject_methods[]. */
static PyObject *
SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
return SwigPyObject_repr((SwigPyObject*)v);
}
SWIGRUNTIME int SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{ {
...@@ -1748,11 +1601,6 @@ SWIGRUNTIME PyObject* ...@@ -1748,11 +1601,6 @@ SWIGRUNTIME PyObject*
SwigPyObject_append(PyObject* v, PyObject* next) SwigPyObject_append(PyObject* v, PyObject* next)
{ {
SwigPyObject *sobj = (SwigPyObject *) v; SwigPyObject *sobj = (SwigPyObject *) v;
#ifndef METH_O
PyObject *tmp = 0;
if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
next = tmp;
#endif
if (!SwigPyObject_Check(next)) { if (!SwigPyObject_Check(next)) {
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
return NULL; return NULL;
...@@ -1763,11 +1611,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) ...@@ -1763,11 +1611,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
} }
SWIGRUNTIME PyObject* SWIGRUNTIME PyObject*
#ifdef METH_NOARGS
SwigPyObject_next(PyObject* v)
#else
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *) v; SwigPyObject *sobj = (SwigPyObject *) v;
if (sobj->next) { if (sobj->next) {
...@@ -1779,11 +1623,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) ...@@ -1779,11 +1623,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
} }
SWIGINTERN PyObject* SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_disown(PyObject *v)
#else
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
sobj->own = 0; sobj->own = 0;
...@@ -1791,11 +1631,7 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) ...@@ -1791,11 +1631,7 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
} }
SWIGINTERN PyObject* SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_acquire(PyObject *v)
#else
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
sobj->own = SWIG_POINTER_OWN; sobj->own = SWIG_POINTER_OWN;
...@@ -1806,13 +1642,7 @@ SWIGINTERN PyObject* ...@@ -1806,13 +1642,7 @@ SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args) SwigPyObject_own(PyObject *v, PyObject *args)
{ {
PyObject *val = 0; PyObject *val = 0;
#if (PY_VERSION_HEX < 0x02020000)
if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
#elif (PY_VERSION_HEX < 0x02050000)
if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
#else
if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
#endif
{ {
return NULL; return NULL;
} }
...@@ -1821,55 +1651,26 @@ SwigPyObject_own(PyObject *v, PyObject *args) ...@@ -1821,55 +1651,26 @@ SwigPyObject_own(PyObject *v, PyObject *args)
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
PyObject *obj = PyBool_FromLong(sobj->own); PyObject *obj = PyBool_FromLong(sobj->own);
if (val) { if (val) {
#ifdef METH_NOARGS
if (PyObject_IsTrue(val)) {
SwigPyObject_acquire(v);
} else {
SwigPyObject_disown(v);
}
#else
if (PyObject_IsTrue(val)) { if (PyObject_IsTrue(val)) {
SwigPyObject_acquire(v,args); SwigPyObject_acquire(v,args);
} else { } else {
SwigPyObject_disown(v,args); SwigPyObject_disown(v,args);
} }
#endif
} }
return obj; return obj;
} }
} }
#ifdef METH_O
static PyMethodDef static PyMethodDef
swigobject_methods[] = { swigobject_methods[] = {
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
{(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
{(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
{(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
{(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
#else
static PyMethodDef
swigobject_methods[] = {
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
{(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (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_VARARGS, (char *)"appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
{(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
{0, 0, 0, 0}
};
#endif
#if PY_VERSION_HEX < 0x02020000
SWIGINTERN PyObject *
SwigPyObject_getattr(SwigPyObject *sobj,char *name)
{
return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
}
#endif
SWIGRUNTIME PyTypeObject* SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) { SwigPyObject_TypeOnce(void) {
...@@ -1914,12 +1715,8 @@ SwigPyObject_TypeOnce(void) { ...@@ -1914,12 +1715,8 @@ SwigPyObject_TypeOnce(void) {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ #else
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif #endif
}; };
...@@ -1927,23 +1724,18 @@ SwigPyObject_TypeOnce(void) { ...@@ -1927,23 +1724,18 @@ SwigPyObject_TypeOnce(void) {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
PyObject_HEAD_INIT(NULL) PyObject_HEAD_INIT(NULL)
0, /* ob_size */ 0, /* ob_size */
#endif #endif
(char *)"SwigPyObject", /* tp_name */ "SwigPyObject", /* tp_name */
sizeof(SwigPyObject), /* tp_basicsize */ sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */
0, /* tp_print */ 0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else
(getattrfunc)0, /* tp_getattr */ (getattrfunc)0, /* tp_getattr */
#endif
(setattrfunc)0, /* tp_setattr */ (setattrfunc)0, /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
...@@ -1966,7 +1758,6 @@ SwigPyObject_TypeOnce(void) { ...@@ -1966,7 +1758,6 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_clear */ 0, /* tp_clear */
(richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0, /* tp_iter */ 0, /* tp_iter */
0, /* tp_iternext */ 0, /* tp_iternext */
swigobject_methods, /* tp_methods */ swigobject_methods, /* tp_methods */
...@@ -1987,13 +1778,8 @@ SwigPyObject_TypeOnce(void) { ...@@ -1987,13 +1778,8 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_cache */ 0, /* tp_cache */
0, /* tp_subclasses */ 0, /* tp_subclasses */
0, /* tp_weaklist */ 0, /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -2001,20 +1787,14 @@ SwigPyObject_TypeOnce(void) { ...@@ -2001,20 +1787,14 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
swigpyobject_type = tmp; swigpyobject_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
swigpyobject_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&swigpyobject_type) < 0) if (PyType_Ready(&swigpyobject_type) < 0)
return NULL; return NULL;
#endif
} }
return &swigpyobject_type; return &swigpyobject_type;
} }
...@@ -2119,14 +1899,13 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2119,14 +1899,13 @@ SwigPyPacked_TypeOnce(void) {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
PyObject_HEAD_INIT(NULL) PyObject_HEAD_INIT(NULL)
0, /* ob_size */ 0, /* ob_size */
#endif #endif
(char *)"SwigPyPacked", /* tp_name */ "SwigPyPacked", /* tp_name */
sizeof(SwigPyPacked), /* tp_basicsize */ sizeof(SwigPyPacked), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
...@@ -2154,7 +1933,6 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2154,7 +1933,6 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0, /* tp_iter */ 0, /* tp_iter */
0, /* tp_iternext */ 0, /* tp_iternext */
0, /* tp_methods */ 0, /* tp_methods */
...@@ -2175,13 +1953,8 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2175,13 +1953,8 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_cache */ 0, /* tp_cache */
0, /* tp_subclasses */ 0, /* tp_subclasses */
0, /* tp_weaklist */ 0, /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -2189,20 +1962,14 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2189,20 +1962,14 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
swigpypacked_type = tmp; swigpypacked_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
swigpypacked_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&swigpypacked_type) < 0) if (PyType_Ready(&swigpypacked_type) < 0)
return NULL; return NULL;
#endif
} }
return &swigpypacked_type; return &swigpypacked_type;
} }
...@@ -2288,7 +2055,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) ...@@ -2288,7 +2055,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
obj = 0; obj = 0;
#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
if (PyInstance_Check(pyobj)) { if (PyInstance_Check(pyobj)) {
obj = _PyInstance_Lookup(pyobj, SWIG_This()); obj = _PyInstance_Lookup(pyobj, SWIG_This());
} else { } else {
...@@ -2510,7 +2277,6 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t ...@@ -2510,7 +2277,6 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t
SWIGRUNTIME PyObject* SWIGRUNTIME PyObject*
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{ {
#if (PY_VERSION_HEX >= 0x02020000)
PyObject *inst = 0; PyObject *inst = 0;
PyObject *newraw = data->newraw; PyObject *newraw = data->newraw;
if (newraw) { if (newraw) {
...@@ -2548,45 +2314,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) ...@@ -2548,45 +2314,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
#endif #endif
} }
return inst; return inst;
#else
#if (PY_VERSION_HEX >= 0x02010000)
PyObject *inst = 0;
PyObject *dict = PyDict_New();
if (dict) {
PyDict_SetItem(dict, SWIG_This(), swig_this);
inst = PyInstance_NewRaw(data->newargs, dict);
Py_DECREF(dict);
}
return (PyObject *) inst;
#else
PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
if (inst == NULL) {
return NULL;
}
inst->in_class = (PyClassObject *)data->newargs;
Py_INCREF(inst->in_class);
inst->in_dict = PyDict_New();
if (inst->in_dict == NULL) {
Py_DECREF(inst);
return NULL;
}
#ifdef Py_TPFLAGS_HAVE_WEAKREFS
inst->in_weakreflist = NULL;
#endif
#ifdef Py_TPFLAGS_GC
PyObject_GC_Init(inst);
#endif
PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
return (PyObject *) inst;
#endif
#endif
} }
SWIGRUNTIME void SWIGRUNTIME void
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{ {
PyObject *dict; PyObject *dict;
#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
PyObject **dictptr = _PyObject_GetDictPtr(inst); PyObject **dictptr = _PyObject_GetDictPtr(inst);
if (dictptr != NULL) { if (dictptr != NULL) {
dict = *dictptr; dict = *dictptr;
...@@ -2598,7 +2332,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) ...@@ -2598,7 +2332,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
return; return;
} }
#endif #endif
dict = PyObject_GetAttrString(inst, (char*)"__dict__"); dict = PyObject_GetAttrString(inst, "__dict__");
PyDict_SetItem(dict, SWIG_This(), swig_this); PyDict_SetItem(dict, SWIG_This(), swig_this);
Py_DECREF(dict); Py_DECREF(dict);
} }
...@@ -2700,8 +2434,8 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { ...@@ -2700,8 +2434,8 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
# ifdef SWIGPY_USE_CAPSULE # ifdef SWIGPY_USE_CAPSULE
type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
# else # else
type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, type_pointer = PyCObject_Import((char *)"swig_runtime_data" SWIG_RUNTIME_VERSION,
(char*)"type_pointer" SWIG_TYPE_TABLE_NAME); (char *)"type_pointer" SWIG_TYPE_TABLE_NAME);
# endif # endif
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
PyErr_Clear(); PyErr_Clear();
...@@ -2771,22 +2505,22 @@ SWIGRUNTIME void ...@@ -2771,22 +2505,22 @@ SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) { SWIG_Python_SetModule(swig_module_info *swig_module) {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
/* Add a dummy module object into sys.modules */ /* Add a dummy module object into sys.modules */
PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
#else #else
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
#endif #endif
#ifdef SWIGPY_USE_CAPSULE #ifdef SWIGPY_USE_CAPSULE
PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
if (pointer && module) { if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
} else { } else {
Py_XDECREF(pointer); Py_XDECREF(pointer);
} }
#else #else
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
if (pointer && module) { if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); PyModule_AddObject(module, "type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
} else { } else {
Py_XDECREF(pointer); Py_XDECREF(pointer);
} }
...@@ -3019,11 +2753,6 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0}; ...@@ -3019,11 +2753,6 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
/* -------- TYPES TABLE (END) -------- */ /* -------- TYPES TABLE (END) -------- */
#if (PY_VERSION_HEX <= 0x02000000)
# if !defined(SWIG_PYTHON_CLASSIC)
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
/*----------------------------------------------- /*-----------------------------------------------
@(target):= _pyUExceptions.so @(target):= _pyUExceptions.so
...@@ -3037,7 +2766,7 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0}; ...@@ -3037,7 +2766,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 0x030008 #define SWIGVERSION 0x030012
#define SWIG_VERSION SWIGVERSION #define SWIG_VERSION SWIGVERSION
...@@ -3141,13 +2870,18 @@ SWIGINTERN int ...@@ -3141,13 +2870,18 @@ SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{ {
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
if (PyBytes_Check(obj))
#else
if (PyUnicode_Check(obj)) if (PyUnicode_Check(obj))
#endif
#else #else
if (PyString_Check(obj)) if (PyString_Check(obj))
#endif #endif
{ {
char *cstr; Py_ssize_t len; char *cstr; Py_ssize_t len;
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
if (!alloc && cptr) { if (!alloc && cptr) {
/* We can't allow converting without allocation, since the internal /* We can't allow converting without allocation, since the internal
representation of string in Python 3 is UCS-2/UCS-4 but we require representation of string in Python 3 is UCS-2/UCS-4 but we require
...@@ -3156,8 +2890,9 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3156,8 +2890,9 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
return SWIG_RuntimeError; return SWIG_RuntimeError;
} }
obj = PyUnicode_AsUTF8String(obj); obj = PyUnicode_AsUTF8String(obj);
PyBytes_AsStringAndSize(obj, &cstr, &len);
if(alloc) *alloc = SWIG_NEWOBJ; if(alloc) *alloc = SWIG_NEWOBJ;
#endif
PyBytes_AsStringAndSize(obj, &cstr, &len);
#else #else
PyString_AsStringAndSize(obj, &cstr, &len); PyString_AsStringAndSize(obj, &cstr, &len);
#endif #endif
...@@ -3178,26 +2913,34 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3178,26 +2913,34 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
if (*alloc == SWIG_NEWOBJ) if (*alloc == SWIG_NEWOBJ)
#endif #endif
{ {
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ; *alloc = SWIG_NEWOBJ;
} else { } else {
*cptr = cstr; *cptr = cstr;
*alloc = SWIG_OLDOBJ; *alloc = SWIG_OLDOBJ;
} }
} else { } else {
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */ #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#endif *cptr = PyBytes_AsString(obj);
#else
assert(0); /* Should never reach here with Unicode strings in Python 3 */
#endif
#else
*cptr = SWIG_Python_str_AsChar(obj); *cptr = SWIG_Python_str_AsChar(obj);
#endif
} }
} }
if (psize) *psize = len + 1; if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
Py_XDECREF(obj); Py_XDECREF(obj);
#endif #endif
return SWIG_OK; return SWIG_OK;
} else { } else {
#if defined(SWIG_PYTHON_2_UNICODE) #if defined(SWIG_PYTHON_2_UNICODE)
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
#endif
#if PY_VERSION_HEX<0x03000000 #if PY_VERSION_HEX<0x03000000
if (PyUnicode_Check(obj)) { if (PyUnicode_Check(obj)) {
char *cstr; Py_ssize_t len; char *cstr; Py_ssize_t len;
...@@ -3208,7 +2951,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3208,7 +2951,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
if (cptr) { if (cptr) {
if (alloc) *alloc = SWIG_NEWOBJ; if (alloc) *alloc = SWIG_NEWOBJ;
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
} }
if (psize) *psize = len + 1; if (psize) *psize = len + 1;
...@@ -3280,11 +3023,15 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) ...@@ -3280,11 +3023,15 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
} else { } else {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#else
#if PY_VERSION_HEX >= 0x03010000 #if PY_VERSION_HEX >= 0x03010000
return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#else #else
return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif #endif
#endif
#else #else
return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif #endif
...@@ -3517,7 +3264,7 @@ fail: ...@@ -3517,7 +3264,7 @@ fail:
SWIGINTERN PyObject *UException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *UException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UException, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UException, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -3620,7 +3367,7 @@ fail: ...@@ -3620,7 +3367,7 @@ fail:
SWIGINTERN PyObject *UTimeOut_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *UTimeOut_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UTimeOut, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UTimeOut, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -3723,7 +3470,7 @@ fail: ...@@ -3723,7 +3470,7 @@ fail:
SWIGINTERN PyObject *USysError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *USysError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_USysError, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_USysError, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -3826,28 +3573,28 @@ fail: ...@@ -3826,28 +3573,28 @@ fail:
SWIGINTERN PyObject *UValidateError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *UValidateError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UValidateError, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UValidateError, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
static PyMethodDef SwigMethods[] = { static PyMethodDef SwigMethods[] = {
{ (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
{ (char *)"new_UException", _wrap_new_UException, METH_VARARGS, NULL}, { "new_UException", _wrap_new_UException, METH_VARARGS, NULL},
{ (char *)"delete_UException", _wrap_delete_UException, METH_VARARGS, NULL}, { "delete_UException", _wrap_delete_UException, METH_VARARGS, NULL},
{ (char *)"UException_getError", _wrap_UException_getError, METH_VARARGS, NULL}, { "UException_getError", _wrap_UException_getError, METH_VARARGS, NULL},
{ (char *)"UException_err_set", _wrap_UException_err_set, METH_VARARGS, NULL}, { "UException_err_set", _wrap_UException_err_set, METH_VARARGS, NULL},
{ (char *)"UException_err_get", _wrap_UException_err_get, METH_VARARGS, NULL}, { "UException_err_get", _wrap_UException_err_get, METH_VARARGS, NULL},
{ (char *)"UException_swigregister", UException_swigregister, METH_VARARGS, NULL}, { "UException_swigregister", UException_swigregister, METH_VARARGS, NULL},
{ (char *)"new_UTimeOut", _wrap_new_UTimeOut, METH_VARARGS, NULL}, { "new_UTimeOut", _wrap_new_UTimeOut, METH_VARARGS, NULL},
{ (char *)"delete_UTimeOut", _wrap_delete_UTimeOut, METH_VARARGS, NULL}, { "delete_UTimeOut", _wrap_delete_UTimeOut, METH_VARARGS, NULL},
{ (char *)"UTimeOut_swigregister", UTimeOut_swigregister, METH_VARARGS, NULL}, { "UTimeOut_swigregister", UTimeOut_swigregister, METH_VARARGS, NULL},
{ (char *)"new_USysError", _wrap_new_USysError, METH_VARARGS, NULL}, { "new_USysError", _wrap_new_USysError, METH_VARARGS, NULL},
{ (char *)"delete_USysError", _wrap_delete_USysError, METH_VARARGS, NULL}, { "delete_USysError", _wrap_delete_USysError, METH_VARARGS, NULL},
{ (char *)"USysError_swigregister", USysError_swigregister, METH_VARARGS, NULL}, { "USysError_swigregister", USysError_swigregister, METH_VARARGS, NULL},
{ (char *)"new_UValidateError", _wrap_new_UValidateError, METH_VARARGS, NULL}, { "new_UValidateError", _wrap_new_UValidateError, METH_VARARGS, NULL},
{ (char *)"delete_UValidateError", _wrap_delete_UValidateError, METH_VARARGS, NULL}, { "delete_UValidateError", _wrap_delete_UValidateError, METH_VARARGS, NULL},
{ (char *)"UValidateError_swigregister", UValidateError_swigregister, METH_VARARGS, NULL}, { "UValidateError_swigregister", UValidateError_swigregister, METH_VARARGS, NULL},
{ NULL, NULL, 0, NULL } { NULL, NULL, 0, NULL }
}; };
...@@ -4268,7 +4015,6 @@ extern "C" { ...@@ -4268,7 +4015,6 @@ extern "C" {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
...@@ -4299,15 +4045,9 @@ extern "C" { ...@@ -4299,15 +4045,9 @@ extern "C" {
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -4315,20 +4055,14 @@ extern "C" { ...@@ -4315,20 +4055,14 @@ extern "C" {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
varlink_type = tmp; varlink_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
varlink_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&varlink_type) < 0) if (PyType_Ready(&varlink_type) < 0)
return NULL; return NULL;
#endif
} }
return &varlink_type; return &varlink_type;
} }
...@@ -4430,9 +4164,9 @@ extern "C" { ...@@ -4430,9 +4164,9 @@ extern "C" {
char *ndoc = (char*)malloc(ldoc + lptr + 10); char *ndoc = (char*)malloc(ldoc + lptr + 10);
if (ndoc) { if (ndoc) {
char *buff = ndoc; char *buff = ndoc;
strncpy(buff, methods[i].ml_doc, ldoc); memcpy(buff, methods[i].ml_doc, ldoc);
buff += ldoc; buff += ldoc;
strncpy(buff, "swig_ptr: ", 10); memcpy(buff, "swig_ptr: ", 10);
buff += 10; buff += 10;
SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
methods[i].ml_doc = ndoc; methods[i].ml_doc = ndoc;
...@@ -4494,19 +4228,19 @@ SWIG_init(void) { ...@@ -4494,19 +4228,19 @@ SWIG_init(void) {
(char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
}; };
static SwigPyGetSet thisown_getset_closure = { static SwigPyGetSet thisown_getset_closure = {
(PyCFunction) SwigPyObject_own, SwigPyObject_own,
(PyCFunction) SwigPyObject_own SwigPyObject_own
}; };
static PyGetSetDef thisown_getset_def = { static PyGetSetDef thisown_getset_def = {
(char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
}; };
PyObject *metatype_args;
PyTypeObject *builtin_pytype; PyTypeObject *builtin_pytype;
int builtin_base_count; int builtin_base_count;
swig_type_info *builtin_basetype; swig_type_info *builtin_basetype;
PyObject *tuple; PyObject *tuple;
PyGetSetDescrObject *static_getset; PyGetSetDescrObject *static_getset;
PyTypeObject *metatype; PyTypeObject *metatype;
PyTypeObject *swigpyobject;
SwigPyClientData *cd; SwigPyClientData *cd;
PyObject *public_interface, *public_symbol; PyObject *public_interface, *public_symbol;
PyObject *this_descr; PyObject *this_descr;
...@@ -4521,14 +4255,9 @@ SWIG_init(void) { ...@@ -4521,14 +4255,9 @@ SWIG_init(void) {
(void)static_getset; (void)static_getset;
(void)self; (void)self;
/* metatype is used to implement static member variables. */ /* Metaclass is used to implement static member variables */
metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); metatype = SwigPyObjectType();
assert(metatype_args);
metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
assert(metatype); assert(metatype);
Py_DECREF(metatype_args);
metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
assert(PyType_Ready(metatype) >= 0);
#endif #endif
/* Fix SwigMethods to carry the callback ptrs when needed */ /* Fix SwigMethods to carry the callback ptrs when needed */
...@@ -4546,13 +4275,15 @@ SWIG_init(void) { ...@@ -4546,13 +4275,15 @@ SWIG_init(void) {
SWIG_InitializeModule(0); SWIG_InitializeModule(0);
#ifdef SWIGPYTHON_BUILTIN #ifdef SWIGPYTHON_BUILTIN
swigpyobject = SwigPyObject_TypeOnce();
SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
assert(SwigPyObject_stype); assert(SwigPyObject_stype);
cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
if (!cd) { if (!cd) {
SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); SwigPyObject_clientdata.pytype = swigpyobject;
} else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
# if PY_VERSION_HEX >= 0x03000000 # if PY_VERSION_HEX >= 0x03000000
return NULL; return NULL;
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.8 * Version 3.0.12
* *
* 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
...@@ -107,10 +107,12 @@ template <typename T> T SwigValueInit() { ...@@ -107,10 +107,12 @@ template <typename T> T SwigValueInit() {
#endif #endif
/* exporting methods */ /* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) #if defined(__GNUC__)
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# ifndef GCC_HASCLASSVISIBILITY # ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY
# endif # endif
# endif
#endif #endif
#ifndef SWIGEXPORT #ifndef SWIGEXPORT
...@@ -669,16 +671,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { ...@@ -669,16 +671,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
char d = *(c++); char d = *(c++);
unsigned char uu; unsigned char uu;
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4); uu = (unsigned char)((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
uu = ((d - ('a'-10)) << 4); uu = (unsigned char)((d - ('a'-10)) << 4);
else else
return (char *) 0; return (char *) 0;
d = *(c++); d = *(c++);
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu |= (d - '0'); uu |= (unsigned char)(d - '0');
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
uu |= (d - ('a'-10)); uu |= (unsigned char)(d - ('a'-10));
else else
return (char *) 0; return (char *) 0;
*u = uu; *u = uu;
...@@ -833,152 +835,21 @@ SWIG_Python_str_FromChar(const char *c) ...@@ -833,152 +835,21 @@ SWIG_Python_str_FromChar(const char *c)
#endif #endif
} }
/* Add PyOS_snprintf for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
# define PyOS_snprintf _snprintf
# else
# define PyOS_snprintf snprintf
# endif
#endif
/* A crude PyString_FromFormat implementation for old Pythons */
#if PY_VERSION_HEX < 0x02020000
#ifndef SWIG_PYBUFFER_SIZE
# define SWIG_PYBUFFER_SIZE 1024
#endif
static PyObject *
PyString_FromFormat(const char *fmt, ...) {
va_list ap;
char buf[SWIG_PYBUFFER_SIZE * 2];
int res;
va_start(ap, fmt);
res = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
}
#endif
/* Add PyObject_Del for old Pythons */
#if PY_VERSION_HEX < 0x01060000
# define PyObject_Del(op) PyMem_DEL((op))
#endif
#ifndef PyObject_DEL #ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del # define PyObject_DEL PyObject_Del
#endif #endif
/* A crude PyExc_StopIteration exception for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# ifndef PyExc_StopIteration
# define PyExc_StopIteration PyExc_RuntimeError
# endif
# ifndef PyObject_GenericGetAttr
# define PyObject_GenericGetAttr 0
# endif
#endif
/* Py_NotImplemented is defined in 2.1 and up. */
#if PY_VERSION_HEX < 0x02010000
# ifndef Py_NotImplemented
# define Py_NotImplemented PyExc_RuntimeError
# endif
#endif
/* A crude PyString_AsStringAndSize implementation for old Pythons */
#if PY_VERSION_HEX < 0x02010000
# ifndef PyString_AsStringAndSize
# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
# endif
#endif
/* PySequence_Size for old Pythons */
#if PY_VERSION_HEX < 0x02000000
# ifndef PySequence_Size
# define PySequence_Size PySequence_Length
# endif
#endif
/* PyBool_FromLong for old Pythons */
#if PY_VERSION_HEX < 0x02030000
static
PyObject *PyBool_FromLong(long ok)
{
PyObject *result = ok ? Py_True : Py_False;
Py_INCREF(result);
return result;
}
#endif
/* Py_ssize_t for old Pythons */
/* This code is as recommended by: */
/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
typedef inquiry lenfunc;
typedef intargfunc ssizeargfunc;
typedef intintargfunc ssizessizeargfunc;
typedef intobjargproc ssizeobjargproc;
typedef intintobjargproc ssizessizeobjargproc;
typedef getreadbufferproc readbufferproc;
typedef getwritebufferproc writebufferproc;
typedef getsegcountproc segcountproc;
typedef getcharbufferproc charbufferproc;
static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
{
long result = 0;
PyObject *i = PyNumber_Int(x);
if (i) {
result = PyInt_AsLong(i);
Py_DECREF(i);
}
return result;
}
#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 { \
if (op) { \
int vret = visit((op), arg); \
if (vret) \
return vret; \
} \
} while (0)
#endif
#if PY_VERSION_HEX < 0x02030000
typedef struct {
PyTypeObject type;
PyNumberMethods as_number;
PyMappingMethods as_mapping;
PySequenceMethods as_sequence;
PyBufferProcs as_buffer;
PyObject *name, *slots;
} PyHeapTypeObject;
#endif
#if PY_VERSION_HEX < 0x02030000
typedef destructor freefunc;
#endif
#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
(PY_MAJOR_VERSION > 3)) (PY_MAJOR_VERSION > 3))
# define SWIGPY_USE_CAPSULE # define SWIGPY_USE_CAPSULE
# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
#endif #endif
#if PY_VERSION_HEX < 0x03020000 #if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#define Py_hash_t long
#endif #endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
...@@ -1059,10 +930,8 @@ SWIG_Python_AddErrorMsg(const char* mesg) ...@@ -1059,10 +930,8 @@ SWIG_Python_AddErrorMsg(const char* mesg)
#endif #endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
# define SWIG_PYTHON_USE_GIL # define SWIG_PYTHON_USE_GIL
# endif # endif
# endif
# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
# ifndef SWIG_PYTHON_INITIALIZE_THREADS # ifndef SWIG_PYTHON_INITIALIZE_THREADS
# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
...@@ -1176,6 +1045,10 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), ...@@ -1176,6 +1045,10 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
* *
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
#if PY_VERSION_HEX < 0x02060000 /* 2.6.0 */
# error "This version of SWIG only supports Python >= 2.6"
#endif
/* Common SWIG API */ /* Common SWIG API */
/* for raw pointers */ /* for raw pointers */
...@@ -1259,11 +1132,7 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { ...@@ -1259,11 +1132,7 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
#if PY_VERSION_HEX < 0x02030000
PyDict_SetItemString(d, (char *)name, obj);
#else
PyDict_SetItemString(d, name, obj); PyDict_SetItemString(d, name, obj);
#endif
Py_DECREF(obj); Py_DECREF(obj);
if (public_interface) if (public_interface)
SwigPyBuiltin_AddPublicSymbol(public_interface, name); SwigPyBuiltin_AddPublicSymbol(public_interface, name);
...@@ -1273,11 +1142,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam ...@@ -1273,11 +1142,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
#if PY_VERSION_HEX < 0x02030000
PyDict_SetItemString(d, (char *)name, obj);
#else
PyDict_SetItemString(d, name, obj); PyDict_SetItemString(d, name, obj);
#endif
Py_DECREF(obj); Py_DECREF(obj);
} }
...@@ -1377,11 +1242,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1377,11 +1242,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
} }
/* A functor is a function object with one single object argument */ /* A functor is a function object with one single object argument */
#if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, (char*)"O", obj);
#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
#else
#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
#endif
/* /*
Helper for static pointer initialization for both C and C++ code, for example Helper for static pointer initialization for both C and C++ code, for example
...@@ -1427,7 +1288,7 @@ extern "C" { ...@@ -1427,7 +1288,7 @@ extern "C" {
SWIGRUNTIMEINLINE PyObject * SWIGRUNTIMEINLINE PyObject *
_SWIG_Py_None(void) _SWIG_Py_None(void)
{ {
PyObject *none = Py_BuildValue((char*)""); PyObject *none = Py_BuildValue("");
Py_DECREF(none); Py_DECREF(none);
return none; return none;
} }
...@@ -1492,11 +1353,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1492,11 +1353,7 @@ SwigPyClientData_New(PyObject* obj)
data->newargs = obj; data->newargs = obj;
Py_INCREF(obj); Py_INCREF(obj);
} else { } else {
#if (PY_VERSION_HEX < 0x02020000) data->newraw = PyObject_GetAttrString(data->klass, "__new__");
data->newraw = 0;
#else
data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
#endif
if (data->newraw) { if (data->newraw) {
Py_INCREF(data->newraw); Py_INCREF(data->newraw);
data->newargs = PyTuple_New(1); data->newargs = PyTuple_New(1);
...@@ -1507,7 +1364,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1507,7 +1364,7 @@ SwigPyClientData_New(PyObject* obj)
Py_INCREF(data->newargs); Py_INCREF(data->newargs);
} }
/* the destroy method, aka as the C++ delete method */ /* the destroy method, aka as the C++ delete method */
data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
PyErr_Clear(); PyErr_Clear();
data->destroy = 0; data->destroy = 0;
...@@ -1516,11 +1373,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1516,11 +1373,7 @@ SwigPyClientData_New(PyObject* obj)
int flags; int flags;
Py_INCREF(data->destroy); Py_INCREF(data->destroy);
flags = PyCFunction_GET_FLAGS(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy);
#ifdef METH_O
data->delargs = !(flags & (METH_O)); data->delargs = !(flags & (METH_O));
#else
data->delargs = 0;
#endif
} else { } else {
data->delargs = 0; data->delargs = 0;
} }
...@@ -1608,20 +1461,12 @@ SwigPyObject_hex(SwigPyObject *v) ...@@ -1608,20 +1461,12 @@ SwigPyObject_hex(SwigPyObject *v)
} }
SWIGRUNTIME PyObject * SWIGRUNTIME PyObject *
#ifdef METH_NOARGS
SwigPyObject_repr(SwigPyObject *v) SwigPyObject_repr(SwigPyObject *v)
#else
SwigPyObject_repr(SwigPyObject *v, PyObject *args)
#endif
{ {
const char *name = SWIG_TypePrettyName(v->ty); const char *name = SWIG_TypePrettyName(v->ty);
PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v); PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
if (v->next) { if (v->next) {
# ifdef METH_NOARGS
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
# else
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
# endif
# if PY_VERSION_HEX >= 0x03000000 # if PY_VERSION_HEX >= 0x03000000
PyObject *joined = PyUnicode_Concat(repr, nrep); PyObject *joined = PyUnicode_Concat(repr, nrep);
Py_DecRef(repr); Py_DecRef(repr);
...@@ -1634,6 +1479,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) ...@@ -1634,6 +1479,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
return repr; return repr;
} }
/* We need a version taking two PyObject* parameters so it's a valid
* PyCFunction to use in swigobject_methods[]. */
static PyObject *
SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
return SwigPyObject_repr((SwigPyObject*)v);
}
SWIGRUNTIME int SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{ {
...@@ -1748,11 +1601,6 @@ SWIGRUNTIME PyObject* ...@@ -1748,11 +1601,6 @@ SWIGRUNTIME PyObject*
SwigPyObject_append(PyObject* v, PyObject* next) SwigPyObject_append(PyObject* v, PyObject* next)
{ {
SwigPyObject *sobj = (SwigPyObject *) v; SwigPyObject *sobj = (SwigPyObject *) v;
#ifndef METH_O
PyObject *tmp = 0;
if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
next = tmp;
#endif
if (!SwigPyObject_Check(next)) { if (!SwigPyObject_Check(next)) {
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
return NULL; return NULL;
...@@ -1763,11 +1611,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) ...@@ -1763,11 +1611,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
} }
SWIGRUNTIME PyObject* SWIGRUNTIME PyObject*
#ifdef METH_NOARGS
SwigPyObject_next(PyObject* v)
#else
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *) v; SwigPyObject *sobj = (SwigPyObject *) v;
if (sobj->next) { if (sobj->next) {
...@@ -1779,11 +1623,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) ...@@ -1779,11 +1623,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
} }
SWIGINTERN PyObject* SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_disown(PyObject *v)
#else
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
sobj->own = 0; sobj->own = 0;
...@@ -1791,11 +1631,7 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) ...@@ -1791,11 +1631,7 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
} }
SWIGINTERN PyObject* SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_acquire(PyObject *v)
#else
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
sobj->own = SWIG_POINTER_OWN; sobj->own = SWIG_POINTER_OWN;
...@@ -1806,13 +1642,7 @@ SWIGINTERN PyObject* ...@@ -1806,13 +1642,7 @@ SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args) SwigPyObject_own(PyObject *v, PyObject *args)
{ {
PyObject *val = 0; PyObject *val = 0;
#if (PY_VERSION_HEX < 0x02020000)
if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
#elif (PY_VERSION_HEX < 0x02050000)
if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
#else
if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
#endif
{ {
return NULL; return NULL;
} }
...@@ -1821,55 +1651,26 @@ SwigPyObject_own(PyObject *v, PyObject *args) ...@@ -1821,55 +1651,26 @@ SwigPyObject_own(PyObject *v, PyObject *args)
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
PyObject *obj = PyBool_FromLong(sobj->own); PyObject *obj = PyBool_FromLong(sobj->own);
if (val) { if (val) {
#ifdef METH_NOARGS
if (PyObject_IsTrue(val)) {
SwigPyObject_acquire(v);
} else {
SwigPyObject_disown(v);
}
#else
if (PyObject_IsTrue(val)) { if (PyObject_IsTrue(val)) {
SwigPyObject_acquire(v,args); SwigPyObject_acquire(v,args);
} else { } else {
SwigPyObject_disown(v,args); SwigPyObject_disown(v,args);
} }
#endif
} }
return obj; return obj;
} }
} }
#ifdef METH_O
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 *)"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"},
{(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
{0, 0, 0, 0}
};
#else
static PyMethodDef static PyMethodDef
swigobject_methods[] = { swigobject_methods[] = {
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
{(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
{(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
{(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
{(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
#endif
#if PY_VERSION_HEX < 0x02020000
SWIGINTERN PyObject *
SwigPyObject_getattr(SwigPyObject *sobj,char *name)
{
return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
}
#endif
SWIGRUNTIME PyTypeObject* SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) { SwigPyObject_TypeOnce(void) {
...@@ -1914,12 +1715,8 @@ SwigPyObject_TypeOnce(void) { ...@@ -1914,12 +1715,8 @@ SwigPyObject_TypeOnce(void) {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ #else
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif #endif
}; };
...@@ -1927,23 +1724,18 @@ SwigPyObject_TypeOnce(void) { ...@@ -1927,23 +1724,18 @@ SwigPyObject_TypeOnce(void) {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
PyObject_HEAD_INIT(NULL) PyObject_HEAD_INIT(NULL)
0, /* ob_size */ 0, /* ob_size */
#endif #endif
(char *)"SwigPyObject", /* tp_name */ "SwigPyObject", /* tp_name */
sizeof(SwigPyObject), /* tp_basicsize */ sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */
0, /* tp_print */ 0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else
(getattrfunc)0, /* tp_getattr */ (getattrfunc)0, /* tp_getattr */
#endif
(setattrfunc)0, /* tp_setattr */ (setattrfunc)0, /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
...@@ -1966,7 +1758,6 @@ SwigPyObject_TypeOnce(void) { ...@@ -1966,7 +1758,6 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_clear */ 0, /* tp_clear */
(richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0, /* tp_iter */ 0, /* tp_iter */
0, /* tp_iternext */ 0, /* tp_iternext */
swigobject_methods, /* tp_methods */ swigobject_methods, /* tp_methods */
...@@ -1987,13 +1778,8 @@ SwigPyObject_TypeOnce(void) { ...@@ -1987,13 +1778,8 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_cache */ 0, /* tp_cache */
0, /* tp_subclasses */ 0, /* tp_subclasses */
0, /* tp_weaklist */ 0, /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -2001,20 +1787,14 @@ SwigPyObject_TypeOnce(void) { ...@@ -2001,20 +1787,14 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
swigpyobject_type = tmp; swigpyobject_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
swigpyobject_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&swigpyobject_type) < 0) if (PyType_Ready(&swigpyobject_type) < 0)
return NULL; return NULL;
#endif
} }
return &swigpyobject_type; return &swigpyobject_type;
} }
...@@ -2119,14 +1899,13 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2119,14 +1899,13 @@ SwigPyPacked_TypeOnce(void) {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
PyObject_HEAD_INIT(NULL) PyObject_HEAD_INIT(NULL)
0, /* ob_size */ 0, /* ob_size */
#endif #endif
(char *)"SwigPyPacked", /* tp_name */ "SwigPyPacked", /* tp_name */
sizeof(SwigPyPacked), /* tp_basicsize */ sizeof(SwigPyPacked), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
...@@ -2154,7 +1933,6 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2154,7 +1933,6 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0, /* tp_iter */ 0, /* tp_iter */
0, /* tp_iternext */ 0, /* tp_iternext */
0, /* tp_methods */ 0, /* tp_methods */
...@@ -2175,13 +1953,8 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2175,13 +1953,8 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_cache */ 0, /* tp_cache */
0, /* tp_subclasses */ 0, /* tp_subclasses */
0, /* tp_weaklist */ 0, /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -2189,20 +1962,14 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2189,20 +1962,14 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
swigpypacked_type = tmp; swigpypacked_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
swigpypacked_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&swigpypacked_type) < 0) if (PyType_Ready(&swigpypacked_type) < 0)
return NULL; return NULL;
#endif
} }
return &swigpypacked_type; return &swigpypacked_type;
} }
...@@ -2288,7 +2055,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) ...@@ -2288,7 +2055,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
obj = 0; obj = 0;
#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
if (PyInstance_Check(pyobj)) { if (PyInstance_Check(pyobj)) {
obj = _PyInstance_Lookup(pyobj, SWIG_This()); obj = _PyInstance_Lookup(pyobj, SWIG_This());
} else { } else {
...@@ -2510,7 +2277,6 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t ...@@ -2510,7 +2277,6 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t
SWIGRUNTIME PyObject* SWIGRUNTIME PyObject*
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{ {
#if (PY_VERSION_HEX >= 0x02020000)
PyObject *inst = 0; PyObject *inst = 0;
PyObject *newraw = data->newraw; PyObject *newraw = data->newraw;
if (newraw) { if (newraw) {
...@@ -2548,45 +2314,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) ...@@ -2548,45 +2314,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
#endif #endif
} }
return inst; return inst;
#else
#if (PY_VERSION_HEX >= 0x02010000)
PyObject *inst = 0;
PyObject *dict = PyDict_New();
if (dict) {
PyDict_SetItem(dict, SWIG_This(), swig_this);
inst = PyInstance_NewRaw(data->newargs, dict);
Py_DECREF(dict);
}
return (PyObject *) inst;
#else
PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
if (inst == NULL) {
return NULL;
}
inst->in_class = (PyClassObject *)data->newargs;
Py_INCREF(inst->in_class);
inst->in_dict = PyDict_New();
if (inst->in_dict == NULL) {
Py_DECREF(inst);
return NULL;
}
#ifdef Py_TPFLAGS_HAVE_WEAKREFS
inst->in_weakreflist = NULL;
#endif
#ifdef Py_TPFLAGS_GC
PyObject_GC_Init(inst);
#endif
PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
return (PyObject *) inst;
#endif
#endif
} }
SWIGRUNTIME void SWIGRUNTIME void
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{ {
PyObject *dict; PyObject *dict;
#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
PyObject **dictptr = _PyObject_GetDictPtr(inst); PyObject **dictptr = _PyObject_GetDictPtr(inst);
if (dictptr != NULL) { if (dictptr != NULL) {
dict = *dictptr; dict = *dictptr;
...@@ -2598,7 +2332,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) ...@@ -2598,7 +2332,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
return; return;
} }
#endif #endif
dict = PyObject_GetAttrString(inst, (char*)"__dict__"); dict = PyObject_GetAttrString(inst, "__dict__");
PyDict_SetItem(dict, SWIG_This(), swig_this); PyDict_SetItem(dict, SWIG_This(), swig_this);
Py_DECREF(dict); Py_DECREF(dict);
} }
...@@ -2700,8 +2434,8 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { ...@@ -2700,8 +2434,8 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
# ifdef SWIGPY_USE_CAPSULE # ifdef SWIGPY_USE_CAPSULE
type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
# else # else
type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, type_pointer = PyCObject_Import((char *)"swig_runtime_data" SWIG_RUNTIME_VERSION,
(char*)"type_pointer" SWIG_TYPE_TABLE_NAME); (char *)"type_pointer" SWIG_TYPE_TABLE_NAME);
# endif # endif
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
PyErr_Clear(); PyErr_Clear();
...@@ -2771,22 +2505,22 @@ SWIGRUNTIME void ...@@ -2771,22 +2505,22 @@ SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) { SWIG_Python_SetModule(swig_module_info *swig_module) {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
/* Add a dummy module object into sys.modules */ /* Add a dummy module object into sys.modules */
PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
#else #else
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
#endif #endif
#ifdef SWIGPY_USE_CAPSULE #ifdef SWIGPY_USE_CAPSULE
PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
if (pointer && module) { if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
} else { } else {
Py_XDECREF(pointer); Py_XDECREF(pointer);
} }
#else #else
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
if (pointer && module) { if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); PyModule_AddObject(module, "type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
} else { } else {
Py_XDECREF(pointer); Py_XDECREF(pointer);
} }
...@@ -3023,11 +2757,6 @@ static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0}; ...@@ -3023,11 +2757,6 @@ static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0};
/* -------- TYPES TABLE (END) -------- */ /* -------- TYPES TABLE (END) -------- */
#if (PY_VERSION_HEX <= 0x02000000)
# if !defined(SWIG_PYTHON_CLASSIC)
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
/*----------------------------------------------- /*-----------------------------------------------
@(target):= _pyUniSet.so @(target):= _pyUniSet.so
...@@ -3041,7 +2770,7 @@ static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0}; ...@@ -3041,7 +2770,7 @@ static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0};
#endif #endif
#define SWIG_name "_pyUniSet" #define SWIG_name "_pyUniSet"
#define SWIGVERSION 0x030008 #define SWIGVERSION 0x030012
#define SWIG_VERSION SWIGVERSION #define SWIG_VERSION SWIGVERSION
...@@ -3146,13 +2875,18 @@ SWIGINTERN int ...@@ -3146,13 +2875,18 @@ SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{ {
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
if (PyBytes_Check(obj))
#else
if (PyUnicode_Check(obj)) if (PyUnicode_Check(obj))
#endif
#else #else
if (PyString_Check(obj)) if (PyString_Check(obj))
#endif #endif
{ {
char *cstr; Py_ssize_t len; char *cstr; Py_ssize_t len;
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
if (!alloc && cptr) { if (!alloc && cptr) {
/* We can't allow converting without allocation, since the internal /* We can't allow converting without allocation, since the internal
representation of string in Python 3 is UCS-2/UCS-4 but we require representation of string in Python 3 is UCS-2/UCS-4 but we require
...@@ -3161,8 +2895,9 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3161,8 +2895,9 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
return SWIG_RuntimeError; return SWIG_RuntimeError;
} }
obj = PyUnicode_AsUTF8String(obj); obj = PyUnicode_AsUTF8String(obj);
PyBytes_AsStringAndSize(obj, &cstr, &len);
if(alloc) *alloc = SWIG_NEWOBJ; if(alloc) *alloc = SWIG_NEWOBJ;
#endif
PyBytes_AsStringAndSize(obj, &cstr, &len);
#else #else
PyString_AsStringAndSize(obj, &cstr, &len); PyString_AsStringAndSize(obj, &cstr, &len);
#endif #endif
...@@ -3183,26 +2918,34 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3183,26 +2918,34 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
if (*alloc == SWIG_NEWOBJ) if (*alloc == SWIG_NEWOBJ)
#endif #endif
{ {
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ; *alloc = SWIG_NEWOBJ;
} else { } else {
*cptr = cstr; *cptr = cstr;
*alloc = SWIG_OLDOBJ; *alloc = SWIG_OLDOBJ;
} }
} else { } else {
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */ #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#endif *cptr = PyBytes_AsString(obj);
#else
assert(0); /* Should never reach here with Unicode strings in Python 3 */
#endif
#else
*cptr = SWIG_Python_str_AsChar(obj); *cptr = SWIG_Python_str_AsChar(obj);
#endif
} }
} }
if (psize) *psize = len + 1; if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
Py_XDECREF(obj); Py_XDECREF(obj);
#endif #endif
return SWIG_OK; return SWIG_OK;
} else { } else {
#if defined(SWIG_PYTHON_2_UNICODE) #if defined(SWIG_PYTHON_2_UNICODE)
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
#endif
#if PY_VERSION_HEX<0x03000000 #if PY_VERSION_HEX<0x03000000
if (PyUnicode_Check(obj)) { if (PyUnicode_Check(obj)) {
char *cstr; Py_ssize_t len; char *cstr; Py_ssize_t len;
...@@ -3213,7 +2956,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3213,7 +2956,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
if (cptr) { if (cptr) {
if (alloc) *alloc = SWIG_NEWOBJ; if (alloc) *alloc = SWIG_NEWOBJ;
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
} }
if (psize) *psize = len + 1; if (psize) *psize = len + 1;
...@@ -3291,7 +3034,7 @@ SWIG_AsVal_double (PyObject *obj, double *val) ...@@ -3291,7 +3034,7 @@ SWIG_AsVal_double (PyObject *obj, double *val)
return SWIG_OK; return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000 #if PY_VERSION_HEX < 0x03000000
} else if (PyInt_Check(obj)) { } else if (PyInt_Check(obj)) {
if (val) *val = PyInt_AsLong(obj); if (val) *val = (double) PyInt_AsLong(obj);
return SWIG_OK; return SWIG_OK;
#endif #endif
} else if (PyLong_Check(obj)) { } else if (PyLong_Check(obj)) {
...@@ -3423,7 +3166,7 @@ SWIG_AsVal_int (PyObject * obj, int *val) ...@@ -3423,7 +3166,7 @@ SWIG_AsVal_int (PyObject * obj, int *val)
} }
#define SWIG_From_long PyLong_FromLong #define SWIG_From_long PyInt_FromLong
SWIGINTERNINLINE PyObject * SWIGINTERNINLINE PyObject *
...@@ -3436,11 +3179,15 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) ...@@ -3436,11 +3179,15 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
} else { } else {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#else
#if PY_VERSION_HEX >= 0x03010000 #if PY_VERSION_HEX >= 0x03010000
return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#else #else
return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif #endif
#endif
#else #else
return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif #endif
...@@ -3527,7 +3274,7 @@ SWIGINTERNINLINE PyObject* ...@@ -3527,7 +3274,7 @@ SWIGINTERNINLINE PyObject*
SWIG_From_unsigned_SS_long (unsigned long value) SWIG_From_unsigned_SS_long (unsigned long value)
{ {
return (value > LONG_MAX) ? return (value > LONG_MAX) ?
PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value)); PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
} }
...@@ -4217,7 +3964,7 @@ fail: ...@@ -4217,7 +3964,7 @@ fail:
SWIGINTERN PyObject *Params_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *Params_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UTypes__Params, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UTypes__Params, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -4518,7 +4265,7 @@ fail: ...@@ -4518,7 +4265,7 @@ fail:
SWIGINTERN PyObject *ShortIOInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *ShortIOInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UTypes__ShortIOInfo, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UTypes__ShortIOInfo, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -4736,7 +4483,7 @@ fail: ...@@ -4736,7 +4483,7 @@ fail:
SWIGINTERN PyObject *UException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *UException_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UException, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UException, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -4839,7 +4586,7 @@ fail: ...@@ -4839,7 +4586,7 @@ fail:
SWIGINTERN PyObject *UTimeOut_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *UTimeOut_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UTimeOut, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UTimeOut, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -4942,7 +4689,7 @@ fail: ...@@ -4942,7 +4689,7 @@ fail:
SWIGINTERN PyObject *USysError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *USysError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_USysError, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_USysError, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -5045,7 +4792,7 @@ fail: ...@@ -5045,7 +4792,7 @@ fail:
SWIGINTERN PyObject *UValidateError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *UValidateError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UValidateError, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UValidateError, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
...@@ -5419,73 +5166,73 @@ fail: ...@@ -5419,73 +5166,73 @@ fail:
SWIGINTERN PyObject *UProxyObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *UProxyObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UProxyObject, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UProxyObject, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
static PyMethodDef SwigMethods[] = { static PyMethodDef SwigMethods[] = {
{ (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
{ (char *)"uniset_init_params", _wrap_uniset_init_params, METH_VARARGS, NULL}, { "uniset_init_params", _wrap_uniset_init_params, METH_VARARGS, NULL},
{ (char *)"uniset_init", _wrap_uniset_init, METH_VARARGS, NULL}, { "uniset_init", _wrap_uniset_init, METH_VARARGS, NULL},
{ (char *)"uniset_activate_objects", _wrap_uniset_activate_objects, METH_VARARGS, NULL}, { "uniset_activate_objects", _wrap_uniset_activate_objects, METH_VARARGS, NULL},
{ (char *)"getValue", _wrap_getValue, METH_VARARGS, NULL}, { "getValue", _wrap_getValue, METH_VARARGS, NULL},
{ (char *)"setValue", _wrap_setValue, METH_VARARGS, NULL}, { "setValue", _wrap_setValue, METH_VARARGS, NULL},
{ (char *)"getSensorID", _wrap_getSensorID, METH_VARARGS, NULL}, { "getSensorID", _wrap_getSensorID, METH_VARARGS, NULL},
{ (char *)"getObjectID", _wrap_getObjectID, METH_VARARGS, NULL}, { "getObjectID", _wrap_getObjectID, METH_VARARGS, NULL},
{ (char *)"getShortName", _wrap_getShortName, METH_VARARGS, NULL}, { "getShortName", _wrap_getShortName, METH_VARARGS, NULL},
{ (char *)"getName", _wrap_getName, METH_VARARGS, NULL}, { "getName", _wrap_getName, METH_VARARGS, NULL},
{ (char *)"getTextName", _wrap_getTextName, METH_VARARGS, NULL}, { "getTextName", _wrap_getTextName, METH_VARARGS, NULL},
{ (char *)"getConfFileName", _wrap_getConfFileName, METH_VARARGS, NULL}, { "getConfFileName", _wrap_getConfFileName, METH_VARARGS, NULL},
{ (char *)"new_Params", _wrap_new_Params, METH_VARARGS, NULL}, { "new_Params", _wrap_new_Params, METH_VARARGS, NULL},
{ (char *)"Params_add", _wrap_Params_add, METH_VARARGS, NULL}, { "Params_add", _wrap_Params_add, METH_VARARGS, NULL},
{ (char *)"Params_add_str", _wrap_Params_add_str, METH_VARARGS, NULL}, { "Params_add_str", _wrap_Params_add_str, METH_VARARGS, NULL},
{ (char *)"Params_argc_set", _wrap_Params_argc_set, METH_VARARGS, NULL}, { "Params_argc_set", _wrap_Params_argc_set, METH_VARARGS, NULL},
{ (char *)"Params_argc_get", _wrap_Params_argc_get, METH_VARARGS, NULL}, { "Params_argc_get", _wrap_Params_argc_get, METH_VARARGS, NULL},
{ (char *)"Params_argv_set", _wrap_Params_argv_set, METH_VARARGS, NULL}, { "Params_argv_set", _wrap_Params_argv_set, METH_VARARGS, NULL},
{ (char *)"Params_argv_get", _wrap_Params_argv_get, METH_VARARGS, NULL}, { "Params_argv_get", _wrap_Params_argv_get, METH_VARARGS, NULL},
{ (char *)"Params_inst", _wrap_Params_inst, METH_VARARGS, NULL}, { "Params_inst", _wrap_Params_inst, METH_VARARGS, NULL},
{ (char *)"delete_Params", _wrap_delete_Params, METH_VARARGS, NULL}, { "delete_Params", _wrap_delete_Params, METH_VARARGS, NULL},
{ (char *)"Params_swigregister", Params_swigregister, METH_VARARGS, NULL}, { "Params_swigregister", Params_swigregister, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_value_set", _wrap_ShortIOInfo_value_set, METH_VARARGS, NULL}, { "ShortIOInfo_value_set", _wrap_ShortIOInfo_value_set, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_value_get", _wrap_ShortIOInfo_value_get, METH_VARARGS, NULL}, { "ShortIOInfo_value_get", _wrap_ShortIOInfo_value_get, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_tv_sec_set", _wrap_ShortIOInfo_tv_sec_set, METH_VARARGS, NULL}, { "ShortIOInfo_tv_sec_set", _wrap_ShortIOInfo_tv_sec_set, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_tv_sec_get", _wrap_ShortIOInfo_tv_sec_get, METH_VARARGS, NULL}, { "ShortIOInfo_tv_sec_get", _wrap_ShortIOInfo_tv_sec_get, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_tv_nsec_set", _wrap_ShortIOInfo_tv_nsec_set, METH_VARARGS, NULL}, { "ShortIOInfo_tv_nsec_set", _wrap_ShortIOInfo_tv_nsec_set, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_tv_nsec_get", _wrap_ShortIOInfo_tv_nsec_get, METH_VARARGS, NULL}, { "ShortIOInfo_tv_nsec_get", _wrap_ShortIOInfo_tv_nsec_get, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_supplier_set", _wrap_ShortIOInfo_supplier_set, METH_VARARGS, NULL}, { "ShortIOInfo_supplier_set", _wrap_ShortIOInfo_supplier_set, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_supplier_get", _wrap_ShortIOInfo_supplier_get, METH_VARARGS, NULL}, { "ShortIOInfo_supplier_get", _wrap_ShortIOInfo_supplier_get, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_supplier_node_set", _wrap_ShortIOInfo_supplier_node_set, METH_VARARGS, NULL}, { "ShortIOInfo_supplier_node_set", _wrap_ShortIOInfo_supplier_node_set, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_supplier_node_get", _wrap_ShortIOInfo_supplier_node_get, METH_VARARGS, NULL}, { "ShortIOInfo_supplier_node_get", _wrap_ShortIOInfo_supplier_node_get, METH_VARARGS, NULL},
{ (char *)"new_ShortIOInfo", _wrap_new_ShortIOInfo, METH_VARARGS, NULL}, { "new_ShortIOInfo", _wrap_new_ShortIOInfo, METH_VARARGS, NULL},
{ (char *)"delete_ShortIOInfo", _wrap_delete_ShortIOInfo, METH_VARARGS, NULL}, { "delete_ShortIOInfo", _wrap_delete_ShortIOInfo, METH_VARARGS, NULL},
{ (char *)"ShortIOInfo_swigregister", ShortIOInfo_swigregister, METH_VARARGS, NULL}, { "ShortIOInfo_swigregister", ShortIOInfo_swigregister, METH_VARARGS, NULL},
{ (char *)"new_UException", _wrap_new_UException, METH_VARARGS, NULL}, { "new_UException", _wrap_new_UException, METH_VARARGS, NULL},
{ (char *)"delete_UException", _wrap_delete_UException, METH_VARARGS, NULL}, { "delete_UException", _wrap_delete_UException, METH_VARARGS, NULL},
{ (char *)"UException_getError", _wrap_UException_getError, METH_VARARGS, NULL}, { "UException_getError", _wrap_UException_getError, METH_VARARGS, NULL},
{ (char *)"UException_err_set", _wrap_UException_err_set, METH_VARARGS, NULL}, { "UException_err_set", _wrap_UException_err_set, METH_VARARGS, NULL},
{ (char *)"UException_err_get", _wrap_UException_err_get, METH_VARARGS, NULL}, { "UException_err_get", _wrap_UException_err_get, METH_VARARGS, NULL},
{ (char *)"UException_swigregister", UException_swigregister, METH_VARARGS, NULL}, { "UException_swigregister", UException_swigregister, METH_VARARGS, NULL},
{ (char *)"new_UTimeOut", _wrap_new_UTimeOut, METH_VARARGS, NULL}, { "new_UTimeOut", _wrap_new_UTimeOut, METH_VARARGS, NULL},
{ (char *)"delete_UTimeOut", _wrap_delete_UTimeOut, METH_VARARGS, NULL}, { "delete_UTimeOut", _wrap_delete_UTimeOut, METH_VARARGS, NULL},
{ (char *)"UTimeOut_swigregister", UTimeOut_swigregister, METH_VARARGS, NULL}, { "UTimeOut_swigregister", UTimeOut_swigregister, METH_VARARGS, NULL},
{ (char *)"new_USysError", _wrap_new_USysError, METH_VARARGS, NULL}, { "new_USysError", _wrap_new_USysError, METH_VARARGS, NULL},
{ (char *)"delete_USysError", _wrap_delete_USysError, METH_VARARGS, NULL}, { "delete_USysError", _wrap_delete_USysError, METH_VARARGS, NULL},
{ (char *)"USysError_swigregister", USysError_swigregister, METH_VARARGS, NULL}, { "USysError_swigregister", USysError_swigregister, METH_VARARGS, NULL},
{ (char *)"new_UValidateError", _wrap_new_UValidateError, METH_VARARGS, NULL}, { "new_UValidateError", _wrap_new_UValidateError, METH_VARARGS, NULL},
{ (char *)"delete_UValidateError", _wrap_delete_UValidateError, METH_VARARGS, NULL}, { "delete_UValidateError", _wrap_delete_UValidateError, METH_VARARGS, NULL},
{ (char *)"UValidateError_swigregister", UValidateError_swigregister, METH_VARARGS, NULL}, { "UValidateError_swigregister", UValidateError_swigregister, METH_VARARGS, NULL},
{ (char *)"new_UProxyObject", _wrap_new_UProxyObject, METH_VARARGS, NULL}, { "new_UProxyObject", _wrap_new_UProxyObject, METH_VARARGS, NULL},
{ (char *)"delete_UProxyObject", _wrap_delete_UProxyObject, METH_VARARGS, NULL}, { "delete_UProxyObject", _wrap_delete_UProxyObject, METH_VARARGS, NULL},
{ (char *)"UProxyObject_addToAsk", _wrap_UProxyObject_addToAsk, METH_VARARGS, NULL}, { "UProxyObject_addToAsk", _wrap_UProxyObject_addToAsk, METH_VARARGS, NULL},
{ (char *)"UProxyObject_getValue", _wrap_UProxyObject_getValue, METH_VARARGS, NULL}, { "UProxyObject_getValue", _wrap_UProxyObject_getValue, METH_VARARGS, NULL},
{ (char *)"UProxyObject_getFloatValue", _wrap_UProxyObject_getFloatValue, METH_VARARGS, NULL}, { "UProxyObject_getFloatValue", _wrap_UProxyObject_getFloatValue, METH_VARARGS, NULL},
{ (char *)"UProxyObject_setValue", _wrap_UProxyObject_setValue, METH_VARARGS, NULL}, { "UProxyObject_setValue", _wrap_UProxyObject_setValue, METH_VARARGS, NULL},
{ (char *)"UProxyObject_askIsOK", _wrap_UProxyObject_askIsOK, METH_VARARGS, NULL}, { "UProxyObject_askIsOK", _wrap_UProxyObject_askIsOK, METH_VARARGS, NULL},
{ (char *)"UProxyObject_reaskSensors", _wrap_UProxyObject_reaskSensors, METH_VARARGS, NULL}, { "UProxyObject_reaskSensors", _wrap_UProxyObject_reaskSensors, METH_VARARGS, NULL},
{ (char *)"UProxyObject_updateValues", _wrap_UProxyObject_updateValues, METH_VARARGS, NULL}, { "UProxyObject_updateValues", _wrap_UProxyObject_updateValues, METH_VARARGS, NULL},
{ (char *)"UProxyObject_smIsOK", _wrap_UProxyObject_smIsOK, METH_VARARGS, NULL}, { "UProxyObject_smIsOK", _wrap_UProxyObject_smIsOK, METH_VARARGS, NULL},
{ (char *)"UProxyObject_swigregister", UProxyObject_swigregister, METH_VARARGS, NULL}, { "UProxyObject_swigregister", UProxyObject_swigregister, METH_VARARGS, NULL},
{ NULL, NULL, 0, NULL } { NULL, NULL, 0, NULL }
}; };
...@@ -5922,7 +5669,6 @@ extern "C" { ...@@ -5922,7 +5669,6 @@ extern "C" {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
...@@ -5953,15 +5699,9 @@ extern "C" { ...@@ -5953,15 +5699,9 @@ extern "C" {
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -5969,20 +5709,14 @@ extern "C" { ...@@ -5969,20 +5709,14 @@ extern "C" {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
varlink_type = tmp; varlink_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
varlink_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&varlink_type) < 0) if (PyType_Ready(&varlink_type) < 0)
return NULL; return NULL;
#endif
} }
return &varlink_type; return &varlink_type;
} }
...@@ -6084,9 +5818,9 @@ extern "C" { ...@@ -6084,9 +5818,9 @@ extern "C" {
char *ndoc = (char*)malloc(ldoc + lptr + 10); char *ndoc = (char*)malloc(ldoc + lptr + 10);
if (ndoc) { if (ndoc) {
char *buff = ndoc; char *buff = ndoc;
strncpy(buff, methods[i].ml_doc, ldoc); memcpy(buff, methods[i].ml_doc, ldoc);
buff += ldoc; buff += ldoc;
strncpy(buff, "swig_ptr: ", 10); memcpy(buff, "swig_ptr: ", 10);
buff += 10; buff += 10;
SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
methods[i].ml_doc = ndoc; methods[i].ml_doc = ndoc;
...@@ -6148,19 +5882,19 @@ SWIG_init(void) { ...@@ -6148,19 +5882,19 @@ SWIG_init(void) {
(char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
}; };
static SwigPyGetSet thisown_getset_closure = { static SwigPyGetSet thisown_getset_closure = {
(PyCFunction) SwigPyObject_own, SwigPyObject_own,
(PyCFunction) SwigPyObject_own SwigPyObject_own
}; };
static PyGetSetDef thisown_getset_def = { static PyGetSetDef thisown_getset_def = {
(char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
}; };
PyObject *metatype_args;
PyTypeObject *builtin_pytype; PyTypeObject *builtin_pytype;
int builtin_base_count; int builtin_base_count;
swig_type_info *builtin_basetype; swig_type_info *builtin_basetype;
PyObject *tuple; PyObject *tuple;
PyGetSetDescrObject *static_getset; PyGetSetDescrObject *static_getset;
PyTypeObject *metatype; PyTypeObject *metatype;
PyTypeObject *swigpyobject;
SwigPyClientData *cd; SwigPyClientData *cd;
PyObject *public_interface, *public_symbol; PyObject *public_interface, *public_symbol;
PyObject *this_descr; PyObject *this_descr;
...@@ -6175,14 +5909,9 @@ SWIG_init(void) { ...@@ -6175,14 +5909,9 @@ SWIG_init(void) {
(void)static_getset; (void)static_getset;
(void)self; (void)self;
/* metatype is used to implement static member variables. */ /* Metaclass is used to implement static member variables */
metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); metatype = SwigPyObjectType();
assert(metatype_args);
metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
assert(metatype); assert(metatype);
Py_DECREF(metatype_args);
metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
assert(PyType_Ready(metatype) >= 0);
#endif #endif
/* Fix SwigMethods to carry the callback ptrs when needed */ /* Fix SwigMethods to carry the callback ptrs when needed */
...@@ -6200,13 +5929,15 @@ SWIG_init(void) { ...@@ -6200,13 +5929,15 @@ SWIG_init(void) {
SWIG_InitializeModule(0); SWIG_InitializeModule(0);
#ifdef SWIGPYTHON_BUILTIN #ifdef SWIGPYTHON_BUILTIN
swigpyobject = SwigPyObject_TypeOnce();
SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
assert(SwigPyObject_stype); assert(SwigPyObject_stype);
cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
if (!cd) { if (!cd) {
SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); SwigPyObject_clientdata.pytype = swigpyobject;
} else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
# if PY_VERSION_HEX >= 0x03000000 # if PY_VERSION_HEX >= 0x03000000
return NULL; return NULL;
...@@ -6237,9 +5968,9 @@ SWIG_init(void) { ...@@ -6237,9 +5968,9 @@ SWIG_init(void) {
SWIG_InstallConstants(d,swig_const_table); SWIG_InstallConstants(d,swig_const_table);
PyDict_SetItemString(md,(char*)"cvar", SWIG_globals()); PyDict_SetItemString(md,(char *)"cvar", SWIG_globals());
SWIG_addvarlink(SWIG_globals(),(char*)"DefaultID",Swig_var_DefaultID_get, Swig_var_DefaultID_set); SWIG_addvarlink(SWIG_globals(),(char *)"DefaultID",Swig_var_DefaultID_get, Swig_var_DefaultID_set);
SWIG_addvarlink(SWIG_globals(),(char*)"DefaultSupplerID",Swig_var_DefaultSupplerID_get, Swig_var_DefaultSupplerID_set); SWIG_addvarlink(SWIG_globals(),(char *)"DefaultSupplerID",Swig_var_DefaultSupplerID_get, Swig_var_DefaultSupplerID_set);
SWIG_Python_SetConstant(d, "Params_max",SWIG_From_int(static_cast< int >(UTypes::Params::max))); SWIG_Python_SetConstant(d, "Params_max",SWIG_From_int(static_cast< int >(UTypes::Params::max)));
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
return m; return m;
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.8 * Version 3.0.12
* *
* 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
...@@ -107,10 +107,12 @@ template <typename T> T SwigValueInit() { ...@@ -107,10 +107,12 @@ template <typename T> T SwigValueInit() {
#endif #endif
/* exporting methods */ /* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) #if defined(__GNUC__)
# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# ifndef GCC_HASCLASSVISIBILITY # ifndef GCC_HASCLASSVISIBILITY
# define GCC_HASCLASSVISIBILITY # define GCC_HASCLASSVISIBILITY
# endif # endif
# endif
#endif #endif
#ifndef SWIGEXPORT #ifndef SWIGEXPORT
...@@ -669,16 +671,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { ...@@ -669,16 +671,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
char d = *(c++); char d = *(c++);
unsigned char uu; unsigned char uu;
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4); uu = (unsigned char)((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
uu = ((d - ('a'-10)) << 4); uu = (unsigned char)((d - ('a'-10)) << 4);
else else
return (char *) 0; return (char *) 0;
d = *(c++); d = *(c++);
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu |= (d - '0'); uu |= (unsigned char)(d - '0');
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
uu |= (d - ('a'-10)); uu |= (unsigned char)(d - ('a'-10));
else else
return (char *) 0; return (char *) 0;
*u = uu; *u = uu;
...@@ -833,152 +835,21 @@ SWIG_Python_str_FromChar(const char *c) ...@@ -833,152 +835,21 @@ SWIG_Python_str_FromChar(const char *c)
#endif #endif
} }
/* Add PyOS_snprintf for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
# define PyOS_snprintf _snprintf
# else
# define PyOS_snprintf snprintf
# endif
#endif
/* A crude PyString_FromFormat implementation for old Pythons */
#if PY_VERSION_HEX < 0x02020000
#ifndef SWIG_PYBUFFER_SIZE
# define SWIG_PYBUFFER_SIZE 1024
#endif
static PyObject *
PyString_FromFormat(const char *fmt, ...) {
va_list ap;
char buf[SWIG_PYBUFFER_SIZE * 2];
int res;
va_start(ap, fmt);
res = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
}
#endif
/* Add PyObject_Del for old Pythons */
#if PY_VERSION_HEX < 0x01060000
# define PyObject_Del(op) PyMem_DEL((op))
#endif
#ifndef PyObject_DEL #ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del # define PyObject_DEL PyObject_Del
#endif #endif
/* A crude PyExc_StopIteration exception for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# ifndef PyExc_StopIteration
# define PyExc_StopIteration PyExc_RuntimeError
# endif
# ifndef PyObject_GenericGetAttr
# define PyObject_GenericGetAttr 0
# endif
#endif
/* Py_NotImplemented is defined in 2.1 and up. */
#if PY_VERSION_HEX < 0x02010000
# ifndef Py_NotImplemented
# define Py_NotImplemented PyExc_RuntimeError
# endif
#endif
/* A crude PyString_AsStringAndSize implementation for old Pythons */
#if PY_VERSION_HEX < 0x02010000
# ifndef PyString_AsStringAndSize
# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
# endif
#endif
/* PySequence_Size for old Pythons */
#if PY_VERSION_HEX < 0x02000000
# ifndef PySequence_Size
# define PySequence_Size PySequence_Length
# endif
#endif
/* PyBool_FromLong for old Pythons */
#if PY_VERSION_HEX < 0x02030000
static
PyObject *PyBool_FromLong(long ok)
{
PyObject *result = ok ? Py_True : Py_False;
Py_INCREF(result);
return result;
}
#endif
/* Py_ssize_t for old Pythons */
/* This code is as recommended by: */
/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
typedef inquiry lenfunc;
typedef intargfunc ssizeargfunc;
typedef intintargfunc ssizessizeargfunc;
typedef intobjargproc ssizeobjargproc;
typedef intintobjargproc ssizessizeobjargproc;
typedef getreadbufferproc readbufferproc;
typedef getwritebufferproc writebufferproc;
typedef getsegcountproc segcountproc;
typedef getcharbufferproc charbufferproc;
static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
{
long result = 0;
PyObject *i = PyNumber_Int(x);
if (i) {
result = PyInt_AsLong(i);
Py_DECREF(i);
}
return result;
}
#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 { \
if (op) { \
int vret = visit((op), arg); \
if (vret) \
return vret; \
} \
} while (0)
#endif
#if PY_VERSION_HEX < 0x02030000
typedef struct {
PyTypeObject type;
PyNumberMethods as_number;
PyMappingMethods as_mapping;
PySequenceMethods as_sequence;
PyBufferProcs as_buffer;
PyObject *name, *slots;
} PyHeapTypeObject;
#endif
#if PY_VERSION_HEX < 0x02030000
typedef destructor freefunc;
#endif
#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
(PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
(PY_MAJOR_VERSION > 3)) (PY_MAJOR_VERSION > 3))
# define SWIGPY_USE_CAPSULE # define SWIGPY_USE_CAPSULE
# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
#endif #endif
#if PY_VERSION_HEX < 0x03020000 #if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#define Py_hash_t long
#endif #endif
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
...@@ -1059,10 +930,8 @@ SWIG_Python_AddErrorMsg(const char* mesg) ...@@ -1059,10 +930,8 @@ SWIG_Python_AddErrorMsg(const char* mesg)
#endif #endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
# define SWIG_PYTHON_USE_GIL # define SWIG_PYTHON_USE_GIL
# endif # endif
# endif
# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
# ifndef SWIG_PYTHON_INITIALIZE_THREADS # ifndef SWIG_PYTHON_INITIALIZE_THREADS
# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
...@@ -1176,6 +1045,10 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), ...@@ -1176,6 +1045,10 @@ SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self),
* *
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
#if PY_VERSION_HEX < 0x02060000 /* 2.6.0 */
# error "This version of SWIG only supports Python >= 2.6"
#endif
/* Common SWIG API */ /* Common SWIG API */
/* for raw pointers */ /* for raw pointers */
...@@ -1259,11 +1132,7 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { ...@@ -1259,11 +1132,7 @@ SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
#if PY_VERSION_HEX < 0x02030000
PyDict_SetItemString(d, (char *)name, obj);
#else
PyDict_SetItemString(d, name, obj); PyDict_SetItemString(d, name, obj);
#endif
Py_DECREF(obj); Py_DECREF(obj);
if (public_interface) if (public_interface)
SwigPyBuiltin_AddPublicSymbol(public_interface, name); SwigPyBuiltin_AddPublicSymbol(public_interface, name);
...@@ -1273,11 +1142,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam ...@@ -1273,11 +1142,7 @@ SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *nam
SWIGINTERN void SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
#if PY_VERSION_HEX < 0x02030000
PyDict_SetItemString(d, (char *)name, obj);
#else
PyDict_SetItemString(d, name, obj); PyDict_SetItemString(d, name, obj);
#endif
Py_DECREF(obj); Py_DECREF(obj);
} }
...@@ -1377,11 +1242,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi ...@@ -1377,11 +1242,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
} }
/* A functor is a function object with one single object argument */ /* A functor is a function object with one single object argument */
#if PY_VERSION_HEX >= 0x02020000 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, (char*)"O", obj);
#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
#else
#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
#endif
/* /*
Helper for static pointer initialization for both C and C++ code, for example Helper for static pointer initialization for both C and C++ code, for example
...@@ -1427,7 +1288,7 @@ extern "C" { ...@@ -1427,7 +1288,7 @@ extern "C" {
SWIGRUNTIMEINLINE PyObject * SWIGRUNTIMEINLINE PyObject *
_SWIG_Py_None(void) _SWIG_Py_None(void)
{ {
PyObject *none = Py_BuildValue((char*)""); PyObject *none = Py_BuildValue("");
Py_DECREF(none); Py_DECREF(none);
return none; return none;
} }
...@@ -1492,11 +1353,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1492,11 +1353,7 @@ SwigPyClientData_New(PyObject* obj)
data->newargs = obj; data->newargs = obj;
Py_INCREF(obj); Py_INCREF(obj);
} else { } else {
#if (PY_VERSION_HEX < 0x02020000) data->newraw = PyObject_GetAttrString(data->klass, "__new__");
data->newraw = 0;
#else
data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
#endif
if (data->newraw) { if (data->newraw) {
Py_INCREF(data->newraw); Py_INCREF(data->newraw);
data->newargs = PyTuple_New(1); data->newargs = PyTuple_New(1);
...@@ -1507,7 +1364,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1507,7 +1364,7 @@ SwigPyClientData_New(PyObject* obj)
Py_INCREF(data->newargs); Py_INCREF(data->newargs);
} }
/* the destroy method, aka as the C++ delete method */ /* the destroy method, aka as the C++ delete method */
data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
PyErr_Clear(); PyErr_Clear();
data->destroy = 0; data->destroy = 0;
...@@ -1516,11 +1373,7 @@ SwigPyClientData_New(PyObject* obj) ...@@ -1516,11 +1373,7 @@ SwigPyClientData_New(PyObject* obj)
int flags; int flags;
Py_INCREF(data->destroy); Py_INCREF(data->destroy);
flags = PyCFunction_GET_FLAGS(data->destroy); flags = PyCFunction_GET_FLAGS(data->destroy);
#ifdef METH_O
data->delargs = !(flags & (METH_O)); data->delargs = !(flags & (METH_O));
#else
data->delargs = 0;
#endif
} else { } else {
data->delargs = 0; data->delargs = 0;
} }
...@@ -1608,20 +1461,12 @@ SwigPyObject_hex(SwigPyObject *v) ...@@ -1608,20 +1461,12 @@ SwigPyObject_hex(SwigPyObject *v)
} }
SWIGRUNTIME PyObject * SWIGRUNTIME PyObject *
#ifdef METH_NOARGS
SwigPyObject_repr(SwigPyObject *v) SwigPyObject_repr(SwigPyObject *v)
#else
SwigPyObject_repr(SwigPyObject *v, PyObject *args)
#endif
{ {
const char *name = SWIG_TypePrettyName(v->ty); const char *name = SWIG_TypePrettyName(v->ty);
PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v); PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
if (v->next) { if (v->next) {
# ifdef METH_NOARGS
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
# else
PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
# endif
# if PY_VERSION_HEX >= 0x03000000 # if PY_VERSION_HEX >= 0x03000000
PyObject *joined = PyUnicode_Concat(repr, nrep); PyObject *joined = PyUnicode_Concat(repr, nrep);
Py_DecRef(repr); Py_DecRef(repr);
...@@ -1634,6 +1479,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args) ...@@ -1634,6 +1479,14 @@ SwigPyObject_repr(SwigPyObject *v, PyObject *args)
return repr; return repr;
} }
/* We need a version taking two PyObject* parameters so it's a valid
* PyCFunction to use in swigobject_methods[]. */
static PyObject *
SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
return SwigPyObject_repr((SwigPyObject*)v);
}
SWIGRUNTIME int SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{ {
...@@ -1748,11 +1601,6 @@ SWIGRUNTIME PyObject* ...@@ -1748,11 +1601,6 @@ SWIGRUNTIME PyObject*
SwigPyObject_append(PyObject* v, PyObject* next) SwigPyObject_append(PyObject* v, PyObject* next)
{ {
SwigPyObject *sobj = (SwigPyObject *) v; SwigPyObject *sobj = (SwigPyObject *) v;
#ifndef METH_O
PyObject *tmp = 0;
if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
next = tmp;
#endif
if (!SwigPyObject_Check(next)) { if (!SwigPyObject_Check(next)) {
PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
return NULL; return NULL;
...@@ -1763,11 +1611,7 @@ SwigPyObject_append(PyObject* v, PyObject* next) ...@@ -1763,11 +1611,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
} }
SWIGRUNTIME PyObject* SWIGRUNTIME PyObject*
#ifdef METH_NOARGS
SwigPyObject_next(PyObject* v)
#else
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *) v; SwigPyObject *sobj = (SwigPyObject *) v;
if (sobj->next) { if (sobj->next) {
...@@ -1779,11 +1623,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) ...@@ -1779,11 +1623,7 @@ SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
} }
SWIGINTERN PyObject* SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_disown(PyObject *v)
#else
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
sobj->own = 0; sobj->own = 0;
...@@ -1791,11 +1631,7 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) ...@@ -1791,11 +1631,7 @@ SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
} }
SWIGINTERN PyObject* SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_acquire(PyObject *v)
#else
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{ {
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
sobj->own = SWIG_POINTER_OWN; sobj->own = SWIG_POINTER_OWN;
...@@ -1806,13 +1642,7 @@ SWIGINTERN PyObject* ...@@ -1806,13 +1642,7 @@ SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args) SwigPyObject_own(PyObject *v, PyObject *args)
{ {
PyObject *val = 0; PyObject *val = 0;
#if (PY_VERSION_HEX < 0x02020000)
if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
#elif (PY_VERSION_HEX < 0x02050000)
if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
#else
if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
#endif
{ {
return NULL; return NULL;
} }
...@@ -1821,55 +1651,26 @@ SwigPyObject_own(PyObject *v, PyObject *args) ...@@ -1821,55 +1651,26 @@ SwigPyObject_own(PyObject *v, PyObject *args)
SwigPyObject *sobj = (SwigPyObject *)v; SwigPyObject *sobj = (SwigPyObject *)v;
PyObject *obj = PyBool_FromLong(sobj->own); PyObject *obj = PyBool_FromLong(sobj->own);
if (val) { if (val) {
#ifdef METH_NOARGS
if (PyObject_IsTrue(val)) {
SwigPyObject_acquire(v);
} else {
SwigPyObject_disown(v);
}
#else
if (PyObject_IsTrue(val)) { if (PyObject_IsTrue(val)) {
SwigPyObject_acquire(v,args); SwigPyObject_acquire(v,args);
} else { } else {
SwigPyObject_disown(v,args); SwigPyObject_disown(v,args);
} }
#endif
} }
return obj; return obj;
} }
} }
#ifdef METH_O
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 *)"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"},
{(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
{0, 0, 0, 0}
};
#else
static PyMethodDef static PyMethodDef
swigobject_methods[] = { swigobject_methods[] = {
{(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
{(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
{(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
{(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
{(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
{(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
{0, 0, 0, 0} {0, 0, 0, 0}
}; };
#endif
#if PY_VERSION_HEX < 0x02020000
SWIGINTERN PyObject *
SwigPyObject_getattr(SwigPyObject *sobj,char *name)
{
return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
}
#endif
SWIGRUNTIME PyTypeObject* SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) { SwigPyObject_TypeOnce(void) {
...@@ -1914,12 +1715,8 @@ SwigPyObject_TypeOnce(void) { ...@@ -1914,12 +1715,8 @@ SwigPyObject_TypeOnce(void) {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ #else
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif #endif
}; };
...@@ -1927,23 +1724,18 @@ SwigPyObject_TypeOnce(void) { ...@@ -1927,23 +1724,18 @@ SwigPyObject_TypeOnce(void) {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
PyObject_HEAD_INIT(NULL) PyObject_HEAD_INIT(NULL)
0, /* ob_size */ 0, /* ob_size */
#endif #endif
(char *)"SwigPyObject", /* tp_name */ "SwigPyObject", /* tp_name */
sizeof(SwigPyObject), /* tp_basicsize */ sizeof(SwigPyObject), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyObject_dealloc, /* tp_dealloc */ (destructor)SwigPyObject_dealloc, /* tp_dealloc */
0, /* tp_print */ 0, /* tp_print */
#if PY_VERSION_HEX < 0x02020000
(getattrfunc)SwigPyObject_getattr, /* tp_getattr */
#else
(getattrfunc)0, /* tp_getattr */ (getattrfunc)0, /* tp_getattr */
#endif
(setattrfunc)0, /* tp_setattr */ (setattrfunc)0, /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
...@@ -1966,7 +1758,6 @@ SwigPyObject_TypeOnce(void) { ...@@ -1966,7 +1758,6 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_clear */ 0, /* tp_clear */
(richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0, /* tp_iter */ 0, /* tp_iter */
0, /* tp_iternext */ 0, /* tp_iternext */
swigobject_methods, /* tp_methods */ swigobject_methods, /* tp_methods */
...@@ -1987,13 +1778,8 @@ SwigPyObject_TypeOnce(void) { ...@@ -1987,13 +1778,8 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_cache */ 0, /* tp_cache */
0, /* tp_subclasses */ 0, /* tp_subclasses */
0, /* tp_weaklist */ 0, /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -2001,20 +1787,14 @@ SwigPyObject_TypeOnce(void) { ...@@ -2001,20 +1787,14 @@ SwigPyObject_TypeOnce(void) {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
swigpyobject_type = tmp; swigpyobject_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
swigpyobject_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&swigpyobject_type) < 0) if (PyType_Ready(&swigpyobject_type) < 0)
return NULL; return NULL;
#endif
} }
return &swigpyobject_type; return &swigpyobject_type;
} }
...@@ -2119,14 +1899,13 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2119,14 +1899,13 @@ SwigPyPacked_TypeOnce(void) {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
PyObject_HEAD_INIT(NULL) PyObject_HEAD_INIT(NULL)
0, /* ob_size */ 0, /* ob_size */
#endif #endif
(char *)"SwigPyPacked", /* tp_name */ "SwigPyPacked", /* tp_name */
sizeof(SwigPyPacked), /* tp_basicsize */ sizeof(SwigPyPacked), /* tp_basicsize */
0, /* tp_itemsize */ 0, /* tp_itemsize */
(destructor)SwigPyPacked_dealloc, /* tp_dealloc */ (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
...@@ -2154,7 +1933,6 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2154,7 +1933,6 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0, /* tp_iter */ 0, /* tp_iter */
0, /* tp_iternext */ 0, /* tp_iternext */
0, /* tp_methods */ 0, /* tp_methods */
...@@ -2175,13 +1953,8 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2175,13 +1953,8 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_cache */ 0, /* tp_cache */
0, /* tp_subclasses */ 0, /* tp_subclasses */
0, /* tp_weaklist */ 0, /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -2189,20 +1962,14 @@ SwigPyPacked_TypeOnce(void) { ...@@ -2189,20 +1962,14 @@ SwigPyPacked_TypeOnce(void) {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
swigpypacked_type = tmp; swigpypacked_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
swigpypacked_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&swigpypacked_type) < 0) if (PyType_Ready(&swigpypacked_type) < 0)
return NULL; return NULL;
#endif
} }
return &swigpypacked_type; return &swigpypacked_type;
} }
...@@ -2288,7 +2055,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) ...@@ -2288,7 +2055,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj)
obj = 0; obj = 0;
#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
if (PyInstance_Check(pyobj)) { if (PyInstance_Check(pyobj)) {
obj = _PyInstance_Lookup(pyobj, SWIG_This()); obj = _PyInstance_Lookup(pyobj, SWIG_This());
} else { } else {
...@@ -2510,7 +2277,6 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t ...@@ -2510,7 +2277,6 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t
SWIGRUNTIME PyObject* SWIGRUNTIME PyObject*
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{ {
#if (PY_VERSION_HEX >= 0x02020000)
PyObject *inst = 0; PyObject *inst = 0;
PyObject *newraw = data->newraw; PyObject *newraw = data->newraw;
if (newraw) { if (newraw) {
...@@ -2548,45 +2314,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) ...@@ -2548,45 +2314,13 @@ SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
#endif #endif
} }
return inst; return inst;
#else
#if (PY_VERSION_HEX >= 0x02010000)
PyObject *inst = 0;
PyObject *dict = PyDict_New();
if (dict) {
PyDict_SetItem(dict, SWIG_This(), swig_this);
inst = PyInstance_NewRaw(data->newargs, dict);
Py_DECREF(dict);
}
return (PyObject *) inst;
#else
PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
if (inst == NULL) {
return NULL;
}
inst->in_class = (PyClassObject *)data->newargs;
Py_INCREF(inst->in_class);
inst->in_dict = PyDict_New();
if (inst->in_dict == NULL) {
Py_DECREF(inst);
return NULL;
}
#ifdef Py_TPFLAGS_HAVE_WEAKREFS
inst->in_weakreflist = NULL;
#endif
#ifdef Py_TPFLAGS_GC
PyObject_GC_Init(inst);
#endif
PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
return (PyObject *) inst;
#endif
#endif
} }
SWIGRUNTIME void SWIGRUNTIME void
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{ {
PyObject *dict; PyObject *dict;
#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
PyObject **dictptr = _PyObject_GetDictPtr(inst); PyObject **dictptr = _PyObject_GetDictPtr(inst);
if (dictptr != NULL) { if (dictptr != NULL) {
dict = *dictptr; dict = *dictptr;
...@@ -2598,7 +2332,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) ...@@ -2598,7 +2332,7 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
return; return;
} }
#endif #endif
dict = PyObject_GetAttrString(inst, (char*)"__dict__"); dict = PyObject_GetAttrString(inst, "__dict__");
PyDict_SetItem(dict, SWIG_This(), swig_this); PyDict_SetItem(dict, SWIG_This(), swig_this);
Py_DECREF(dict); Py_DECREF(dict);
} }
...@@ -2700,8 +2434,8 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { ...@@ -2700,8 +2434,8 @@ SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
# ifdef SWIGPY_USE_CAPSULE # ifdef SWIGPY_USE_CAPSULE
type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
# else # else
type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, type_pointer = PyCObject_Import((char *)"swig_runtime_data" SWIG_RUNTIME_VERSION,
(char*)"type_pointer" SWIG_TYPE_TABLE_NAME); (char *)"type_pointer" SWIG_TYPE_TABLE_NAME);
# endif # endif
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
PyErr_Clear(); PyErr_Clear();
...@@ -2771,22 +2505,22 @@ SWIGRUNTIME void ...@@ -2771,22 +2505,22 @@ SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) { SWIG_Python_SetModule(swig_module_info *swig_module) {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
/* Add a dummy module object into sys.modules */ /* Add a dummy module object into sys.modules */
PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
#else #else
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
#endif #endif
#ifdef SWIGPY_USE_CAPSULE #ifdef SWIGPY_USE_CAPSULE
PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
if (pointer && module) { if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
} else { } else {
Py_XDECREF(pointer); Py_XDECREF(pointer);
} }
#else #else
PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
if (pointer && module) { if (pointer && module) {
PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); PyModule_AddObject(module, "type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
} else { } else {
Py_XDECREF(pointer); Py_XDECREF(pointer);
} }
...@@ -3017,11 +2751,6 @@ static swig_module_info swig_module = {swig_types, 3, 0, 0, 0, 0}; ...@@ -3017,11 +2751,6 @@ static swig_module_info swig_module = {swig_types, 3, 0, 0, 0, 0};
/* -------- TYPES TABLE (END) -------- */ /* -------- TYPES TABLE (END) -------- */
#if (PY_VERSION_HEX <= 0x02000000)
# if !defined(SWIG_PYTHON_CLASSIC)
# error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
/*----------------------------------------------- /*-----------------------------------------------
@(target):= _pyUModbus.so @(target):= _pyUModbus.so
...@@ -3035,7 +2764,7 @@ static swig_module_info swig_module = {swig_types, 3, 0, 0, 0, 0}; ...@@ -3035,7 +2764,7 @@ static swig_module_info swig_module = {swig_types, 3, 0, 0, 0, 0};
#endif #endif
#define SWIG_name "_pyUModbus" #define SWIG_name "_pyUModbus"
#define SWIGVERSION 0x030008 #define SWIGVERSION 0x030012
#define SWIG_VERSION SWIGVERSION #define SWIG_VERSION SWIGVERSION
...@@ -3145,11 +2874,15 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) ...@@ -3145,11 +2874,15 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
} else { } else {
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#else
#if PY_VERSION_HEX >= 0x03010000 #if PY_VERSION_HEX >= 0x03010000
return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape"); return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#else #else
return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif #endif
#endif
#else #else
return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size)); return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif #endif
...@@ -3186,7 +2919,7 @@ SWIG_AsVal_double (PyObject *obj, double *val) ...@@ -3186,7 +2919,7 @@ SWIG_AsVal_double (PyObject *obj, double *val)
return SWIG_OK; return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000 #if PY_VERSION_HEX < 0x03000000
} else if (PyInt_Check(obj)) { } else if (PyInt_Check(obj)) {
if (val) *val = PyInt_AsLong(obj); if (val) *val = (double) PyInt_AsLong(obj);
return SWIG_OK; return SWIG_OK;
#endif #endif
} else if (PyLong_Check(obj)) { } else if (PyLong_Check(obj)) {
...@@ -3329,13 +3062,18 @@ SWIGINTERN int ...@@ -3329,13 +3062,18 @@ SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{ {
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
if (PyBytes_Check(obj))
#else
if (PyUnicode_Check(obj)) if (PyUnicode_Check(obj))
#endif
#else #else
if (PyString_Check(obj)) if (PyString_Check(obj))
#endif #endif
{ {
char *cstr; Py_ssize_t len; char *cstr; Py_ssize_t len;
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
if (!alloc && cptr) { if (!alloc && cptr) {
/* We can't allow converting without allocation, since the internal /* We can't allow converting without allocation, since the internal
representation of string in Python 3 is UCS-2/UCS-4 but we require representation of string in Python 3 is UCS-2/UCS-4 but we require
...@@ -3344,8 +3082,9 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3344,8 +3082,9 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
return SWIG_RuntimeError; return SWIG_RuntimeError;
} }
obj = PyUnicode_AsUTF8String(obj); obj = PyUnicode_AsUTF8String(obj);
PyBytes_AsStringAndSize(obj, &cstr, &len);
if(alloc) *alloc = SWIG_NEWOBJ; if(alloc) *alloc = SWIG_NEWOBJ;
#endif
PyBytes_AsStringAndSize(obj, &cstr, &len);
#else #else
PyString_AsStringAndSize(obj, &cstr, &len); PyString_AsStringAndSize(obj, &cstr, &len);
#endif #endif
...@@ -3366,26 +3105,34 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3366,26 +3105,34 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
if (*alloc == SWIG_NEWOBJ) if (*alloc == SWIG_NEWOBJ)
#endif #endif
{ {
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
*alloc = SWIG_NEWOBJ; *alloc = SWIG_NEWOBJ;
} else { } else {
*cptr = cstr; *cptr = cstr;
*alloc = SWIG_OLDOBJ; *alloc = SWIG_OLDOBJ;
} }
} else { } else {
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000
assert(0); /* Should never reach here in Python 3 */ #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#endif *cptr = PyBytes_AsString(obj);
#else
assert(0); /* Should never reach here with Unicode strings in Python 3 */
#endif
#else
*cptr = SWIG_Python_str_AsChar(obj); *cptr = SWIG_Python_str_AsChar(obj);
#endif
} }
} }
if (psize) *psize = len + 1; if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
Py_XDECREF(obj); Py_XDECREF(obj);
#endif #endif
return SWIG_OK; return SWIG_OK;
} else { } else {
#if defined(SWIG_PYTHON_2_UNICODE) #if defined(SWIG_PYTHON_2_UNICODE)
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
#endif
#if PY_VERSION_HEX<0x03000000 #if PY_VERSION_HEX<0x03000000
if (PyUnicode_Check(obj)) { if (PyUnicode_Check(obj)) {
char *cstr; Py_ssize_t len; char *cstr; Py_ssize_t len;
...@@ -3396,7 +3143,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) ...@@ -3396,7 +3143,7 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
if (cptr) { if (cptr) {
if (alloc) *alloc = SWIG_NEWOBJ; if (alloc) *alloc = SWIG_NEWOBJ;
*cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
} }
if (psize) *psize = len + 1; if (psize) *psize = len + 1;
...@@ -3462,7 +3209,7 @@ SWIGINTERNINLINE PyObject* ...@@ -3462,7 +3209,7 @@ SWIGINTERNINLINE PyObject*
} }
#define SWIG_From_long PyLong_FromLong #define SWIG_From_long PyInt_FromLong
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -5167,29 +4914,29 @@ fail: ...@@ -5167,29 +4914,29 @@ fail:
SWIGINTERN PyObject *UModbus_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { SWIGINTERN PyObject *UModbus_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *obj; PyObject *obj;
if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
SWIG_TypeNewClientData(SWIGTYPE_p_UModbus, SWIG_NewClientData(obj)); SWIG_TypeNewClientData(SWIGTYPE_p_UModbus, SWIG_NewClientData(obj));
return SWIG_Py_Void(); return SWIG_Py_Void();
} }
static PyMethodDef SwigMethods[] = { static PyMethodDef SwigMethods[] = {
{ (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
{ (char *)"new_UModbus", _wrap_new_UModbus, METH_VARARGS, NULL}, { "new_UModbus", _wrap_new_UModbus, METH_VARARGS, NULL},
{ (char *)"delete_UModbus", _wrap_delete_UModbus, METH_VARARGS, NULL}, { "delete_UModbus", _wrap_delete_UModbus, METH_VARARGS, NULL},
{ (char *)"UModbus_getUIType", _wrap_UModbus_getUIType, METH_VARARGS, NULL}, { "UModbus_getUIType", _wrap_UModbus_getUIType, METH_VARARGS, NULL},
{ (char *)"UModbus_isWriteFunction", _wrap_UModbus_isWriteFunction, METH_VARARGS, NULL}, { "UModbus_isWriteFunction", _wrap_UModbus_isWriteFunction, METH_VARARGS, NULL},
{ (char *)"UModbus_prepare", _wrap_UModbus_prepare, METH_VARARGS, NULL}, { "UModbus_prepare", _wrap_UModbus_prepare, METH_VARARGS, NULL},
{ (char *)"UModbus_connect", _wrap_UModbus_connect, METH_VARARGS, NULL}, { "UModbus_connect", _wrap_UModbus_connect, METH_VARARGS, NULL},
{ (char *)"UModbus_conn_port", _wrap_UModbus_conn_port, METH_VARARGS, NULL}, { "UModbus_conn_port", _wrap_UModbus_conn_port, METH_VARARGS, NULL},
{ (char *)"UModbus_conn_ip", _wrap_UModbus_conn_ip, METH_VARARGS, NULL}, { "UModbus_conn_ip", _wrap_UModbus_conn_ip, METH_VARARGS, NULL},
{ (char *)"UModbus_isConnection", _wrap_UModbus_isConnection, METH_VARARGS, NULL}, { "UModbus_isConnection", _wrap_UModbus_isConnection, METH_VARARGS, NULL},
{ (char *)"UModbus_setTimeout", _wrap_UModbus_setTimeout, METH_VARARGS, NULL}, { "UModbus_setTimeout", _wrap_UModbus_setTimeout, METH_VARARGS, NULL},
{ (char *)"UModbus_mbread", _wrap_UModbus_mbread, METH_VARARGS, NULL}, { "UModbus_mbread", _wrap_UModbus_mbread, METH_VARARGS, NULL},
{ (char *)"UModbus_getWord", _wrap_UModbus_getWord, METH_VARARGS, NULL}, { "UModbus_getWord", _wrap_UModbus_getWord, METH_VARARGS, NULL},
{ (char *)"UModbus_getByte", _wrap_UModbus_getByte, METH_VARARGS, NULL}, { "UModbus_getByte", _wrap_UModbus_getByte, METH_VARARGS, NULL},
{ (char *)"UModbus_getBit", _wrap_UModbus_getBit, METH_VARARGS, NULL}, { "UModbus_getBit", _wrap_UModbus_getBit, METH_VARARGS, NULL},
{ (char *)"UModbus_mbwrite", _wrap_UModbus_mbwrite, METH_VARARGS, NULL}, { "UModbus_mbwrite", _wrap_UModbus_mbwrite, METH_VARARGS, NULL},
{ (char *)"UModbus_swigregister", UModbus_swigregister, METH_VARARGS, NULL}, { "UModbus_swigregister", UModbus_swigregister, METH_VARARGS, NULL},
{ NULL, NULL, 0, NULL } { NULL, NULL, 0, NULL }
}; };
...@@ -5593,7 +5340,6 @@ extern "C" { ...@@ -5593,7 +5340,6 @@ extern "C" {
static int type_init = 0; static int type_init = 0;
if (!type_init) { if (!type_init) {
const PyTypeObject tmp = { const PyTypeObject tmp = {
/* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000 #if PY_VERSION_HEX >= 0x03000000
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
#else #else
...@@ -5624,15 +5370,9 @@ extern "C" { ...@@ -5624,15 +5370,9 @@ extern "C" {
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
0, /* tp_weaklistoffset */ 0, /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
0, /* tp_del */ 0, /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
0, /* tp_version_tag */ 0, /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000 #if PY_VERSION_HEX >= 0x03040000
0, /* tp_finalize */ 0, /* tp_finalize */
#endif #endif
...@@ -5640,20 +5380,14 @@ extern "C" { ...@@ -5640,20 +5380,14 @@ extern "C" {
0, /* tp_allocs */ 0, /* tp_allocs */
0, /* tp_frees */ 0, /* tp_frees */
0, /* tp_maxalloc */ 0, /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
0, /* tp_prev */ 0, /* tp_prev */
#endif
0 /* tp_next */ 0 /* tp_next */
#endif #endif
}; };
varlink_type = tmp; varlink_type = tmp;
type_init = 1; type_init = 1;
#if PY_VERSION_HEX < 0x02020000
varlink_type.ob_type = &PyType_Type;
#else
if (PyType_Ready(&varlink_type) < 0) if (PyType_Ready(&varlink_type) < 0)
return NULL; return NULL;
#endif
} }
return &varlink_type; return &varlink_type;
} }
...@@ -5755,9 +5489,9 @@ extern "C" { ...@@ -5755,9 +5489,9 @@ extern "C" {
char *ndoc = (char*)malloc(ldoc + lptr + 10); char *ndoc = (char*)malloc(ldoc + lptr + 10);
if (ndoc) { if (ndoc) {
char *buff = ndoc; char *buff = ndoc;
strncpy(buff, methods[i].ml_doc, ldoc); memcpy(buff, methods[i].ml_doc, ldoc);
buff += ldoc; buff += ldoc;
strncpy(buff, "swig_ptr: ", 10); memcpy(buff, "swig_ptr: ", 10);
buff += 10; buff += 10;
SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
methods[i].ml_doc = ndoc; methods[i].ml_doc = ndoc;
...@@ -5819,19 +5553,19 @@ SWIG_init(void) { ...@@ -5819,19 +5553,19 @@ SWIG_init(void) {
(char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
}; };
static SwigPyGetSet thisown_getset_closure = { static SwigPyGetSet thisown_getset_closure = {
(PyCFunction) SwigPyObject_own, SwigPyObject_own,
(PyCFunction) SwigPyObject_own SwigPyObject_own
}; };
static PyGetSetDef thisown_getset_def = { static PyGetSetDef thisown_getset_def = {
(char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
}; };
PyObject *metatype_args;
PyTypeObject *builtin_pytype; PyTypeObject *builtin_pytype;
int builtin_base_count; int builtin_base_count;
swig_type_info *builtin_basetype; swig_type_info *builtin_basetype;
PyObject *tuple; PyObject *tuple;
PyGetSetDescrObject *static_getset; PyGetSetDescrObject *static_getset;
PyTypeObject *metatype; PyTypeObject *metatype;
PyTypeObject *swigpyobject;
SwigPyClientData *cd; SwigPyClientData *cd;
PyObject *public_interface, *public_symbol; PyObject *public_interface, *public_symbol;
PyObject *this_descr; PyObject *this_descr;
...@@ -5846,14 +5580,9 @@ SWIG_init(void) { ...@@ -5846,14 +5580,9 @@ SWIG_init(void) {
(void)static_getset; (void)static_getset;
(void)self; (void)self;
/* metatype is used to implement static member variables. */ /* Metaclass is used to implement static member variables */
metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); metatype = SwigPyObjectType();
assert(metatype_args);
metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
assert(metatype); assert(metatype);
Py_DECREF(metatype_args);
metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
assert(PyType_Ready(metatype) >= 0);
#endif #endif
/* Fix SwigMethods to carry the callback ptrs when needed */ /* Fix SwigMethods to carry the callback ptrs when needed */
...@@ -5871,13 +5600,15 @@ SWIG_init(void) { ...@@ -5871,13 +5600,15 @@ SWIG_init(void) {
SWIG_InitializeModule(0); SWIG_InitializeModule(0);
#ifdef SWIGPYTHON_BUILTIN #ifdef SWIGPYTHON_BUILTIN
swigpyobject = SwigPyObject_TypeOnce();
SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
assert(SwigPyObject_stype); assert(SwigPyObject_stype);
cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
if (!cd) { if (!cd) {
SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); SwigPyObject_clientdata.pytype = swigpyobject;
} else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
# if PY_VERSION_HEX >= 0x03000000 # if PY_VERSION_HEX >= 0x03000000
return NULL; return NULL;
......
# This file was automatically generated by SWIG (http://www.swig.org). # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8 # Version 3.0.12
# #
# 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 as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_import_helper():
import importlib
from sys import version_info pkg_parts = __name__.rpartition('.')
if version_info >= (2, 6, 0): pkg = pkg_parts[0] if pkg_parts[1] == '.' else pkg_parts[2]
mname = '.'.join((pkg, '_pyUConnector')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_pyUConnector')
_pyUConnector = swig_import_helper()
del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
def swig_import_helper(): def swig_import_helper():
from os.path import dirname from os.path import dirname
import imp import imp
...@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0): ...@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0):
except ImportError: except ImportError:
import _pyUConnector import _pyUConnector
return _pyUConnector return _pyUConnector
if fp is not None:
try: try:
_mod = imp.load_module('_pyUConnector', fp, pathname, description) _mod = imp.load_module('_pyUConnector', fp, pathname, description)
finally: finally:
if fp is not None:
fp.close() fp.close()
return _mod return _mod
_pyUConnector = swig_import_helper() _pyUConnector = swig_import_helper()
del swig_import_helper del swig_import_helper
else: else:
import _pyUConnector raise RuntimeError('Python 2.6 or later required')
del version_info del _swig_python_version_info
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1): def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"): if (name == "thisown"):
...@@ -51,25 +64,19 @@ def _swig_setattr(self, class_type, name, value): ...@@ -51,25 +64,19 @@ def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0) return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr_nondynamic(self, class_type, name, static=1): def _swig_getattr(self, class_type, name):
if (name == "thisown"): if (name == "thisown"):
return self.this.own() return self.this.own()
method = class_type.__swig_getmethods__.get(name, None) method = class_type.__swig_getmethods__.get(name, None)
if method: if method:
return method(self) return method(self)
if (not static): raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
return object.__getattr__(self, name)
else:
raise AttributeError(name)
def _swig_getattr(self, class_type, name):
return _swig_getattr_nondynamic(self, class_type, name, 0)
def _swig_repr(self): def _swig_repr(self):
try: try:
strthis = "proxy of " + self.this.__repr__() strthis = "proxy of " + self.this.__repr__()
except Exception: except __builtin__.Exception:
strthis = "" strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
...@@ -85,7 +92,7 @@ class Params: ...@@ -85,7 +92,7 @@ class Params:
this = _pyUConnector.new_Params() this = _pyUConnector.new_Params()
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
def add(self, s): def add(self, s):
...@@ -97,7 +104,7 @@ class Params: ...@@ -97,7 +104,7 @@ class Params:
__swig_getmethods__["argc"] = _pyUConnector.Params_argc_get __swig_getmethods__["argc"] = _pyUConnector.Params_argc_get
__swig_setmethods__["argv"] = _pyUConnector.Params_argv_set __swig_setmethods__["argv"] = _pyUConnector.Params_argv_set
__swig_getmethods__["argv"] = _pyUConnector.Params_argv_get __swig_getmethods__["argv"] = _pyUConnector.Params_argv_get
__swig_getmethods__["inst"] = lambda x: _pyUConnector.Params_inst inst = _pyUConnector.Params_inst
__swig_destroy__ = _pyUConnector.delete_Params __swig_destroy__ = _pyUConnector.delete_Params
__del__ = lambda self: None __del__ = lambda self: None
Params_swigregister = _pyUConnector.Params_swigregister Params_swigregister = _pyUConnector.Params_swigregister
...@@ -131,7 +138,7 @@ class ShortIOInfo: ...@@ -131,7 +138,7 @@ class ShortIOInfo:
this = _pyUConnector.new_ShortIOInfo() this = _pyUConnector.new_ShortIOInfo()
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUConnector.delete_ShortIOInfo __swig_destroy__ = _pyUConnector.delete_ShortIOInfo
__del__ = lambda self: None __del__ = lambda self: None
...@@ -149,7 +156,7 @@ class UConnector: ...@@ -149,7 +156,7 @@ class UConnector:
this = _pyUConnector.new_UConnector(*args) this = _pyUConnector.new_UConnector(*args)
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUConnector.delete_UConnector __swig_destroy__ = _pyUConnector.delete_UConnector
__del__ = lambda self: None __del__ = lambda self: None
...@@ -198,6 +205,5 @@ class UConnector: ...@@ -198,6 +205,5 @@ class UConnector:
UConnector_swigregister = _pyUConnector.UConnector_swigregister UConnector_swigregister = _pyUConnector.UConnector_swigregister
UConnector_swigregister(UConnector) UConnector_swigregister(UConnector)
# This file is compatible with both classic and new-style classes.
# This file was automatically generated by SWIG (http://www.swig.org). # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8 # Version 3.0.12
# #
# 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 as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_import_helper():
import importlib
from sys import version_info pkg_parts = __name__.rpartition('.')
if version_info >= (2, 6, 0): pkg = pkg_parts[0] if pkg_parts[1] == '.' else pkg_parts[2]
mname = '.'.join((pkg, '_pyUExceptions')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_pyUExceptions')
_pyUExceptions = swig_import_helper()
del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
def swig_import_helper(): def swig_import_helper():
from os.path import dirname from os.path import dirname
import imp import imp
...@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0): ...@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0):
except ImportError: except ImportError:
import _pyUExceptions import _pyUExceptions
return _pyUExceptions return _pyUExceptions
if fp is not None:
try: try:
_mod = imp.load_module('_pyUExceptions', fp, pathname, description) _mod = imp.load_module('_pyUExceptions', fp, pathname, description)
finally: finally:
if fp is not None:
fp.close() fp.close()
return _mod return _mod
_pyUExceptions = swig_import_helper() _pyUExceptions = swig_import_helper()
del swig_import_helper del swig_import_helper
else: else:
import _pyUExceptions raise RuntimeError('Python 2.6 or later required')
del version_info del _swig_python_version_info
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1): def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"): if (name == "thisown"):
...@@ -51,25 +64,19 @@ def _swig_setattr(self, class_type, name, value): ...@@ -51,25 +64,19 @@ def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0) return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr_nondynamic(self, class_type, name, static=1): def _swig_getattr(self, class_type, name):
if (name == "thisown"): if (name == "thisown"):
return self.this.own() return self.this.own()
method = class_type.__swig_getmethods__.get(name, None) method = class_type.__swig_getmethods__.get(name, None)
if method: if method:
return method(self) return method(self)
if (not static): raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
return object.__getattr__(self, name)
else:
raise AttributeError(name)
def _swig_getattr(self, class_type, name):
return _swig_getattr_nondynamic(self, class_type, name, 0)
def _swig_repr(self): def _swig_repr(self):
try: try:
strthis = "proxy of " + self.this.__repr__() strthis = "proxy of " + self.this.__repr__()
except Exception: except __builtin__.Exception:
strthis = "" strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
...@@ -84,7 +91,7 @@ class UException: ...@@ -84,7 +91,7 @@ class UException:
this = _pyUExceptions.new_UException(*args) this = _pyUExceptions.new_UException(*args)
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUExceptions.delete_UException __swig_destroy__ = _pyUExceptions.delete_UException
__del__ = lambda self: None __del__ = lambda self: None
...@@ -111,7 +118,7 @@ class UTimeOut(UException): ...@@ -111,7 +118,7 @@ class UTimeOut(UException):
this = _pyUExceptions.new_UTimeOut(*args) this = _pyUExceptions.new_UTimeOut(*args)
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUExceptions.delete_UTimeOut __swig_destroy__ = _pyUExceptions.delete_UTimeOut
__del__ = lambda self: None __del__ = lambda self: None
...@@ -133,7 +140,7 @@ class USysError(UException): ...@@ -133,7 +140,7 @@ class USysError(UException):
this = _pyUExceptions.new_USysError(*args) this = _pyUExceptions.new_USysError(*args)
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUExceptions.delete_USysError __swig_destroy__ = _pyUExceptions.delete_USysError
__del__ = lambda self: None __del__ = lambda self: None
...@@ -155,13 +162,12 @@ class UValidateError(UException): ...@@ -155,13 +162,12 @@ class UValidateError(UException):
this = _pyUExceptions.new_UValidateError(*args) this = _pyUExceptions.new_UValidateError(*args)
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUExceptions.delete_UValidateError __swig_destroy__ = _pyUExceptions.delete_UValidateError
__del__ = lambda self: None __del__ = lambda self: None
UValidateError_swigregister = _pyUExceptions.UValidateError_swigregister UValidateError_swigregister = _pyUExceptions.UValidateError_swigregister
UValidateError_swigregister(UValidateError) UValidateError_swigregister(UValidateError)
# This file is compatible with both classic and new-style classes.
# This file was automatically generated by SWIG (http://www.swig.org). # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8 # Version 3.0.12
# #
# 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 as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_import_helper():
import importlib
from sys import version_info pkg_parts = __name__.rpartition('.')
if version_info >= (2, 6, 0): pkg = pkg_parts[0] if pkg_parts[1] == '.' else pkg_parts[2]
mname = '.'.join((pkg, '_pyUModbus')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_pyUModbus')
_pyUModbus = swig_import_helper()
del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
def swig_import_helper(): def swig_import_helper():
from os.path import dirname from os.path import dirname
import imp import imp
...@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0): ...@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0):
except ImportError: except ImportError:
import _pyUModbus import _pyUModbus
return _pyUModbus return _pyUModbus
if fp is not None:
try: try:
_mod = imp.load_module('_pyUModbus', fp, pathname, description) _mod = imp.load_module('_pyUModbus', fp, pathname, description)
finally: finally:
if fp is not None:
fp.close() fp.close()
return _mod return _mod
_pyUModbus = swig_import_helper() _pyUModbus = swig_import_helper()
del swig_import_helper del swig_import_helper
else: else:
import _pyUModbus raise RuntimeError('Python 2.6 or later required')
del version_info del _swig_python_version_info
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1): def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"): if (name == "thisown"):
...@@ -51,25 +64,19 @@ def _swig_setattr(self, class_type, name, value): ...@@ -51,25 +64,19 @@ def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0) return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr_nondynamic(self, class_type, name, static=1): def _swig_getattr(self, class_type, name):
if (name == "thisown"): if (name == "thisown"):
return self.this.own() return self.this.own()
method = class_type.__swig_getmethods__.get(name, None) method = class_type.__swig_getmethods__.get(name, None)
if method: if method:
return method(self) return method(self)
if (not static): raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
return object.__getattr__(self, name)
else:
raise AttributeError(name)
def _swig_getattr(self, class_type, name):
return _swig_getattr_nondynamic(self, class_type, name, 0)
def _swig_repr(self): def _swig_repr(self):
try: try:
strthis = "proxy of " + self.this.__repr__() strthis = "proxy of " + self.this.__repr__()
except Exception: except __builtin__.Exception:
strthis = "" strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
...@@ -84,7 +91,7 @@ class UModbus: ...@@ -84,7 +91,7 @@ class UModbus:
this = _pyUModbus.new_UModbus() this = _pyUModbus.new_UModbus()
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUModbus.delete_UModbus __swig_destroy__ = _pyUModbus.delete_UModbus
__del__ = lambda self: None __del__ = lambda self: None
...@@ -130,6 +137,5 @@ class UModbus: ...@@ -130,6 +137,5 @@ class UModbus:
UModbus_swigregister = _pyUModbus.UModbus_swigregister UModbus_swigregister = _pyUModbus.UModbus_swigregister
UModbus_swigregister(UModbus) UModbus_swigregister(UModbus)
# This file is compatible with both classic and new-style classes.
# This file was automatically generated by SWIG (http://www.swig.org). # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8 # Version 3.0.12
# #
# 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 as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
def swig_import_helper():
import importlib
from sys import version_info pkg_parts = __name__.rpartition('.')
if version_info >= (2, 6, 0): pkg = pkg_parts[0] if pkg_parts[1] == '.' else pkg_parts[2]
mname = '.'.join((pkg, '_pyUniSet')).lstrip('.')
try:
return importlib.import_module(mname)
except ImportError:
return importlib.import_module('_pyUniSet')
_pyUniSet = swig_import_helper()
del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
def swig_import_helper(): def swig_import_helper():
from os.path import dirname from os.path import dirname
import imp import imp
...@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0): ...@@ -19,17 +27,22 @@ if version_info >= (2, 6, 0):
except ImportError: except ImportError:
import _pyUniSet import _pyUniSet
return _pyUniSet return _pyUniSet
if fp is not None:
try: try:
_mod = imp.load_module('_pyUniSet', fp, pathname, description) _mod = imp.load_module('_pyUniSet', fp, pathname, description)
finally: finally:
if fp is not None:
fp.close() fp.close()
return _mod return _mod
_pyUniSet = swig_import_helper() _pyUniSet = swig_import_helper()
del swig_import_helper del swig_import_helper
else: else:
import _pyUniSet raise RuntimeError('Python 2.6 or later required')
del version_info del _swig_python_version_info
try:
import builtins as __builtin__
except ImportError:
import __builtin__
def _swig_setattr_nondynamic(self, class_type, name, value, static=1): def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"): if (name == "thisown"):
...@@ -51,25 +64,19 @@ def _swig_setattr(self, class_type, name, value): ...@@ -51,25 +64,19 @@ def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0) return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr_nondynamic(self, class_type, name, static=1): def _swig_getattr(self, class_type, name):
if (name == "thisown"): if (name == "thisown"):
return self.this.own() return self.this.own()
method = class_type.__swig_getmethods__.get(name, None) method = class_type.__swig_getmethods__.get(name, None)
if method: if method:
return method(self) return method(self)
if (not static): raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
return object.__getattr__(self, name)
else:
raise AttributeError(name)
def _swig_getattr(self, class_type, name):
return _swig_getattr_nondynamic(self, class_type, name, 0)
def _swig_repr(self): def _swig_repr(self):
try: try:
strthis = "proxy of " + self.this.__repr__() strthis = "proxy of " + self.this.__repr__()
except Exception: except __builtin__.Exception:
strthis = "" strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
...@@ -129,7 +136,7 @@ class Params: ...@@ -129,7 +136,7 @@ class Params:
this = _pyUniSet.new_Params() this = _pyUniSet.new_Params()
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
def add(self, s): def add(self, s):
...@@ -141,7 +148,7 @@ class Params: ...@@ -141,7 +148,7 @@ class Params:
__swig_getmethods__["argc"] = _pyUniSet.Params_argc_get __swig_getmethods__["argc"] = _pyUniSet.Params_argc_get
__swig_setmethods__["argv"] = _pyUniSet.Params_argv_set __swig_setmethods__["argv"] = _pyUniSet.Params_argv_set
__swig_getmethods__["argv"] = _pyUniSet.Params_argv_get __swig_getmethods__["argv"] = _pyUniSet.Params_argv_get
__swig_getmethods__["inst"] = lambda x: _pyUniSet.Params_inst inst = _pyUniSet.Params_inst
__swig_destroy__ = _pyUniSet.delete_Params __swig_destroy__ = _pyUniSet.delete_Params
__del__ = lambda self: None __del__ = lambda self: None
Params_swigregister = _pyUniSet.Params_swigregister Params_swigregister = _pyUniSet.Params_swigregister
...@@ -175,7 +182,7 @@ class ShortIOInfo: ...@@ -175,7 +182,7 @@ class ShortIOInfo:
this = _pyUniSet.new_ShortIOInfo() this = _pyUniSet.new_ShortIOInfo()
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUniSet.delete_ShortIOInfo __swig_destroy__ = _pyUniSet.delete_ShortIOInfo
__del__ = lambda self: None __del__ = lambda self: None
...@@ -193,7 +200,7 @@ class UException(Exception): ...@@ -193,7 +200,7 @@ class UException(Exception):
this = _pyUniSet.new_UException(*args) this = _pyUniSet.new_UException(*args)
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUniSet.delete_UException __swig_destroy__ = _pyUniSet.delete_UException
__del__ = lambda self: None __del__ = lambda self: None
...@@ -220,7 +227,7 @@ class UTimeOut(UException): ...@@ -220,7 +227,7 @@ class UTimeOut(UException):
this = _pyUniSet.new_UTimeOut(*args) this = _pyUniSet.new_UTimeOut(*args)
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUniSet.delete_UTimeOut __swig_destroy__ = _pyUniSet.delete_UTimeOut
__del__ = lambda self: None __del__ = lambda self: None
...@@ -242,7 +249,7 @@ class USysError(UException): ...@@ -242,7 +249,7 @@ class USysError(UException):
this = _pyUniSet.new_USysError(*args) this = _pyUniSet.new_USysError(*args)
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUniSet.delete_USysError __swig_destroy__ = _pyUniSet.delete_USysError
__del__ = lambda self: None __del__ = lambda self: None
...@@ -264,7 +271,7 @@ class UValidateError(UException): ...@@ -264,7 +271,7 @@ class UValidateError(UException):
this = _pyUniSet.new_UValidateError(*args) this = _pyUniSet.new_UValidateError(*args)
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUniSet.delete_UValidateError __swig_destroy__ = _pyUniSet.delete_UValidateError
__del__ = lambda self: None __del__ = lambda self: None
...@@ -282,7 +289,7 @@ class UProxyObject: ...@@ -282,7 +289,7 @@ class UProxyObject:
this = _pyUniSet.new_UProxyObject(*args) this = _pyUniSet.new_UProxyObject(*args)
try: try:
self.this.append(this) self.this.append(this)
except Exception: except __builtin__.Exception:
self.this = this self.this = this
__swig_destroy__ = _pyUniSet.delete_UProxyObject __swig_destroy__ = _pyUniSet.delete_UProxyObject
__del__ = lambda self: None __del__ = lambda self: None
...@@ -313,6 +320,5 @@ class UProxyObject: ...@@ -313,6 +320,5 @@ class UProxyObject:
UProxyObject_swigregister = _pyUniSet.UProxyObject_swigregister UProxyObject_swigregister = _pyUniSet.UProxyObject_swigregister
UProxyObject_swigregister(UProxyObject) UProxyObject_swigregister(UProxyObject)
# This file is compatible with both classic and new-style classes.
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