12 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
20 #ifndef SWIGTEMPLATEDISAMBIGUATOR
21 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
22 # define SWIGTEMPLATEDISAMBIGUATOR template
23 # elif defined(__HP_aCC)
26 # define SWIGTEMPLATEDISAMBIGUATOR template
28 # define SWIGTEMPLATEDISAMBIGUATOR
34 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
35 # define SWIGINLINE inline
43 # if defined(__GNUC__)
44 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
45 # define SWIGUNUSED __attribute__ ((__unused__))
50 # define SWIGUNUSED __attribute__ ((__unused__))
56 #ifndef SWIG_MSC_UNSUPPRESS_4505
57 # if defined(_MSC_VER)
58 # pragma warning(disable : 4505)
62 #ifndef SWIGUNUSEDPARM
64 # define SWIGUNUSEDPARM(p)
66 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
72 # define SWIGINTERN static SWIGUNUSED
76 #ifndef SWIGINTERNINLINE
77 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
81 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
82 # ifndef GCC_HASCLASSVISIBILITY
83 # define GCC_HASCLASSVISIBILITY
88 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
89 # if defined(STATIC_LINKED)
92 # define SWIGEXPORT __declspec(dllexport)
95 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
96 # define SWIGEXPORT __attribute__ ((visibility("default")))
105 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
106 # define SWIGSTDCALL __stdcall
113 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
114 # define _CRT_SECURE_NO_DEPRECATE
118 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
119 # define _SCL_SECURE_NO_DEPRECATE
124 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
142 #define SWIG_RUNTIME_VERSION "4"
145 #ifdef SWIG_TYPE_TABLE
146 # define SWIG_QUOTE_STRING(x) #x
147 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
148 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
150 # define SWIG_TYPE_TABLE_NAME
163 # define SWIGRUNTIME SWIGINTERN
166 #ifndef SWIGRUNTIMEINLINE
167 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
171 #ifndef SWIG_BUFFER_SIZE
172 # define SWIG_BUFFER_SIZE 1024
176 #define SWIG_POINTER_DISOWN 0x1
177 #define SWIG_CAST_NEW_MEMORY 0x2
180 #define SWIG_POINTER_OWN 0x1
263 #define SWIG_ERROR (-1)
264 #define SWIG_IsOK(r) (r >= 0)
265 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
268 #define SWIG_CASTRANKLIMIT (1 << 8)
270 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
272 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
274 #define SWIG_BADOBJ (SWIG_ERROR)
275 #define SWIG_OLDOBJ (SWIG_OK)
276 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
277 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
279 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
280 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
281 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
282 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
283 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
284 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
287 #if defined(SWIG_CASTRANK_MODE)
288 # ifndef SWIG_TypeRank
289 # define SWIG_TypeRank unsigned long
291 # ifndef SWIG_MAXCASTRANK
292 # define SWIG_MAXCASTRANK (2)
294 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
295 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
300 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
303 # define SWIG_AddCast(r) (r)
304 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
314 typedef void *(*swig_converter_func)(
void *,
int *);
356 const char *f2,
const char *l2) {
357 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
358 while ((*f1 ==
' ') && (f1 != l1)) ++f1;
359 while ((*f2 ==
' ') && (f2 != l2)) ++f2;
360 if (*f1 != *f2)
return (*f1 > *f2) ? 1 : -1;
362 return (
int)((l1 - f1) - (l2 - f2));
372 const char* te = tb +
strlen(tb);
374 while (equiv != 0 && *ne) {
375 for (nb = ne; *ne; ++ne) {
376 if (*ne ==
'|')
break;
402 if (iter == ty->
cast)
428 if (iter->
type == from) {
429 if (iter == ty->
cast)
461 if (!ty || !ty->
dcast)
return ty;
462 while (ty && (ty->
dcast)) {
463 ty = (*ty->
dcast)(ptr);
487 if (!type)
return NULL;
489 const char *last_name = type->
str;
491 for (s = type->
str; *s; s++)
492 if (*s ==
'|') last_name = s+1;
539 register size_t l = 0;
540 register size_t r = iter->
size - 1;
543 register size_t i = (l +
r) >> 1;
544 const char *iname = iter->
types[i]->
name;
546 register int compare =
strcmp(name, iname);
548 return iter->
types[i];
549 }
else if (compare < 0) {
555 }
else if (compare > 0) {
564 }
while (iter != end);
590 register size_t i = 0;
591 for (; i < iter->
size; ++i) {
593 return iter->
types[i];
596 }
while (iter != end);
608 static const char hex[17] =
"0123456789abcdef";
609 register const unsigned char *u = (
unsigned char *) ptr;
610 register const unsigned char *eu = u + sz;
611 for (; u != eu; ++u) {
612 register unsigned char uu = *u;
613 *(c++) = hex[(uu & 0xf0) >> 4];
614 *(c++) = hex[uu & 0xf];
624 register unsigned char *u = (
unsigned char *) ptr;
625 register const unsigned char *eu = u + sz;
626 for (; u != eu; ++u) {
627 register char d = *(c++);
628 register unsigned char uu;
629 if ((d >=
'0') && (d <=
'9'))
630 uu = ((d -
'0') << 4);
631 else if ((d >=
'a') && (d <=
'f'))
632 uu = ((d - (
'a'-10)) << 4);
636 if ((d >=
'0') && (d <=
'9'))
638 else if ((d >=
'a') && (d <=
'f'))
639 uu |= (d - (
'a'-10));
653 if ((2*
sizeof(
void *) + 2) > bsz)
return 0;
656 if (
strlen(name) + 1 > (bsz - (r - buff)))
return 0;
664 if (
strcmp(c,
"NULL") == 0) {
677 size_t lname = (name ?
strlen(name) : 0);
678 if ((2*sz + 2 + lname) > bsz)
return 0;
692 if (
strcmp(c,
"NULL") == 0) {
707 #define SWIG_UnknownError -1
708 #define SWIG_IOError -2
709 #define SWIG_RuntimeError -3
710 #define SWIG_IndexError -4
711 #define SWIG_TypeError -5
712 #define SWIG_DivisionByZero -6
713 #define SWIG_OverflowError -7
714 #define SWIG_SyntaxError -8
715 #define SWIG_ValueError -9
716 #define SWIG_SystemError -10
717 #define SWIG_AttributeError -11
718 #define SWIG_MemoryError -12
719 #define SWIG_NullReferenceError -13
724 #if PY_VERSION_HEX >= 0x03000000
726 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
727 #define PyInt_Check(x) PyLong_Check(x)
728 #define PyInt_AsLong(x) PyLong_AsLong(x)
729 #define PyInt_FromLong(x) PyLong_FromLong(x)
730 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
731 #define PyString_Check(name) PyBytes_Check(name)
732 #define PyString_FromString(x) PyUnicode_FromString(x)
733 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
734 #define PyString_AsString(str) PyBytes_AsString(str)
735 #define PyString_Size(str) PyBytes_Size(str)
736 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
737 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
738 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
739 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
744 # define Py_TYPE(op) ((op)->ob_type)
749 #if PY_VERSION_HEX >= 0x03000000
750 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
752 # define SWIG_Python_str_FromFormat PyString_FromFormat
762 #if PY_VERSION_HEX >= 0x03000000
766 str = PyUnicode_AsUTF8String(str);
767 PyBytes_AsStringAndSize(str, &cstr, &len);
768 newstr = (
char *) malloc(len+1);
769 memcpy(newstr, cstr, len+1);
773 return PyString_AsString(str);
777 #if PY_VERSION_HEX >= 0x03000000
778 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
780 # define SWIG_Python_str_DelForPy3(x)
787 #if PY_VERSION_HEX >= 0x03000000
788 return PyUnicode_FromString(c);
790 return PyString_FromString(c);
795 #if PY_VERSION_HEX < 0x02020000
796 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
797 # define PyOS_snprintf _snprintf
799 # define PyOS_snprintf snprintf
804 #if PY_VERSION_HEX < 0x02020000
806 #ifndef SWIG_PYBUFFER_SIZE
807 # define SWIG_PYBUFFER_SIZE 1024
816 res = vsnprintf(buf,
sizeof(buf), fmt, ap);
818 return (res < 0 || res >= (
int)
sizeof(buf)) ? 0 : PyString_FromString(buf);
823 #if PY_VERSION_HEX < 0x01060000
824 # define PyObject_Del(op) PyMem_DEL((op))
827 # define PyObject_DEL PyObject_Del
831 #if PY_VERSION_HEX < 0x02020000
832 # ifndef PyExc_StopIteration
833 # define PyExc_StopIteration PyExc_RuntimeError
835 # ifndef PyObject_GenericGetAttr
836 # define PyObject_GenericGetAttr 0
841 #if PY_VERSION_HEX < 0x02010000
842 # ifndef Py_NotImplemented
843 # define Py_NotImplemented PyExc_RuntimeError
848 #if PY_VERSION_HEX < 0x02010000
849 # ifndef PyString_AsStringAndSize
850 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
855 #if PY_VERSION_HEX < 0x02000000
856 # ifndef PySequence_Size
857 # define PySequence_Size PySequence_Length
862 #if PY_VERSION_HEX < 0x02030000
866 PyObject *result = ok ? Py_True : Py_False;
875 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
877 # define PY_SSIZE_T_MAX INT_MAX
878 # define PY_SSIZE_T_MIN INT_MIN
891 PyObject *i = PyNumber_Int(x);
893 result = PyInt_AsLong(i);
900 #if PY_VERSION_HEX < 0x02050000
901 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
904 #if PY_VERSION_HEX < 0x02040000
905 #define Py_VISIT(op) \
908 int vret = visit((op), arg); \
915 #if PY_VERSION_HEX < 0x02030000
926 #if PY_VERSION_HEX < 0x02030000
930 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
931 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
932 (PY_MAJOR_VERSION > 3))
933 # define SWIGPY_USE_CAPSULE
934 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
937 #if PY_VERSION_HEX < 0x03020000
938 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
939 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
951 type = PyExc_MemoryError;
954 type = PyExc_IOError;
957 type = PyExc_RuntimeError;
960 type = PyExc_IndexError;
963 type = PyExc_TypeError;
966 type = PyExc_ZeroDivisionError;
969 type = PyExc_OverflowError;
972 type = PyExc_SyntaxError;
975 type = PyExc_ValueError;
978 type = PyExc_SystemError;
981 type = PyExc_AttributeError;
984 type = PyExc_RuntimeError;
995 PyObject *traceback = 0;
997 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
1000 PyObject *old_str = PyObject_Str(value);
1009 PyErr_SetString(PyExc_RuntimeError, mesg);
1013 #if defined(SWIG_PYTHON_NO_THREADS)
1014 # if defined(SWIG_PYTHON_THREADS)
1015 # undef SWIG_PYTHON_THREADS
1018 #if defined(SWIG_PYTHON_THREADS)
1019 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1020 # if (PY_VERSION_HEX >= 0x02030000)
1021 # define SWIG_PYTHON_USE_GIL
1024 # if defined(SWIG_PYTHON_USE_GIL)
1025 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
1026 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
1029 class SWIG_Python_Thread_Block {
1031 PyGILState_STATE state;
1033 void end() {
if (status) { PyGILState_Release(state); status =
false;} }
1034 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1035 ~SWIG_Python_Thread_Block() { end(); }
1037 class SWIG_Python_Thread_Allow {
1039 PyThreadState *save;
1041 void end() {
if (status) { PyEval_RestoreThread(save); status =
false; }}
1042 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1043 ~SWIG_Python_Thread_Allow() { end(); }
1045 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1046 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1047 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1048 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1050 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1051 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1052 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1053 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1056 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1057 # define SWIG_PYTHON_INITIALIZE_THREADS
1059 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1060 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1062 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1063 # define SWIG_PYTHON_THREAD_END_BLOCK
1065 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1066 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1068 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1069 # define SWIG_PYTHON_THREAD_END_ALLOW
1073 # define SWIG_PYTHON_INITIALIZE_THREADS
1074 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1075 # define SWIG_PYTHON_THREAD_END_BLOCK
1076 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1077 # define SWIG_PYTHON_THREAD_END_ALLOW
1093 #define SWIG_PY_POINTER 4
1094 #define SWIG_PY_BINARY 5
1111 #if PY_VERSION_HEX >= 0x03000000
1114 return PyInstanceMethod_New(func);
1140 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1141 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1142 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1144 #ifdef SWIGPYTHON_BUILTIN
1145 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1147 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1150 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1152 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1153 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1154 #define swig_owntype int
1157 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1158 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1161 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1162 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1165 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1166 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1169 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1170 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1175 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1176 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1177 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1179 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1180 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1181 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1182 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1183 #define SWIG_fail goto fail
1193 PyErr_SetObject(errtype, obj);
1201 PyErr_SetString(errtype, msg);
1205 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1209 #if defined(SWIGPYTHON_BUILTIN)
1212 SwigPyBuiltin_AddPublicSymbol(PyObject *seq,
const char *key) {
1213 PyObject *s = PyString_InternFromString(key);
1214 PyList_Append(seq, s);
1220 #if PY_VERSION_HEX < 0x02030000
1221 PyDict_SetItemString(d, (
char *)name, obj);
1223 PyDict_SetItemString(d, name, obj);
1226 if (public_interface)
1227 SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1234 #if PY_VERSION_HEX < 0x02030000
1235 PyDict_SetItemString(d, (
char *)name, obj);
1237 PyDict_SetItemString(d, name, obj);
1248 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1251 }
else if (result == Py_None) {
1255 if (!PyList_Check(result)) {
1256 PyObject *o2 = result;
1257 result = PyList_New(1);
1258 PyList_SetItem(result, 0, o2);
1260 PyList_Append(result,obj);
1269 }
else if (result == Py_None) {
1273 if (!PyTuple_Check(result)) {
1275 result = PyTuple_New(1);
1276 PyTuple_SET_ITEM(result, 0, o2);
1278 o3 = PyTuple_New(1);
1279 PyTuple_SET_ITEM(o3, 0, obj);
1281 result = PySequence_Concat(o2, o3);
1298 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got none",
1299 name, (min == max ?
"" :
"at least "), (
int)min);
1303 if (!PyTuple_Check(args)) {
1304 if (min <= 1 && max >= 1) {
1307 for (i = 1; i < max; ++i) {
1312 PyErr_SetString(PyExc_SystemError,
"UnpackTuple() argument list is not a tuple");
1315 register Py_ssize_t l = PyTuple_GET_SIZE(args);
1317 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1318 name, (min == max ?
"" :
"at least "), (
int)min, (
int)l);
1320 }
else if (l > max) {
1321 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1322 name, (min == max ?
"" :
"at most "), (
int)max, (
int)l);
1326 for (i = 0; i < l; ++i) {
1327 objs[i] = PyTuple_GET_ITEM(args, i);
1329 for (; l < max; ++l) {
1338 #if PY_VERSION_HEX >= 0x02020000
1339 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1341 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1349 #define SWIG_STATIC_POINTER(var) var
1351 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1359 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1360 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1362 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1364 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1365 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1372 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1373 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1374 # ifndef SWIG_PYTHON_BUILD_NONE
1375 # define SWIG_PYTHON_BUILD_NONE
1380 #ifdef SWIG_PYTHON_BUILD_NONE
1383 # define Py_None SWIG_Py_None()
1388 PyObject *none = Py_BuildValue((
char*)
"");
1405 PyObject *none = Py_None;
1432 PyObject *klass = data ? data->
klass : 0;
1433 return (klass ? klass : PyExc_RuntimeError);
1446 Py_INCREF(data->
klass);
1448 if (PyClass_Check(obj)) {
1453 #if (PY_VERSION_HEX < 0x02020000)
1456 data->
newraw = PyObject_GetAttrString(data->
klass, (
char *)
"__new__");
1460 data->
newargs = PyTuple_New(1);
1461 PyTuple_SetItem(data->
newargs, 0, obj);
1468 data->
destroy = PyObject_GetAttrString(data->
klass, (
char *)
"__swig_destroy__");
1469 if (PyErr_Occurred()) {
1476 flags = PyCFunction_GET_FLAGS(data->
destroy);
1478 data->
delargs = !(flags & (METH_O));
1493 Py_XDECREF(data->
newraw);
1506 #ifdef SWIGPYTHON_BUILTIN
1514 return PyLong_FromVoidPtr(v->
ptr);
1520 PyObject *res =
NULL;
1521 PyObject *args = PyTuple_New(1);
1526 #if PY_VERSION_HEX >= 0x03000000
1527 res = PyUnicode_Format(ofmt,args);
1529 res = PyString_Format(ofmt,args);
1566 # if PY_VERSION_HEX >= 0x03000000
1567 PyObject *joined = PyUnicode_Concat(repr, nrep);
1572 PyString_ConcatAndDel(&repr,nrep);
1583 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1591 if( op != Py_EQ && op != Py_NE ) {
1602 #ifdef SWIGPYTHON_BUILTIN
1607 assert(SwigPyObject_stype);
1623 #ifdef SWIGPYTHON_BUILTIN
1625 if (PyType_IsSubtype(op->ob_type, target_tp))
1627 return (
strcmp(op->ob_type->tp_name,
"SwigPyObject") == 0);
1641 PyObject *next = sobj->
next;
1645 PyObject *destroy = data ? data->
destroy : 0;
1655 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1656 PyObject *mself = PyCFunction_GET_SELF(destroy);
1657 res = ((*meth)(mself, v));
1661 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1664 printf(
"swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name :
"unknown"));
1678 if (!PyArg_ParseTuple(next,(
char *)
"O:append", &tmp))
return NULL;
1698 Py_INCREF(sobj->
next);
1733 #if (PY_VERSION_HEX < 0x02020000)
1734 if (!PyArg_ParseTuple(args,(
char *)
"|O:own",&val))
1735 #elif (PY_VERSION_HEX < 0x02050000)
1736 if (!PyArg_UnpackTuple(args, (
char *)
"own", 0, 1, &val))
1738 if (!PyArg_UnpackTuple(args,
"own", 0, 1, &val))
1749 if (PyObject_IsTrue(val)) {
1755 if (PyObject_IsTrue(val)) {
1769 {(
char *)
"disown", (PyCFunction)
SwigPyObject_disown, METH_NOARGS, (
char *)
"releases ownership of the pointer"},
1770 {(
char *)
"acquire", (PyCFunction)
SwigPyObject_acquire, METH_NOARGS, (
char *)
"acquires ownership of the pointer"},
1771 {(
char *)
"own", (PyCFunction)
SwigPyObject_own, METH_VARARGS, (
char *)
"returns/sets ownership of the pointer"},
1772 {(
char *)
"append", (PyCFunction)
SwigPyObject_append, METH_O, (
char *)
"appends another 'this' object"},
1773 {(
char *)
"next", (PyCFunction)
SwigPyObject_next, METH_NOARGS, (
char *)
"returns the next 'this' object"},
1774 {(
char *)
"__repr__",(PyCFunction)
SwigPyObject_repr, METH_NOARGS, (
char *)
"returns object representation"},
1779 swigobject_methods[] = {
1780 {(
char *)
"disown", (PyCFunction)
SwigPyObject_disown, METH_VARARGS, (
char *)
"releases ownership of the pointer"},
1781 {(
char *)
"acquire", (PyCFunction)
SwigPyObject_acquire, METH_VARARGS, (
char *)
"aquires ownership of the pointer"},
1782 {(
char *)
"own", (PyCFunction)
SwigPyObject_own, METH_VARARGS, (
char *)
"returns/sets ownership of the pointer"},
1783 {(
char *)
"append", (PyCFunction)
SwigPyObject_append, METH_VARARGS, (
char *)
"appends another 'this' object"},
1784 {(
char *)
"next", (PyCFunction)
SwigPyObject_next, METH_VARARGS, (
char *)
"returns the next 'this' object"},
1785 {(
char *)
"__repr__",(PyCFunction)
SwigPyObject_repr, METH_VARARGS, (
char *)
"returns object representation"},
1790 #if PY_VERSION_HEX < 0x02020000
1794 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1800 static char swigobject_doc[] =
"Swig object carries a C/C++ instance pointer";
1802 static PyNumberMethods SwigPyObject_as_number = {
1807 #
if PY_VERSION_HEX < 0x03000000
1823 #
if PY_VERSION_HEX < 0x03000000
1827 #if PY_VERSION_HEX < 0x03000000
1833 #if PY_VERSION_HEX < 0x03000000
1837 #if PY_VERSION_HEX >= 0x03000000
1838 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1839 #elif PY_VERSION_HEX >= 0x02050000
1840 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1841 #elif PY_VERSION_HEX >= 0x02020000
1842 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1843 #elif PY_VERSION_HEX >= 0x02000000
1844 0,0,0,0,0,0,0,0,0,0,0
1848 static PyTypeObject swigpyobject_type;
1849 static int type_init = 0;
1851 const PyTypeObject tmp = {
1853 #if PY_VERSION_HEX >= 0x03000000
1854 PyVarObject_HEAD_INIT(
NULL, 0)
1856 PyObject_HEAD_INIT(
NULL)
1859 (
char *)
"SwigPyObject",
1864 #
if PY_VERSION_HEX < 0x02020000
1870 #if PY_VERSION_HEX >= 0x03000000
1876 &SwigPyObject_as_number,
1891 #
if PY_VERSION_HEX >= 0x02020000
1913 #
if PY_VERSION_HEX >= 0x02030000
1916 #
if PY_VERSION_HEX >= 0x02060000
1923 swigpyobject_type = tmp;
1925 #if PY_VERSION_HEX < 0x02020000
1926 swigpyobject_type.ob_type = &PyType_Type;
1928 if (PyType_Ready(&swigpyobject_type) < 0)
1932 return &swigpyobject_type;
1945 return (PyObject *)sobj;
1963 fputs(
"<Swig Packed ", fp);
2000 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2015 || (
strcmp((op)->ob_type->tp_name,
"SwigPyPacked") == 0);
2030 static char swigpacked_doc[] =
"Swig object carries a C/C++ instance pointer";
2031 static PyTypeObject swigpypacked_type;
2032 static int type_init = 0;
2034 const PyTypeObject tmp = {
2036 #if PY_VERSION_HEX>=0x03000000
2037 PyVarObject_HEAD_INIT(
NULL, 0)
2039 PyObject_HEAD_INIT(
NULL)
2042 (
char *)
"SwigPyPacked",
2049 #if PY_VERSION_HEX>=0x03000000
2070 #
if PY_VERSION_HEX >= 0x02020000
2092 #
if PY_VERSION_HEX >= 0x02030000
2095 #
if PY_VERSION_HEX >= 0x02060000
2102 swigpypacked_type = tmp;
2104 #if PY_VERSION_HEX < 0x02020000
2105 swigpypacked_type.ob_type = &PyType_Type;
2107 if (PyType_Ready(&swigpypacked_type) < 0)
2111 return &swigpypacked_type;
2119 void *pack = malloc(size);
2130 return (PyObject *) sobj;
2138 if (sobj->
size != size)
return 0;
2161 if (swig_this ==
NULL)
2169 #if PY_VERSION_HEX>=0x03000000
2170 #define SWIG_PYTHON_SLOW_GETSET_THIS
2181 #ifdef SWIGPYTHON_BUILTIN
2183 # ifdef PyWeakref_CheckProxy
2184 if (PyWeakref_CheckProxy(pyobj)) {
2185 pyobj = PyWeakref_GET_OBJECT(pyobj);
2195 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2196 if (PyInstance_Check(pyobj)) {
2197 obj = _PyInstance_Lookup(pyobj,
SWIG_This());
2199 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2200 if (dictptr !=
NULL) {
2201 PyObject *dict = *dictptr;
2202 obj = dict ? PyDict_GetItem(dict,
SWIG_This()) : 0;
2204 #ifdef PyWeakref_CheckProxy
2205 if (PyWeakref_CheckProxy(pyobj)) {
2206 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2210 obj = PyObject_GetAttr(pyobj,
SWIG_This());
2214 if (PyErr_Occurred()) PyErr_Clear();
2220 obj = PyObject_GetAttr(pyobj,
SWIG_This());
2224 if (PyErr_Occurred()) PyErr_Clear();
2244 int oldown = sobj->
own;
2262 if (obj == Py_None && !implicit_conv) {
2274 void *vptr = sobj->
ptr;
2279 if (ptr) *ptr = vptr;
2299 if (ptr) *ptr = vptr;
2305 *own = *own | sobj->
own;
2311 if (implicit_conv) {
2314 PyObject *klass = data->
klass;
2320 if (PyErr_Occurred()) {
2346 if (!
SWIG_IsOK(res) && obj == Py_None) {
2349 if (PyErr_Occurred())
2361 if (!PyCFunction_Check(obj)) {
2367 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2368 const char *desc = doc ?
strstr(doc,
"swig_ptr: ") : 0;
2417 #if (PY_VERSION_HEX >= 0x02020000)
2419 PyObject *newraw = data->
newraw;
2421 inst = PyObject_Call(newraw, data->
newargs,
NULL);
2423 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2424 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2425 if (dictptr !=
NULL) {
2426 PyObject *dict = *dictptr;
2428 dict = PyDict_New();
2430 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2435 PyObject_SetAttr(inst, key, swig_this);
2439 #if PY_VERSION_HEX >= 0x03000000
2440 inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->
newargs, Py_None, Py_None);
2442 PyObject_SetAttr(inst,
SWIG_This(), swig_this);
2443 Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2446 PyObject *dict = PyDict_New();
2448 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2449 inst = PyInstance_NewRaw(data->
newargs, dict);
2456 #if (PY_VERSION_HEX >= 0x02010000)
2458 PyObject *dict = PyDict_New();
2460 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2461 inst = PyInstance_NewRaw(data->
newargs, dict);
2464 return (PyObject *) inst;
2466 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2470 inst->in_class = (PyClassObject *)data->
newargs;
2471 Py_INCREF(inst->in_class);
2472 inst->in_dict = PyDict_New();
2473 if (inst->in_dict ==
NULL) {
2477 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2478 inst->in_weakreflist =
NULL;
2480 #ifdef Py_TPFLAGS_GC
2481 PyObject_GC_Init(inst);
2483 PyDict_SetItem(inst->in_dict,
SWIG_This(), swig_this);
2484 return (PyObject *) inst;
2493 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2494 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2495 if (dictptr !=
NULL) {
2498 dict = PyDict_New();
2501 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2505 dict = PyObject_GetAttrString(inst, (
char*)
"__dict__");
2506 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2540 if (clientdata && clientdata->
pytype) {
2545 PyObject *next_self = clientdata->
pytype->tp_alloc(clientdata->
pytype, 0);
2546 while (newobj->
next)
2548 newobj->
next = next_self;
2559 #ifdef SWIGPYTHON_BUILTIN
2562 return (PyObject*) newobj;
2589 #ifdef SWIG_LINK_RUNTIME
2590 void *SWIG_ReturnGlobalTypeList(
void *);
2595 static void *type_pointer = (
void *)0;
2597 if (!type_pointer) {
2598 #ifdef SWIG_LINK_RUNTIME
2599 type_pointer = SWIG_ReturnGlobalTypeList((
void *)0);
2601 # ifdef SWIGPY_USE_CAPSULE
2602 type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2607 if (PyErr_Occurred()) {
2609 type_pointer = (
void *)0;
2616 #if PY_MAJOR_VERSION < 2
2623 if (!PyModule_Check(m)) {
2624 PyErr_SetString(PyExc_TypeError,
2625 "PyModule_AddObject() needs module as first arg");
2629 PyErr_SetString(PyExc_TypeError,
2630 "PyModule_AddObject() needs non-NULL value");
2634 dict = PyModule_GetDict(m);
2637 PyErr_Format(PyExc_SystemError,
"module '%s' has no __dict__",
2638 PyModule_GetName(m));
2641 if (PyDict_SetItemString(dict, name, o))
2649 #ifdef SWIGPY_USE_CAPSULE
2655 #ifdef SWIGPY_USE_CAPSULE
2662 for (i =0; i < swig_module->
size; ++i) {
2675 #if PY_VERSION_HEX >= 0x03000000
2679 static PyMethodDef swig_empty_runtime_method_table[] = { {
NULL,
NULL, 0, NULL} };
2680 PyObject *module = Py_InitModule((
char*)
"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2682 #ifdef SWIGPY_USE_CAPSULE
2684 if (pointer && module) {
2687 Py_XDECREF(pointer);
2691 if (pointer && module) {
2694 Py_XDECREF(pointer);
2711 PyObject *obj = PyDict_GetItem(cache, key);
2714 #ifdef SWIGPY_USE_CAPSULE
2723 #ifdef SWIGPY_USE_CAPSULE
2724 obj = PyCapsule_New((
void*) descriptor,
NULL,
NULL);
2726 obj = PyCObject_FromVoidPtr(descriptor,
NULL);
2728 PyDict_SetItem(cache, key, obj);
2739 #define SWIG_POINTER_EXCEPTION 0
2740 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2741 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2746 if (PyErr_Occurred()) {
2748 PyObject *value = 0;
2749 PyObject *traceback = 0;
2750 PyErr_Fetch(&type, &value, &traceback);
2753 PyObject *old_str = PyObject_Str(value);
2773 if (PyErr_Occurred()) {
2776 PyOS_snprintf(mesg,
sizeof(mesg),
"argument number %d:", argnum);
2788 return ty ? ty->
str :
"";
2795 #if defined(SWIG_COBJECT_TYPES)
2799 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, 'SwigPyObject(%s)' is received",
2806 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2808 PyObject *str = PyObject_Str(obj);
2811 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s(%s)' is received",
2815 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s' is received",
2822 PyErr_Format(PyExc_TypeError,
"a '%s' is expected", type);
2824 PyErr_Format(PyExc_TypeError,
"unexpected type is received");
2835 #if SWIG_POINTER_EXCEPTION
2845 #ifdef SWIGPYTHON_BUILTIN
2847 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2848 PyTypeObject *tp = obj->ob_type;
2850 PyObject *encoded_name;
2854 # ifdef Py_USING_UNICODE
2855 if (PyString_Check(name)) {
2856 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name),
NULL,
NULL);
2859 }
else if (!PyUnicode_Check(name))
2861 if (!PyString_Check(name))
2864 PyErr_Format(PyExc_TypeError,
"attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2871 if (PyType_Ready(tp) < 0)
2875 descr = _PyType_Lookup(tp, name);
2878 f = descr->ob_type->tp_descr_set;
2880 if (PyString_Check(name)) {
2881 encoded_name = name;
2884 encoded_name = PyUnicode_AsUTF8String(name);
2886 PyErr_Format(PyExc_AttributeError,
"'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2887 Py_DECREF(encoded_name);
2889 res = f(descr, obj, value);
2905 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2907 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2913 #define SWIGTYPE_p_char swig_types[0]
2916 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2917 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2921 #if (PY_VERSION_HEX <= 0x02000000)
2922 # if !defined(SWIG_PYTHON_CLASSIC)
2923 # error "This python version requires swig to be run with the '-classic' option"
2930 #if PY_VERSION_HEX >= 0x03000000
2931 # define SWIG_init PyInit__startx
2934 # define SWIG_init init_startx
2937 #define SWIG_name "_startx"
2939 #define SWIGVERSION 0x020011
2940 #define SWIG_VERSION SWIGVERSION
2943 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
2944 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
2950 return PyInt_FromLong((
long) value);
2957 static int init = 0;
2971 if (size > INT_MAX) {
2973 return pchar_descriptor ?
2976 #if PY_VERSION_HEX >= 0x03000000
2977 return PyUnicode_FromStringAndSize(carray, (
int)(size));
2979 return PyString_FromStringAndSize(carray, (
int)(size));
3021 {0, 0, 0, 0.0, 0, 0}};
3075 #define SWIGRUNTIME_DEBUG
3086 if (swig_module.
next==0) {
3108 if (iter==&swig_module) {
3113 }
while (iter!= module_head);
3118 swig_module.
next = module_head->
next;
3126 if (init == 0)
return;
3129 #ifdef SWIGRUNTIME_DEBUG
3130 printf(
"SWIG_InitializeModule: size %d\n", swig_module.
size);
3132 for (i = 0; i < swig_module.
size; ++i) {
3137 #ifdef SWIGRUNTIME_DEBUG
3138 printf(
"SWIG_InitializeModule: type %d %s\n", i, swig_module.
type_initial[i]->
name);
3142 if (swig_module.
next != &swig_module) {
3147 #ifdef SWIGRUNTIME_DEBUG
3148 printf(
"SWIG_InitializeModule: found type %s\n", type->
name);
3152 #ifdef SWIGRUNTIME_DEBUG
3153 printf(
"SWIG_InitializeModule: found and overwrite type %s \n", type->
name);
3162 while (cast->
type) {
3165 #ifdef SWIGRUNTIME_DEBUG
3166 printf(
"SWIG_InitializeModule: look cast %s\n", cast->
type->
name);
3168 if (swig_module.
next != &swig_module) {
3170 #ifdef SWIGRUNTIME_DEBUG
3171 if (ret) printf(
"SWIG_InitializeModule: found cast %s\n", ret->
name);
3176 #ifdef SWIGRUNTIME_DEBUG
3177 printf(
"SWIG_InitializeModule: skip old type %s\n", ret->
name);
3184 #ifdef SWIGRUNTIME_DEBUG
3185 if (ocast) printf(
"SWIG_InitializeModule: skip old cast %s\n", ret->
name);
3187 if (!ocast) ret = 0;
3192 #ifdef SWIGRUNTIME_DEBUG
3193 printf(
"SWIG_InitializeModule: adding cast %s\n", cast->
type->
name);
3204 swig_module.
types[i] = type;
3206 swig_module.
types[i] = 0;
3208 #ifdef SWIGRUNTIME_DEBUG
3209 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
3210 for (i = 0; i < swig_module.
size; ++i) {
3213 printf(
"SWIG_InitializeModule: type %d %s\n", i, swig_module.
type_initial[i]->
name);
3214 while (cast->
type) {
3215 printf(
"SWIG_InitializeModule: cast type %s\n", cast->
type->
name);
3219 printf(
"---- Total casts: %d\n",j);
3221 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
3234 static int init_run = 0;
3236 if (init_run)
return;
3239 for (i = 0; i < swig_module.
size; i++) {
3247 equiv = equiv->
next;
3268 #define SWIG_newvarlink() SWIG_Python_newvarlink()
3269 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
3270 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
3278 PyObject *(*get_attr)(void);
3290 #if PY_VERSION_HEX >= 0x03000000
3291 return PyUnicode_InternFromString(
"<Swig global variables>");
3293 return PyString_FromString(
"<Swig global variables>");
3299 #if PY_VERSION_HEX >= 0x03000000
3300 PyObject *str = PyUnicode_InternFromString(
"(");
3304 for (var = v->
vars; var; var=var->
next) {
3305 tail = PyUnicode_FromString(var->
name);
3306 joined = PyUnicode_Concat(str, tail);
3311 tail = PyUnicode_InternFromString(
", ");
3312 joined = PyUnicode_Concat(str, tail);
3318 tail = PyUnicode_InternFromString(
")");
3319 joined = PyUnicode_Concat(str, tail);
3324 PyObject *str = PyString_FromString(
"(");
3326 for (var = v->
vars; var; var=var->
next) {
3327 PyString_ConcatAndDel(&str,PyString_FromString(var->
name));
3328 if (var->
next) PyString_ConcatAndDel(&str,PyString_FromString(
", "));
3330 PyString_ConcatAndDel(&str,PyString_FromString(
")"));
3339 fprintf(fp,
"Swig global variables ");
3359 PyObject *res =
NULL;
3368 if (res ==
NULL && !PyErr_Occurred()) {
3369 PyErr_SetString(PyExc_NameError,
"Unknown C global variable");
3385 if (res == 1 && !PyErr_Occurred()) {
3386 PyErr_SetString(PyExc_NameError,
"Unknown C global variable");
3393 static char varlink__doc__[] =
"Swig var link object";
3394 static PyTypeObject varlink_type;
3395 static int type_init = 0;
3397 const PyTypeObject tmp = {
3399 #if PY_VERSION_HEX >= 0x03000000
3400 PyVarObject_HEAD_INIT(
NULL, 0)
3402 PyObject_HEAD_INIT(
NULL)
3405 (
char *)
"swigvarlink",
3429 #if PY_VERSION_HEX >= 0x02020000
3430 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
3432 #if PY_VERSION_HEX >= 0x02030000
3435 #if PY_VERSION_HEX >= 0x02060000
3444 #if PY_VERSION_HEX < 0x02020000
3445 varlink_type.ob_type = &PyType_Type;
3447 if (PyType_Ready(&varlink_type) < 0)
3451 return &varlink_type;
3461 return ((PyObject*) result);
3469 size_t size =
strlen(name)+1;
3470 gv->
name = (
char *)malloc(size);
3483 static PyObject *_SWIG_globals = 0;
3485 return _SWIG_globals;
3497 for (i = 0; constants[i].
type; ++i) {
3498 switch(constants[i].type) {
3503 obj =
SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
3510 PyDict_SetItemString(d, constants[i].name, obj);
3526 for (i = 0; methods[i].ml_name; ++i) {
3527 const char *c = methods[i].ml_doc;
3528 if (c && (c =
strstr(c,
"swig_ptr: "))) {
3531 const char *name = c + 10;
3532 for (j = 0; const_table[j].
type; ++j) {
3533 if (
strncmp(const_table[j].name, name,
3534 strlen(const_table[j].name)) == 0) {
3535 ci = &(const_table[j]);
3542 size_t shift = (ci->
ptype) - types;
3544 size_t ldoc = (c - methods[i].ml_doc);
3545 size_t lptr =
strlen(ty->
name)+2*
sizeof(
void*)+2;
3546 char *ndoc = (
char*)malloc(ldoc + lptr + 10);
3549 strncpy(buff, methods[i].ml_doc, ldoc);
3551 strncpy(buff,
"swig_ptr: ", 10);
3554 methods[i].ml_doc = ndoc;
3575 #if PY_VERSION_HEX >= 0x03000000
3581 PyObject *m, *d, *md;
3582 #if PY_VERSION_HEX >= 0x03000000
3583 static struct PyModuleDef SWIG_module = {
3584 # if PY_VERSION_HEX >= 0x03020000
3585 PyModuleDef_HEAD_INIT,
3588 PyObject_HEAD_INIT(
NULL)
3605 #if defined(SWIGPYTHON_BUILTIN)
3609 static PyGetSetDef this_getset_def = {
3610 (
char *)
"this", &SwigPyBuiltin_ThisClosure,
NULL,
NULL,
NULL
3612 static SwigPyGetSet thisown_getset_closure = {
3616 static PyGetSetDef thisown_getset_def = {
3617 (
char *)
"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure,
NULL, &thisown_getset_closure
3619 PyObject *metatype_args;
3620 PyTypeObject *builtin_pytype;
3621 int builtin_base_count;
3624 PyGetSetDescrObject *static_getset;
3625 PyTypeObject *metatype;
3627 PyObject *public_interface, *public_symbol;
3628 PyObject *this_descr;
3629 PyObject *thisown_descr;
3632 (void)builtin_pytype;
3633 (void)builtin_base_count;
3634 (void)builtin_basetype;
3636 (void)static_getset;
3639 metatype_args = Py_BuildValue(
"(s(O){})",
"SwigPyObjectType", &PyType_Type);
3640 assert(metatype_args);
3641 metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args,
NULL);
3643 Py_DECREF(metatype_args);
3644 metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
3645 assert(PyType_Ready(metatype) >= 0);
3651 #if PY_VERSION_HEX >= 0x03000000
3652 m = PyModule_Create(&SWIG_module);
3654 m = Py_InitModule((
char *)
SWIG_name, SwigMethods);
3656 md = d = PyModule_GetDict(m);
3661 #ifdef SWIGPYTHON_BUILTIN
3663 assert(SwigPyObject_stype);
3666 SwigPyObject_stype->
clientdata = &SwigPyObject_clientdata;
3669 PyErr_SetString(PyExc_RuntimeError,
"Import error: attempted to load two incompatible swig-generated modules.");
3670 # if PY_VERSION_HEX >= 0x03000000
3683 (void)thisown_descr;
3685 public_interface = PyList_New(0);
3687 (void)public_symbol;
3689 PyDict_SetItemString(md,
"__all__", public_interface);
3690 Py_DECREF(public_interface);
3691 for (i = 0; SwigMethods[i].ml_name !=
NULL; ++i)
3692 SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
3708 #if PY_VERSION_HEX >= 0x03000000
getwritebufferproc writebufferproc
static PyMethodDef swigobject_methods[]
SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o)
SWIGINTERN PyObject * SWIG_Python_newvarlink(void)
#define SWIG_PYTHON_THREAD_END_BLOCK
SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
getreadbufferproc readbufferproc
intintobjargproc ssizessizeobjargproc
#define SWIG_POINTER_IMPLICIT_CONV
PyMappingMethods as_mapping
#define SWIG_InternalNewPointerObj(ptr, type, flags)
SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module)
SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v)
getsegcountproc segcountproc
static swig_cast_info _swigc__p_char[]
SWIGRUNTIME int SWIG_Python_AddErrMesg(const char *mesg, int infront)
SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v)
struct swig_cast_info * prev
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
#define SWIG_DivisionByZero
static PyObject * PyBool_FromLong(long ok)
intobjargproc ssizeobjargproc
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
struct swig_globalvar * next
#define SWIG_RUNTIME_VERSION
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
__BEGIN_NAMESPACE_STD void * memcpy(void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull((1
SWIGINTERN PyObject * SWIG_globals(void)
SWIGRUNTIME PyObject * SwigPyObject_format(const char *fmt, SwigPyObject *v)
#define SWIG_PYBUFFER_SIZE
SWIGRUNTIME PyObject * SwigPyObject_append(PyObject *v, PyObject *next)
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD char * strcpy(char *__restrict __dest, const char *__restrict __src) __THROW __nonnull((1
SWIGRUNTIMEINLINE PyObject * _SWIG_This(void)
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
#define SWIG_TypeQuery(name)
SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
#define SWIG_STATIC_POINTER(var)
#define SWIG_GetModule(clientdata)
#define SWIG_MangledTypeQuery(name)
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
struct swig_globalvar swig_globalvar
getcharbufferproc charbufferproc
__END_NAMESPACE_STD char char __BEGIN_NAMESPACE_STD size_t strlen(const char *__s) __THROW __attribute_pure__ __nonnull((1))
swig_cast_info ** cast_initial
SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type)
SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v)
SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
#define SWIG_SetModule(clientdata, pointer)
#define SWIG_Python_str_DelForPy3(x)
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
SWIGRUNTIME PyObject * SWIG_Python_ErrorType(int code)
SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj)
SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
#define SWIG_RuntimeError
#define SWIG_CheckState(r)
SWIGRUNTIME PyObject * SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
static swig_type_info * swig_types[2]
#define SWIG_PYTHON_THREAD_BEGIN_BLOCK
struct swig_type_info *(* swig_dycast_func)(void **)
SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty)
struct swig_varlinkobject swig_varlinkobject
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
struct swig_type_info swig_type_info
SWIGINTERN PyObject * SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
#define SWIG_CAST_NEW_MEMORY
SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op)
SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
SWIGRUNTIME PyObject * SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD char char * strncpy(char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull((1
SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void)
SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char *carray, size_t size)
PyNumberMethods as_number
static PyMethodDef SwigMethods[]
SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v)
static swig_const_info swig_const_table[]
#define SWIG_OverflowError
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata))
#define SWIGRUNTIMEINLINE
SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD char char char char int strcmp(const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull((1
SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own)
static swig_type_info * swig_type_initial[]
SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg)
struct swig_module_info swig_module_info
SWIGINTERN PyObject * SWIG_Python_AppendOutput(PyObject *result, PyObject *obj)
SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self)
#define SWIG_newvarlink()
SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
SWIGRUNTIME PyObject * SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
int(* set_attr)(PyObject *)
struct swig_cast_info swig_cast_info
#define SWIG_AddNewMask(r)
#define SWIG_AttributeError
PySequenceMethods as_sequence
SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty)
SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj, char *name)
static PyObject * swig_this
SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
static long PyNumber_AsSsize_t(PyObject *x, void *SWIGUNUSEDPARM(exc))
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD char char char char int int strncmp(const char *__s1, const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull((1
SWIGINTERN PyTypeObject * swig_varlink_type(void)
static swig_cast_info * swig_cast_initial[]
SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v)
#define PyObject_GenericGetAttr
#define Py_NotImplemented
#define SWIG_Python_str_FromFormat
SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v))
SWIGINTERN swig_type_info * SWIG_pchar_descriptor(void)
SWIGRUNTIME PyTypeObject * SwigPyObject_TypeOnce(void)
PyObject *(* get_attr)(void)
SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data)
static swig_module_info swig_module
SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v)
struct swig_cast_info * cast
#define SWIG_TYPE_TABLE_NAME
SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
SWIGINTERNINLINE PyObject * SWIG_From_int(int value)
#define SWIG_NewPackedObj(ptr, sz, type)
SWIGRUNTIME PyObject * SWIG_This(void)
SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty)
#define SWIG_ConvertPtr(obj, pptr, type, flags)
SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags)
SWIGINTERNINLINE PyObject * SWIG_FromCharPtr(const char *cptr)
#define SWIG_POINTER_DISOWN
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
SWIGRUNTIME PyTypeObject * SwigPyObject_type(void)
SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v)
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
#define SWIG_InstallConstants(d, constants)
SWIGRUNTIME void SWIG_PropagateClientData(void)
SWIGRUNTIME void SWIG_Python_DestroyModule(void *vptr)
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
#define SWIG_Python_CallFunctor(functor, obj)
SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own)
SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[])
__BEGIN_NAMESPACE_STD void void __END_NAMESPACE_STD void __BEGIN_NAMESPACE_STD void * memset(void *__s, int __c, size_t __n) __THROW __nonnull((1))
SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v)
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg)
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type)
SWIGRUNTIME PyTypeObject * SwigPyPacked_TypeOnce(void)
swig_converter_func converter
static PyObject * PyString_FromFormat(const char *fmt,...)
struct swig_const_info swig_const_info
SWIGINTERN PyObject * SwigPyObject_own(PyObject *v, PyObject *args)
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op)
SWIGRUNTIME PyTypeObject * SwigPyPacked_type(void)
SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
SWIGINTERN char * SWIG_Python_str_AsChar(PyObject *str)
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
#define SWIGUNUSEDPARM(p)
SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject *obj)
static swig_type_info _swigt__p_char
struct swig_cast_info * next
SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v, PyObject *args)
SWIGINTERN PyObject * SwigPyObject_disown(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
intintargfunc ssizessizeargfunc
swig_type_info ** type_initial
void *(* swig_converter_func)(void *, int *)
struct swig_module_info * next
PyObject_HEAD void * pack
#define SWIG_POINTER_NOSHADOW
SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD size_t size_t char char * strstr(const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull((1
SWIGRUNTIME PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
SWIGRUNTIME int SWIG_Python_ArgFail(int argnum)
#define SWIG_BUILTIN_TP_INIT
PyObject_HEAD swig_globalvar * vars
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)