1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.2
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11
12 #ifndef SWIGPYTHON
13 #define SWIGPYTHON
14 #endif
15
16 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
17
18
19 #ifdef __cplusplus
20 /* SwigValueWrapper is described in swig.swg */
21 template<typename T> class SwigValueWrapper {
22 struct SwigMovePointer {
23 T *ptr;
SwigMovePointerSwigValueWrapper::SwigMovePointer24 SwigMovePointer(T *p) : ptr(p) { }
~SwigMovePointerSwigValueWrapper::SwigMovePointer25 ~SwigMovePointer() { delete ptr; }
operator =SwigValueWrapper::SwigMovePointer26 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
27 } pointer;
28 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
29 SwigValueWrapper(const SwigValueWrapper<T>& rhs);
30 public:
SwigValueWrapper()31 SwigValueWrapper() : pointer(0) { }
operator =(const T & t)32 SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
operator T&() const33 operator T&() const { return *pointer.ptr; }
operator &()34 T *operator&() { return pointer.ptr; }
35 };
36
SwigValueInit()37 template <typename T> T SwigValueInit() {
38 return T();
39 }
40 #endif
41
42 /* -----------------------------------------------------------------------------
43 * This section contains generic SWIG labels for method/variable
44 * declarations/attributes, and other compiler dependent labels.
45 * ----------------------------------------------------------------------------- */
46
47 /* template workaround for compilers that cannot correctly implement the C++ standard */
48 #ifndef SWIGTEMPLATEDISAMBIGUATOR
49 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
50 # define SWIGTEMPLATEDISAMBIGUATOR template
51 # elif defined(__HP_aCC)
52 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
53 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
54 # define SWIGTEMPLATEDISAMBIGUATOR template
55 # else
56 # define SWIGTEMPLATEDISAMBIGUATOR
57 # endif
58 #endif
59
60 /* inline attribute */
61 #ifndef SWIGINLINE
62 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
63 # define SWIGINLINE inline
64 # else
65 # define SWIGINLINE
66 # endif
67 #endif
68
69 /* attribute recognised by some compilers to avoid 'unused' warnings */
70 #ifndef SWIGUNUSED
71 # if defined(__GNUC__)
72 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
73 # define SWIGUNUSED __attribute__ ((__unused__))
74 # else
75 # define SWIGUNUSED
76 # endif
77 # elif defined(__ICC)
78 # define SWIGUNUSED __attribute__ ((__unused__))
79 # else
80 # define SWIGUNUSED
81 # endif
82 #endif
83
84 #ifndef SWIG_MSC_UNSUPPRESS_4505
85 # if defined(_MSC_VER)
86 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
87 # endif
88 #endif
89
90 #ifndef SWIGUNUSEDPARM
91 # ifdef __cplusplus
92 # define SWIGUNUSEDPARM(p)
93 # else
94 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
95 # endif
96 #endif
97
98 /* internal SWIG method */
99 #ifndef SWIGINTERN
100 # define SWIGINTERN static SWIGUNUSED
101 #endif
102
103 /* internal inline SWIG method */
104 #ifndef SWIGINTERNINLINE
105 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
106 #endif
107
108 /* exporting methods */
109 #if defined(__GNUC__)
110 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
111 # ifndef GCC_HASCLASSVISIBILITY
112 # define GCC_HASCLASSVISIBILITY
113 # endif
114 # endif
115 #endif
116
117 #ifndef SWIGEXPORT
118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
119 # if defined(STATIC_LINKED)
120 # define SWIGEXPORT
121 # else
122 # define SWIGEXPORT __declspec(dllexport)
123 # endif
124 # else
125 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
126 # define SWIGEXPORT __attribute__ ((visibility("default")))
127 # else
128 # define SWIGEXPORT
129 # endif
130 # endif
131 #endif
132
133 /* calling conventions for Windows */
134 #ifndef SWIGSTDCALL
135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
136 # define SWIGSTDCALL __stdcall
137 # else
138 # define SWIGSTDCALL
139 # endif
140 #endif
141
142 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
144 # define _CRT_SECURE_NO_DEPRECATE
145 #endif
146
147 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
149 # define _SCL_SECURE_NO_DEPRECATE
150 #endif
151
152 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
153 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
154 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
155 #endif
156
157 /* Intel's compiler complains if a variable which was never initialised is
158 * cast to void, which is a common idiom which we use to indicate that we
159 * are aware a variable isn't used. So we just silence that warning.
160 * See: https://github.com/swig/swig/issues/192 for more discussion.
161 */
162 #ifdef __INTEL_COMPILER
163 # pragma warning disable 592
164 #endif
165
166
167 #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
168 /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
169 # include <math.h>
170 #endif
171
172 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
173 /* Use debug wrappers with the Python release dll */
174 # undef _DEBUG
175 # include <Python.h>
176 # define _DEBUG 1
177 #else
178 # include <Python.h>
179 #endif
180
181 /* -----------------------------------------------------------------------------
182 * swigrun.swg
183 *
184 * This file contains generic C API SWIG runtime support for pointer
185 * type checking.
186 * ----------------------------------------------------------------------------- */
187
188 /* This should only be incremented when either the layout of swig_type_info changes,
189 or for whatever reason, the runtime changes incompatibly */
190 #define SWIG_RUNTIME_VERSION "4"
191
192 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
193 #ifdef SWIG_TYPE_TABLE
194 # define SWIG_QUOTE_STRING(x) #x
195 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
196 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
197 #else
198 # define SWIG_TYPE_TABLE_NAME
199 #endif
200
201 /*
202 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
203 creating a static or dynamic library from the SWIG runtime code.
204 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
205
206 But only do this if strictly necessary, ie, if you have problems
207 with your compiler or suchlike.
208 */
209
210 #ifndef SWIGRUNTIME
211 # define SWIGRUNTIME SWIGINTERN
212 #endif
213
214 #ifndef SWIGRUNTIMEINLINE
215 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
216 #endif
217
218 /* Generic buffer size */
219 #ifndef SWIG_BUFFER_SIZE
220 # define SWIG_BUFFER_SIZE 1024
221 #endif
222
223 /* Flags for pointer conversions */
224 #define SWIG_POINTER_DISOWN 0x1
225 #define SWIG_CAST_NEW_MEMORY 0x2
226 #define SWIG_POINTER_NO_NULL 0x4
227
228 /* Flags for new pointer objects */
229 #define SWIG_POINTER_OWN 0x1
230
231
232 /*
233 Flags/methods for returning states.
234
235 The SWIG conversion methods, as ConvertPtr, return an integer
236 that tells if the conversion was successful or not. And if not,
237 an error code can be returned (see swigerrors.swg for the codes).
238
239 Use the following macros/flags to set or process the returning
240 states.
241
242 In old versions of SWIG, code such as the following was usually written:
243
244 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
245 // success code
246 } else {
247 //fail code
248 }
249
250 Now you can be more explicit:
251
252 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
253 if (SWIG_IsOK(res)) {
254 // success code
255 } else {
256 // fail code
257 }
258
259 which is the same really, but now you can also do
260
261 Type *ptr;
262 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
263 if (SWIG_IsOK(res)) {
264 // success code
265 if (SWIG_IsNewObj(res) {
266 ...
267 delete *ptr;
268 } else {
269 ...
270 }
271 } else {
272 // fail code
273 }
274
275 I.e., now SWIG_ConvertPtr can return new objects and you can
276 identify the case and take care of the deallocation. Of course that
277 also requires SWIG_ConvertPtr to return new result values, such as
278
279 int SWIG_ConvertPtr(obj, ptr,...) {
280 if (<obj is ok>) {
281 if (<need new object>) {
282 *ptr = <ptr to new allocated object>;
283 return SWIG_NEWOBJ;
284 } else {
285 *ptr = <ptr to old object>;
286 return SWIG_OLDOBJ;
287 }
288 } else {
289 return SWIG_BADOBJ;
290 }
291 }
292
293 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
294 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
295 SWIG errors code.
296
297 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
298 allows to return the 'cast rank', for example, if you have this
299
300 int food(double)
301 int fooi(int);
302
303 and you call
304
305 food(1) // cast rank '1' (1 -> 1.0)
306 fooi(1) // cast rank '0'
307
308 just use the SWIG_AddCast()/SWIG_CheckState()
309 */
310
311 #define SWIG_OK (0)
312 #define SWIG_ERROR (-1)
313 #define SWIG_IsOK(r) (r >= 0)
314 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
315
316 /* The CastRankLimit says how many bits are used for the cast rank */
317 #define SWIG_CASTRANKLIMIT (1 << 8)
318 /* The NewMask denotes the object was created (using new/malloc) */
319 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
320 /* The TmpMask is for in/out typemaps that use temporal objects */
321 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
322 /* Simple returning values */
323 #define SWIG_BADOBJ (SWIG_ERROR)
324 #define SWIG_OLDOBJ (SWIG_OK)
325 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
326 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
327 /* Check, add and del mask methods */
328 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
329 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
330 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
331 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
332 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
333 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
334
335 /* Cast-Rank Mode */
336 #if defined(SWIG_CASTRANK_MODE)
337 # ifndef SWIG_TypeRank
338 # define SWIG_TypeRank unsigned long
339 # endif
340 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
341 # define SWIG_MAXCASTRANK (2)
342 # endif
343 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
344 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)345 SWIGINTERNINLINE int SWIG_AddCast(int r) {
346 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
347 }
SWIG_CheckState(int r)348 SWIGINTERNINLINE int SWIG_CheckState(int r) {
349 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
350 }
351 #else /* no cast-rank mode */
352 # define SWIG_AddCast(r) (r)
353 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
354 #endif
355
356
357 #include <string.h>
358
359 #ifdef __cplusplus
360 extern "C" {
361 #endif
362
363 typedef void *(*swig_converter_func)(void *, int *);
364 typedef struct swig_type_info *(*swig_dycast_func)(void **);
365
366 /* Structure to store information on one type */
367 typedef struct swig_type_info {
368 const char *name; /* mangled name of this type */
369 const char *str; /* human readable name of this type */
370 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
371 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
372 void *clientdata; /* language specific type data */
373 int owndata; /* flag if the structure owns the clientdata */
374 } swig_type_info;
375
376 /* Structure to store a type and conversion function used for casting */
377 typedef struct swig_cast_info {
378 swig_type_info *type; /* pointer to type that is equivalent to this type */
379 swig_converter_func converter; /* function to cast the void pointers */
380 struct swig_cast_info *next; /* pointer to next cast in linked list */
381 struct swig_cast_info *prev; /* pointer to the previous cast */
382 } swig_cast_info;
383
384 /* Structure used to store module information
385 * Each module generates one structure like this, and the runtime collects
386 * all of these structures and stores them in a circularly linked list.*/
387 typedef struct swig_module_info {
388 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
389 size_t size; /* Number of types in this module */
390 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
391 swig_type_info **type_initial; /* Array of initially generated type structures */
392 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
393 void *clientdata; /* Language specific module data */
394 } swig_module_info;
395
396 /*
397 Compare two type names skipping the space characters, therefore
398 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
399
400 Return 0 when the two name types are equivalent, as in
401 strncmp, but skipping ' '.
402 */
403 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)404 SWIG_TypeNameComp(const char *f1, const char *l1,
405 const char *f2, const char *l2) {
406 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
407 while ((*f1 == ' ') && (f1 != l1)) ++f1;
408 while ((*f2 == ' ') && (f2 != l2)) ++f2;
409 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
410 }
411 return (int)((l1 - f1) - (l2 - f2));
412 }
413
414 /*
415 Check type equivalence in a name list like <name1>|<name2>|...
416 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
417 */
418 SWIGRUNTIME int
SWIG_TypeCmp(const char * nb,const char * tb)419 SWIG_TypeCmp(const char *nb, const char *tb) {
420 int equiv = 1;
421 const char* te = tb + strlen(tb);
422 const char* ne = nb;
423 while (equiv != 0 && *ne) {
424 for (nb = ne; *ne; ++ne) {
425 if (*ne == '|') break;
426 }
427 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
428 if (*ne) ++ne;
429 }
430 return equiv;
431 }
432
433 /*
434 Check type equivalence in a name list like <name1>|<name2>|...
435 Return 0 if not equal, 1 if equal
436 */
437 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)438 SWIG_TypeEquiv(const char *nb, const char *tb) {
439 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
440 }
441
442 /*
443 Check the typename
444 */
445 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)446 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
447 if (ty) {
448 swig_cast_info *iter = ty->cast;
449 while (iter) {
450 if (strcmp(iter->type->name, c) == 0) {
451 if (iter == ty->cast)
452 return iter;
453 /* Move iter to the top of the linked list */
454 iter->prev->next = iter->next;
455 if (iter->next)
456 iter->next->prev = iter->prev;
457 iter->next = ty->cast;
458 iter->prev = 0;
459 if (ty->cast) ty->cast->prev = iter;
460 ty->cast = iter;
461 return iter;
462 }
463 iter = iter->next;
464 }
465 }
466 return 0;
467 }
468
469 /*
470 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
471 */
472 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)473 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
474 if (ty) {
475 swig_cast_info *iter = ty->cast;
476 while (iter) {
477 if (iter->type == from) {
478 if (iter == ty->cast)
479 return iter;
480 /* Move iter to the top of the linked list */
481 iter->prev->next = iter->next;
482 if (iter->next)
483 iter->next->prev = iter->prev;
484 iter->next = ty->cast;
485 iter->prev = 0;
486 if (ty->cast) ty->cast->prev = iter;
487 ty->cast = iter;
488 return iter;
489 }
490 iter = iter->next;
491 }
492 }
493 return 0;
494 }
495
496 /*
497 Cast a pointer up an inheritance hierarchy
498 */
499 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)500 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
501 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
502 }
503
504 /*
505 Dynamic pointer casting. Down an inheritance hierarchy
506 */
507 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)508 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
509 swig_type_info *lastty = ty;
510 if (!ty || !ty->dcast) return ty;
511 while (ty && (ty->dcast)) {
512 ty = (*ty->dcast)(ptr);
513 if (ty) lastty = ty;
514 }
515 return lastty;
516 }
517
518 /*
519 Return the name associated with this type
520 */
521 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)522 SWIG_TypeName(const swig_type_info *ty) {
523 return ty->name;
524 }
525
526 /*
527 Return the pretty name associated with this type,
528 that is an unmangled type name in a form presentable to the user.
529 */
530 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)531 SWIG_TypePrettyName(const swig_type_info *type) {
532 /* The "str" field contains the equivalent pretty names of the
533 type, separated by vertical-bar characters. We choose
534 to print the last name, as it is often (?) the most
535 specific. */
536 if (!type) return NULL;
537 if (type->str != NULL) {
538 const char *last_name = type->str;
539 const char *s;
540 for (s = type->str; *s; s++)
541 if (*s == '|') last_name = s+1;
542 return last_name;
543 }
544 else
545 return type->name;
546 }
547
548 /*
549 Set the clientdata field for a type
550 */
551 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)552 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
553 swig_cast_info *cast = ti->cast;
554 /* if (ti->clientdata == clientdata) return; */
555 ti->clientdata = clientdata;
556
557 while (cast) {
558 if (!cast->converter) {
559 swig_type_info *tc = cast->type;
560 if (!tc->clientdata) {
561 SWIG_TypeClientData(tc, clientdata);
562 }
563 }
564 cast = cast->next;
565 }
566 }
567 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)568 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
569 SWIG_TypeClientData(ti, clientdata);
570 ti->owndata = 1;
571 }
572
573 /*
574 Search for a swig_type_info structure only by mangled name
575 Search is a O(log #types)
576
577 We start searching at module start, and finish searching when start == end.
578 Note: if start == end at the beginning of the function, we go all the way around
579 the circular list.
580 */
581 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)582 SWIG_MangledTypeQueryModule(swig_module_info *start,
583 swig_module_info *end,
584 const char *name) {
585 swig_module_info *iter = start;
586 do {
587 if (iter->size) {
588 size_t l = 0;
589 size_t r = iter->size - 1;
590 do {
591 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
592 size_t i = (l + r) >> 1;
593 const char *iname = iter->types[i]->name;
594 if (iname) {
595 int compare = strcmp(name, iname);
596 if (compare == 0) {
597 return iter->types[i];
598 } else if (compare < 0) {
599 if (i) {
600 r = i - 1;
601 } else {
602 break;
603 }
604 } else if (compare > 0) {
605 l = i + 1;
606 }
607 } else {
608 break; /* should never happen */
609 }
610 } while (l <= r);
611 }
612 iter = iter->next;
613 } while (iter != end);
614 return 0;
615 }
616
617 /*
618 Search for a swig_type_info structure for either a mangled name or a human readable name.
619 It first searches the mangled names of the types, which is a O(log #types)
620 If a type is not found it then searches the human readable names, which is O(#types).
621
622 We start searching at module start, and finish searching when start == end.
623 Note: if start == end at the beginning of the function, we go all the way around
624 the circular list.
625 */
626 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)627 SWIG_TypeQueryModule(swig_module_info *start,
628 swig_module_info *end,
629 const char *name) {
630 /* STEP 1: Search the name field using binary search */
631 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
632 if (ret) {
633 return ret;
634 } else {
635 /* STEP 2: If the type hasn't been found, do a complete search
636 of the str field (the human readable name) */
637 swig_module_info *iter = start;
638 do {
639 size_t i = 0;
640 for (; i < iter->size; ++i) {
641 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
642 return iter->types[i];
643 }
644 iter = iter->next;
645 } while (iter != end);
646 }
647
648 /* neither found a match */
649 return 0;
650 }
651
652 /*
653 Pack binary data into a string
654 */
655 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)656 SWIG_PackData(char *c, void *ptr, size_t sz) {
657 static const char hex[17] = "0123456789abcdef";
658 const unsigned char *u = (unsigned char *) ptr;
659 const unsigned char *eu = u + sz;
660 for (; u != eu; ++u) {
661 unsigned char uu = *u;
662 *(c++) = hex[(uu & 0xf0) >> 4];
663 *(c++) = hex[uu & 0xf];
664 }
665 return c;
666 }
667
668 /*
669 Unpack binary data from a string
670 */
671 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)672 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
673 unsigned char *u = (unsigned char *) ptr;
674 const unsigned char *eu = u + sz;
675 for (; u != eu; ++u) {
676 char d = *(c++);
677 unsigned char uu;
678 if ((d >= '0') && (d <= '9'))
679 uu = (unsigned char)((d - '0') << 4);
680 else if ((d >= 'a') && (d <= 'f'))
681 uu = (unsigned char)((d - ('a'-10)) << 4);
682 else
683 return (char *) 0;
684 d = *(c++);
685 if ((d >= '0') && (d <= '9'))
686 uu |= (unsigned char)(d - '0');
687 else if ((d >= 'a') && (d <= 'f'))
688 uu |= (unsigned char)(d - ('a'-10));
689 else
690 return (char *) 0;
691 *u = uu;
692 }
693 return c;
694 }
695
696 /*
697 Pack 'void *' into a string buffer.
698 */
699 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)700 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
701 char *r = buff;
702 if ((2*sizeof(void *) + 2) > bsz) return 0;
703 *(r++) = '_';
704 r = SWIG_PackData(r,&ptr,sizeof(void *));
705 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
706 strcpy(r,name);
707 return buff;
708 }
709
710 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)711 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
712 if (*c != '_') {
713 if (strcmp(c,"NULL") == 0) {
714 *ptr = (void *) 0;
715 return name;
716 } else {
717 return 0;
718 }
719 }
720 return SWIG_UnpackData(++c,ptr,sizeof(void *));
721 }
722
723 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)724 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
725 char *r = buff;
726 size_t lname = (name ? strlen(name) : 0);
727 if ((2*sz + 2 + lname) > bsz) return 0;
728 *(r++) = '_';
729 r = SWIG_PackData(r,ptr,sz);
730 if (lname) {
731 strncpy(r,name,lname+1);
732 } else {
733 *r = 0;
734 }
735 return buff;
736 }
737
738 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)739 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
740 if (*c != '_') {
741 if (strcmp(c,"NULL") == 0) {
742 memset(ptr,0,sz);
743 return name;
744 } else {
745 return 0;
746 }
747 }
748 return SWIG_UnpackData(++c,ptr,sz);
749 }
750
751 #ifdef __cplusplus
752 }
753 #endif
754
755 /* Errors in SWIG */
756 #define SWIG_UnknownError -1
757 #define SWIG_IOError -2
758 #define SWIG_RuntimeError -3
759 #define SWIG_IndexError -4
760 #define SWIG_TypeError -5
761 #define SWIG_DivisionByZero -6
762 #define SWIG_OverflowError -7
763 #define SWIG_SyntaxError -8
764 #define SWIG_ValueError -9
765 #define SWIG_SystemError -10
766 #define SWIG_AttributeError -11
767 #define SWIG_MemoryError -12
768 #define SWIG_NullReferenceError -13
769
770
771
772 /* Compatibility macros for Python 3 */
773 #if PY_VERSION_HEX >= 0x03000000
774
775 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
776 #define PyInt_Check(x) PyLong_Check(x)
777 #define PyInt_AsLong(x) PyLong_AsLong(x)
778 #define PyInt_FromLong(x) PyLong_FromLong(x)
779 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
780 #define PyString_Check(name) PyBytes_Check(name)
781 #define PyString_FromString(x) PyUnicode_FromString(x)
782 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
783 #define PyString_AsString(str) PyBytes_AsString(str)
784 #define PyString_Size(str) PyBytes_Size(str)
785 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
786 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
787 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
788 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
789
790 #endif
791
792 #ifndef Py_TYPE
793 # define Py_TYPE(op) ((op)->ob_type)
794 #endif
795
796 /* SWIG APIs for compatibility of both Python 2 & 3 */
797
798 #if PY_VERSION_HEX >= 0x03000000
799 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
800 #else
801 # define SWIG_Python_str_FromFormat PyString_FromFormat
802 #endif
803
804
805 /* Warning: This function will allocate a new string in Python 3,
806 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
807 */
808 SWIGINTERN char*
SWIG_Python_str_AsChar(PyObject * str)809 SWIG_Python_str_AsChar(PyObject *str)
810 {
811 #if PY_VERSION_HEX >= 0x03030000
812 return (char *)PyUnicode_AsUTF8(str);
813 #elif PY_VERSION_HEX >= 0x03000000
814 char *newstr = 0;
815 str = PyUnicode_AsUTF8String(str);
816 if (str) {
817 char *cstr;
818 Py_ssize_t len;
819 if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
820 newstr = (char *) malloc(len+1);
821 if (newstr)
822 memcpy(newstr, cstr, len+1);
823 }
824 Py_XDECREF(str);
825 }
826 return newstr;
827 #else
828 return PyString_AsString(str);
829 #endif
830 }
831
832 #if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
833 # define SWIG_Python_str_DelForPy3(x)
834 #else
835 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
836 #endif
837
838
839 SWIGINTERN PyObject*
SWIG_Python_str_FromChar(const char * c)840 SWIG_Python_str_FromChar(const char *c)
841 {
842 #if PY_VERSION_HEX >= 0x03000000
843 return PyUnicode_FromString(c);
844 #else
845 return PyString_FromString(c);
846 #endif
847 }
848
849 #ifndef PyObject_DEL
850 # define PyObject_DEL PyObject_Del
851 #endif
852
853 // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
854 // interface files check for it.
855 # define SWIGPY_USE_CAPSULE
856 # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
857
858 #if PY_VERSION_HEX < 0x03020000
859 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
860 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
861 #define Py_hash_t long
862 #endif
863
864 /* -----------------------------------------------------------------------------
865 * error manipulation
866 * ----------------------------------------------------------------------------- */
867
868 SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code)869 SWIG_Python_ErrorType(int code) {
870 PyObject* type = 0;
871 switch(code) {
872 case SWIG_MemoryError:
873 type = PyExc_MemoryError;
874 break;
875 case SWIG_IOError:
876 type = PyExc_IOError;
877 break;
878 case SWIG_RuntimeError:
879 type = PyExc_RuntimeError;
880 break;
881 case SWIG_IndexError:
882 type = PyExc_IndexError;
883 break;
884 case SWIG_TypeError:
885 type = PyExc_TypeError;
886 break;
887 case SWIG_DivisionByZero:
888 type = PyExc_ZeroDivisionError;
889 break;
890 case SWIG_OverflowError:
891 type = PyExc_OverflowError;
892 break;
893 case SWIG_SyntaxError:
894 type = PyExc_SyntaxError;
895 break;
896 case SWIG_ValueError:
897 type = PyExc_ValueError;
898 break;
899 case SWIG_SystemError:
900 type = PyExc_SystemError;
901 break;
902 case SWIG_AttributeError:
903 type = PyExc_AttributeError;
904 break;
905 default:
906 type = PyExc_RuntimeError;
907 }
908 return type;
909 }
910
911
912 SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char * mesg)913 SWIG_Python_AddErrorMsg(const char* mesg)
914 {
915 PyObject *type = 0;
916 PyObject *value = 0;
917 PyObject *traceback = 0;
918
919 if (PyErr_Occurred())
920 PyErr_Fetch(&type, &value, &traceback);
921 if (value) {
922 PyObject *old_str = PyObject_Str(value);
923 const char *tmp = SWIG_Python_str_AsChar(old_str);
924 PyErr_Clear();
925 Py_XINCREF(type);
926 if (tmp)
927 PyErr_Format(type, "%s %s", tmp, mesg);
928 else
929 PyErr_Format(type, "%s", mesg);
930 SWIG_Python_str_DelForPy3(tmp);
931 Py_DECREF(old_str);
932 Py_DECREF(value);
933 } else {
934 PyErr_SetString(PyExc_RuntimeError, mesg);
935 }
936 }
937
938 SWIGRUNTIME int
SWIG_Python_TypeErrorOccurred(PyObject * obj)939 SWIG_Python_TypeErrorOccurred(PyObject *obj)
940 {
941 PyObject *error;
942 if (obj)
943 return 0;
944 error = PyErr_Occurred();
945 return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
946 }
947
948 SWIGRUNTIME void
SWIG_Python_RaiseOrModifyTypeError(const char * message)949 SWIG_Python_RaiseOrModifyTypeError(const char *message)
950 {
951 if (SWIG_Python_TypeErrorOccurred(NULL)) {
952 /* Use existing TypeError to preserve stacktrace and enhance with given message */
953 PyObject *newvalue;
954 PyObject *type = NULL, *value = NULL, *traceback = NULL;
955 PyErr_Fetch(&type, &value, &traceback);
956 #if PY_VERSION_HEX >= 0x03000000
957 newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
958 #else
959 newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
960 #endif
961 Py_XDECREF(value);
962 PyErr_Restore(type, newvalue, traceback);
963 } else {
964 /* Raise TypeError using given message */
965 PyErr_SetString(PyExc_TypeError, message);
966 }
967 }
968
969 #if defined(SWIG_PYTHON_NO_THREADS)
970 # if defined(SWIG_PYTHON_THREADS)
971 # undef SWIG_PYTHON_THREADS
972 # endif
973 #endif
974 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
975 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
976 # define SWIG_PYTHON_USE_GIL
977 # endif
978 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
979 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
980 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
981 # endif
982 # ifdef __cplusplus /* C++ code */
983 class SWIG_Python_Thread_Block {
984 bool status;
985 PyGILState_STATE state;
986 public:
end()987 void end() { if (status) { PyGILState_Release(state); status = false;} }
SWIG_Python_Thread_Block()988 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
~SWIG_Python_Thread_Block()989 ~SWIG_Python_Thread_Block() { end(); }
990 };
991 class SWIG_Python_Thread_Allow {
992 bool status;
993 PyThreadState *save;
994 public:
end()995 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
SWIG_Python_Thread_Allow()996 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
~SWIG_Python_Thread_Allow()997 ~SWIG_Python_Thread_Allow() { end(); }
998 };
999 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1000 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1001 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1002 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1003 # else /* C code */
1004 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1005 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1006 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1007 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1008 # endif
1009 # else /* Old thread way, not implemented, user must provide it */
1010 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1011 # define SWIG_PYTHON_INITIALIZE_THREADS
1012 # endif
1013 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1014 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1015 # endif
1016 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1017 # define SWIG_PYTHON_THREAD_END_BLOCK
1018 # endif
1019 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1020 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1021 # endif
1022 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1023 # define SWIG_PYTHON_THREAD_END_ALLOW
1024 # endif
1025 # endif
1026 #else /* No thread support */
1027 # define SWIG_PYTHON_INITIALIZE_THREADS
1028 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1029 # define SWIG_PYTHON_THREAD_END_BLOCK
1030 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1031 # define SWIG_PYTHON_THREAD_END_ALLOW
1032 #endif
1033
1034 /* -----------------------------------------------------------------------------
1035 * Python API portion that goes into the runtime
1036 * ----------------------------------------------------------------------------- */
1037
1038 #ifdef __cplusplus
1039 extern "C" {
1040 #endif
1041
1042 /* -----------------------------------------------------------------------------
1043 * Constant declarations
1044 * ----------------------------------------------------------------------------- */
1045
1046 /* Constant Types */
1047 #define SWIG_PY_POINTER 4
1048 #define SWIG_PY_BINARY 5
1049
1050 /* Constant information structure */
1051 typedef struct swig_const_info {
1052 int type;
1053 const char *name;
1054 long lvalue;
1055 double dvalue;
1056 void *pvalue;
1057 swig_type_info **ptype;
1058 } swig_const_info;
1059
1060 #ifdef __cplusplus
1061 }
1062 #endif
1063
1064
1065 /* -----------------------------------------------------------------------------
1066 * pyrun.swg
1067 *
1068 * This file contains the runtime support for Python modules
1069 * and includes code for managing global variables and pointer
1070 * type checking.
1071 *
1072 * ----------------------------------------------------------------------------- */
1073
1074 #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
1075 # error "This version of SWIG only supports Python >= 2.7"
1076 #endif
1077
1078 #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
1079 # error "This version of SWIG only supports Python 3 >= 3.2"
1080 #endif
1081
1082 /* Common SWIG API */
1083
1084 /* for raw pointers */
1085 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1086 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1087 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1088
1089 #ifdef SWIGPYTHON_BUILTIN
1090 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1091 #else
1092 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1093 #endif
1094
1095 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1096
1097 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1098 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1099 #define swig_owntype int
1100
1101 /* for raw packed data */
1102 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1103 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1104
1105 /* for class or struct pointers */
1106 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1107 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1108
1109 /* for C or C++ function pointers */
1110 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1111 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1112
1113 /* for C++ member pointers, ie, member methods */
1114 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1115 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1116
1117
1118 /* Runtime API */
1119
1120 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1121 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1122 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1123
1124 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1125 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1126 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1127 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1128 #define SWIG_fail goto fail
1129
1130
1131 /* Runtime API implementation */
1132
1133 /* Error manipulation */
1134
1135 SWIGINTERN void
SWIG_Python_SetErrorObj(PyObject * errtype,PyObject * obj)1136 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1137 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1138 PyErr_SetObject(errtype, obj);
1139 Py_DECREF(obj);
1140 SWIG_PYTHON_THREAD_END_BLOCK;
1141 }
1142
1143 SWIGINTERN void
SWIG_Python_SetErrorMsg(PyObject * errtype,const char * msg)1144 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1145 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1146 PyErr_SetString(errtype, msg);
1147 SWIG_PYTHON_THREAD_END_BLOCK;
1148 }
1149
1150 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1151
1152 /* Set a constant value */
1153
1154 #if defined(SWIGPYTHON_BUILTIN)
1155
1156 SWIGINTERN void
SwigPyBuiltin_AddPublicSymbol(PyObject * seq,const char * key)1157 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1158 PyObject *s = PyString_InternFromString(key);
1159 PyList_Append(seq, s);
1160 Py_DECREF(s);
1161 }
1162
1163 SWIGINTERN void
SWIG_Python_SetConstant(PyObject * d,PyObject * public_interface,const char * name,PyObject * obj)1164 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1165 PyDict_SetItemString(d, name, obj);
1166 Py_DECREF(obj);
1167 if (public_interface)
1168 SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1169 }
1170
1171 #else
1172
1173 SWIGINTERN void
SWIG_Python_SetConstant(PyObject * d,const char * name,PyObject * obj)1174 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1175 PyDict_SetItemString(d, name, obj);
1176 Py_DECREF(obj);
1177 }
1178
1179 #endif
1180
1181 /* Append a value to the result obj */
1182
1183 SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject * result,PyObject * obj)1184 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1185 if (!result) {
1186 result = obj;
1187 } else if (result == Py_None) {
1188 Py_DECREF(result);
1189 result = obj;
1190 } else {
1191 if (!PyList_Check(result)) {
1192 PyObject *o2 = result;
1193 result = PyList_New(1);
1194 PyList_SetItem(result, 0, o2);
1195 }
1196 PyList_Append(result,obj);
1197 Py_DECREF(obj);
1198 }
1199 return result;
1200 }
1201
1202 /* Unpack the argument tuple */
1203
1204 SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject * args,const char * name,Py_ssize_t min,Py_ssize_t max,PyObject ** objs)1205 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1206 {
1207 if (!args) {
1208 if (!min && !max) {
1209 return 1;
1210 } else {
1211 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1212 name, (min == max ? "" : "at least "), (int)min);
1213 return 0;
1214 }
1215 }
1216 if (!PyTuple_Check(args)) {
1217 if (min <= 1 && max >= 1) {
1218 Py_ssize_t i;
1219 objs[0] = args;
1220 for (i = 1; i < max; ++i) {
1221 objs[i] = 0;
1222 }
1223 return 2;
1224 }
1225 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1226 return 0;
1227 } else {
1228 Py_ssize_t l = PyTuple_GET_SIZE(args);
1229 if (l < min) {
1230 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1231 name, (min == max ? "" : "at least "), (int)min, (int)l);
1232 return 0;
1233 } else if (l > max) {
1234 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1235 name, (min == max ? "" : "at most "), (int)max, (int)l);
1236 return 0;
1237 } else {
1238 Py_ssize_t i;
1239 for (i = 0; i < l; ++i) {
1240 objs[i] = PyTuple_GET_ITEM(args, i);
1241 }
1242 for (; l < max; ++l) {
1243 objs[l] = 0;
1244 }
1245 return i + 1;
1246 }
1247 }
1248 }
1249
1250 SWIGINTERN int
SWIG_Python_CheckNoKeywords(PyObject * kwargs,const char * name)1251 SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
1252 int no_kwargs = 1;
1253 if (kwargs) {
1254 assert(PyDict_Check(kwargs));
1255 if (PyDict_Size(kwargs) > 0) {
1256 PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
1257 no_kwargs = 0;
1258 }
1259 }
1260 return no_kwargs;
1261 }
1262
1263 /* A functor is a function object with one single object argument */
1264 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1265
1266 /*
1267 Helper for static pointer initialization for both C and C++ code, for example
1268 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1269 */
1270 #ifdef __cplusplus
1271 #define SWIG_STATIC_POINTER(var) var
1272 #else
1273 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1274 #endif
1275
1276 /* -----------------------------------------------------------------------------
1277 * Pointer declarations
1278 * ----------------------------------------------------------------------------- */
1279
1280 /* Flags for new pointer objects */
1281 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1282 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1283
1284 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1285
1286 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1287 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1288
1289 #ifdef __cplusplus
1290 extern "C" {
1291 #endif
1292
1293 /* The python void return value */
1294
1295 SWIGRUNTIMEINLINE PyObject *
SWIG_Py_Void(void)1296 SWIG_Py_Void(void)
1297 {
1298 PyObject *none = Py_None;
1299 Py_INCREF(none);
1300 return none;
1301 }
1302
1303 /* SwigPyClientData */
1304
1305 typedef struct {
1306 PyObject *klass;
1307 PyObject *newraw;
1308 PyObject *newargs;
1309 PyObject *destroy;
1310 int delargs;
1311 int implicitconv;
1312 PyTypeObject *pytype;
1313 } SwigPyClientData;
1314
1315 SWIGRUNTIMEINLINE int
SWIG_Python_CheckImplicit(swig_type_info * ty)1316 SWIG_Python_CheckImplicit(swig_type_info *ty)
1317 {
1318 SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1319 int fail = data ? data->implicitconv : 0;
1320 if (fail)
1321 PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
1322 return fail;
1323 }
1324
1325 SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info * desc)1326 SWIG_Python_ExceptionType(swig_type_info *desc) {
1327 SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1328 PyObject *klass = data ? data->klass : 0;
1329 return (klass ? klass : PyExc_RuntimeError);
1330 }
1331
1332
1333 SWIGRUNTIME SwigPyClientData *
SwigPyClientData_New(PyObject * obj)1334 SwigPyClientData_New(PyObject* obj)
1335 {
1336 if (!obj) {
1337 return 0;
1338 } else {
1339 SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1340 /* the klass element */
1341 data->klass = obj;
1342 Py_INCREF(data->klass);
1343 /* the newraw method and newargs arguments used to create a new raw instance */
1344 if (PyClass_Check(obj)) {
1345 data->newraw = 0;
1346 data->newargs = obj;
1347 Py_INCREF(obj);
1348 } else {
1349 data->newraw = PyObject_GetAttrString(data->klass, "__new__");
1350 if (data->newraw) {
1351 Py_INCREF(data->newraw);
1352 data->newargs = PyTuple_New(1);
1353 PyTuple_SetItem(data->newargs, 0, obj);
1354 } else {
1355 data->newargs = obj;
1356 }
1357 Py_INCREF(data->newargs);
1358 }
1359 /* the destroy method, aka as the C++ delete method */
1360 data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1361 if (PyErr_Occurred()) {
1362 PyErr_Clear();
1363 data->destroy = 0;
1364 }
1365 if (data->destroy) {
1366 int flags;
1367 Py_INCREF(data->destroy);
1368 flags = PyCFunction_GET_FLAGS(data->destroy);
1369 data->delargs = !(flags & (METH_O));
1370 } else {
1371 data->delargs = 0;
1372 }
1373 data->implicitconv = 0;
1374 data->pytype = 0;
1375 return data;
1376 }
1377 }
1378
1379 SWIGRUNTIME void
SwigPyClientData_Del(SwigPyClientData * data)1380 SwigPyClientData_Del(SwigPyClientData *data) {
1381 Py_XDECREF(data->newraw);
1382 Py_XDECREF(data->newargs);
1383 Py_XDECREF(data->destroy);
1384 }
1385
1386 /* =============== SwigPyObject =====================*/
1387
1388 typedef struct {
1389 PyObject_HEAD
1390 void *ptr;
1391 swig_type_info *ty;
1392 int own;
1393 PyObject *next;
1394 #ifdef SWIGPYTHON_BUILTIN
1395 PyObject *dict;
1396 #endif
1397 } SwigPyObject;
1398
1399
1400 #ifdef SWIGPYTHON_BUILTIN
1401
1402 SWIGRUNTIME PyObject *
SwigPyObject_get___dict__(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1403 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1404 {
1405 SwigPyObject *sobj = (SwigPyObject *)v;
1406
1407 if (!sobj->dict)
1408 sobj->dict = PyDict_New();
1409
1410 Py_INCREF(sobj->dict);
1411 return sobj->dict;
1412 }
1413
1414 #endif
1415
1416 SWIGRUNTIME PyObject *
SwigPyObject_long(SwigPyObject * v)1417 SwigPyObject_long(SwigPyObject *v)
1418 {
1419 return PyLong_FromVoidPtr(v->ptr);
1420 }
1421
1422 SWIGRUNTIME PyObject *
SwigPyObject_format(const char * fmt,SwigPyObject * v)1423 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1424 {
1425 PyObject *res = NULL;
1426 PyObject *args = PyTuple_New(1);
1427 if (args) {
1428 if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1429 PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1430 if (ofmt) {
1431 #if PY_VERSION_HEX >= 0x03000000
1432 res = PyUnicode_Format(ofmt,args);
1433 #else
1434 res = PyString_Format(ofmt,args);
1435 #endif
1436 Py_DECREF(ofmt);
1437 }
1438 Py_DECREF(args);
1439 }
1440 }
1441 return res;
1442 }
1443
1444 SWIGRUNTIME PyObject *
SwigPyObject_oct(SwigPyObject * v)1445 SwigPyObject_oct(SwigPyObject *v)
1446 {
1447 return SwigPyObject_format("%o",v);
1448 }
1449
1450 SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject * v)1451 SwigPyObject_hex(SwigPyObject *v)
1452 {
1453 return SwigPyObject_format("%x",v);
1454 }
1455
1456 SWIGRUNTIME PyObject *
SwigPyObject_repr(SwigPyObject * v)1457 SwigPyObject_repr(SwigPyObject *v)
1458 {
1459 const char *name = SWIG_TypePrettyName(v->ty);
1460 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1461 if (v->next) {
1462 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1463 # if PY_VERSION_HEX >= 0x03000000
1464 PyObject *joined = PyUnicode_Concat(repr, nrep);
1465 Py_DecRef(repr);
1466 Py_DecRef(nrep);
1467 repr = joined;
1468 # else
1469 PyString_ConcatAndDel(&repr,nrep);
1470 # endif
1471 }
1472 return repr;
1473 }
1474
1475 /* We need a version taking two PyObject* parameters so it's a valid
1476 * PyCFunction to use in swigobject_methods[]. */
1477 SWIGRUNTIME PyObject *
SwigPyObject_repr2(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1478 SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1479 {
1480 return SwigPyObject_repr((SwigPyObject*)v);
1481 }
1482
1483 SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject * v,SwigPyObject * w)1484 SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1485 {
1486 void *i = v->ptr;
1487 void *j = w->ptr;
1488 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1489 }
1490
1491 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1492 SWIGRUNTIME PyObject*
SwigPyObject_richcompare(SwigPyObject * v,SwigPyObject * w,int op)1493 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1494 {
1495 PyObject* res;
1496 if( op != Py_EQ && op != Py_NE ) {
1497 Py_INCREF(Py_NotImplemented);
1498 return Py_NotImplemented;
1499 }
1500 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1501 return res;
1502 }
1503
1504
1505 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1506
1507 #ifdef SWIGPYTHON_BUILTIN
1508 static swig_type_info *SwigPyObject_stype = 0;
1509 SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void)1510 SwigPyObject_type(void) {
1511 SwigPyClientData *cd;
1512 assert(SwigPyObject_stype);
1513 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1514 assert(cd);
1515 assert(cd->pytype);
1516 return cd->pytype;
1517 }
1518 #else
1519 SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void)1520 SwigPyObject_type(void) {
1521 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1522 return type;
1523 }
1524 #endif
1525
1526 SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject * op)1527 SwigPyObject_Check(PyObject *op) {
1528 #ifdef SWIGPYTHON_BUILTIN
1529 PyTypeObject *target_tp = SwigPyObject_type();
1530 if (PyType_IsSubtype(op->ob_type, target_tp))
1531 return 1;
1532 return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1533 #else
1534 return (Py_TYPE(op) == SwigPyObject_type())
1535 || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1536 #endif
1537 }
1538
1539 SWIGRUNTIME PyObject *
1540 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1541
1542 SWIGRUNTIME void
SwigPyObject_dealloc(PyObject * v)1543 SwigPyObject_dealloc(PyObject *v)
1544 {
1545 SwigPyObject *sobj = (SwigPyObject *) v;
1546 PyObject *next = sobj->next;
1547 if (sobj->own == SWIG_POINTER_OWN) {
1548 swig_type_info *ty = sobj->ty;
1549 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1550 PyObject *destroy = data ? data->destroy : 0;
1551 if (destroy) {
1552 /* destroy is always a VARARGS method */
1553 PyObject *res;
1554
1555 /* PyObject_CallFunction() has the potential to silently drop
1556 the active exception. In cases of unnamed temporary
1557 variable or where we just finished iterating over a generator
1558 StopIteration will be active right now, and this needs to
1559 remain true upon return from SwigPyObject_dealloc. So save
1560 and restore. */
1561
1562 PyObject *type = NULL, *value = NULL, *traceback = NULL;
1563 PyErr_Fetch(&type, &value, &traceback);
1564
1565 if (data->delargs) {
1566 /* we need to create a temporary object to carry the destroy operation */
1567 PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1568 res = SWIG_Python_CallFunctor(destroy, tmp);
1569 Py_DECREF(tmp);
1570 } else {
1571 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1572 PyObject *mself = PyCFunction_GET_SELF(destroy);
1573 res = ((*meth)(mself, v));
1574 }
1575 if (!res)
1576 PyErr_WriteUnraisable(destroy);
1577
1578 PyErr_Restore(type, value, traceback);
1579
1580 Py_XDECREF(res);
1581 }
1582 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1583 else {
1584 const char *name = SWIG_TypePrettyName(ty);
1585 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1586 }
1587 #endif
1588 }
1589 Py_XDECREF(next);
1590 PyObject_DEL(v);
1591 }
1592
1593 SWIGRUNTIME PyObject*
SwigPyObject_append(PyObject * v,PyObject * next)1594 SwigPyObject_append(PyObject* v, PyObject* next)
1595 {
1596 SwigPyObject *sobj = (SwigPyObject *) v;
1597 if (!SwigPyObject_Check(next)) {
1598 PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1599 return NULL;
1600 }
1601 sobj->next = next;
1602 Py_INCREF(next);
1603 return SWIG_Py_Void();
1604 }
1605
1606 SWIGRUNTIME PyObject*
SwigPyObject_next(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1607 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1608 {
1609 SwigPyObject *sobj = (SwigPyObject *) v;
1610 if (sobj->next) {
1611 Py_INCREF(sobj->next);
1612 return sobj->next;
1613 } else {
1614 return SWIG_Py_Void();
1615 }
1616 }
1617
1618 SWIGINTERN PyObject*
SwigPyObject_disown(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1619 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1620 {
1621 SwigPyObject *sobj = (SwigPyObject *)v;
1622 sobj->own = 0;
1623 return SWIG_Py_Void();
1624 }
1625
1626 SWIGINTERN PyObject*
SwigPyObject_acquire(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1627 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1628 {
1629 SwigPyObject *sobj = (SwigPyObject *)v;
1630 sobj->own = SWIG_POINTER_OWN;
1631 return SWIG_Py_Void();
1632 }
1633
1634 SWIGINTERN PyObject*
SwigPyObject_own(PyObject * v,PyObject * args)1635 SwigPyObject_own(PyObject *v, PyObject *args)
1636 {
1637 PyObject *val = 0;
1638 if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1639 return NULL;
1640 } else {
1641 SwigPyObject *sobj = (SwigPyObject *)v;
1642 PyObject *obj = PyBool_FromLong(sobj->own);
1643 if (val) {
1644 if (PyObject_IsTrue(val)) {
1645 SwigPyObject_acquire(v,args);
1646 } else {
1647 SwigPyObject_disown(v,args);
1648 }
1649 }
1650 return obj;
1651 }
1652 }
1653
1654 static PyMethodDef
1655 swigobject_methods[] = {
1656 {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
1657 {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
1658 {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
1659 {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
1660 {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
1661 {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
1662 {0, 0, 0, 0}
1663 };
1664
1665 SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void)1666 SwigPyObject_TypeOnce(void) {
1667 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1668
1669 static PyNumberMethods SwigPyObject_as_number = {
1670 (binaryfunc)0, /*nb_add*/
1671 (binaryfunc)0, /*nb_subtract*/
1672 (binaryfunc)0, /*nb_multiply*/
1673 /* nb_divide removed in Python 3 */
1674 #if PY_VERSION_HEX < 0x03000000
1675 (binaryfunc)0, /*nb_divide*/
1676 #endif
1677 (binaryfunc)0, /*nb_remainder*/
1678 (binaryfunc)0, /*nb_divmod*/
1679 (ternaryfunc)0,/*nb_power*/
1680 (unaryfunc)0, /*nb_negative*/
1681 (unaryfunc)0, /*nb_positive*/
1682 (unaryfunc)0, /*nb_absolute*/
1683 (inquiry)0, /*nb_nonzero*/
1684 0, /*nb_invert*/
1685 0, /*nb_lshift*/
1686 0, /*nb_rshift*/
1687 0, /*nb_and*/
1688 0, /*nb_xor*/
1689 0, /*nb_or*/
1690 #if PY_VERSION_HEX < 0x03000000
1691 0, /*nb_coerce*/
1692 #endif
1693 (unaryfunc)SwigPyObject_long, /*nb_int*/
1694 #if PY_VERSION_HEX < 0x03000000
1695 (unaryfunc)SwigPyObject_long, /*nb_long*/
1696 #else
1697 0, /*nb_reserved*/
1698 #endif
1699 (unaryfunc)0, /*nb_float*/
1700 #if PY_VERSION_HEX < 0x03000000
1701 (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1702 (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1703 #endif
1704 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1705 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1706 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1707 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1708 #else
1709 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1710 #endif
1711 };
1712
1713 static PyTypeObject swigpyobject_type;
1714 static int type_init = 0;
1715 if (!type_init) {
1716 const PyTypeObject tmp = {
1717 #if PY_VERSION_HEX >= 0x03000000
1718 PyVarObject_HEAD_INIT(NULL, 0)
1719 #else
1720 PyObject_HEAD_INIT(NULL)
1721 0, /* ob_size */
1722 #endif
1723 "SwigPyObject", /* tp_name */
1724 sizeof(SwigPyObject), /* tp_basicsize */
1725 0, /* tp_itemsize */
1726 (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1727 0, /* tp_print */
1728 (getattrfunc)0, /* tp_getattr */
1729 (setattrfunc)0, /* tp_setattr */
1730 #if PY_VERSION_HEX >= 0x03000000
1731 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1732 #else
1733 (cmpfunc)SwigPyObject_compare, /* tp_compare */
1734 #endif
1735 (reprfunc)SwigPyObject_repr, /* tp_repr */
1736 &SwigPyObject_as_number, /* tp_as_number */
1737 0, /* tp_as_sequence */
1738 0, /* tp_as_mapping */
1739 (hashfunc)0, /* tp_hash */
1740 (ternaryfunc)0, /* tp_call */
1741 0, /* tp_str */
1742 PyObject_GenericGetAttr, /* tp_getattro */
1743 0, /* tp_setattro */
1744 0, /* tp_as_buffer */
1745 Py_TPFLAGS_DEFAULT, /* tp_flags */
1746 swigobject_doc, /* tp_doc */
1747 0, /* tp_traverse */
1748 0, /* tp_clear */
1749 (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1750 0, /* tp_weaklistoffset */
1751 0, /* tp_iter */
1752 0, /* tp_iternext */
1753 swigobject_methods, /* tp_methods */
1754 0, /* tp_members */
1755 0, /* tp_getset */
1756 0, /* tp_base */
1757 0, /* tp_dict */
1758 0, /* tp_descr_get */
1759 0, /* tp_descr_set */
1760 0, /* tp_dictoffset */
1761 0, /* tp_init */
1762 0, /* tp_alloc */
1763 0, /* tp_new */
1764 0, /* tp_free */
1765 0, /* tp_is_gc */
1766 0, /* tp_bases */
1767 0, /* tp_mro */
1768 0, /* tp_cache */
1769 0, /* tp_subclasses */
1770 0, /* tp_weaklist */
1771 0, /* tp_del */
1772 0, /* tp_version_tag */
1773 #if PY_VERSION_HEX >= 0x03040000
1774 0, /* tp_finalize */
1775 #endif
1776 #if PY_VERSION_HEX >= 0x03080000
1777 0, /* tp_vectorcall */
1778 #endif
1779 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1780 0, /* tp_print */
1781 #endif
1782 #ifdef COUNT_ALLOCS
1783 0, /* tp_allocs */
1784 0, /* tp_frees */
1785 0, /* tp_maxalloc */
1786 0, /* tp_prev */
1787 0 /* tp_next */
1788 #endif
1789 };
1790 swigpyobject_type = tmp;
1791 type_init = 1;
1792 if (PyType_Ready(&swigpyobject_type) < 0)
1793 return NULL;
1794 }
1795 return &swigpyobject_type;
1796 }
1797
1798 SWIGRUNTIME PyObject *
SwigPyObject_New(void * ptr,swig_type_info * ty,int own)1799 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1800 {
1801 SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1802 if (sobj) {
1803 sobj->ptr = ptr;
1804 sobj->ty = ty;
1805 sobj->own = own;
1806 sobj->next = 0;
1807 }
1808 return (PyObject *)sobj;
1809 }
1810
1811 /* -----------------------------------------------------------------------------
1812 * Implements a simple Swig Packed type, and use it instead of string
1813 * ----------------------------------------------------------------------------- */
1814
1815 typedef struct {
1816 PyObject_HEAD
1817 void *pack;
1818 swig_type_info *ty;
1819 size_t size;
1820 } SwigPyPacked;
1821
1822 SWIGRUNTIME PyObject *
SwigPyPacked_repr(SwigPyPacked * v)1823 SwigPyPacked_repr(SwigPyPacked *v)
1824 {
1825 char result[SWIG_BUFFER_SIZE];
1826 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1827 return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1828 } else {
1829 return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1830 }
1831 }
1832
1833 SWIGRUNTIME PyObject *
SwigPyPacked_str(SwigPyPacked * v)1834 SwigPyPacked_str(SwigPyPacked *v)
1835 {
1836 char result[SWIG_BUFFER_SIZE];
1837 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1838 return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1839 } else {
1840 return SWIG_Python_str_FromChar(v->ty->name);
1841 }
1842 }
1843
1844 SWIGRUNTIME int
SwigPyPacked_compare(SwigPyPacked * v,SwigPyPacked * w)1845 SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
1846 {
1847 size_t i = v->size;
1848 size_t j = w->size;
1849 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1850 return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
1851 }
1852
1853 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
1854
1855 SWIGRUNTIME PyTypeObject*
SwigPyPacked_type(void)1856 SwigPyPacked_type(void) {
1857 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1858 return type;
1859 }
1860
1861 SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject * op)1862 SwigPyPacked_Check(PyObject *op) {
1863 return ((op)->ob_type == SwigPyPacked_TypeOnce())
1864 || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1865 }
1866
1867 SWIGRUNTIME void
SwigPyPacked_dealloc(PyObject * v)1868 SwigPyPacked_dealloc(PyObject *v)
1869 {
1870 if (SwigPyPacked_Check(v)) {
1871 SwigPyPacked *sobj = (SwigPyPacked *) v;
1872 free(sobj->pack);
1873 }
1874 PyObject_DEL(v);
1875 }
1876
1877 SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void)1878 SwigPyPacked_TypeOnce(void) {
1879 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1880 static PyTypeObject swigpypacked_type;
1881 static int type_init = 0;
1882 if (!type_init) {
1883 const PyTypeObject tmp = {
1884 #if PY_VERSION_HEX>=0x03000000
1885 PyVarObject_HEAD_INIT(NULL, 0)
1886 #else
1887 PyObject_HEAD_INIT(NULL)
1888 0, /* ob_size */
1889 #endif
1890 "SwigPyPacked", /* tp_name */
1891 sizeof(SwigPyPacked), /* tp_basicsize */
1892 0, /* tp_itemsize */
1893 (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
1894 0, /* tp_print */
1895 (getattrfunc)0, /* tp_getattr */
1896 (setattrfunc)0, /* tp_setattr */
1897 #if PY_VERSION_HEX>=0x03000000
1898 0, /* tp_reserved in 3.0.1 */
1899 #else
1900 (cmpfunc)SwigPyPacked_compare, /* tp_compare */
1901 #endif
1902 (reprfunc)SwigPyPacked_repr, /* tp_repr */
1903 0, /* tp_as_number */
1904 0, /* tp_as_sequence */
1905 0, /* tp_as_mapping */
1906 (hashfunc)0, /* tp_hash */
1907 (ternaryfunc)0, /* tp_call */
1908 (reprfunc)SwigPyPacked_str, /* tp_str */
1909 PyObject_GenericGetAttr, /* tp_getattro */
1910 0, /* tp_setattro */
1911 0, /* tp_as_buffer */
1912 Py_TPFLAGS_DEFAULT, /* tp_flags */
1913 swigpacked_doc, /* tp_doc */
1914 0, /* tp_traverse */
1915 0, /* tp_clear */
1916 0, /* tp_richcompare */
1917 0, /* tp_weaklistoffset */
1918 0, /* tp_iter */
1919 0, /* tp_iternext */
1920 0, /* tp_methods */
1921 0, /* tp_members */
1922 0, /* tp_getset */
1923 0, /* tp_base */
1924 0, /* tp_dict */
1925 0, /* tp_descr_get */
1926 0, /* tp_descr_set */
1927 0, /* tp_dictoffset */
1928 0, /* tp_init */
1929 0, /* tp_alloc */
1930 0, /* tp_new */
1931 0, /* tp_free */
1932 0, /* tp_is_gc */
1933 0, /* tp_bases */
1934 0, /* tp_mro */
1935 0, /* tp_cache */
1936 0, /* tp_subclasses */
1937 0, /* tp_weaklist */
1938 0, /* tp_del */
1939 0, /* tp_version_tag */
1940 #if PY_VERSION_HEX >= 0x03040000
1941 0, /* tp_finalize */
1942 #endif
1943 #if PY_VERSION_HEX >= 0x03080000
1944 0, /* tp_vectorcall */
1945 #endif
1946 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1947 0, /* tp_print */
1948 #endif
1949 #ifdef COUNT_ALLOCS
1950 0, /* tp_allocs */
1951 0, /* tp_frees */
1952 0, /* tp_maxalloc */
1953 0, /* tp_prev */
1954 0 /* tp_next */
1955 #endif
1956 };
1957 swigpypacked_type = tmp;
1958 type_init = 1;
1959 if (PyType_Ready(&swigpypacked_type) < 0)
1960 return NULL;
1961 }
1962 return &swigpypacked_type;
1963 }
1964
1965 SWIGRUNTIME PyObject *
SwigPyPacked_New(void * ptr,size_t size,swig_type_info * ty)1966 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
1967 {
1968 SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
1969 if (sobj) {
1970 void *pack = malloc(size);
1971 if (pack) {
1972 memcpy(pack, ptr, size);
1973 sobj->pack = pack;
1974 sobj->ty = ty;
1975 sobj->size = size;
1976 } else {
1977 PyObject_DEL((PyObject *) sobj);
1978 sobj = 0;
1979 }
1980 }
1981 return (PyObject *) sobj;
1982 }
1983
1984 SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject * obj,void * ptr,size_t size)1985 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1986 {
1987 if (SwigPyPacked_Check(obj)) {
1988 SwigPyPacked *sobj = (SwigPyPacked *)obj;
1989 if (sobj->size != size) return 0;
1990 memcpy(ptr, sobj->pack, size);
1991 return sobj->ty;
1992 } else {
1993 return 0;
1994 }
1995 }
1996
1997 /* -----------------------------------------------------------------------------
1998 * pointers/data manipulation
1999 * ----------------------------------------------------------------------------- */
2000
2001 static PyObject *Swig_This_global = NULL;
2002
2003 SWIGRUNTIME PyObject *
SWIG_This(void)2004 SWIG_This(void)
2005 {
2006 if (Swig_This_global == NULL)
2007 Swig_This_global = SWIG_Python_str_FromChar("this");
2008 return Swig_This_global;
2009 }
2010
2011 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2012
2013 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2014 #if PY_VERSION_HEX>=0x03000000
2015 #define SWIG_PYTHON_SLOW_GETSET_THIS
2016 #endif
2017
2018 SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject * pyobj)2019 SWIG_Python_GetSwigThis(PyObject *pyobj)
2020 {
2021 PyObject *obj;
2022
2023 if (SwigPyObject_Check(pyobj))
2024 return (SwigPyObject *) pyobj;
2025
2026 #ifdef SWIGPYTHON_BUILTIN
2027 (void)obj;
2028 # ifdef PyWeakref_CheckProxy
2029 if (PyWeakref_CheckProxy(pyobj)) {
2030 pyobj = PyWeakref_GET_OBJECT(pyobj);
2031 if (pyobj && SwigPyObject_Check(pyobj))
2032 return (SwigPyObject*) pyobj;
2033 }
2034 # endif
2035 return NULL;
2036 #else
2037
2038 obj = 0;
2039
2040 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2041 if (PyInstance_Check(pyobj)) {
2042 obj = _PyInstance_Lookup(pyobj, SWIG_This());
2043 } else {
2044 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2045 if (dictptr != NULL) {
2046 PyObject *dict = *dictptr;
2047 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2048 } else {
2049 #ifdef PyWeakref_CheckProxy
2050 if (PyWeakref_CheckProxy(pyobj)) {
2051 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2052 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2053 }
2054 #endif
2055 obj = PyObject_GetAttr(pyobj,SWIG_This());
2056 if (obj) {
2057 Py_DECREF(obj);
2058 } else {
2059 if (PyErr_Occurred()) PyErr_Clear();
2060 return 0;
2061 }
2062 }
2063 }
2064 #else
2065 obj = PyObject_GetAttr(pyobj,SWIG_This());
2066 if (obj) {
2067 Py_DECREF(obj);
2068 } else {
2069 if (PyErr_Occurred()) PyErr_Clear();
2070 return 0;
2071 }
2072 #endif
2073 if (obj && !SwigPyObject_Check(obj)) {
2074 /* a PyObject is called 'this', try to get the 'real this'
2075 SwigPyObject from it */
2076 return SWIG_Python_GetSwigThis(obj);
2077 }
2078 return (SwigPyObject *)obj;
2079 #endif
2080 }
2081
2082 /* Acquire a pointer value */
2083
2084 SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject * obj,int own)2085 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2086 if (own == SWIG_POINTER_OWN) {
2087 SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2088 if (sobj) {
2089 int oldown = sobj->own;
2090 sobj->own = own;
2091 return oldown;
2092 }
2093 }
2094 return 0;
2095 }
2096
2097 /* Convert a pointer value */
2098
2099 SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject * obj,void ** ptr,swig_type_info * ty,int flags,int * own)2100 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2101 int res;
2102 SwigPyObject *sobj;
2103 int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2104
2105 if (!obj)
2106 return SWIG_ERROR;
2107 if (obj == Py_None && !implicit_conv) {
2108 if (ptr)
2109 *ptr = 0;
2110 return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
2111 }
2112
2113 res = SWIG_ERROR;
2114
2115 sobj = SWIG_Python_GetSwigThis(obj);
2116 if (own)
2117 *own = 0;
2118 while (sobj) {
2119 void *vptr = sobj->ptr;
2120 if (ty) {
2121 swig_type_info *to = sobj->ty;
2122 if (to == ty) {
2123 /* no type cast needed */
2124 if (ptr) *ptr = vptr;
2125 break;
2126 } else {
2127 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2128 if (!tc) {
2129 sobj = (SwigPyObject *)sobj->next;
2130 } else {
2131 if (ptr) {
2132 int newmemory = 0;
2133 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2134 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2135 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2136 if (own)
2137 *own = *own | SWIG_CAST_NEW_MEMORY;
2138 }
2139 }
2140 break;
2141 }
2142 }
2143 } else {
2144 if (ptr) *ptr = vptr;
2145 break;
2146 }
2147 }
2148 if (sobj) {
2149 if (own)
2150 *own = *own | sobj->own;
2151 if (flags & SWIG_POINTER_DISOWN) {
2152 sobj->own = 0;
2153 }
2154 res = SWIG_OK;
2155 } else {
2156 if (implicit_conv) {
2157 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2158 if (data && !data->implicitconv) {
2159 PyObject *klass = data->klass;
2160 if (klass) {
2161 PyObject *impconv;
2162 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2163 impconv = SWIG_Python_CallFunctor(klass, obj);
2164 data->implicitconv = 0;
2165 if (PyErr_Occurred()) {
2166 PyErr_Clear();
2167 impconv = 0;
2168 }
2169 if (impconv) {
2170 SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2171 if (iobj) {
2172 void *vptr;
2173 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2174 if (SWIG_IsOK(res)) {
2175 if (ptr) {
2176 *ptr = vptr;
2177 /* transfer the ownership to 'ptr' */
2178 iobj->own = 0;
2179 res = SWIG_AddCast(res);
2180 res = SWIG_AddNewMask(res);
2181 } else {
2182 res = SWIG_AddCast(res);
2183 }
2184 }
2185 }
2186 Py_DECREF(impconv);
2187 }
2188 }
2189 }
2190 if (!SWIG_IsOK(res) && obj == Py_None) {
2191 if (ptr)
2192 *ptr = 0;
2193 if (PyErr_Occurred())
2194 PyErr_Clear();
2195 res = SWIG_OK;
2196 }
2197 }
2198 }
2199 return res;
2200 }
2201
2202 /* Convert a function ptr value */
2203
2204 SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject * obj,void ** ptr,swig_type_info * ty)2205 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2206 if (!PyCFunction_Check(obj)) {
2207 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2208 } else {
2209 void *vptr = 0;
2210 swig_cast_info *tc;
2211
2212 /* here we get the method pointer for callbacks */
2213 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2214 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2215 if (desc)
2216 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2217 if (!desc)
2218 return SWIG_ERROR;
2219 tc = SWIG_TypeCheck(desc,ty);
2220 if (tc) {
2221 int newmemory = 0;
2222 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2223 assert(!newmemory); /* newmemory handling not yet implemented */
2224 } else {
2225 return SWIG_ERROR;
2226 }
2227 return SWIG_OK;
2228 }
2229 }
2230
2231 /* Convert a packed pointer value */
2232
2233 SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject * obj,void * ptr,size_t sz,swig_type_info * ty)2234 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2235 swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2236 if (!to) return SWIG_ERROR;
2237 if (ty) {
2238 if (to != ty) {
2239 /* check type cast? */
2240 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2241 if (!tc) return SWIG_ERROR;
2242 }
2243 }
2244 return SWIG_OK;
2245 }
2246
2247 /* -----------------------------------------------------------------------------
2248 * Create a new pointer object
2249 * ----------------------------------------------------------------------------- */
2250
2251 /*
2252 Create a new instance object, without calling __init__, and set the
2253 'this' attribute.
2254 */
2255
2256 SWIGRUNTIME PyObject*
SWIG_Python_NewShadowInstance(SwigPyClientData * data,PyObject * swig_this)2257 SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2258 {
2259 PyObject *inst = 0;
2260 PyObject *newraw = data->newraw;
2261 if (newraw) {
2262 inst = PyObject_Call(newraw, data->newargs, NULL);
2263 if (inst) {
2264 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2265 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2266 if (dictptr != NULL) {
2267 PyObject *dict = *dictptr;
2268 if (dict == NULL) {
2269 dict = PyDict_New();
2270 *dictptr = dict;
2271 PyDict_SetItem(dict, SWIG_This(), swig_this);
2272 }
2273 }
2274 #else
2275 if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2276 Py_DECREF(inst);
2277 inst = 0;
2278 }
2279 #endif
2280 }
2281 } else {
2282 #if PY_VERSION_HEX >= 0x03000000
2283 PyObject *empty_args = PyTuple_New(0);
2284 if (empty_args) {
2285 PyObject *empty_kwargs = PyDict_New();
2286 if (empty_kwargs) {
2287 inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
2288 Py_DECREF(empty_kwargs);
2289 if (inst) {
2290 if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2291 Py_DECREF(inst);
2292 inst = 0;
2293 } else {
2294 Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2295 }
2296 }
2297 }
2298 Py_DECREF(empty_args);
2299 }
2300 #else
2301 PyObject *dict = PyDict_New();
2302 if (dict) {
2303 PyDict_SetItem(dict, SWIG_This(), swig_this);
2304 inst = PyInstance_NewRaw(data->newargs, dict);
2305 Py_DECREF(dict);
2306 }
2307 #endif
2308 }
2309 return inst;
2310 }
2311
2312 SWIGRUNTIME int
SWIG_Python_SetSwigThis(PyObject * inst,PyObject * swig_this)2313 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2314 {
2315 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2316 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2317 if (dictptr != NULL) {
2318 PyObject *dict = *dictptr;
2319 if (dict == NULL) {
2320 dict = PyDict_New();
2321 *dictptr = dict;
2322 }
2323 return PyDict_SetItem(dict, SWIG_This(), swig_this);
2324 }
2325 #endif
2326 return PyObject_SetAttr(inst, SWIG_This(), swig_this);
2327 }
2328
2329
2330 SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject * args)2331 SWIG_Python_InitShadowInstance(PyObject *args) {
2332 PyObject *obj[2];
2333 if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2334 return NULL;
2335 } else {
2336 SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2337 if (sthis) {
2338 SwigPyObject_append((PyObject*) sthis, obj[1]);
2339 } else {
2340 if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
2341 return NULL;
2342 }
2343 return SWIG_Py_Void();
2344 }
2345 }
2346
2347 /* Create a new pointer object */
2348
2349 SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(PyObject * self,void * ptr,swig_type_info * type,int flags)2350 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2351 SwigPyClientData *clientdata;
2352 PyObject * robj;
2353 int own;
2354
2355 if (!ptr)
2356 return SWIG_Py_Void();
2357
2358 clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2359 own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2360 if (clientdata && clientdata->pytype) {
2361 SwigPyObject *newobj;
2362 if (flags & SWIG_BUILTIN_TP_INIT) {
2363 newobj = (SwigPyObject*) self;
2364 if (newobj->ptr) {
2365 PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2366 while (newobj->next)
2367 newobj = (SwigPyObject *) newobj->next;
2368 newobj->next = next_self;
2369 newobj = (SwigPyObject *)next_self;
2370 #ifdef SWIGPYTHON_BUILTIN
2371 newobj->dict = 0;
2372 #endif
2373 }
2374 } else {
2375 newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2376 #ifdef SWIGPYTHON_BUILTIN
2377 newobj->dict = 0;
2378 #endif
2379 }
2380 if (newobj) {
2381 newobj->ptr = ptr;
2382 newobj->ty = type;
2383 newobj->own = own;
2384 newobj->next = 0;
2385 return (PyObject*) newobj;
2386 }
2387 return SWIG_Py_Void();
2388 }
2389
2390 assert(!(flags & SWIG_BUILTIN_TP_INIT));
2391
2392 robj = SwigPyObject_New(ptr, type, own);
2393 if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2394 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2395 Py_DECREF(robj);
2396 robj = inst;
2397 }
2398 return robj;
2399 }
2400
2401 /* Create a new packed object */
2402
2403 SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void * ptr,size_t sz,swig_type_info * type)2404 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2405 return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2406 }
2407
2408 /* -----------------------------------------------------------------------------*
2409 * Get type list
2410 * -----------------------------------------------------------------------------*/
2411
2412 #ifdef SWIG_LINK_RUNTIME
2413 void *SWIG_ReturnGlobalTypeList(void *);
2414 #endif
2415
2416 SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void * SWIGUNUSEDPARM (clientdata))2417 SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
2418 static void *type_pointer = (void *)0;
2419 /* first check if module already created */
2420 if (!type_pointer) {
2421 #ifdef SWIG_LINK_RUNTIME
2422 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2423 #else
2424 type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2425 if (PyErr_Occurred()) {
2426 PyErr_Clear();
2427 type_pointer = (void *)0;
2428 }
2429 #endif
2430 }
2431 return (swig_module_info *) type_pointer;
2432 }
2433
2434 SWIGRUNTIME void
SWIG_Python_DestroyModule(PyObject * obj)2435 SWIG_Python_DestroyModule(PyObject *obj)
2436 {
2437 swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2438 swig_type_info **types = swig_module->types;
2439 size_t i;
2440 for (i =0; i < swig_module->size; ++i) {
2441 swig_type_info *ty = types[i];
2442 if (ty->owndata) {
2443 SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2444 if (data) SwigPyClientData_Del(data);
2445 }
2446 }
2447 Py_DECREF(SWIG_This());
2448 Swig_This_global = NULL;
2449 }
2450
2451 SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info * swig_module)2452 SWIG_Python_SetModule(swig_module_info *swig_module) {
2453 #if PY_VERSION_HEX >= 0x03000000
2454 /* Add a dummy module object into sys.modules */
2455 PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2456 #else
2457 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2458 PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2459 #endif
2460 PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2461 if (pointer && module) {
2462 PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2463 } else {
2464 Py_XDECREF(pointer);
2465 }
2466 }
2467
2468 /* The python cached type query */
2469 SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void)2470 SWIG_Python_TypeCache(void) {
2471 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2472 return cache;
2473 }
2474
2475 SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char * type)2476 SWIG_Python_TypeQuery(const char *type)
2477 {
2478 PyObject *cache = SWIG_Python_TypeCache();
2479 PyObject *key = SWIG_Python_str_FromChar(type);
2480 PyObject *obj = PyDict_GetItem(cache, key);
2481 swig_type_info *descriptor;
2482 if (obj) {
2483 descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2484 } else {
2485 swig_module_info *swig_module = SWIG_GetModule(0);
2486 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2487 if (descriptor) {
2488 obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2489 PyDict_SetItem(cache, key, obj);
2490 Py_DECREF(obj);
2491 }
2492 }
2493 Py_DECREF(key);
2494 return descriptor;
2495 }
2496
2497 /*
2498 For backward compatibility only
2499 */
2500 #define SWIG_POINTER_EXCEPTION 0
2501 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2502 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2503
2504 SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char * mesg,int infront)2505 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2506 {
2507 if (PyErr_Occurred()) {
2508 PyObject *type = 0;
2509 PyObject *value = 0;
2510 PyObject *traceback = 0;
2511 PyErr_Fetch(&type, &value, &traceback);
2512 if (value) {
2513 PyObject *old_str = PyObject_Str(value);
2514 const char *tmp = SWIG_Python_str_AsChar(old_str);
2515 const char *errmesg = tmp ? tmp : "Invalid error message";
2516 Py_XINCREF(type);
2517 PyErr_Clear();
2518 if (infront) {
2519 PyErr_Format(type, "%s %s", mesg, errmesg);
2520 } else {
2521 PyErr_Format(type, "%s %s", errmesg, mesg);
2522 }
2523 SWIG_Python_str_DelForPy3(tmp);
2524 Py_DECREF(old_str);
2525 }
2526 return 1;
2527 } else {
2528 return 0;
2529 }
2530 }
2531
2532 SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)2533 SWIG_Python_ArgFail(int argnum)
2534 {
2535 if (PyErr_Occurred()) {
2536 /* add information about failing argument */
2537 char mesg[256];
2538 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2539 return SWIG_Python_AddErrMesg(mesg, 1);
2540 } else {
2541 return 0;
2542 }
2543 }
2544
2545 SWIGRUNTIMEINLINE const char *
SwigPyObject_GetDesc(PyObject * self)2546 SwigPyObject_GetDesc(PyObject *self)
2547 {
2548 SwigPyObject *v = (SwigPyObject *)self;
2549 swig_type_info *ty = v ? v->ty : 0;
2550 return ty ? ty->str : "";
2551 }
2552
2553 SWIGRUNTIME void
SWIG_Python_TypeError(const char * type,PyObject * obj)2554 SWIG_Python_TypeError(const char *type, PyObject *obj)
2555 {
2556 if (type) {
2557 #if defined(SWIG_COBJECT_TYPES)
2558 if (obj && SwigPyObject_Check(obj)) {
2559 const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2560 if (otype) {
2561 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2562 type, otype);
2563 return;
2564 }
2565 } else
2566 #endif
2567 {
2568 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2569 if (otype) {
2570 PyObject *str = PyObject_Str(obj);
2571 const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2572 if (cstr) {
2573 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2574 type, otype, cstr);
2575 SWIG_Python_str_DelForPy3(cstr);
2576 } else {
2577 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2578 type, otype);
2579 }
2580 Py_XDECREF(str);
2581 return;
2582 }
2583 }
2584 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2585 } else {
2586 PyErr_Format(PyExc_TypeError, "unexpected type is received");
2587 }
2588 }
2589
2590
2591 /* Convert a pointer value, signal an exception on a type mismatch */
2592 SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject * obj,swig_type_info * ty,int SWIGUNUSEDPARM (argnum),int flags)2593 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2594 void *result;
2595 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2596 PyErr_Clear();
2597 #if SWIG_POINTER_EXCEPTION
2598 if (flags) {
2599 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2600 SWIG_Python_ArgFail(argnum);
2601 }
2602 #endif
2603 }
2604 return result;
2605 }
2606
2607 #ifdef SWIGPYTHON_BUILTIN
2608 SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject * obj,PyObject * name,PyObject * value)2609 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2610 PyTypeObject *tp = obj->ob_type;
2611 PyObject *descr;
2612 PyObject *encoded_name;
2613 descrsetfunc f;
2614 int res = -1;
2615
2616 # ifdef Py_USING_UNICODE
2617 if (PyString_Check(name)) {
2618 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2619 if (!name)
2620 return -1;
2621 } else if (!PyUnicode_Check(name))
2622 # else
2623 if (!PyString_Check(name))
2624 # endif
2625 {
2626 PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2627 return -1;
2628 } else {
2629 Py_INCREF(name);
2630 }
2631
2632 if (!tp->tp_dict) {
2633 if (PyType_Ready(tp) < 0)
2634 goto done;
2635 }
2636
2637 descr = _PyType_Lookup(tp, name);
2638 f = NULL;
2639 if (descr != NULL)
2640 f = descr->ob_type->tp_descr_set;
2641 if (!f) {
2642 if (PyString_Check(name)) {
2643 encoded_name = name;
2644 Py_INCREF(name);
2645 } else {
2646 encoded_name = PyUnicode_AsUTF8String(name);
2647 if (!encoded_name)
2648 return -1;
2649 }
2650 PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2651 Py_DECREF(encoded_name);
2652 } else {
2653 res = f(descr, obj, value);
2654 }
2655
2656 done:
2657 Py_DECREF(name);
2658 return res;
2659 }
2660 #endif
2661
2662
2663 #ifdef __cplusplus
2664 }
2665 #endif
2666
2667
2668
2669 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2670
2671 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2672
2673
2674
2675 #ifdef __cplusplus
2676 extern "C" {
2677 #endif
2678
2679 /* Method creation and docstring support functions */
2680
2681 SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
2682 SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2683 SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2684
2685 #ifdef __cplusplus
2686 }
2687 #endif
2688
2689
2690 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2691
2692
2693 /* -------- TYPES TABLE (BEGIN) -------- */
2694
2695 #define SWIGTYPE_p_bdd_info_map swig_types[0]
2696 #define SWIGTYPE_p_char swig_types[1]
2697 #define SWIGTYPE_p_fv_map swig_types[2]
2698 #define SWIGTYPE_p_ltsmin_kripkecube_ptr swig_types[3]
2699 #define SWIGTYPE_p_ref_set swig_types[4]
2700 #define SWIGTYPE_p_spot__formula swig_types[5]
2701 #define SWIGTYPE_p_spot__ltsmin_model swig_types[6]
2702 #define SWIGTYPE_p_std__setT_spot__formula_std__lessT_spot__formula_t_std__allocatorT_spot__formula_t_t swig_types[7]
2703 #define SWIGTYPE_p_std__shared_ptrT_spot__bdd_dict_t swig_types[8]
2704 #define SWIGTYPE_p_std__shared_ptrT_spot__fair_kripke_t swig_types[9]
2705 #define SWIGTYPE_p_std__shared_ptrT_spot__kripke_const_t swig_types[10]
2706 #define SWIGTYPE_p_std__shared_ptrT_spot__kripke_t swig_types[11]
2707 #define SWIGTYPE_p_std__shared_ptrT_spot__state_const_t swig_types[12]
2708 #define SWIGTYPE_p_std__shared_ptrT_spot__twa_run_t swig_types[13]
2709 #define SWIGTYPE_p_std__shared_ptrT_spot__twa_t swig_types[14]
2710 #define SWIGTYPE_p_std__shared_ptrT_spot__twa_word_t swig_types[15]
2711 #define SWIGTYPE_p_std__unordered_setT_spot__state_const_p_spot__state_ptr_hash_spot__state_ptr_equal_t swig_types[16]
2712 #define SWIGTYPE_p_std__unordered_setT_std__shared_ptrT_spot__state_const_t_spot__state_shared_ptr_hash_spot__state_shared_ptr_equal_t swig_types[17]
2713 #define SWIGTYPE_p_std__vectorT_std__string_t swig_types[18]
2714 #define SWIGTYPE_p_vf_map swig_types[19]
2715 static swig_type_info *swig_types[21];
2716 static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0};
2717 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2718 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2719
2720 /* -------- TYPES TABLE (END) -------- */
2721
2722 #ifdef SWIG_TypeQuery
2723 # undef SWIG_TypeQuery
2724 #endif
2725 #define SWIG_TypeQuery SWIG_Python_TypeQuery
2726
2727 /*-----------------------------------------------
2728 @(target):= _ltsmin.so
2729 ------------------------------------------------*/
2730 #if PY_VERSION_HEX >= 0x03000000
2731 # define SWIG_init PyInit__ltsmin
2732
2733 #else
2734 # define SWIG_init init_ltsmin
2735
2736 #endif
2737 #define SWIG_name "_ltsmin"
2738
2739 #define SWIGVERSION 0x040002
2740 #define SWIG_VERSION SWIGVERSION
2741
2742
2743 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2744 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2745
2746
2747 #include <stdexcept>
2748
2749
2750 namespace swig {
2751 class SwigPtr_PyObject {
2752 protected:
2753 PyObject *_obj;
2754
2755 public:
SwigPtr_PyObject()2756 SwigPtr_PyObject() :_obj(0)
2757 {
2758 }
2759
SwigPtr_PyObject(const SwigPtr_PyObject & item)2760 SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
2761 {
2762 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2763 Py_XINCREF(_obj);
2764 SWIG_PYTHON_THREAD_END_BLOCK;
2765 }
2766
SwigPtr_PyObject(PyObject * obj,bool initial_ref=true)2767 SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2768 {
2769 if (initial_ref) {
2770 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2771 Py_XINCREF(_obj);
2772 SWIG_PYTHON_THREAD_END_BLOCK;
2773 }
2774 }
2775
operator =(const SwigPtr_PyObject & item)2776 SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
2777 {
2778 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2779 Py_XINCREF(item._obj);
2780 Py_XDECREF(_obj);
2781 _obj = item._obj;
2782 SWIG_PYTHON_THREAD_END_BLOCK;
2783 return *this;
2784 }
2785
~SwigPtr_PyObject()2786 ~SwigPtr_PyObject()
2787 {
2788 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2789 Py_XDECREF(_obj);
2790 SWIG_PYTHON_THREAD_END_BLOCK;
2791 }
2792
operator PyObject*() const2793 operator PyObject *() const
2794 {
2795 return _obj;
2796 }
2797
operator ->() const2798 PyObject *operator->() const
2799 {
2800 return _obj;
2801 }
2802 };
2803 }
2804
2805
2806 namespace swig {
2807 struct SwigVar_PyObject : SwigPtr_PyObject {
SwigVar_PyObjectswig::SwigVar_PyObject2808 SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2809
operator =swig::SwigVar_PyObject2810 SwigVar_PyObject & operator = (PyObject* obj)
2811 {
2812 Py_XDECREF(_obj);
2813 _obj = obj;
2814 return *this;
2815 }
2816 };
2817 }
2818
2819
2820 #include <string>
2821
2822
2823 SWIGINTERNINLINE PyObject*
SWIG_From_int(int value)2824 SWIG_From_int (int value)
2825 {
2826 return PyInt_FromLong((long) value);
2827 }
2828
2829
2830 #include <spot/ltsmin/ltsmin.hh>
2831 using namespace spot;
2832
2833
2834 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)2835 SWIG_pchar_descriptor(void)
2836 {
2837 static int init = 0;
2838 static swig_type_info* info = 0;
2839 if (!init) {
2840 info = SWIG_TypeQuery("_p_char");
2841 init = 1;
2842 }
2843 return info;
2844 }
2845
2846
2847 SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject * obj,char ** cptr,size_t * psize,int * alloc)2848 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
2849 {
2850 #if PY_VERSION_HEX>=0x03000000
2851 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2852 if (PyBytes_Check(obj))
2853 #else
2854 if (PyUnicode_Check(obj))
2855 #endif
2856 #else
2857 if (PyString_Check(obj))
2858 #endif
2859 {
2860 char *cstr; Py_ssize_t len;
2861 int ret = SWIG_OK;
2862 #if PY_VERSION_HEX>=0x03000000
2863 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2864 if (!alloc && cptr) {
2865 /* We can't allow converting without allocation, since the internal
2866 representation of string in Python 3 is UCS-2/UCS-4 but we require
2867 a UTF-8 representation.
2868 TODO(bhy) More detailed explanation */
2869 return SWIG_RuntimeError;
2870 }
2871 obj = PyUnicode_AsUTF8String(obj);
2872 if (!obj)
2873 return SWIG_TypeError;
2874 if (alloc)
2875 *alloc = SWIG_NEWOBJ;
2876 #endif
2877 if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
2878 return SWIG_TypeError;
2879 #else
2880 if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
2881 return SWIG_TypeError;
2882 #endif
2883 if (cptr) {
2884 if (alloc) {
2885 if (*alloc == SWIG_NEWOBJ) {
2886 *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
2887 *alloc = SWIG_NEWOBJ;
2888 } else {
2889 *cptr = cstr;
2890 *alloc = SWIG_OLDOBJ;
2891 }
2892 } else {
2893 #if PY_VERSION_HEX>=0x03000000
2894 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2895 *cptr = PyBytes_AsString(obj);
2896 #else
2897 assert(0); /* Should never reach here with Unicode strings in Python 3 */
2898 #endif
2899 #else
2900 *cptr = SWIG_Python_str_AsChar(obj);
2901 if (!*cptr)
2902 ret = SWIG_TypeError;
2903 #endif
2904 }
2905 }
2906 if (psize) *psize = len + 1;
2907 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2908 Py_XDECREF(obj);
2909 #endif
2910 return ret;
2911 } else {
2912 #if defined(SWIG_PYTHON_2_UNICODE)
2913 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2914 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
2915 #endif
2916 #if PY_VERSION_HEX<0x03000000
2917 if (PyUnicode_Check(obj)) {
2918 char *cstr; Py_ssize_t len;
2919 if (!alloc && cptr) {
2920 return SWIG_RuntimeError;
2921 }
2922 obj = PyUnicode_AsUTF8String(obj);
2923 if (!obj)
2924 return SWIG_TypeError;
2925 if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
2926 if (cptr) {
2927 if (alloc) *alloc = SWIG_NEWOBJ;
2928 *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
2929 }
2930 if (psize) *psize = len + 1;
2931
2932 Py_XDECREF(obj);
2933 return SWIG_OK;
2934 } else {
2935 Py_XDECREF(obj);
2936 }
2937 }
2938 #endif
2939 #endif
2940
2941 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2942 if (pchar_descriptor) {
2943 void* vptr = 0;
2944 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
2945 if (cptr) *cptr = (char *) vptr;
2946 if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
2947 if (alloc) *alloc = SWIG_OLDOBJ;
2948 return SWIG_OK;
2949 }
2950 }
2951 }
2952 return SWIG_TypeError;
2953 }
2954
2955
2956 SWIGINTERN int
SWIG_AsPtr_std_string(PyObject * obj,std::string ** val)2957 SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
2958 {
2959 char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
2960 if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
2961 if (buf) {
2962 if (val) *val = new std::string(buf, size - 1);
2963 if (alloc == SWIG_NEWOBJ) delete[] buf;
2964 return SWIG_NEWOBJ;
2965 } else {
2966 if (val) *val = 0;
2967 return SWIG_OLDOBJ;
2968 }
2969 } else {
2970 static int init = 0;
2971 static swig_type_info* descriptor = 0;
2972 if (!init) {
2973 descriptor = SWIG_TypeQuery("std::string" " *");
2974 init = 1;
2975 }
2976 if (descriptor) {
2977 std::string *vptr;
2978 int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
2979 if (SWIG_IsOK(res) && val) *val = vptr;
2980 return res;
2981 }
2982 }
2983 return SWIG_ERROR;
2984 }
2985
2986
2987 #include <limits.h>
2988 #if !defined(SWIG_NO_LLONG_MAX)
2989 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
2990 # define LLONG_MAX __LONG_LONG_MAX__
2991 # define LLONG_MIN (-LLONG_MAX - 1LL)
2992 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
2993 # endif
2994 #endif
2995
2996
2997 SWIGINTERN int
SWIG_AsVal_double(PyObject * obj,double * val)2998 SWIG_AsVal_double (PyObject *obj, double *val)
2999 {
3000 int res = SWIG_TypeError;
3001 if (PyFloat_Check(obj)) {
3002 if (val) *val = PyFloat_AsDouble(obj);
3003 return SWIG_OK;
3004 #if PY_VERSION_HEX < 0x03000000
3005 } else if (PyInt_Check(obj)) {
3006 if (val) *val = (double) PyInt_AsLong(obj);
3007 return SWIG_OK;
3008 #endif
3009 } else if (PyLong_Check(obj)) {
3010 double v = PyLong_AsDouble(obj);
3011 if (!PyErr_Occurred()) {
3012 if (val) *val = v;
3013 return SWIG_OK;
3014 } else {
3015 PyErr_Clear();
3016 }
3017 }
3018 #ifdef SWIG_PYTHON_CAST_MODE
3019 {
3020 int dispatch = 0;
3021 double d = PyFloat_AsDouble(obj);
3022 if (!PyErr_Occurred()) {
3023 if (val) *val = d;
3024 return SWIG_AddCast(SWIG_OK);
3025 } else {
3026 PyErr_Clear();
3027 }
3028 if (!dispatch) {
3029 long v = PyLong_AsLong(obj);
3030 if (!PyErr_Occurred()) {
3031 if (val) *val = v;
3032 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3033 } else {
3034 PyErr_Clear();
3035 }
3036 }
3037 }
3038 #endif
3039 return res;
3040 }
3041
3042
3043 #include <float.h>
3044
3045
3046 #include <math.h>
3047
3048
3049 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)3050 SWIG_CanCastAsInteger(double *d, double min, double max) {
3051 double x = *d;
3052 if ((min <= x && x <= max)) {
3053 double fx = floor(x);
3054 double cx = ceil(x);
3055 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3056 if ((errno == EDOM) || (errno == ERANGE)) {
3057 errno = 0;
3058 } else {
3059 double summ, reps, diff;
3060 if (rd < x) {
3061 diff = x - rd;
3062 } else if (rd > x) {
3063 diff = rd - x;
3064 } else {
3065 return 1;
3066 }
3067 summ = rd + x;
3068 reps = diff/summ;
3069 if (reps < 8*DBL_EPSILON) {
3070 *d = rd;
3071 return 1;
3072 }
3073 }
3074 }
3075 return 0;
3076 }
3077
3078
3079 SWIGINTERN int
SWIG_AsVal_long(PyObject * obj,long * val)3080 SWIG_AsVal_long (PyObject *obj, long* val)
3081 {
3082 #if PY_VERSION_HEX < 0x03000000
3083 if (PyInt_Check(obj)) {
3084 if (val) *val = PyInt_AsLong(obj);
3085 return SWIG_OK;
3086 } else
3087 #endif
3088 if (PyLong_Check(obj)) {
3089 long v = PyLong_AsLong(obj);
3090 if (!PyErr_Occurred()) {
3091 if (val) *val = v;
3092 return SWIG_OK;
3093 } else {
3094 PyErr_Clear();
3095 return SWIG_OverflowError;
3096 }
3097 }
3098 #ifdef SWIG_PYTHON_CAST_MODE
3099 {
3100 int dispatch = 0;
3101 long v = PyInt_AsLong(obj);
3102 if (!PyErr_Occurred()) {
3103 if (val) *val = v;
3104 return SWIG_AddCast(SWIG_OK);
3105 } else {
3106 PyErr_Clear();
3107 }
3108 if (!dispatch) {
3109 double d;
3110 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3111 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3112 if (val) *val = (long)(d);
3113 return res;
3114 }
3115 }
3116 }
3117 #endif
3118 return SWIG_TypeError;
3119 }
3120
3121
3122 SWIGINTERN int
SWIG_AsVal_int(PyObject * obj,int * val)3123 SWIG_AsVal_int (PyObject * obj, int *val)
3124 {
3125 long v;
3126 int res = SWIG_AsVal_long (obj, &v);
3127 if (SWIG_IsOK(res)) {
3128 if ((v < INT_MIN || v > INT_MAX)) {
3129 return SWIG_OverflowError;
3130 } else {
3131 if (val) *val = static_cast< int >(v);
3132 }
3133 }
3134 return res;
3135 }
3136
3137
3138 SWIGINTERN int
SWIG_AsVal_unsigned_SS_long(PyObject * obj,unsigned long * val)3139 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
3140 {
3141 #if PY_VERSION_HEX < 0x03000000
3142 if (PyInt_Check(obj)) {
3143 long v = PyInt_AsLong(obj);
3144 if (v >= 0) {
3145 if (val) *val = v;
3146 return SWIG_OK;
3147 } else {
3148 return SWIG_OverflowError;
3149 }
3150 } else
3151 #endif
3152 if (PyLong_Check(obj)) {
3153 unsigned long v = PyLong_AsUnsignedLong(obj);
3154 if (!PyErr_Occurred()) {
3155 if (val) *val = v;
3156 return SWIG_OK;
3157 } else {
3158 PyErr_Clear();
3159 return SWIG_OverflowError;
3160 }
3161 }
3162 #ifdef SWIG_PYTHON_CAST_MODE
3163 {
3164 int dispatch = 0;
3165 unsigned long v = PyLong_AsUnsignedLong(obj);
3166 if (!PyErr_Occurred()) {
3167 if (val) *val = v;
3168 return SWIG_AddCast(SWIG_OK);
3169 } else {
3170 PyErr_Clear();
3171 }
3172 if (!dispatch) {
3173 double d;
3174 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3175 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3176 if (val) *val = (unsigned long)(d);
3177 return res;
3178 }
3179 }
3180 }
3181 #endif
3182 return SWIG_TypeError;
3183 }
3184
3185
3186 SWIGINTERN int
SWIG_AsVal_unsigned_SS_int(PyObject * obj,unsigned int * val)3187 SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
3188 {
3189 unsigned long v;
3190 int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3191 if (SWIG_IsOK(res)) {
3192 if ((v > UINT_MAX)) {
3193 return SWIG_OverflowError;
3194 } else {
3195 if (val) *val = static_cast< unsigned int >(v);
3196 }
3197 }
3198 return res;
3199 }
3200
3201
3202 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)3203 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3204 {
3205 if (carray) {
3206 if (size > INT_MAX) {
3207 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3208 return pchar_descriptor ?
3209 SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3210 } else {
3211 #if PY_VERSION_HEX >= 0x03000000
3212 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3213 return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3214 #else
3215 return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
3216 #endif
3217 #else
3218 return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3219 #endif
3220 }
3221 } else {
3222 return SWIG_Py_Void();
3223 }
3224 }
3225
3226
3227 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtr(const char * cptr)3228 SWIG_FromCharPtr(const char *cptr)
3229 {
3230 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3231 }
3232
3233 #ifdef __cplusplus
3234 extern "C" {
3235 #endif
_wrap_delete_model(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3236 SWIGINTERN PyObject *_wrap_delete_model(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3237 PyObject *resultobj = 0;
3238 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3239 void *argp1 = 0 ;
3240 int res1 = 0 ;
3241 PyObject *swig_obj[1] ;
3242
3243 if (!args) SWIG_fail;
3244 swig_obj[0] = args;
3245 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, SWIG_POINTER_DISOWN | 0 );
3246 if (!SWIG_IsOK(res1)) {
3247 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_model" "', argument " "1"" of type '" "spot::ltsmin_model *""'");
3248 }
3249 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3250 {
3251 try {
3252 delete arg1;
3253 }
3254 catch (const std::runtime_error& e)
3255 {
3256 SWIG_exception(SWIG_RuntimeError, e.what());
3257 }
3258 }
3259 resultobj = SWIG_Py_Void();
3260 return resultobj;
3261 fail:
3262 return NULL;
3263 }
3264
3265
_wrap_model_load(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3266 SWIGINTERN PyObject *_wrap_model_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3267 PyObject *resultobj = 0;
3268 std::string *arg1 = 0 ;
3269 int res1 = SWIG_OLDOBJ ;
3270 PyObject *swig_obj[1] ;
3271 SwigValueWrapper< spot::ltsmin_model > result;
3272
3273 if (!args) SWIG_fail;
3274 swig_obj[0] = args;
3275 {
3276 std::string *ptr = (std::string *)0;
3277 res1 = SWIG_AsPtr_std_string(swig_obj[0], &ptr);
3278 if (!SWIG_IsOK(res1)) {
3279 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_load" "', argument " "1"" of type '" "std::string const &""'");
3280 }
3281 if (!ptr) {
3282 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model_load" "', argument " "1"" of type '" "std::string const &""'");
3283 }
3284 arg1 = ptr;
3285 }
3286 {
3287 try {
3288 result = spot::ltsmin_model::load((std::string const &)*arg1);
3289 }
3290 catch (const std::runtime_error& e)
3291 {
3292 SWIG_exception(SWIG_RuntimeError, e.what());
3293 }
3294 }
3295 resultobj = SWIG_NewPointerObj((new spot::ltsmin_model(static_cast< const spot::ltsmin_model& >(result))), SWIGTYPE_p_spot__ltsmin_model, SWIG_POINTER_OWN | 0 );
3296 if (SWIG_IsNewObj(res1)) delete arg1;
3297 return resultobj;
3298 fail:
3299 if (SWIG_IsNewObj(res1)) delete arg1;
3300 return NULL;
3301 }
3302
3303
_wrap_model_kripke_raw__SWIG_0(PyObject * SWIGUNUSEDPARM (self),Py_ssize_t nobjs,PyObject ** swig_obj)3304 SWIGINTERN PyObject *_wrap_model_kripke_raw__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3305 PyObject *resultobj = 0;
3306 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3307 spot::atomic_prop_set *arg2 = (spot::atomic_prop_set *) 0 ;
3308 spot::bdd_dict_ptr arg3 ;
3309 spot::formula arg4 ;
3310 int arg5 ;
3311 void *argp1 = 0 ;
3312 int res1 = 0 ;
3313 void *argp2 = 0 ;
3314 int res2 = 0 ;
3315 void *argp3 ;
3316 int res3 = 0 ;
3317 void *argp4 ;
3318 int res4 = 0 ;
3319 int val5 ;
3320 int ecode5 = 0 ;
3321 spot::kripke_ptr result;
3322
3323 if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
3324 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3325 if (!SWIG_IsOK(res1)) {
3326 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_kripke_raw" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3327 }
3328 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3329 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__setT_spot__formula_std__lessT_spot__formula_t_std__allocatorT_spot__formula_t_t, 0 | 0 );
3330 if (!SWIG_IsOK(res2)) {
3331 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "model_kripke_raw" "', argument " "2"" of type '" "spot::atomic_prop_set const *""'");
3332 }
3333 arg2 = reinterpret_cast< spot::atomic_prop_set * >(argp2);
3334 {
3335 int newmem = 0;
3336 res3 = SWIG_ConvertPtrAndOwn(swig_obj[2], &argp3, SWIGTYPE_p_std__shared_ptrT_spot__bdd_dict_t, 0 , &newmem);
3337 if (!SWIG_IsOK(res3)) {
3338 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "model_kripke_raw" "', argument " "3"" of type '" "spot::bdd_dict_ptr""'");
3339 }
3340 if (argp3) arg3 = *(reinterpret_cast< spot::bdd_dict_ptr * >(argp3));
3341 if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< spot::bdd_dict_ptr * >(argp3);
3342 }
3343 {
3344 res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_spot__formula, 0 | 0);
3345 if (!SWIG_IsOK(res4)) {
3346 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "model_kripke_raw" "', argument " "4"" of type '" "spot::formula""'");
3347 }
3348 if (!argp4) {
3349 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model_kripke_raw" "', argument " "4"" of type '" "spot::formula""'");
3350 } else {
3351 spot::formula * temp = reinterpret_cast< spot::formula * >(argp4);
3352 arg4 = *temp;
3353 if (SWIG_IsNewObj(res4)) delete temp;
3354 }
3355 }
3356 ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
3357 if (!SWIG_IsOK(ecode5)) {
3358 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "model_kripke_raw" "', argument " "5"" of type '" "int""'");
3359 }
3360 arg5 = static_cast< int >(val5);
3361 {
3362 try {
3363 result = ((spot::ltsmin_model const *)arg1)->kripke((spot::atomic_prop_set const *)arg2,arg3,arg4,arg5);
3364 }
3365 catch (const std::runtime_error& e)
3366 {
3367 SWIG_exception(SWIG_RuntimeError, e.what());
3368 }
3369 }
3370 {
3371 std::shared_ptr< spot::kripke > *smartresult = result ? new std::shared_ptr< spot::kripke >(result) : 0;
3372 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_spot__kripke_t, SWIG_POINTER_OWN);
3373 }
3374 return resultobj;
3375 fail:
3376 return NULL;
3377 }
3378
3379
_wrap_model_kripke_raw__SWIG_1(PyObject * SWIGUNUSEDPARM (self),Py_ssize_t nobjs,PyObject ** swig_obj)3380 SWIGINTERN PyObject *_wrap_model_kripke_raw__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3381 PyObject *resultobj = 0;
3382 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3383 spot::atomic_prop_set *arg2 = (spot::atomic_prop_set *) 0 ;
3384 spot::bdd_dict_ptr arg3 ;
3385 spot::formula arg4 ;
3386 void *argp1 = 0 ;
3387 int res1 = 0 ;
3388 void *argp2 = 0 ;
3389 int res2 = 0 ;
3390 void *argp3 ;
3391 int res3 = 0 ;
3392 void *argp4 ;
3393 int res4 = 0 ;
3394 spot::kripke_ptr result;
3395
3396 if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
3397 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3398 if (!SWIG_IsOK(res1)) {
3399 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_kripke_raw" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3400 }
3401 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3402 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__setT_spot__formula_std__lessT_spot__formula_t_std__allocatorT_spot__formula_t_t, 0 | 0 );
3403 if (!SWIG_IsOK(res2)) {
3404 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "model_kripke_raw" "', argument " "2"" of type '" "spot::atomic_prop_set const *""'");
3405 }
3406 arg2 = reinterpret_cast< spot::atomic_prop_set * >(argp2);
3407 {
3408 int newmem = 0;
3409 res3 = SWIG_ConvertPtrAndOwn(swig_obj[2], &argp3, SWIGTYPE_p_std__shared_ptrT_spot__bdd_dict_t, 0 , &newmem);
3410 if (!SWIG_IsOK(res3)) {
3411 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "model_kripke_raw" "', argument " "3"" of type '" "spot::bdd_dict_ptr""'");
3412 }
3413 if (argp3) arg3 = *(reinterpret_cast< spot::bdd_dict_ptr * >(argp3));
3414 if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< spot::bdd_dict_ptr * >(argp3);
3415 }
3416 {
3417 res4 = SWIG_ConvertPtr(swig_obj[3], &argp4, SWIGTYPE_p_spot__formula, 0 | 0);
3418 if (!SWIG_IsOK(res4)) {
3419 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "model_kripke_raw" "', argument " "4"" of type '" "spot::formula""'");
3420 }
3421 if (!argp4) {
3422 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model_kripke_raw" "', argument " "4"" of type '" "spot::formula""'");
3423 } else {
3424 spot::formula * temp = reinterpret_cast< spot::formula * >(argp4);
3425 arg4 = *temp;
3426 if (SWIG_IsNewObj(res4)) delete temp;
3427 }
3428 }
3429 {
3430 try {
3431 result = ((spot::ltsmin_model const *)arg1)->kripke((spot::atomic_prop_set const *)arg2,arg3,arg4);
3432 }
3433 catch (const std::runtime_error& e)
3434 {
3435 SWIG_exception(SWIG_RuntimeError, e.what());
3436 }
3437 }
3438 {
3439 std::shared_ptr< spot::kripke > *smartresult = result ? new std::shared_ptr< spot::kripke >(result) : 0;
3440 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_spot__kripke_t, SWIG_POINTER_OWN);
3441 }
3442 return resultobj;
3443 fail:
3444 return NULL;
3445 }
3446
3447
_wrap_model_kripke_raw__SWIG_2(PyObject * SWIGUNUSEDPARM (self),Py_ssize_t nobjs,PyObject ** swig_obj)3448 SWIGINTERN PyObject *_wrap_model_kripke_raw__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3449 PyObject *resultobj = 0;
3450 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3451 spot::atomic_prop_set *arg2 = (spot::atomic_prop_set *) 0 ;
3452 spot::bdd_dict_ptr arg3 ;
3453 void *argp1 = 0 ;
3454 int res1 = 0 ;
3455 void *argp2 = 0 ;
3456 int res2 = 0 ;
3457 void *argp3 ;
3458 int res3 = 0 ;
3459 spot::kripke_ptr result;
3460
3461 if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
3462 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3463 if (!SWIG_IsOK(res1)) {
3464 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_kripke_raw" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3465 }
3466 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3467 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_std__setT_spot__formula_std__lessT_spot__formula_t_std__allocatorT_spot__formula_t_t, 0 | 0 );
3468 if (!SWIG_IsOK(res2)) {
3469 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "model_kripke_raw" "', argument " "2"" of type '" "spot::atomic_prop_set const *""'");
3470 }
3471 arg2 = reinterpret_cast< spot::atomic_prop_set * >(argp2);
3472 {
3473 int newmem = 0;
3474 res3 = SWIG_ConvertPtrAndOwn(swig_obj[2], &argp3, SWIGTYPE_p_std__shared_ptrT_spot__bdd_dict_t, 0 , &newmem);
3475 if (!SWIG_IsOK(res3)) {
3476 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "model_kripke_raw" "', argument " "3"" of type '" "spot::bdd_dict_ptr""'");
3477 }
3478 if (argp3) arg3 = *(reinterpret_cast< spot::bdd_dict_ptr * >(argp3));
3479 if (newmem & SWIG_CAST_NEW_MEMORY) delete reinterpret_cast< spot::bdd_dict_ptr * >(argp3);
3480 }
3481 {
3482 try {
3483 result = ((spot::ltsmin_model const *)arg1)->kripke((spot::atomic_prop_set const *)arg2,arg3);
3484 }
3485 catch (const std::runtime_error& e)
3486 {
3487 SWIG_exception(SWIG_RuntimeError, e.what());
3488 }
3489 }
3490 {
3491 std::shared_ptr< spot::kripke > *smartresult = result ? new std::shared_ptr< spot::kripke >(result) : 0;
3492 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(smartresult), SWIGTYPE_p_std__shared_ptrT_spot__kripke_t, SWIG_POINTER_OWN);
3493 }
3494 return resultobj;
3495 fail:
3496 return NULL;
3497 }
3498
3499
_wrap_model_kripke_raw(PyObject * self,PyObject * args)3500 SWIGINTERN PyObject *_wrap_model_kripke_raw(PyObject *self, PyObject *args) {
3501 Py_ssize_t argc;
3502 PyObject *argv[6] = {
3503 0
3504 };
3505
3506 if (!(argc = SWIG_Python_UnpackTuple(args, "model_kripke_raw", 0, 5, argv))) SWIG_fail;
3507 --argc;
3508 if (argc == 3) {
3509 PyObject *retobj = _wrap_model_kripke_raw__SWIG_2(self, argc, argv);
3510 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
3511 SWIG_fail;
3512 }
3513 if (argc == 4) {
3514 PyObject *retobj = _wrap_model_kripke_raw__SWIG_1(self, argc, argv);
3515 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
3516 SWIG_fail;
3517 }
3518 if (argc == 5) {
3519 PyObject *retobj = _wrap_model_kripke_raw__SWIG_0(self, argc, argv);
3520 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
3521 SWIG_fail;
3522 }
3523
3524 fail:
3525 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'model_kripke_raw'.\n"
3526 " Possible C/C++ prototypes are:\n"
3527 " spot::ltsmin_model::kripke(spot::atomic_prop_set const *,spot::bdd_dict_ptr,spot::formula,int) const\n"
3528 " spot::ltsmin_model::kripke(spot::atomic_prop_set const *,spot::bdd_dict_ptr,spot::formula) const\n"
3529 " spot::ltsmin_model::kripke(spot::atomic_prop_set const *,spot::bdd_dict_ptr) const\n");
3530 return 0;
3531 }
3532
3533
_wrap_model_kripkecube__SWIG_0(PyObject * SWIGUNUSEDPARM (self),Py_ssize_t nobjs,PyObject ** swig_obj)3534 SWIGINTERN PyObject *_wrap_model_kripkecube__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3535 PyObject *resultobj = 0;
3536 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3537 SwigValueWrapper< std::vector< std::string > > arg2 ;
3538 spot::formula arg3 ;
3539 int arg4 ;
3540 unsigned int arg5 ;
3541 void *argp1 = 0 ;
3542 int res1 = 0 ;
3543 void *argp2 ;
3544 int res2 = 0 ;
3545 void *argp3 ;
3546 int res3 = 0 ;
3547 int val4 ;
3548 int ecode4 = 0 ;
3549 unsigned int val5 ;
3550 int ecode5 = 0 ;
3551 ltsmin_kripkecube_ptr result;
3552
3553 if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
3554 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3555 if (!SWIG_IsOK(res1)) {
3556 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_kripkecube" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3557 }
3558 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3559 {
3560 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__string_t, 0 | 0);
3561 if (!SWIG_IsOK(res2)) {
3562 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "model_kripkecube" "', argument " "2"" of type '" "std::vector< std::string >""'");
3563 }
3564 if (!argp2) {
3565 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model_kripkecube" "', argument " "2"" of type '" "std::vector< std::string >""'");
3566 } else {
3567 std::vector< std::string > * temp = reinterpret_cast< std::vector< std::string > * >(argp2);
3568 arg2 = *temp;
3569 if (SWIG_IsNewObj(res2)) delete temp;
3570 }
3571 }
3572 {
3573 res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_spot__formula, 0 | 0);
3574 if (!SWIG_IsOK(res3)) {
3575 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "model_kripkecube" "', argument " "3"" of type '" "spot::formula""'");
3576 }
3577 if (!argp3) {
3578 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model_kripkecube" "', argument " "3"" of type '" "spot::formula""'");
3579 } else {
3580 spot::formula * temp = reinterpret_cast< spot::formula * >(argp3);
3581 arg3 = *temp;
3582 if (SWIG_IsNewObj(res3)) delete temp;
3583 }
3584 }
3585 ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
3586 if (!SWIG_IsOK(ecode4)) {
3587 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "model_kripkecube" "', argument " "4"" of type '" "int""'");
3588 }
3589 arg4 = static_cast< int >(val4);
3590 ecode5 = SWIG_AsVal_unsigned_SS_int(swig_obj[4], &val5);
3591 if (!SWIG_IsOK(ecode5)) {
3592 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "model_kripkecube" "', argument " "5"" of type '" "unsigned int""'");
3593 }
3594 arg5 = static_cast< unsigned int >(val5);
3595 {
3596 try {
3597 result = ((spot::ltsmin_model const *)arg1)->kripkecube(arg2,arg3,arg4,arg5);
3598 }
3599 catch (const std::runtime_error& e)
3600 {
3601 SWIG_exception(SWIG_RuntimeError, e.what());
3602 }
3603 }
3604 resultobj = SWIG_NewPointerObj((new ltsmin_kripkecube_ptr(static_cast< const ltsmin_kripkecube_ptr& >(result))), SWIGTYPE_p_ltsmin_kripkecube_ptr, SWIG_POINTER_OWN | 0 );
3605 return resultobj;
3606 fail:
3607 return NULL;
3608 }
3609
3610
_wrap_model_kripkecube__SWIG_1(PyObject * SWIGUNUSEDPARM (self),Py_ssize_t nobjs,PyObject ** swig_obj)3611 SWIGINTERN PyObject *_wrap_model_kripkecube__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3612 PyObject *resultobj = 0;
3613 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3614 SwigValueWrapper< std::vector< std::string > > arg2 ;
3615 spot::formula arg3 ;
3616 int arg4 ;
3617 void *argp1 = 0 ;
3618 int res1 = 0 ;
3619 void *argp2 ;
3620 int res2 = 0 ;
3621 void *argp3 ;
3622 int res3 = 0 ;
3623 int val4 ;
3624 int ecode4 = 0 ;
3625 ltsmin_kripkecube_ptr result;
3626
3627 if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
3628 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3629 if (!SWIG_IsOK(res1)) {
3630 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_kripkecube" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3631 }
3632 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3633 {
3634 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__string_t, 0 | 0);
3635 if (!SWIG_IsOK(res2)) {
3636 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "model_kripkecube" "', argument " "2"" of type '" "std::vector< std::string >""'");
3637 }
3638 if (!argp2) {
3639 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model_kripkecube" "', argument " "2"" of type '" "std::vector< std::string >""'");
3640 } else {
3641 std::vector< std::string > * temp = reinterpret_cast< std::vector< std::string > * >(argp2);
3642 arg2 = *temp;
3643 if (SWIG_IsNewObj(res2)) delete temp;
3644 }
3645 }
3646 {
3647 res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_spot__formula, 0 | 0);
3648 if (!SWIG_IsOK(res3)) {
3649 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "model_kripkecube" "', argument " "3"" of type '" "spot::formula""'");
3650 }
3651 if (!argp3) {
3652 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model_kripkecube" "', argument " "3"" of type '" "spot::formula""'");
3653 } else {
3654 spot::formula * temp = reinterpret_cast< spot::formula * >(argp3);
3655 arg3 = *temp;
3656 if (SWIG_IsNewObj(res3)) delete temp;
3657 }
3658 }
3659 ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
3660 if (!SWIG_IsOK(ecode4)) {
3661 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "model_kripkecube" "', argument " "4"" of type '" "int""'");
3662 }
3663 arg4 = static_cast< int >(val4);
3664 {
3665 try {
3666 result = ((spot::ltsmin_model const *)arg1)->kripkecube(arg2,arg3,arg4);
3667 }
3668 catch (const std::runtime_error& e)
3669 {
3670 SWIG_exception(SWIG_RuntimeError, e.what());
3671 }
3672 }
3673 resultobj = SWIG_NewPointerObj((new ltsmin_kripkecube_ptr(static_cast< const ltsmin_kripkecube_ptr& >(result))), SWIGTYPE_p_ltsmin_kripkecube_ptr, SWIG_POINTER_OWN | 0 );
3674 return resultobj;
3675 fail:
3676 return NULL;
3677 }
3678
3679
_wrap_model_kripkecube__SWIG_2(PyObject * SWIGUNUSEDPARM (self),Py_ssize_t nobjs,PyObject ** swig_obj)3680 SWIGINTERN PyObject *_wrap_model_kripkecube__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3681 PyObject *resultobj = 0;
3682 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3683 SwigValueWrapper< std::vector< std::string > > arg2 ;
3684 spot::formula arg3 ;
3685 void *argp1 = 0 ;
3686 int res1 = 0 ;
3687 void *argp2 ;
3688 int res2 = 0 ;
3689 void *argp3 ;
3690 int res3 = 0 ;
3691 ltsmin_kripkecube_ptr result;
3692
3693 if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
3694 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3695 if (!SWIG_IsOK(res1)) {
3696 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_kripkecube" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3697 }
3698 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3699 {
3700 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__string_t, 0 | 0);
3701 if (!SWIG_IsOK(res2)) {
3702 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "model_kripkecube" "', argument " "2"" of type '" "std::vector< std::string >""'");
3703 }
3704 if (!argp2) {
3705 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model_kripkecube" "', argument " "2"" of type '" "std::vector< std::string >""'");
3706 } else {
3707 std::vector< std::string > * temp = reinterpret_cast< std::vector< std::string > * >(argp2);
3708 arg2 = *temp;
3709 if (SWIG_IsNewObj(res2)) delete temp;
3710 }
3711 }
3712 {
3713 res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_spot__formula, 0 | 0);
3714 if (!SWIG_IsOK(res3)) {
3715 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "model_kripkecube" "', argument " "3"" of type '" "spot::formula""'");
3716 }
3717 if (!argp3) {
3718 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model_kripkecube" "', argument " "3"" of type '" "spot::formula""'");
3719 } else {
3720 spot::formula * temp = reinterpret_cast< spot::formula * >(argp3);
3721 arg3 = *temp;
3722 if (SWIG_IsNewObj(res3)) delete temp;
3723 }
3724 }
3725 {
3726 try {
3727 result = ((spot::ltsmin_model const *)arg1)->kripkecube(arg2,arg3);
3728 }
3729 catch (const std::runtime_error& e)
3730 {
3731 SWIG_exception(SWIG_RuntimeError, e.what());
3732 }
3733 }
3734 resultobj = SWIG_NewPointerObj((new ltsmin_kripkecube_ptr(static_cast< const ltsmin_kripkecube_ptr& >(result))), SWIGTYPE_p_ltsmin_kripkecube_ptr, SWIG_POINTER_OWN | 0 );
3735 return resultobj;
3736 fail:
3737 return NULL;
3738 }
3739
3740
_wrap_model_kripkecube__SWIG_3(PyObject * SWIGUNUSEDPARM (self),Py_ssize_t nobjs,PyObject ** swig_obj)3741 SWIGINTERN PyObject *_wrap_model_kripkecube__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3742 PyObject *resultobj = 0;
3743 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3744 SwigValueWrapper< std::vector< std::string > > arg2 ;
3745 void *argp1 = 0 ;
3746 int res1 = 0 ;
3747 void *argp2 ;
3748 int res2 = 0 ;
3749 ltsmin_kripkecube_ptr result;
3750
3751 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
3752 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3753 if (!SWIG_IsOK(res1)) {
3754 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_kripkecube" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3755 }
3756 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3757 {
3758 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_std__vectorT_std__string_t, 0 | 0);
3759 if (!SWIG_IsOK(res2)) {
3760 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "model_kripkecube" "', argument " "2"" of type '" "std::vector< std::string >""'");
3761 }
3762 if (!argp2) {
3763 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "model_kripkecube" "', argument " "2"" of type '" "std::vector< std::string >""'");
3764 } else {
3765 std::vector< std::string > * temp = reinterpret_cast< std::vector< std::string > * >(argp2);
3766 arg2 = *temp;
3767 if (SWIG_IsNewObj(res2)) delete temp;
3768 }
3769 }
3770 {
3771 try {
3772 result = ((spot::ltsmin_model const *)arg1)->kripkecube(arg2);
3773 }
3774 catch (const std::runtime_error& e)
3775 {
3776 SWIG_exception(SWIG_RuntimeError, e.what());
3777 }
3778 }
3779 resultobj = SWIG_NewPointerObj((new ltsmin_kripkecube_ptr(static_cast< const ltsmin_kripkecube_ptr& >(result))), SWIGTYPE_p_ltsmin_kripkecube_ptr, SWIG_POINTER_OWN | 0 );
3780 return resultobj;
3781 fail:
3782 return NULL;
3783 }
3784
3785
_wrap_model_kripkecube(PyObject * self,PyObject * args)3786 SWIGINTERN PyObject *_wrap_model_kripkecube(PyObject *self, PyObject *args) {
3787 Py_ssize_t argc;
3788 PyObject *argv[6] = {
3789 0
3790 };
3791
3792 if (!(argc = SWIG_Python_UnpackTuple(args, "model_kripkecube", 0, 5, argv))) SWIG_fail;
3793 --argc;
3794 if (argc == 2) {
3795 PyObject *retobj = _wrap_model_kripkecube__SWIG_3(self, argc, argv);
3796 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
3797 SWIG_fail;
3798 }
3799 if (argc == 3) {
3800 PyObject *retobj = _wrap_model_kripkecube__SWIG_2(self, argc, argv);
3801 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
3802 SWIG_fail;
3803 }
3804 if (argc == 4) {
3805 PyObject *retobj = _wrap_model_kripkecube__SWIG_1(self, argc, argv);
3806 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
3807 SWIG_fail;
3808 }
3809 if (argc == 5) {
3810 PyObject *retobj = _wrap_model_kripkecube__SWIG_0(self, argc, argv);
3811 if (!SWIG_Python_TypeErrorOccurred(retobj)) return retobj;
3812 SWIG_fail;
3813 }
3814
3815 fail:
3816 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'model_kripkecube'.\n"
3817 " Possible C/C++ prototypes are:\n"
3818 " spot::ltsmin_model::kripkecube(std::vector< std::string >,spot::formula,int,unsigned int) const\n"
3819 " spot::ltsmin_model::kripkecube(std::vector< std::string >,spot::formula,int) const\n"
3820 " spot::ltsmin_model::kripkecube(std::vector< std::string >,spot::formula) const\n"
3821 " spot::ltsmin_model::kripkecube(std::vector< std::string >) const\n");
3822 return 0;
3823 }
3824
3825
_wrap_model_state_size(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3826 SWIGINTERN PyObject *_wrap_model_state_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3827 PyObject *resultobj = 0;
3828 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3829 void *argp1 = 0 ;
3830 int res1 = 0 ;
3831 PyObject *swig_obj[1] ;
3832 int result;
3833
3834 if (!args) SWIG_fail;
3835 swig_obj[0] = args;
3836 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3837 if (!SWIG_IsOK(res1)) {
3838 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_state_size" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3839 }
3840 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3841 {
3842 try {
3843 result = (int)((spot::ltsmin_model const *)arg1)->state_size();
3844 }
3845 catch (const std::runtime_error& e)
3846 {
3847 SWIG_exception(SWIG_RuntimeError, e.what());
3848 }
3849 }
3850 resultobj = SWIG_From_int(static_cast< int >(result));
3851 return resultobj;
3852 fail:
3853 return NULL;
3854 }
3855
3856
_wrap_model_state_variable_name(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3857 SWIGINTERN PyObject *_wrap_model_state_variable_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3858 PyObject *resultobj = 0;
3859 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3860 int arg2 ;
3861 void *argp1 = 0 ;
3862 int res1 = 0 ;
3863 int val2 ;
3864 int ecode2 = 0 ;
3865 PyObject *swig_obj[2] ;
3866 char *result = 0 ;
3867
3868 if (!SWIG_Python_UnpackTuple(args, "model_state_variable_name", 2, 2, swig_obj)) SWIG_fail;
3869 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3870 if (!SWIG_IsOK(res1)) {
3871 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_state_variable_name" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3872 }
3873 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3874 ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3875 if (!SWIG_IsOK(ecode2)) {
3876 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "model_state_variable_name" "', argument " "2"" of type '" "int""'");
3877 }
3878 arg2 = static_cast< int >(val2);
3879 {
3880 try {
3881 result = (char *)((spot::ltsmin_model const *)arg1)->state_variable_name(arg2);
3882 }
3883 catch (const std::runtime_error& e)
3884 {
3885 SWIG_exception(SWIG_RuntimeError, e.what());
3886 }
3887 }
3888 resultobj = SWIG_FromCharPtr((const char *)result);
3889 return resultobj;
3890 fail:
3891 return NULL;
3892 }
3893
3894
_wrap_model_state_variable_type(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3895 SWIGINTERN PyObject *_wrap_model_state_variable_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3896 PyObject *resultobj = 0;
3897 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3898 int arg2 ;
3899 void *argp1 = 0 ;
3900 int res1 = 0 ;
3901 int val2 ;
3902 int ecode2 = 0 ;
3903 PyObject *swig_obj[2] ;
3904 int result;
3905
3906 if (!SWIG_Python_UnpackTuple(args, "model_state_variable_type", 2, 2, swig_obj)) SWIG_fail;
3907 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3908 if (!SWIG_IsOK(res1)) {
3909 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_state_variable_type" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3910 }
3911 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3912 ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3913 if (!SWIG_IsOK(ecode2)) {
3914 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "model_state_variable_type" "', argument " "2"" of type '" "int""'");
3915 }
3916 arg2 = static_cast< int >(val2);
3917 {
3918 try {
3919 result = (int)((spot::ltsmin_model const *)arg1)->state_variable_type(arg2);
3920 }
3921 catch (const std::runtime_error& e)
3922 {
3923 SWIG_exception(SWIG_RuntimeError, e.what());
3924 }
3925 }
3926 resultobj = SWIG_From_int(static_cast< int >(result));
3927 return resultobj;
3928 fail:
3929 return NULL;
3930 }
3931
3932
_wrap_model_type_count(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3933 SWIGINTERN PyObject *_wrap_model_type_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3934 PyObject *resultobj = 0;
3935 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3936 void *argp1 = 0 ;
3937 int res1 = 0 ;
3938 PyObject *swig_obj[1] ;
3939 int result;
3940
3941 if (!args) SWIG_fail;
3942 swig_obj[0] = args;
3943 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3944 if (!SWIG_IsOK(res1)) {
3945 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_type_count" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3946 }
3947 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3948 {
3949 try {
3950 result = (int)((spot::ltsmin_model const *)arg1)->type_count();
3951 }
3952 catch (const std::runtime_error& e)
3953 {
3954 SWIG_exception(SWIG_RuntimeError, e.what());
3955 }
3956 }
3957 resultobj = SWIG_From_int(static_cast< int >(result));
3958 return resultobj;
3959 fail:
3960 return NULL;
3961 }
3962
3963
_wrap_model_type_name(PyObject * SWIGUNUSEDPARM (self),PyObject * args)3964 SWIGINTERN PyObject *_wrap_model_type_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3965 PyObject *resultobj = 0;
3966 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
3967 int arg2 ;
3968 void *argp1 = 0 ;
3969 int res1 = 0 ;
3970 int val2 ;
3971 int ecode2 = 0 ;
3972 PyObject *swig_obj[2] ;
3973 char *result = 0 ;
3974
3975 if (!SWIG_Python_UnpackTuple(args, "model_type_name", 2, 2, swig_obj)) SWIG_fail;
3976 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
3977 if (!SWIG_IsOK(res1)) {
3978 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_type_name" "', argument " "1"" of type '" "spot::ltsmin_model const *""'");
3979 }
3980 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
3981 ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3982 if (!SWIG_IsOK(ecode2)) {
3983 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "model_type_name" "', argument " "2"" of type '" "int""'");
3984 }
3985 arg2 = static_cast< int >(val2);
3986 {
3987 try {
3988 result = (char *)((spot::ltsmin_model const *)arg1)->type_name(arg2);
3989 }
3990 catch (const std::runtime_error& e)
3991 {
3992 SWIG_exception(SWIG_RuntimeError, e.what());
3993 }
3994 }
3995 resultobj = SWIG_FromCharPtr((const char *)result);
3996 return resultobj;
3997 fail:
3998 return NULL;
3999 }
4000
4001
_wrap_model_type_value_count(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4002 SWIGINTERN PyObject *_wrap_model_type_value_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4003 PyObject *resultobj = 0;
4004 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
4005 int arg2 ;
4006 void *argp1 = 0 ;
4007 int res1 = 0 ;
4008 int val2 ;
4009 int ecode2 = 0 ;
4010 PyObject *swig_obj[2] ;
4011 int result;
4012
4013 if (!SWIG_Python_UnpackTuple(args, "model_type_value_count", 2, 2, swig_obj)) SWIG_fail;
4014 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
4015 if (!SWIG_IsOK(res1)) {
4016 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_type_value_count" "', argument " "1"" of type '" "spot::ltsmin_model *""'");
4017 }
4018 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
4019 ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4020 if (!SWIG_IsOK(ecode2)) {
4021 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "model_type_value_count" "', argument " "2"" of type '" "int""'");
4022 }
4023 arg2 = static_cast< int >(val2);
4024 {
4025 try {
4026 result = (int)(arg1)->type_value_count(arg2);
4027 }
4028 catch (const std::runtime_error& e)
4029 {
4030 SWIG_exception(SWIG_RuntimeError, e.what());
4031 }
4032 }
4033 resultobj = SWIG_From_int(static_cast< int >(result));
4034 return resultobj;
4035 fail:
4036 return NULL;
4037 }
4038
4039
_wrap_model_type_value_name(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4040 SWIGINTERN PyObject *_wrap_model_type_value_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4041 PyObject *resultobj = 0;
4042 spot::ltsmin_model *arg1 = (spot::ltsmin_model *) 0 ;
4043 int arg2 ;
4044 int arg3 ;
4045 void *argp1 = 0 ;
4046 int res1 = 0 ;
4047 int val2 ;
4048 int ecode2 = 0 ;
4049 int val3 ;
4050 int ecode3 = 0 ;
4051 PyObject *swig_obj[3] ;
4052 char *result = 0 ;
4053
4054 if (!SWIG_Python_UnpackTuple(args, "model_type_value_name", 3, 3, swig_obj)) SWIG_fail;
4055 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_spot__ltsmin_model, 0 | 0 );
4056 if (!SWIG_IsOK(res1)) {
4057 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "model_type_value_name" "', argument " "1"" of type '" "spot::ltsmin_model *""'");
4058 }
4059 arg1 = reinterpret_cast< spot::ltsmin_model * >(argp1);
4060 ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4061 if (!SWIG_IsOK(ecode2)) {
4062 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "model_type_value_name" "', argument " "2"" of type '" "int""'");
4063 }
4064 arg2 = static_cast< int >(val2);
4065 ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
4066 if (!SWIG_IsOK(ecode3)) {
4067 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "model_type_value_name" "', argument " "3"" of type '" "int""'");
4068 }
4069 arg3 = static_cast< int >(val3);
4070 {
4071 try {
4072 result = (char *)(arg1)->type_value_name(arg2,arg3);
4073 }
4074 catch (const std::runtime_error& e)
4075 {
4076 SWIG_exception(SWIG_RuntimeError, e.what());
4077 }
4078 }
4079 resultobj = SWIG_FromCharPtr((const char *)result);
4080 return resultobj;
4081 fail:
4082 return NULL;
4083 }
4084
4085
model_swigregister(PyObject * SWIGUNUSEDPARM (self),PyObject * args)4086 SWIGINTERN PyObject *model_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4087 PyObject *obj;
4088 if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
4089 SWIG_TypeNewClientData(SWIGTYPE_p_spot__ltsmin_model, SWIG_NewClientData(obj));
4090 return SWIG_Py_Void();
4091 }
4092
4093 static PyMethodDef SwigMethods[] = {
4094 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
4095 { "SWIG_PyStaticMethod_New", SWIG_PyStaticMethod_New, METH_O, NULL},
4096 { "delete_model", _wrap_delete_model, METH_O, NULL},
4097 { "model_load", _wrap_model_load, METH_O, NULL},
4098 { "model_kripke_raw", _wrap_model_kripke_raw, METH_VARARGS, NULL},
4099 { "model_kripkecube", _wrap_model_kripkecube, METH_VARARGS, NULL},
4100 { "model_state_size", _wrap_model_state_size, METH_O, NULL},
4101 { "model_state_variable_name", _wrap_model_state_variable_name, METH_VARARGS, NULL},
4102 { "model_state_variable_type", _wrap_model_state_variable_type, METH_VARARGS, NULL},
4103 { "model_type_count", _wrap_model_type_count, METH_O, NULL},
4104 { "model_type_name", _wrap_model_type_name, METH_VARARGS, NULL},
4105 { "model_type_value_count", _wrap_model_type_value_count, METH_VARARGS, NULL},
4106 { "model_type_value_name", _wrap_model_type_value_name, METH_VARARGS, NULL},
4107 { "model_swigregister", model_swigregister, METH_O, NULL},
4108 { NULL, NULL, 0, NULL }
4109 };
4110
4111 static PyMethodDef SwigMethods_proxydocs[] = {
4112 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
4113 { "SWIG_PyStaticMethod_New", SWIG_PyStaticMethod_New, METH_O, NULL},
4114 { "delete_model", _wrap_delete_model, METH_O, NULL},
4115 { "model_load", _wrap_model_load, METH_O, NULL},
4116 { "model_kripke_raw", _wrap_model_kripke_raw, METH_VARARGS, NULL},
4117 { "model_kripkecube", _wrap_model_kripkecube, METH_VARARGS, NULL},
4118 { "model_state_size", _wrap_model_state_size, METH_O, NULL},
4119 { "model_state_variable_name", _wrap_model_state_variable_name, METH_VARARGS, NULL},
4120 { "model_state_variable_type", _wrap_model_state_variable_type, METH_VARARGS, NULL},
4121 { "model_type_count", _wrap_model_type_count, METH_O, NULL},
4122 { "model_type_name", _wrap_model_type_name, METH_VARARGS, NULL},
4123 { "model_type_value_count", _wrap_model_type_value_count, METH_VARARGS, NULL},
4124 { "model_type_value_name", _wrap_model_type_value_name, METH_VARARGS, NULL},
4125 { "model_swigregister", model_swigregister, METH_O, NULL},
4126 { NULL, NULL, 0, NULL }
4127 };
4128
4129
4130 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
4131
_p_std__shared_ptrT_spot__kripke_tTo_p_std__shared_ptrT_spot__fair_kripke_t(void * x,int * newmemory)4132 static void *_p_std__shared_ptrT_spot__kripke_tTo_p_std__shared_ptrT_spot__fair_kripke_t(void *x, int *newmemory) {
4133 *newmemory = SWIG_CAST_NEW_MEMORY;
4134 return (void *) new std::shared_ptr< spot::fair_kripke >(*(std::shared_ptr< spot::kripke > *)x);
4135 }
_p_std__shared_ptrT_spot__fair_kripke_tTo_p_std__shared_ptrT_spot__twa_t(void * x,int * newmemory)4136 static void *_p_std__shared_ptrT_spot__fair_kripke_tTo_p_std__shared_ptrT_spot__twa_t(void *x, int *newmemory) {
4137 *newmemory = SWIG_CAST_NEW_MEMORY;
4138 return (void *) new std::shared_ptr< spot::twa >(*(std::shared_ptr< spot::fair_kripke > *)x);
4139 }
_p_std__shared_ptrT_spot__kripke_tTo_p_std__shared_ptrT_spot__twa_t(void * x,int * newmemory)4140 static void *_p_std__shared_ptrT_spot__kripke_tTo_p_std__shared_ptrT_spot__twa_t(void *x, int *newmemory) {
4141 *newmemory = SWIG_CAST_NEW_MEMORY;
4142 return (void *) new std::shared_ptr< spot::twa >(*(std::shared_ptr< spot::kripke > *)x);
4143 }
4144 static swig_type_info _swigt__p_bdd_info_map = {"_p_bdd_info_map", "bdd_info_map *", 0, 0, (void*)0, 0};
4145 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
4146 static swig_type_info _swigt__p_fv_map = {"_p_fv_map", "fv_map *", 0, 0, (void*)0, 0};
4147 static swig_type_info _swigt__p_ltsmin_kripkecube_ptr = {"_p_ltsmin_kripkecube_ptr", "ltsmin_kripkecube_ptr *", 0, 0, (void*)0, 0};
4148 static swig_type_info _swigt__p_ref_set = {"_p_ref_set", "ref_set *", 0, 0, (void*)0, 0};
4149 static swig_type_info _swigt__p_spot__formula = {"_p_spot__formula", "spot::formula *", 0, 0, (void*)0, 0};
4150 static swig_type_info _swigt__p_spot__ltsmin_model = {"_p_spot__ltsmin_model", "spot::ltsmin_model *", 0, 0, (void*)0, 0};
4151 static swig_type_info _swigt__p_std__setT_spot__formula_std__lessT_spot__formula_t_std__allocatorT_spot__formula_t_t = {"_p_std__setT_spot__formula_std__lessT_spot__formula_t_std__allocatorT_spot__formula_t_t", "std::set< spot::formula,std::less< spot::formula >,std::allocator< spot::formula > > *|spot::atomic_prop_set *", 0, 0, (void*)0, 0};
4152 static swig_type_info _swigt__p_std__shared_ptrT_spot__bdd_dict_t = {"_p_std__shared_ptrT_spot__bdd_dict_t", "spot::bdd_dict_ptr *|std::shared_ptr< spot::bdd_dict > *", 0, 0, (void*)0, 0};
4153 static swig_type_info _swigt__p_std__shared_ptrT_spot__fair_kripke_t = {"_p_std__shared_ptrT_spot__fair_kripke_t", "std::shared_ptr< spot::fair_kripke > *", 0, 0, (void*)0, 0};
4154 static swig_type_info _swigt__p_std__shared_ptrT_spot__kripke_const_t = {"_p_std__shared_ptrT_spot__kripke_const_t", "spot::const_kripke_ptr *|std::shared_ptr< spot::kripke const > *", 0, 0, (void*)0, 0};
4155 static swig_type_info _swigt__p_std__shared_ptrT_spot__kripke_t = {"_p_std__shared_ptrT_spot__kripke_t", "spot::kripke_ptr *|std::shared_ptr< spot::kripke > *", 0, 0, (void*)0, 0};
4156 static swig_type_info _swigt__p_std__shared_ptrT_spot__state_const_t = {"_p_std__shared_ptrT_spot__state_const_t", "std::shared_ptr< spot::state const > *|spot::shared_state *", 0, 0, (void*)0, 0};
4157 static swig_type_info _swigt__p_std__shared_ptrT_spot__twa_run_t = {"_p_std__shared_ptrT_spot__twa_run_t", "spot::twa_run_ptr *|std::shared_ptr< spot::twa_run > *", 0, 0, (void*)0, 0};
4158 static swig_type_info _swigt__p_std__shared_ptrT_spot__twa_t = {"_p_std__shared_ptrT_spot__twa_t", "std::shared_ptr< spot::twa > *", 0, 0, (void*)0, 0};
4159 static swig_type_info _swigt__p_std__shared_ptrT_spot__twa_word_t = {"_p_std__shared_ptrT_spot__twa_word_t", "spot::twa_word_ptr *|std::shared_ptr< spot::twa_word > *", 0, 0, (void*)0, 0};
4160 static swig_type_info _swigt__p_std__unordered_setT_spot__state_const_p_spot__state_ptr_hash_spot__state_ptr_equal_t = {"_p_std__unordered_setT_spot__state_const_p_spot__state_ptr_hash_spot__state_ptr_equal_t", "std::unordered_set< spot::state const *,spot::state_ptr_hash,spot::state_ptr_equal > *|spot::state_set *", 0, 0, (void*)0, 0};
4161 static swig_type_info _swigt__p_std__unordered_setT_std__shared_ptrT_spot__state_const_t_spot__state_shared_ptr_hash_spot__state_shared_ptr_equal_t = {"_p_std__unordered_setT_std__shared_ptrT_spot__state_const_t_spot__state_shared_ptr_hash_spot__state_shared_ptr_equal_t", "std::unordered_set< std::shared_ptr< spot::state const >,spot::state_shared_ptr_hash,spot::state_shared_ptr_equal > *|spot::shared_state_set *", 0, 0, (void*)0, 0};
4162 static swig_type_info _swigt__p_std__vectorT_std__string_t = {"_p_std__vectorT_std__string_t", "std::vector< std::string > *", 0, 0, (void*)0, 0};
4163 static swig_type_info _swigt__p_vf_map = {"_p_vf_map", "vf_map *", 0, 0, (void*)0, 0};
4164
4165 static swig_type_info *swig_type_initial[] = {
4166 &_swigt__p_bdd_info_map,
4167 &_swigt__p_char,
4168 &_swigt__p_fv_map,
4169 &_swigt__p_ltsmin_kripkecube_ptr,
4170 &_swigt__p_ref_set,
4171 &_swigt__p_spot__formula,
4172 &_swigt__p_spot__ltsmin_model,
4173 &_swigt__p_std__setT_spot__formula_std__lessT_spot__formula_t_std__allocatorT_spot__formula_t_t,
4174 &_swigt__p_std__shared_ptrT_spot__bdd_dict_t,
4175 &_swigt__p_std__shared_ptrT_spot__fair_kripke_t,
4176 &_swigt__p_std__shared_ptrT_spot__kripke_const_t,
4177 &_swigt__p_std__shared_ptrT_spot__kripke_t,
4178 &_swigt__p_std__shared_ptrT_spot__state_const_t,
4179 &_swigt__p_std__shared_ptrT_spot__twa_run_t,
4180 &_swigt__p_std__shared_ptrT_spot__twa_t,
4181 &_swigt__p_std__shared_ptrT_spot__twa_word_t,
4182 &_swigt__p_std__unordered_setT_spot__state_const_p_spot__state_ptr_hash_spot__state_ptr_equal_t,
4183 &_swigt__p_std__unordered_setT_std__shared_ptrT_spot__state_const_t_spot__state_shared_ptr_hash_spot__state_shared_ptr_equal_t,
4184 &_swigt__p_std__vectorT_std__string_t,
4185 &_swigt__p_vf_map,
4186 };
4187
4188 static swig_cast_info _swigc__p_bdd_info_map[] = { {&_swigt__p_bdd_info_map, 0, 0, 0},{0, 0, 0, 0}};
4189 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4190 static swig_cast_info _swigc__p_fv_map[] = { {&_swigt__p_fv_map, 0, 0, 0},{0, 0, 0, 0}};
4191 static swig_cast_info _swigc__p_ltsmin_kripkecube_ptr[] = { {&_swigt__p_ltsmin_kripkecube_ptr, 0, 0, 0},{0, 0, 0, 0}};
4192 static swig_cast_info _swigc__p_ref_set[] = { {&_swigt__p_ref_set, 0, 0, 0},{0, 0, 0, 0}};
4193 static swig_cast_info _swigc__p_spot__formula[] = { {&_swigt__p_spot__formula, 0, 0, 0},{0, 0, 0, 0}};
4194 static swig_cast_info _swigc__p_spot__ltsmin_model[] = { {&_swigt__p_spot__ltsmin_model, 0, 0, 0},{0, 0, 0, 0}};
4195 static swig_cast_info _swigc__p_std__setT_spot__formula_std__lessT_spot__formula_t_std__allocatorT_spot__formula_t_t[] = { {&_swigt__p_std__setT_spot__formula_std__lessT_spot__formula_t_std__allocatorT_spot__formula_t_t, 0, 0, 0},{0, 0, 0, 0}};
4196 static swig_cast_info _swigc__p_std__shared_ptrT_spot__bdd_dict_t[] = { {&_swigt__p_std__shared_ptrT_spot__bdd_dict_t, 0, 0, 0},{0, 0, 0, 0}};
4197 static swig_cast_info _swigc__p_std__shared_ptrT_spot__fair_kripke_t[] = { {&_swigt__p_std__shared_ptrT_spot__fair_kripke_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_spot__kripke_t, _p_std__shared_ptrT_spot__kripke_tTo_p_std__shared_ptrT_spot__fair_kripke_t, 0, 0},{0, 0, 0, 0}};
4198 static swig_cast_info _swigc__p_std__shared_ptrT_spot__kripke_const_t[] = { {&_swigt__p_std__shared_ptrT_spot__kripke_const_t, 0, 0, 0},{0, 0, 0, 0}};
4199 static swig_cast_info _swigc__p_std__shared_ptrT_spot__kripke_t[] = { {&_swigt__p_std__shared_ptrT_spot__kripke_t, 0, 0, 0},{0, 0, 0, 0}};
4200 static swig_cast_info _swigc__p_std__shared_ptrT_spot__state_const_t[] = { {&_swigt__p_std__shared_ptrT_spot__state_const_t, 0, 0, 0},{0, 0, 0, 0}};
4201 static swig_cast_info _swigc__p_std__shared_ptrT_spot__twa_run_t[] = { {&_swigt__p_std__shared_ptrT_spot__twa_run_t, 0, 0, 0},{0, 0, 0, 0}};
4202 static swig_cast_info _swigc__p_std__shared_ptrT_spot__twa_t[] = { {&_swigt__p_std__shared_ptrT_spot__twa_t, 0, 0, 0}, {&_swigt__p_std__shared_ptrT_spot__fair_kripke_t, _p_std__shared_ptrT_spot__fair_kripke_tTo_p_std__shared_ptrT_spot__twa_t, 0, 0}, {&_swigt__p_std__shared_ptrT_spot__kripke_t, _p_std__shared_ptrT_spot__kripke_tTo_p_std__shared_ptrT_spot__twa_t, 0, 0},{0, 0, 0, 0}};
4203 static swig_cast_info _swigc__p_std__shared_ptrT_spot__twa_word_t[] = { {&_swigt__p_std__shared_ptrT_spot__twa_word_t, 0, 0, 0},{0, 0, 0, 0}};
4204 static swig_cast_info _swigc__p_std__unordered_setT_spot__state_const_p_spot__state_ptr_hash_spot__state_ptr_equal_t[] = { {&_swigt__p_std__unordered_setT_spot__state_const_p_spot__state_ptr_hash_spot__state_ptr_equal_t, 0, 0, 0},{0, 0, 0, 0}};
4205 static swig_cast_info _swigc__p_std__unordered_setT_std__shared_ptrT_spot__state_const_t_spot__state_shared_ptr_hash_spot__state_shared_ptr_equal_t[] = { {&_swigt__p_std__unordered_setT_std__shared_ptrT_spot__state_const_t_spot__state_shared_ptr_hash_spot__state_shared_ptr_equal_t, 0, 0, 0},{0, 0, 0, 0}};
4206 static swig_cast_info _swigc__p_std__vectorT_std__string_t[] = { {&_swigt__p_std__vectorT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};
4207 static swig_cast_info _swigc__p_vf_map[] = { {&_swigt__p_vf_map, 0, 0, 0},{0, 0, 0, 0}};
4208
4209 static swig_cast_info *swig_cast_initial[] = {
4210 _swigc__p_bdd_info_map,
4211 _swigc__p_char,
4212 _swigc__p_fv_map,
4213 _swigc__p_ltsmin_kripkecube_ptr,
4214 _swigc__p_ref_set,
4215 _swigc__p_spot__formula,
4216 _swigc__p_spot__ltsmin_model,
4217 _swigc__p_std__setT_spot__formula_std__lessT_spot__formula_t_std__allocatorT_spot__formula_t_t,
4218 _swigc__p_std__shared_ptrT_spot__bdd_dict_t,
4219 _swigc__p_std__shared_ptrT_spot__fair_kripke_t,
4220 _swigc__p_std__shared_ptrT_spot__kripke_const_t,
4221 _swigc__p_std__shared_ptrT_spot__kripke_t,
4222 _swigc__p_std__shared_ptrT_spot__state_const_t,
4223 _swigc__p_std__shared_ptrT_spot__twa_run_t,
4224 _swigc__p_std__shared_ptrT_spot__twa_t,
4225 _swigc__p_std__shared_ptrT_spot__twa_word_t,
4226 _swigc__p_std__unordered_setT_spot__state_const_p_spot__state_ptr_hash_spot__state_ptr_equal_t,
4227 _swigc__p_std__unordered_setT_std__shared_ptrT_spot__state_const_t_spot__state_shared_ptr_hash_spot__state_shared_ptr_equal_t,
4228 _swigc__p_std__vectorT_std__string_t,
4229 _swigc__p_vf_map,
4230 };
4231
4232
4233 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
4234
4235 static swig_const_info swig_const_table[] = {
4236 {0, 0, 0, 0.0, 0, 0}};
4237
4238 #ifdef __cplusplus
4239 }
4240 #endif
4241 /* -----------------------------------------------------------------------------
4242 * Type initialization:
4243 * This problem is tough by the requirement that no dynamic
4244 * memory is used. Also, since swig_type_info structures store pointers to
4245 * swig_cast_info structures and swig_cast_info structures store pointers back
4246 * to swig_type_info structures, we need some lookup code at initialization.
4247 * The idea is that swig generates all the structures that are needed.
4248 * The runtime then collects these partially filled structures.
4249 * The SWIG_InitializeModule function takes these initial arrays out of
4250 * swig_module, and does all the lookup, filling in the swig_module.types
4251 * array with the correct data and linking the correct swig_cast_info
4252 * structures together.
4253 *
4254 * The generated swig_type_info structures are assigned statically to an initial
4255 * array. We just loop through that array, and handle each type individually.
4256 * First we lookup if this type has been already loaded, and if so, use the
4257 * loaded structure instead of the generated one. Then we have to fill in the
4258 * cast linked list. The cast data is initially stored in something like a
4259 * two-dimensional array. Each row corresponds to a type (there are the same
4260 * number of rows as there are in the swig_type_initial array). Each entry in
4261 * a column is one of the swig_cast_info structures for that type.
4262 * The cast_initial array is actually an array of arrays, because each row has
4263 * a variable number of columns. So to actually build the cast linked list,
4264 * we find the array of casts associated with the type, and loop through it
4265 * adding the casts to the list. The one last trick we need to do is making
4266 * sure the type pointer in the swig_cast_info struct is correct.
4267 *
4268 * First off, we lookup the cast->type name to see if it is already loaded.
4269 * There are three cases to handle:
4270 * 1) If the cast->type has already been loaded AND the type we are adding
4271 * casting info to has not been loaded (it is in this module), THEN we
4272 * replace the cast->type pointer with the type pointer that has already
4273 * been loaded.
4274 * 2) If BOTH types (the one we are adding casting info to, and the
4275 * cast->type) are loaded, THEN the cast info has already been loaded by
4276 * the previous module so we just ignore it.
4277 * 3) Finally, if cast->type has not already been loaded, then we add that
4278 * swig_cast_info to the linked list (because the cast->type) pointer will
4279 * be correct.
4280 * ----------------------------------------------------------------------------- */
4281
4282 #ifdef __cplusplus
4283 extern "C" {
4284 #if 0
4285 } /* c-mode */
4286 #endif
4287 #endif
4288
4289 #if 0
4290 #define SWIGRUNTIME_DEBUG
4291 #endif
4292
4293
4294 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)4295 SWIG_InitializeModule(void *clientdata) {
4296 size_t i;
4297 swig_module_info *module_head, *iter;
4298 int init;
4299
4300 /* check to see if the circular list has been setup, if not, set it up */
4301 if (swig_module.next==0) {
4302 /* Initialize the swig_module */
4303 swig_module.type_initial = swig_type_initial;
4304 swig_module.cast_initial = swig_cast_initial;
4305 swig_module.next = &swig_module;
4306 init = 1;
4307 } else {
4308 init = 0;
4309 }
4310
4311 /* Try and load any already created modules */
4312 module_head = SWIG_GetModule(clientdata);
4313 if (!module_head) {
4314 /* This is the first module loaded for this interpreter */
4315 /* so set the swig module into the interpreter */
4316 SWIG_SetModule(clientdata, &swig_module);
4317 } else {
4318 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
4319 iter=module_head;
4320 do {
4321 if (iter==&swig_module) {
4322 /* Our module is already in the list, so there's nothing more to do. */
4323 return;
4324 }
4325 iter=iter->next;
4326 } while (iter!= module_head);
4327
4328 /* otherwise we must add our module into the list */
4329 swig_module.next = module_head->next;
4330 module_head->next = &swig_module;
4331 }
4332
4333 /* When multiple interpreters are used, a module could have already been initialized in
4334 a different interpreter, but not yet have a pointer in this interpreter.
4335 In this case, we do not want to continue adding types... everything should be
4336 set up already */
4337 if (init == 0) return;
4338
4339 /* Now work on filling in swig_module.types */
4340 #ifdef SWIGRUNTIME_DEBUG
4341 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
4342 #endif
4343 for (i = 0; i < swig_module.size; ++i) {
4344 swig_type_info *type = 0;
4345 swig_type_info *ret;
4346 swig_cast_info *cast;
4347
4348 #ifdef SWIGRUNTIME_DEBUG
4349 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
4350 #endif
4351
4352 /* if there is another module already loaded */
4353 if (swig_module.next != &swig_module) {
4354 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
4355 }
4356 if (type) {
4357 /* Overwrite clientdata field */
4358 #ifdef SWIGRUNTIME_DEBUG
4359 printf("SWIG_InitializeModule: found type %s\n", type->name);
4360 #endif
4361 if (swig_module.type_initial[i]->clientdata) {
4362 type->clientdata = swig_module.type_initial[i]->clientdata;
4363 #ifdef SWIGRUNTIME_DEBUG
4364 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4365 #endif
4366 }
4367 } else {
4368 type = swig_module.type_initial[i];
4369 }
4370
4371 /* Insert casting types */
4372 cast = swig_module.cast_initial[i];
4373 while (cast->type) {
4374 /* Don't need to add information already in the list */
4375 ret = 0;
4376 #ifdef SWIGRUNTIME_DEBUG
4377 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
4378 #endif
4379 if (swig_module.next != &swig_module) {
4380 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
4381 #ifdef SWIGRUNTIME_DEBUG
4382 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
4383 #endif
4384 }
4385 if (ret) {
4386 if (type == swig_module.type_initial[i]) {
4387 #ifdef SWIGRUNTIME_DEBUG
4388 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
4389 #endif
4390 cast->type = ret;
4391 ret = 0;
4392 } else {
4393 /* Check for casting already in the list */
4394 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
4395 #ifdef SWIGRUNTIME_DEBUG
4396 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
4397 #endif
4398 if (!ocast) ret = 0;
4399 }
4400 }
4401
4402 if (!ret) {
4403 #ifdef SWIGRUNTIME_DEBUG
4404 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4405 #endif
4406 if (type->cast) {
4407 type->cast->prev = cast;
4408 cast->next = type->cast;
4409 }
4410 type->cast = cast;
4411 }
4412 cast++;
4413 }
4414 /* Set entry in modules->types array equal to the type */
4415 swig_module.types[i] = type;
4416 }
4417 swig_module.types[i] = 0;
4418
4419 #ifdef SWIGRUNTIME_DEBUG
4420 printf("**** SWIG_InitializeModule: Cast List ******\n");
4421 for (i = 0; i < swig_module.size; ++i) {
4422 int j = 0;
4423 swig_cast_info *cast = swig_module.cast_initial[i];
4424 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
4425 while (cast->type) {
4426 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4427 cast++;
4428 ++j;
4429 }
4430 printf("---- Total casts: %d\n",j);
4431 }
4432 printf("**** SWIG_InitializeModule: Cast List ******\n");
4433 #endif
4434 }
4435
4436 /* This function will propagate the clientdata field of type to
4437 * any new swig_type_info structures that have been added into the list
4438 * of equivalent types. It is like calling
4439 * SWIG_TypeClientData(type, clientdata) a second time.
4440 */
4441 SWIGRUNTIME void
SWIG_PropagateClientData(void)4442 SWIG_PropagateClientData(void) {
4443 size_t i;
4444 swig_cast_info *equiv;
4445 static int init_run = 0;
4446
4447 if (init_run) return;
4448 init_run = 1;
4449
4450 for (i = 0; i < swig_module.size; i++) {
4451 if (swig_module.types[i]->clientdata) {
4452 equiv = swig_module.types[i]->cast;
4453 while (equiv) {
4454 if (!equiv->converter) {
4455 if (equiv->type && !equiv->type->clientdata)
4456 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
4457 }
4458 equiv = equiv->next;
4459 }
4460 }
4461 }
4462 }
4463
4464 #ifdef __cplusplus
4465 #if 0
4466 {
4467 /* c-mode */
4468 #endif
4469 }
4470 #endif
4471
4472
4473
4474 #ifdef __cplusplus
4475 extern "C" {
4476 #endif
4477
4478 /* Python-specific SWIG API */
4479 #define SWIG_newvarlink() SWIG_Python_newvarlink()
4480 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
4481 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
4482
4483 /* -----------------------------------------------------------------------------
4484 * global variable support code.
4485 * ----------------------------------------------------------------------------- */
4486
4487 typedef struct swig_globalvar {
4488 char *name; /* Name of global variable */
4489 PyObject *(*get_attr)(void); /* Return the current value */
4490 int (*set_attr)(PyObject *); /* Set the value */
4491 struct swig_globalvar *next;
4492 } swig_globalvar;
4493
4494 typedef struct swig_varlinkobject {
4495 PyObject_HEAD
4496 swig_globalvar *vars;
4497 } swig_varlinkobject;
4498
4499 SWIGINTERN PyObject *
swig_varlink_repr(swig_varlinkobject * SWIGUNUSEDPARM (v))4500 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
4501 #if PY_VERSION_HEX >= 0x03000000
4502 return PyUnicode_InternFromString("<Swig global variables>");
4503 #else
4504 return PyString_FromString("<Swig global variables>");
4505 #endif
4506 }
4507
4508 SWIGINTERN PyObject *
swig_varlink_str(swig_varlinkobject * v)4509 swig_varlink_str(swig_varlinkobject *v) {
4510 #if PY_VERSION_HEX >= 0x03000000
4511 PyObject *str = PyUnicode_InternFromString("(");
4512 PyObject *tail;
4513 PyObject *joined;
4514 swig_globalvar *var;
4515 for (var = v->vars; var; var=var->next) {
4516 tail = PyUnicode_FromString(var->name);
4517 joined = PyUnicode_Concat(str, tail);
4518 Py_DecRef(str);
4519 Py_DecRef(tail);
4520 str = joined;
4521 if (var->next) {
4522 tail = PyUnicode_InternFromString(", ");
4523 joined = PyUnicode_Concat(str, tail);
4524 Py_DecRef(str);
4525 Py_DecRef(tail);
4526 str = joined;
4527 }
4528 }
4529 tail = PyUnicode_InternFromString(")");
4530 joined = PyUnicode_Concat(str, tail);
4531 Py_DecRef(str);
4532 Py_DecRef(tail);
4533 str = joined;
4534 #else
4535 PyObject *str = PyString_FromString("(");
4536 swig_globalvar *var;
4537 for (var = v->vars; var; var=var->next) {
4538 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
4539 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
4540 }
4541 PyString_ConcatAndDel(&str,PyString_FromString(")"));
4542 #endif
4543 return str;
4544 }
4545
4546 SWIGINTERN void
swig_varlink_dealloc(swig_varlinkobject * v)4547 swig_varlink_dealloc(swig_varlinkobject *v) {
4548 swig_globalvar *var = v->vars;
4549 while (var) {
4550 swig_globalvar *n = var->next;
4551 free(var->name);
4552 free(var);
4553 var = n;
4554 }
4555 }
4556
4557 SWIGINTERN PyObject *
swig_varlink_getattr(swig_varlinkobject * v,char * n)4558 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
4559 PyObject *res = NULL;
4560 swig_globalvar *var = v->vars;
4561 while (var) {
4562 if (strcmp(var->name,n) == 0) {
4563 res = (*var->get_attr)();
4564 break;
4565 }
4566 var = var->next;
4567 }
4568 if (res == NULL && !PyErr_Occurred()) {
4569 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
4570 }
4571 return res;
4572 }
4573
4574 SWIGINTERN int
swig_varlink_setattr(swig_varlinkobject * v,char * n,PyObject * p)4575 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
4576 int res = 1;
4577 swig_globalvar *var = v->vars;
4578 while (var) {
4579 if (strcmp(var->name,n) == 0) {
4580 res = (*var->set_attr)(p);
4581 break;
4582 }
4583 var = var->next;
4584 }
4585 if (res == 1 && !PyErr_Occurred()) {
4586 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
4587 }
4588 return res;
4589 }
4590
4591 SWIGINTERN PyTypeObject*
swig_varlink_type(void)4592 swig_varlink_type(void) {
4593 static char varlink__doc__[] = "Swig var link object";
4594 static PyTypeObject varlink_type;
4595 static int type_init = 0;
4596 if (!type_init) {
4597 const PyTypeObject tmp = {
4598 #if PY_VERSION_HEX >= 0x03000000
4599 PyVarObject_HEAD_INIT(NULL, 0)
4600 #else
4601 PyObject_HEAD_INIT(NULL)
4602 0, /* ob_size */
4603 #endif
4604 "swigvarlink", /* tp_name */
4605 sizeof(swig_varlinkobject), /* tp_basicsize */
4606 0, /* tp_itemsize */
4607 (destructor) swig_varlink_dealloc, /* tp_dealloc */
4608 0, /* tp_print */
4609 (getattrfunc) swig_varlink_getattr, /* tp_getattr */
4610 (setattrfunc) swig_varlink_setattr, /* tp_setattr */
4611 0, /* tp_compare */
4612 (reprfunc) swig_varlink_repr, /* tp_repr */
4613 0, /* tp_as_number */
4614 0, /* tp_as_sequence */
4615 0, /* tp_as_mapping */
4616 0, /* tp_hash */
4617 0, /* tp_call */
4618 (reprfunc) swig_varlink_str, /* tp_str */
4619 0, /* tp_getattro */
4620 0, /* tp_setattro */
4621 0, /* tp_as_buffer */
4622 0, /* tp_flags */
4623 varlink__doc__, /* tp_doc */
4624 0, /* tp_traverse */
4625 0, /* tp_clear */
4626 0, /* tp_richcompare */
4627 0, /* tp_weaklistoffset */
4628 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
4629 0, /* tp_del */
4630 0, /* tp_version_tag */
4631 #if PY_VERSION_HEX >= 0x03040000
4632 0, /* tp_finalize */
4633 #endif
4634 #if PY_VERSION_HEX >= 0x03080000
4635 0, /* tp_vectorcall */
4636 #endif
4637 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
4638 0, /* tp_print */
4639 #endif
4640 #ifdef COUNT_ALLOCS
4641 0, /* tp_allocs */
4642 0, /* tp_frees */
4643 0, /* tp_maxalloc */
4644 0, /* tp_prev */
4645 0 /* tp_next */
4646 #endif
4647 };
4648 varlink_type = tmp;
4649 type_init = 1;
4650 if (PyType_Ready(&varlink_type) < 0)
4651 return NULL;
4652 }
4653 return &varlink_type;
4654 }
4655
4656 /* Create a variable linking object for use later */
4657 SWIGINTERN PyObject *
SWIG_Python_newvarlink(void)4658 SWIG_Python_newvarlink(void) {
4659 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
4660 if (result) {
4661 result->vars = 0;
4662 }
4663 return ((PyObject*) result);
4664 }
4665
4666 SWIGINTERN void
SWIG_Python_addvarlink(PyObject * p,const char * name,PyObject * (* get_attr)(void),int (* set_attr)(PyObject * p))4667 SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
4668 swig_varlinkobject *v = (swig_varlinkobject *) p;
4669 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
4670 if (gv) {
4671 size_t size = strlen(name)+1;
4672 gv->name = (char *)malloc(size);
4673 if (gv->name) {
4674 memcpy(gv->name, name, size);
4675 gv->get_attr = get_attr;
4676 gv->set_attr = set_attr;
4677 gv->next = v->vars;
4678 }
4679 }
4680 v->vars = gv;
4681 }
4682
4683 SWIGINTERN PyObject *
SWIG_globals(void)4684 SWIG_globals(void) {
4685 static PyObject *globals = 0;
4686 if (!globals) {
4687 globals = SWIG_newvarlink();
4688 }
4689 return globals;
4690 }
4691
4692 /* -----------------------------------------------------------------------------
4693 * constants/methods manipulation
4694 * ----------------------------------------------------------------------------- */
4695
4696 /* Install Constants */
4697 SWIGINTERN void
SWIG_Python_InstallConstants(PyObject * d,swig_const_info constants[])4698 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
4699 PyObject *obj = 0;
4700 size_t i;
4701 for (i = 0; constants[i].type; ++i) {
4702 switch(constants[i].type) {
4703 case SWIG_PY_POINTER:
4704 obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
4705 break;
4706 case SWIG_PY_BINARY:
4707 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
4708 break;
4709 default:
4710 obj = 0;
4711 break;
4712 }
4713 if (obj) {
4714 PyDict_SetItemString(d, constants[i].name, obj);
4715 Py_DECREF(obj);
4716 }
4717 }
4718 }
4719
4720 /* -----------------------------------------------------------------------------*/
4721 /* Fix SwigMethods to carry the callback ptrs when needed */
4722 /* -----------------------------------------------------------------------------*/
4723
4724 SWIGINTERN void
SWIG_Python_FixMethods(PyMethodDef * methods,swig_const_info * const_table,swig_type_info ** types,swig_type_info ** types_initial)4725 SWIG_Python_FixMethods(PyMethodDef *methods,
4726 swig_const_info *const_table,
4727 swig_type_info **types,
4728 swig_type_info **types_initial) {
4729 size_t i;
4730 for (i = 0; methods[i].ml_name; ++i) {
4731 const char *c = methods[i].ml_doc;
4732 if (!c) continue;
4733 c = strstr(c, "swig_ptr: ");
4734 if (c) {
4735 int j;
4736 swig_const_info *ci = 0;
4737 const char *name = c + 10;
4738 for (j = 0; const_table[j].type; ++j) {
4739 if (strncmp(const_table[j].name, name,
4740 strlen(const_table[j].name)) == 0) {
4741 ci = &(const_table[j]);
4742 break;
4743 }
4744 }
4745 if (ci) {
4746 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
4747 if (ptr) {
4748 size_t shift = (ci->ptype) - types;
4749 swig_type_info *ty = types_initial[shift];
4750 size_t ldoc = (c - methods[i].ml_doc);
4751 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
4752 char *ndoc = (char*)malloc(ldoc + lptr + 10);
4753 if (ndoc) {
4754 char *buff = ndoc;
4755 memcpy(buff, methods[i].ml_doc, ldoc);
4756 buff += ldoc;
4757 memcpy(buff, "swig_ptr: ", 10);
4758 buff += 10;
4759 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
4760 methods[i].ml_doc = ndoc;
4761 }
4762 }
4763 }
4764 }
4765 }
4766 }
4767
4768 /* -----------------------------------------------------------------------------
4769 * Method creation and docstring support functions
4770 * ----------------------------------------------------------------------------- */
4771
4772 /* -----------------------------------------------------------------------------
4773 * Function to find the method definition with the correct docstring for the
4774 * proxy module as opposed to the low-level API
4775 * ----------------------------------------------------------------------------- */
4776
SWIG_PythonGetProxyDoc(const char * name)4777 SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
4778 /* Find the function in the modified method table */
4779 size_t offset = 0;
4780 int found = 0;
4781 while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
4782 if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
4783 found = 1;
4784 break;
4785 }
4786 offset++;
4787 }
4788 /* Use the copy with the modified docstring if available */
4789 return found ? &SwigMethods_proxydocs[offset] : NULL;
4790 }
4791
4792 /* -----------------------------------------------------------------------------
4793 * Wrapper of PyInstanceMethod_New() used in Python 3
4794 * It is exported to the generated module, used for -fastproxy
4795 * ----------------------------------------------------------------------------- */
4796
SWIG_PyInstanceMethod_New(PyObject * SWIGUNUSEDPARM (self),PyObject * func)4797 SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
4798 if (PyCFunction_Check(func)) {
4799 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
4800 PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
4801 if (ml)
4802 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
4803 }
4804 #if PY_VERSION_HEX >= 0x03000000
4805 return PyInstanceMethod_New(func);
4806 #else
4807 return PyMethod_New(func, NULL, NULL);
4808 #endif
4809 }
4810
4811 /* -----------------------------------------------------------------------------
4812 * Wrapper of PyStaticMethod_New()
4813 * It is exported to the generated module, used for -fastproxy
4814 * ----------------------------------------------------------------------------- */
4815
SWIG_PyStaticMethod_New(PyObject * SWIGUNUSEDPARM (self),PyObject * func)4816 SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
4817 if (PyCFunction_Check(func)) {
4818 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
4819 PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
4820 if (ml)
4821 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
4822 }
4823 return PyStaticMethod_New(func);
4824 }
4825
4826 #ifdef __cplusplus
4827 }
4828 #endif
4829
4830 /* -----------------------------------------------------------------------------*
4831 * Partial Init method
4832 * -----------------------------------------------------------------------------*/
4833
4834 #ifdef __cplusplus
4835 extern "C"
4836 #endif
4837
4838 SWIGEXPORT
4839 #if PY_VERSION_HEX >= 0x03000000
4840 PyObject*
4841 #else
4842 void
4843 #endif
SWIG_init(void)4844 SWIG_init(void) {
4845 PyObject *m, *d, *md, *globals;
4846
4847 #if PY_VERSION_HEX >= 0x03000000
4848 static struct PyModuleDef SWIG_module = {
4849 PyModuleDef_HEAD_INIT,
4850 SWIG_name,
4851 NULL,
4852 -1,
4853 SwigMethods,
4854 NULL,
4855 NULL,
4856 NULL,
4857 NULL
4858 };
4859 #endif
4860
4861 #if defined(SWIGPYTHON_BUILTIN)
4862 static SwigPyClientData SwigPyObject_clientdata = {
4863 0, 0, 0, 0, 0, 0, 0
4864 };
4865 static PyGetSetDef this_getset_def = {
4866 (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
4867 };
4868 static SwigPyGetSet thisown_getset_closure = {
4869 SwigPyObject_own,
4870 SwigPyObject_own
4871 };
4872 static PyGetSetDef thisown_getset_def = {
4873 (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
4874 };
4875 PyTypeObject *builtin_pytype;
4876 int builtin_base_count;
4877 swig_type_info *builtin_basetype;
4878 PyObject *tuple;
4879 PyGetSetDescrObject *static_getset;
4880 PyTypeObject *metatype;
4881 PyTypeObject *swigpyobject;
4882 SwigPyClientData *cd;
4883 PyObject *public_interface, *public_symbol;
4884 PyObject *this_descr;
4885 PyObject *thisown_descr;
4886 PyObject *self = 0;
4887 int i;
4888
4889 (void)builtin_pytype;
4890 (void)builtin_base_count;
4891 (void)builtin_basetype;
4892 (void)tuple;
4893 (void)static_getset;
4894 (void)self;
4895
4896 /* Metaclass is used to implement static member variables */
4897 metatype = SwigPyObjectType();
4898 assert(metatype);
4899 #endif
4900
4901 (void)globals;
4902
4903 /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
4904 SWIG_This();
4905 SWIG_Python_TypeCache();
4906 SwigPyPacked_type();
4907 #ifndef SWIGPYTHON_BUILTIN
4908 SwigPyObject_type();
4909 #endif
4910
4911 /* Fix SwigMethods to carry the callback ptrs when needed */
4912 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
4913
4914 #if PY_VERSION_HEX >= 0x03000000
4915 m = PyModule_Create(&SWIG_module);
4916 #else
4917 m = Py_InitModule(SWIG_name, SwigMethods);
4918 #endif
4919
4920 md = d = PyModule_GetDict(m);
4921 (void)md;
4922
4923 SWIG_InitializeModule(0);
4924
4925 #ifdef SWIGPYTHON_BUILTIN
4926 swigpyobject = SwigPyObject_TypeOnce();
4927
4928 SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
4929 assert(SwigPyObject_stype);
4930 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
4931 if (!cd) {
4932 SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
4933 SwigPyObject_clientdata.pytype = swigpyobject;
4934 } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
4935 PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
4936 # if PY_VERSION_HEX >= 0x03000000
4937 return NULL;
4938 # else
4939 return;
4940 # endif
4941 }
4942
4943 /* All objects have a 'this' attribute */
4944 this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
4945 (void)this_descr;
4946
4947 /* All objects have a 'thisown' attribute */
4948 thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
4949 (void)thisown_descr;
4950
4951 public_interface = PyList_New(0);
4952 public_symbol = 0;
4953 (void)public_symbol;
4954
4955 PyDict_SetItemString(md, "__all__", public_interface);
4956 Py_DECREF(public_interface);
4957 for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
4958 SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
4959 for (i = 0; swig_const_table[i].name != 0; ++i)
4960 SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
4961 #endif
4962
4963 SWIG_InstallConstants(d,swig_const_table);
4964
4965 SWIG_Python_SetConstant(d, "SHARED_PTR_DISOWN",SWIG_From_int(static_cast< int >(0)));
4966 #if PY_VERSION_HEX >= 0x03000000
4967 return m;
4968 #else
4969 return;
4970 #endif
4971 }
4972
4973