YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
swigpythonrun.h
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.1
4 *
5 * Do not make changes to this file unless you know what you are doing - modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9/* -----------------------------------------------------------------------------
10 * swigcompat.swg
11 *
12 * Macros to provide support compatibility with older C and C++ standards.
13 * ----------------------------------------------------------------------------- */
14
15/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
16 * if you're missing it.
17 */
18#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
19 (defined __cplusplus && __cplusplus >= 201103L) || \
20 defined SWIG_HAVE_SNPRINTF) && \
21 !defined SWIG_NO_SNPRINTF
22# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
23# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
24#else
25/* Fallback versions ignore the buffer size, but most of our uses either have a
26 * fixed maximum possible size or dynamically allocate a buffer that's large
27 * enough.
28 */
29# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
30# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
31#endif
32/* -----------------------------------------------------------------------------
33 * This section contains generic SWIG labels for method/variable
34 * declarations/attributes, and other compiler dependent labels.
35 * ----------------------------------------------------------------------------- */
36
37/* template workaround for compilers that cannot correctly implement the C++ standard */
38#ifndef SWIGTEMPLATEDISAMBIGUATOR
39# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
40# define SWIGTEMPLATEDISAMBIGUATOR template
41# elif defined(__HP_aCC)
42/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
43/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
44# define SWIGTEMPLATEDISAMBIGUATOR template
45# else
46# define SWIGTEMPLATEDISAMBIGUATOR
47# endif
48#endif
49
50/* inline attribute */
51#ifndef SWIGINLINE
52# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
53# define SWIGINLINE inline
54# else
55# define SWIGINLINE
56# endif
57#endif
58
59/* attribute recognised by some compilers to avoid 'unused' warnings */
60#ifndef SWIGUNUSED
61# if defined(__GNUC__)
62# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
63# define SWIGUNUSED __attribute__ ((__unused__))
64# else
65# define SWIGUNUSED
66# endif
67# elif defined(__ICC)
68# define SWIGUNUSED __attribute__ ((__unused__))
69# else
70# define SWIGUNUSED
71# endif
72#endif
73
74#ifndef SWIG_MSC_UNSUPPRESS_4505
75# if defined(_MSC_VER)
76# pragma warning(disable : 4505) /* unreferenced local function has been removed */
77# endif
78#endif
79
80#ifndef SWIGUNUSEDPARM
81# ifdef __cplusplus
82# define SWIGUNUSEDPARM(p)
83# else
84# define SWIGUNUSEDPARM(p) p SWIGUNUSED
85# endif
86#endif
87
88/* internal SWIG method */
89#ifndef SWIGINTERN
90# define SWIGINTERN static SWIGUNUSED
91#endif
92
93/* internal inline SWIG method */
94#ifndef SWIGINTERNINLINE
95# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
96#endif
97
98/* exporting methods */
99#if defined(__GNUC__)
100# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
101# ifndef GCC_HASCLASSVISIBILITY
102# define GCC_HASCLASSVISIBILITY
103# endif
104# endif
105#endif
106
107#ifndef SWIGEXPORT
108# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
109# if defined(STATIC_LINKED)
110# define SWIGEXPORT
111# else
112# define SWIGEXPORT __declspec(dllexport)
113# endif
114# else
115# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
116# define SWIGEXPORT __attribute__ ((visibility("default")))
117# else
118# define SWIGEXPORT
119# endif
120# endif
121#endif
122
123/* calling conventions for Windows */
124#ifndef SWIGSTDCALL
125# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
126# define SWIGSTDCALL __stdcall
127# else
128# define SWIGSTDCALL
129# endif
130#endif
131
132/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
133#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
134# define _CRT_SECURE_NO_DEPRECATE
135#endif
136
137/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
138#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
139# define _SCL_SECURE_NO_DEPRECATE
140#endif
141
142/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
143#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
144# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
145#endif
146
147/* Intel's compiler complains if a variable which was never initialised is
148 * cast to void, which is a common idiom which we use to indicate that we
149 * are aware a variable isn't used. So we just silence that warning.
150 * See: https://github.com/swig/swig/issues/192 for more discussion.
151 */
152#ifdef __INTEL_COMPILER
153# pragma warning disable 592
154#endif
155
156#if defined(__cplusplus) && __cplusplus >=201103L
157# define SWIG_NULLPTR nullptr
158#else
159# define SWIG_NULLPTR NULL
160#endif
161/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
162#define SWIG_UnknownError -1
163#define SWIG_IOError -2
164#define SWIG_RuntimeError -3
165#define SWIG_IndexError -4
166#define SWIG_TypeError -5
167#define SWIG_DivisionByZero -6
168#define SWIG_OverflowError -7
169#define SWIG_SyntaxError -8
170#define SWIG_ValueError -9
171#define SWIG_SystemError -10
172#define SWIG_AttributeError -11
173#define SWIG_MemoryError -12
174#define SWIG_NullReferenceError -13
175
176/* -----------------------------------------------------------------------------
177 * swigrun.swg
178 *
179 * This file contains generic C API SWIG runtime support for pointer
180 * type checking.
181 * ----------------------------------------------------------------------------- */
182
183/* This should only be incremented when either the layout of swig_type_info changes,
184 or for whatever reason, the runtime changes incompatibly */
185#define SWIG_RUNTIME_VERSION "4"
186
187/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
188#ifdef SWIG_TYPE_TABLE
189# define SWIG_QUOTE_STRING(x) #x
190# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
191# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
192#else
193# define SWIG_TYPE_TABLE_NAME
194#endif
195
196/*
197 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
198 creating a static or dynamic library from the SWIG runtime code.
199 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
200
201 But only do this if strictly necessary, ie, if you have problems
202 with your compiler or suchlike.
203*/
204
205#ifndef SWIGRUNTIME
206# define SWIGRUNTIME SWIGINTERN
207#endif
208
209#ifndef SWIGRUNTIMEINLINE
210# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
211#endif
212
213/* Generic buffer size */
214#ifndef SWIG_BUFFER_SIZE
215# define SWIG_BUFFER_SIZE 1024
216#endif
217
218/* Flags for pointer conversions */
219#define SWIG_POINTER_DISOWN 0x1
220#define SWIG_CAST_NEW_MEMORY 0x2
221#define SWIG_POINTER_NO_NULL 0x4
222#define SWIG_POINTER_CLEAR 0x8
223#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
224
225/* Flags for new pointer objects */
226#define SWIG_POINTER_OWN 0x1
227
228
229/*
230 Flags/methods for returning states.
231
232 The SWIG conversion methods, as ConvertPtr, return an integer
233 that tells if the conversion was successful or not. And if not,
234 an error code can be returned (see swigerrors.swg for the codes).
235
236 Use the following macros/flags to set or process the returning
237 states.
238
239 In old versions of SWIG, code such as the following was usually written:
240
241 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
242 // success code
243 } else {
244 //fail code
245 }
246
247 Now you can be more explicit:
248
249 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
250 if (SWIG_IsOK(res)) {
251 // success code
252 } else {
253 // fail code
254 }
255
256 which is the same really, but now you can also do
257
258 Type *ptr;
259 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
260 if (SWIG_IsOK(res)) {
261 // success code
262 if (SWIG_IsNewObj(res) {
263 ...
264 delete *ptr;
265 } else {
266 ...
267 }
268 } else {
269 // fail code
270 }
271
272 I.e., now SWIG_ConvertPtr can return new objects and you can
273 identify the case and take care of the deallocation. Of course that
274 also requires SWIG_ConvertPtr to return new result values, such as
275
276 int SWIG_ConvertPtr(obj, ptr,...) {
277 if (<obj is ok>) {
278 if (<need new object>) {
279 *ptr = <ptr to new allocated object>;
280 return SWIG_NEWOBJ;
281 } else {
282 *ptr = <ptr to old object>;
283 return SWIG_OLDOBJ;
284 }
285 } else {
286 return SWIG_BADOBJ;
287 }
288 }
289
290 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
291 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
292 SWIG errors code.
293
294 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
295 allows returning the 'cast rank', for example, if you have this
296
297 int food(double)
298 int fooi(int);
299
300 and you call
301
302 food(1) // cast rank '1' (1 -> 1.0)
303 fooi(1) // cast rank '0'
304
305 just use the SWIG_AddCast()/SWIG_CheckState()
306*/
307
308#define SWIG_OK (0)
309/* Runtime errors are < 0 */
310#define SWIG_ERROR (-1)
311/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
312/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
313/* Errors < -200 are generic runtime specific errors */
314#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
315
316#define SWIG_IsOK(r) (r >= 0)
317#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
318
319/* The CastRankLimit says how many bits are used for the cast rank */
320#define SWIG_CASTRANKLIMIT (1 << 8)
321/* The NewMask denotes the object was created (using new/malloc) */
322#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
323/* The TmpMask is for in/out typemaps that use temporary objects */
324#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
325/* Simple returning values */
326#define SWIG_BADOBJ (SWIG_ERROR)
327#define SWIG_OLDOBJ (SWIG_OK)
328#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
329#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
330/* Check, add and del object mask methods */
331#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
332#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
333#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
334#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
335#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
336#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
337
338/* Cast-Rank Mode */
339#if defined(SWIG_CASTRANK_MODE)
340# ifndef SWIG_TypeRank
341# define SWIG_TypeRank unsigned long
342# endif
343# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
344# define SWIG_MAXCASTRANK (2)
345# endif
346# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
347# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
349 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
350}
352 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
353}
354#else /* no cast-rank mode */
355# define SWIG_AddCast(r) (r)
356# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
357#endif
358
359
360#include <string.h>
361
362#ifdef __cplusplus
363extern "C" {
364#endif
365
366typedef void *(*swig_converter_func)(void *, int *);
367typedef struct swig_type_info *(*swig_dycast_func)(void **);
368
369/* Structure to store information on one type */
370typedef struct swig_type_info {
371 const char *name; /* mangled name of this type */
372 const char *str; /* human readable name of this type */
373 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
374 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
375 void *clientdata; /* language specific type data */
376 int owndata; /* flag if the structure owns the clientdata */
378
379/* Structure to store a type and conversion function used for casting */
380typedef struct swig_cast_info {
381 swig_type_info *type; /* pointer to type that is equivalent to this type */
382 swig_converter_func converter; /* function to cast the void pointers */
383 struct swig_cast_info *next; /* pointer to next cast in linked list */
384 struct swig_cast_info *prev; /* pointer to the previous cast */
386
387/* Structure used to store module information
388 * Each module generates one structure like this, and the runtime collects
389 * all of these structures and stores them in a circularly linked list.*/
390typedef struct swig_module_info {
391 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
392 size_t size; /* Number of types in this module */
393 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
394 swig_type_info **type_initial; /* Array of initially generated type structures */
395 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
396 void *clientdata; /* Language specific module data */
398
399/*
400 Compare two type names skipping the space characters, therefore
401 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
402
403 Return 0 when the two name types are equivalent, as in
404 strncmp, but skipping ' '.
405*/
406SWIGRUNTIME int
407SWIG_TypeNameComp(const char *f1, const char *l1,
408 const char *f2, const char *l2) {
409 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
410 while ((*f1 == ' ') && (f1 != l1)) ++f1;
411 while ((*f2 == ' ') && (f2 != l2)) ++f2;
412 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
413 }
414 return (int)((l1 - f1) - (l2 - f2));
415}
416
417/*
418 Check type equivalence in a name list like <name1>|<name2>|...
419 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
420*/
421SWIGRUNTIME int
422SWIG_TypeCmp(const char *nb, const char *tb) {
423 int equiv = 1;
424 const char* te = tb + strlen(tb);
425 const char* ne = nb;
426 while (equiv != 0 && *ne) {
427 for (nb = ne; *ne; ++ne) {
428 if (*ne == '|') break;
429 }
430 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
431 if (*ne) ++ne;
432 }
433 return equiv;
434}
435
436/*
437 Check type equivalence in a name list like <name1>|<name2>|...
438 Return 0 if not equal, 1 if equal
439*/
440SWIGRUNTIME int
441SWIG_TypeEquiv(const char *nb, const char *tb) {
442 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
443}
444
445/*
446 Check the typename
447*/
449SWIG_TypeCheck(const char *c, swig_type_info *ty) {
450 if (ty) {
451 swig_cast_info *iter = ty->cast;
452 while (iter) {
453 if (strcmp(iter->type->name, c) == 0) {
454 if (iter == ty->cast)
455 return iter;
456 /* Move iter to the top of the linked list */
457 iter->prev->next = iter->next;
458 if (iter->next)
459 iter->next->prev = iter->prev;
460 iter->next = ty->cast;
461 iter->prev = 0;
462 if (ty->cast) ty->cast->prev = iter;
463 ty->cast = iter;
464 return iter;
465 }
466 iter = iter->next;
467 }
468 }
469 return 0;
470}
471
472/*
473 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
474*/
477 if (ty) {
478 swig_cast_info *iter = ty->cast;
479 while (iter) {
480 if (iter->type == from) {
481 if (iter == ty->cast)
482 return iter;
483 /* Move iter to the top of the linked list */
484 iter->prev->next = iter->next;
485 if (iter->next)
486 iter->next->prev = iter->prev;
487 iter->next = ty->cast;
488 iter->prev = 0;
489 if (ty->cast) ty->cast->prev = iter;
490 ty->cast = iter;
491 return iter;
492 }
493 iter = iter->next;
494 }
495 }
496 return 0;
497}
498
499/*
500 Cast a pointer up an inheritance hierarchy
501*/
503SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
504 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
505}
506
507/*
508 Dynamic pointer casting. Down an inheritance hierarchy
509*/
512 swig_type_info *lastty = ty;
513 if (!ty || !ty->dcast) return ty;
514 while (ty && (ty->dcast)) {
515 ty = (*ty->dcast)(ptr);
516 if (ty) lastty = ty;
517 }
518 return lastty;
519}
520
521/*
522 Return the name associated with this type
523*/
524SWIGRUNTIMEINLINE const char *
526 return ty->name;
527}
528
529/*
530 Return the pretty name associated with this type,
531 that is an unmangled type name in a form presentable to the user.
532*/
533SWIGRUNTIME const char *
535 /* The "str" field contains the equivalent pretty names of the
536 type, separated by vertical-bar characters. Choose the last
537 name. It should be the most specific; a fully resolved name
538 but not necessarily with default template parameters expanded. */
539 if (!type) return NULL;
540 if (type->str != NULL) {
541 const char *last_name = type->str;
542 const char *s;
543 for (s = type->str; *s; s++)
544 if (*s == '|') last_name = s+1;
545 return last_name;
546 }
547 else
548 return type->name;
549}
550
551/*
552 Set the clientdata field for a type
553*/
554SWIGRUNTIME void
556 swig_cast_info *cast = ti->cast;
557 /* if (ti->clientdata == clientdata) return; */
559
560 while (cast) {
561 if (!cast->converter) {
562 swig_type_info *tc = cast->type;
563 if (!tc->clientdata) {
565 }
566 }
567 cast = cast->next;
568 }
569}
570SWIGRUNTIME void
575
576/*
577 Search for a swig_type_info structure only by mangled name
578 Search is a O(log #types)
579
580 We start searching at module start, and finish searching when start == end.
581 Note: if start == end at the beginning of the function, we go all the way around
582 the circular list.
583*/
586 swig_module_info *end,
587 const char *name) {
588 swig_module_info *iter = start;
589 do {
590 if (iter->size) {
591 size_t l = 0;
592 size_t r = iter->size - 1;
593 do {
594 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
595 size_t i = (l + r) >> 1;
596 const char *iname = iter->types[i]->name;
597 if (iname) {
598 int compare = strcmp(name, iname);
599 if (compare == 0) {
600 return iter->types[i];
601 } else if (compare < 0) {
602 if (i) {
603 r = i - 1;
604 } else {
605 break;
606 }
607 } else if (compare > 0) {
608 l = i + 1;
609 }
610 } else {
611 break; /* should never happen */
612 }
613 } while (l <= r);
614 }
615 iter = iter->next;
616 } while (iter != end);
617 return 0;
618}
619
620/*
621 Search for a swig_type_info structure for either a mangled name or a human readable name.
622 It first searches the mangled names of the types, which is a O(log #types)
623 If a type is not found it then searches the human readable names, which is O(#types).
624
625 We start searching at module start, and finish searching when start == end.
626 Note: if start == end at the beginning of the function, we go all the way around
627 the circular list.
628*/
631 swig_module_info *end,
632 const char *name) {
633 /* STEP 1: Search the name field using binary search */
634 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
635 if (ret) {
636 return ret;
637 } else {
638 /* STEP 2: If the type hasn't been found, do a complete search
639 of the str field (the human readable name) */
640 swig_module_info *iter = start;
641 do {
642 size_t i = 0;
643 for (; i < iter->size; ++i) {
644 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
645 return iter->types[i];
646 }
647 iter = iter->next;
648 } while (iter != end);
649 }
650
651 /* neither found a match */
652 return 0;
653}
654
655/*
656 Pack binary data into a string
657*/
658SWIGRUNTIME char *
659SWIG_PackData(char *c, void *ptr, size_t sz) {
660 static const char hex[17] = "0123456789abcdef";
661 const unsigned char *u = (unsigned char *) ptr;
662 const unsigned char *eu = u + sz;
663 for (; u != eu; ++u) {
664 unsigned char uu = *u;
665 *(c++) = hex[(uu & 0xf0) >> 4];
666 *(c++) = hex[uu & 0xf];
667 }
668 return c;
669}
670
671/*
672 Unpack binary data from a string
673*/
674SWIGRUNTIME const char *
675SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
676 unsigned char *u = (unsigned char *) ptr;
677 const unsigned char *eu = u + sz;
678 for (; u != eu; ++u) {
679 char d = *(c++);
680 unsigned char uu;
681 if ((d >= '0') && (d <= '9'))
682 uu = (unsigned char)((d - '0') << 4);
683 else if ((d >= 'a') && (d <= 'f'))
684 uu = (unsigned char)((d - ('a'-10)) << 4);
685 else
686 return (char *) 0;
687 d = *(c++);
688 if ((d >= '0') && (d <= '9'))
689 uu |= (unsigned char)(d - '0');
690 else if ((d >= 'a') && (d <= 'f'))
691 uu |= (unsigned char)(d - ('a'-10));
692 else
693 return (char *) 0;
694 *u = uu;
695 }
696 return c;
697}
698
699/*
700 Pack 'void *' into a string buffer.
701*/
702SWIGRUNTIME char *
703SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
704 char *r = buff;
705 if ((2*sizeof(void *) + 2) > bsz) return 0;
706 *(r++) = '_';
707 r = SWIG_PackData(r,&ptr,sizeof(void *));
708 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
709 strcpy(r,name);
710 return buff;
711}
712
713SWIGRUNTIME const char *
714SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
715 if (*c != '_') {
716 if (strcmp(c,"NULL") == 0) {
717 *ptr = (void *) 0;
718 return name;
719 } else {
720 return 0;
721 }
722 }
723 return SWIG_UnpackData(++c,ptr,sizeof(void *));
724}
725
726SWIGRUNTIME char *
727SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
728 char *r = buff;
729 size_t lname = (name ? strlen(name) : 0);
730 if ((2*sz + 2 + lname) > bsz) return 0;
731 *(r++) = '_';
732 r = SWIG_PackData(r,ptr,sz);
733 if (lname) {
734 strncpy(r,name,lname+1);
735 } else {
736 *r = 0;
737 }
738 return buff;
739}
740
741SWIGRUNTIME const char *
742SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
743 if (*c != '_') {
744 if (strcmp(c,"NULL") == 0) {
745 memset(ptr,0,sz);
746 return name;
747 } else {
748 return 0;
749 }
750 }
751 return SWIG_UnpackData(++c,ptr,sz);
752}
753
754#ifdef __cplusplus
755}
756#endif
757/* Compatibility macros for Python 3 */
758#if PY_VERSION_HEX >= 0x03000000
759
760#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
761#define PyInt_Check(x) PyLong_Check(x)
762#define PyInt_AsLong(x) PyLong_AsLong(x)
763#define PyInt_FromLong(x) PyLong_FromLong(x)
764#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
765#define PyString_Check(name) PyBytes_Check(name)
766#define PyString_FromString(x) PyUnicode_FromString(x)
767#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
768#define PyString_AsString(str) PyBytes_AsString(str)
769#define PyString_Size(str) PyBytes_Size(str)
770#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
771#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
772#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
773
774#endif
775
776#ifndef Py_TYPE
777# define Py_TYPE(op) ((op)->ob_type)
778#endif
779
780/* SWIG APIs for compatibility of both Python 2 & 3 */
781
782#if PY_VERSION_HEX >= 0x03000000
783# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
784#else
785# define SWIG_Python_str_FromFormat PyString_FromFormat
786#endif
787
788
789/* Wrapper around PyUnicode_AsUTF8AndSize - call Py_XDECREF on the returned pbytes when finished with the returned string */
790SWIGINTERN const char *
791SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes)
792{
793#if PY_VERSION_HEX >= 0x03030000
794# if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
795 *pbytes = NULL;
796 return PyUnicode_AsUTF8AndSize(str, psize);
797# else
798 *pbytes = PyUnicode_AsUTF8String(str);
799 const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL;
800 if (chars && psize)
801 *psize = PyBytes_Size(*pbytes);
802 return chars;
803# endif
804#else
805 char *chars = NULL;
806 *pbytes = NULL;
807 PyString_AsStringAndSize(str, &chars, psize);
808 return chars;
809#endif
810}
811
812SWIGINTERN PyObject*
814{
815#if PY_VERSION_HEX >= 0x03000000
816 return PyUnicode_FromString(c);
817#else
818 return PyString_FromString(c);
819#endif
820}
821
822#ifndef PyObject_DEL
823# define PyObject_DEL PyObject_Del
824#endif
825
826/* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */
827# define SWIGPY_USE_CAPSULE
828#ifdef SWIGPYTHON_BUILTIN
829# define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule_builtin" SWIG_TYPE_TABLE_NAME
830#else
831# define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule" SWIG_TYPE_TABLE_NAME
832#endif
833# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION "." SWIGPY_CAPSULE_ATTR_NAME)
834
835#if PY_VERSION_HEX < 0x03020000
836#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
837#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
838#define Py_hash_t long
839#endif
840
841#ifdef Py_LIMITED_API
842# define PyTuple_GET_ITEM PyTuple_GetItem
843/* Note that PyTuple_SetItem() has different semantics from PyTuple_SET_ITEM as it decref's the original tuple item, so in general they cannot be used
844 interchangeably. However in SWIG-generated code PyTuple_SET_ITEM is only used with newly initialized tuples without any items and for them this does work. */
845# define PyTuple_SET_ITEM PyTuple_SetItem
846# define PyTuple_GET_SIZE PyTuple_Size
847# define PyCFunction_GET_FLAGS PyCFunction_GetFlags
848# define PyCFunction_GET_FUNCTION PyCFunction_GetFunction
849# define PyCFunction_GET_SELF PyCFunction_GetSelf
850# define PyList_GET_ITEM PyList_GetItem
851# define PyList_SET_ITEM PyList_SetItem
852# define PySliceObject PyObject
853#endif
854/* -----------------------------------------------------------------------------
855 * error manipulation
856 * ----------------------------------------------------------------------------- */
857
858SWIGRUNTIME PyObject*
860 PyObject* type = 0;
861 switch(code) {
862 case SWIG_MemoryError:
863 type = PyExc_MemoryError;
864 break;
865 case SWIG_IOError:
866 type = PyExc_IOError;
867 break;
869 type = PyExc_RuntimeError;
870 break;
871 case SWIG_IndexError:
872 type = PyExc_IndexError;
873 break;
874 case SWIG_TypeError:
875 type = PyExc_TypeError;
876 break;
878 type = PyExc_ZeroDivisionError;
879 break;
881 type = PyExc_OverflowError;
882 break;
883 case SWIG_SyntaxError:
884 type = PyExc_SyntaxError;
885 break;
886 case SWIG_ValueError:
887 type = PyExc_ValueError;
888 break;
889 case SWIG_SystemError:
890 type = PyExc_SystemError;
891 break;
893 type = PyExc_AttributeError;
894 break;
895 default:
896 type = PyExc_RuntimeError;
897 }
898 return type;
899}
900
901
902SWIGRUNTIME void
903SWIG_Python_AddErrorMsg(const char* mesg)
904{
905 PyObject *type = 0;
906 PyObject *value = 0;
907 PyObject *traceback = 0;
908
909 if (PyErr_Occurred())
910 PyErr_Fetch(&type, &value, &traceback);
911 if (value) {
912 PyObject *old_str = PyObject_Str(value);
913 PyObject *bytes = NULL;
914 const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes);
915 PyErr_Clear();
916 Py_XINCREF(type);
917 if (tmp)
918 PyErr_Format(type, "%s %s", tmp, mesg);
919 else
920 PyErr_Format(type, "%s", mesg);
921 Py_XDECREF(bytes);
922 Py_DECREF(old_str);
923 Py_DECREF(value);
924 } else {
925 PyErr_SetString(PyExc_RuntimeError, mesg);
926 }
927}
928
929SWIGRUNTIME int
931{
932 PyObject *error;
933 if (obj)
934 return 0;
935 error = PyErr_Occurred();
936 return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
937}
938
939SWIGRUNTIME void
941{
943 /* Use existing TypeError to preserve stacktrace and enhance with given message */
944 PyObject *newvalue;
945 PyObject *type = NULL, *value = NULL, *traceback = NULL;
946 PyErr_Fetch(&type, &value, &traceback);
947#if PY_VERSION_HEX >= 0x03000000
948 newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
949#else
950 newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
951#endif
952 if (newvalue) {
953 Py_XDECREF(value);
954 PyErr_Restore(type, newvalue, traceback);
955 } else {
956 PyErr_Restore(type, value, traceback);
957 }
958 } else {
959 /* Raise TypeError using given message */
960 PyErr_SetString(PyExc_TypeError, message);
961 }
962}
963#if defined(SWIG_PYTHON_NO_THREADS)
964# if defined(SWIG_PYTHON_THREADS)
965# undef SWIG_PYTHON_THREADS
966# endif
967#endif
968#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
969# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
970# define SWIG_PYTHON_USE_GIL
971# endif
972# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
973# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
974# if PY_VERSION_HEX < 0x03070000
975# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
976# else
977# define SWIG_PYTHON_INITIALIZE_THREADS
978# endif
979# endif
980# ifdef __cplusplus /* C++ code */
981 class SWIG_Python_Thread_Block {
982 bool status;
983 PyGILState_STATE state;
984 public:
985 void end() { if (status) { PyGILState_Release(state); status = false;} }
986 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
987 ~SWIG_Python_Thread_Block() { end(); }
988 };
989 class SWIG_Python_Thread_Allow {
990 bool status;
991 PyThreadState *save;
992 public:
993 void end() { if (status) { status = false; PyEval_RestoreThread(save); }}
994 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
995 ~SWIG_Python_Thread_Allow() { end(); }
996 };
997# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
998# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
999# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1000# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1001# else /* C code */
1002# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1003# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1004# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1005# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1006# endif
1007# else /* Old thread way, not implemented, user must provide it */
1008# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1009# define SWIG_PYTHON_INITIALIZE_THREADS
1010# endif
1011# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1012# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1013# endif
1014# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1015# define SWIG_PYTHON_THREAD_END_BLOCK
1016# endif
1017# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1018# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1019# endif
1020# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1021# define SWIG_PYTHON_THREAD_END_ALLOW
1022# endif
1023# endif
1024#else /* No thread support */
1025# define SWIG_PYTHON_INITIALIZE_THREADS
1026# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1027# define SWIG_PYTHON_THREAD_END_BLOCK
1028# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1029# define SWIG_PYTHON_THREAD_END_ALLOW
1030#endif
1031/* -----------------------------------------------------------------------------
1032 * Python API portion that goes into the runtime
1033 * ----------------------------------------------------------------------------- */
1034
1035#ifdef __cplusplus
1036extern "C" {
1037#endif
1038
1039/* -----------------------------------------------------------------------------
1040 * Constant declarations
1041 * ----------------------------------------------------------------------------- */
1042
1043/* Constant Types */
1044#define SWIG_PY_POINTER 4
1045#define SWIG_PY_BINARY 5
1046
1047/* Constant information structure */
1056
1057#ifdef __cplusplus
1058}
1059#endif
1060
1061/* -----------------------------------------------------------------------------
1062 * pyrun.swg
1063 *
1064 * This file contains the runtime support for Python modules
1065 * and includes code for managing global variables and pointer
1066 * type checking.
1067 *
1068 * ----------------------------------------------------------------------------- */
1069
1070#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
1071# error "This version of SWIG only supports Python >= 2.7"
1072#endif
1073
1074#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03030000
1075# error "This version of SWIG only supports Python 3 >= 3.3"
1076#endif
1077
1078/* Common SWIG API */
1079
1080/* for raw pointers */
1081#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1082#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1083#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1084
1085#ifdef SWIGPYTHON_BUILTIN
1086#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1087#else
1088#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1089#endif
1090
1091#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1092
1093#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1094#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1095#define swig_owntype int
1096
1097/* for raw packed data */
1098#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1099#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1100
1101/* for class or struct pointers */
1102#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1103#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1104
1105/* for C or C++ function pointers */
1106#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1107#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1108
1109/* for C++ member pointers, ie, member methods */
1110#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1111#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1112
1113
1114/* Runtime API */
1115
1116#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1117#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1118#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1119
1120#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1121#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1122#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1123#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1124#define SWIG_fail goto fail
1125
1126
1127/* Runtime API implementation */
1128
1129/* Error manipulation */
1130
1131SWIGINTERN void
1132SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1134 PyErr_SetObject(errtype, obj);
1135 Py_DECREF(obj);
1137}
1138
1139SWIGINTERN void
1140SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1142 PyErr_SetString(errtype, msg);
1144}
1145
1146#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1147
1148/* Set a constant value */
1149
1150#if defined(SWIGPYTHON_BUILTIN)
1151
1152SWIGINTERN void
1153SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1154 PyObject *s = PyString_InternFromString(key);
1155 PyList_Append(seq, s);
1156 Py_DECREF(s);
1157}
1158
1159SWIGINTERN void
1160SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1161 PyDict_SetItemString(d, name, obj);
1162 Py_DECREF(obj);
1163 if (public_interface)
1164 SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1165}
1166
1167#else
1168
1169SWIGINTERN void
1170SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1171 PyDict_SetItemString(d, name, obj);
1172 Py_DECREF(obj);
1173}
1174
1175#endif
1176
1177/* Append a value to the result obj */
1178
1179SWIGINTERN PyObject*
1180SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1181 if (!result) {
1182 result = obj;
1183 } else if (result == Py_None) {
1184 Py_DECREF(result);
1185 result = obj;
1186 } else {
1187 if (!PyList_Check(result)) {
1188 PyObject *o2 = result;
1189 result = PyList_New(1);
1190 if (result) {
1191 PyList_SET_ITEM(result, 0, o2);
1192 } else {
1193 Py_DECREF(obj);
1194 return o2;
1195 }
1196 }
1197 PyList_Append(result,obj);
1198 Py_DECREF(obj);
1199 }
1200 return result;
1201}
1202
1203/* Unpack the argument tuple */
1204
1205SWIGINTERN Py_ssize_t
1206SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1207{
1208 if (!args) {
1209 if (!min && !max) {
1210 return 1;
1211 } else {
1212 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1213 name, (min == max ? "" : "at least "), (int)min);
1214 return 0;
1215 }
1216 }
1217 if (!PyTuple_Check(args)) {
1218 if (min <= 1 && max >= 1) {
1219 Py_ssize_t i;
1220 objs[0] = args;
1221 for (i = 1; i < max; ++i) {
1222 objs[i] = 0;
1223 }
1224 return 2;
1225 }
1226 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1227 return 0;
1228 } else {
1229 Py_ssize_t l = PyTuple_GET_SIZE(args);
1230 if (l < min) {
1231 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1232 name, (min == max ? "" : "at least "), (int)min, (int)l);
1233 return 0;
1234 } else if (l > max) {
1235 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1236 name, (min == max ? "" : "at most "), (int)max, (int)l);
1237 return 0;
1238 } else {
1239 Py_ssize_t i;
1240 for (i = 0; i < l; ++i) {
1241 objs[i] = PyTuple_GET_ITEM(args, i);
1242 }
1243 for (; l < max; ++l) {
1244 objs[l] = 0;
1245 }
1246 return i + 1;
1247 }
1248 }
1249}
1250
1251SWIGINTERN int
1252SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
1253 int no_kwargs = 1;
1254 if (kwargs) {
1255 assert(PyDict_Check(kwargs));
1256 if (PyDict_Size(kwargs) > 0) {
1257 PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
1258 no_kwargs = 0;
1259 }
1260 }
1261 return no_kwargs;
1262}
1263
1264/* A functor is a function object with one single object argument */
1265#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1266
1267/*
1268 Helper for static pointer initialization for both C and C++ code, for example
1269 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1270*/
1271#ifdef __cplusplus
1272#define SWIG_STATIC_POINTER(var) var
1273#else
1274#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1275#endif
1276
1277#ifdef __cplusplus
1278extern "C" {
1279#endif
1280
1281/* Python-specific SWIG API */
1282#define SWIG_newvarlink() SWIG_Python_newvarlink()
1283#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
1284#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
1285
1286/* -----------------------------------------------------------------------------
1287 * global variable support code.
1288 * ----------------------------------------------------------------------------- */
1289
1290typedef struct swig_globalvar {
1291 char *name; /* Name of global variable */
1292 PyObject *(*get_attr)(void); /* Return the current value */
1293 int (*set_attr)(PyObject *); /* Set the value */
1296
1301
1302SWIGINTERN PyObject *
1304#if PY_VERSION_HEX >= 0x03000000
1305 return PyUnicode_InternFromString("<Swig global variables>");
1306#else
1307 return PyString_FromString("<Swig global variables>");
1308#endif
1309}
1310
1311SWIGINTERN PyObject *
1312swig_varlink_str(PyObject *o) {
1314#if PY_VERSION_HEX >= 0x03000000
1315 PyObject *str = PyUnicode_InternFromString("(");
1316 PyObject *tail;
1317 PyObject *joined;
1318 swig_globalvar *var;
1319 for (var = v->vars; var; var=var->next) {
1320 tail = PyUnicode_FromString(var->name);
1321 joined = PyUnicode_Concat(str, tail);
1322 Py_DecRef(str);
1323 Py_DecRef(tail);
1324 str = joined;
1325 if (var->next) {
1326 tail = PyUnicode_InternFromString(", ");
1327 joined = PyUnicode_Concat(str, tail);
1328 Py_DecRef(str);
1329 Py_DecRef(tail);
1330 str = joined;
1331 }
1332 }
1333 tail = PyUnicode_InternFromString(")");
1334 joined = PyUnicode_Concat(str, tail);
1335 Py_DecRef(str);
1336 Py_DecRef(tail);
1337 str = joined;
1338#else
1339 PyObject *str = PyString_FromString("(");
1340 swig_globalvar *var;
1341 for (var = v->vars; var; var=var->next) {
1342 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
1343 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
1344 }
1345 PyString_ConcatAndDel(&str,PyString_FromString(")"));
1346#endif
1347 return str;
1348}
1349
1350SWIGINTERN void
1353 swig_globalvar *var = v->vars;
1354 while (var) {
1355 swig_globalvar *n = var->next;
1356 free(var->name);
1357 free(var);
1358 var = n;
1359 }
1360}
1361
1362SWIGINTERN PyObject *
1363swig_varlink_getattr(PyObject *o, char *n) {
1365 PyObject *res = NULL;
1366 swig_globalvar *var = v->vars;
1367 while (var) {
1368 if (strcmp(var->name,n) == 0) {
1369 res = (*var->get_attr)();
1370 break;
1371 }
1372 var = var->next;
1373 }
1374 if (res == NULL && !PyErr_Occurred()) {
1375 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
1376 }
1377 return res;
1378}
1379
1380SWIGINTERN int
1381swig_varlink_setattr(PyObject *o, char *n, PyObject *p) {
1383 int res = 1;
1384 swig_globalvar *var = v->vars;
1385 while (var) {
1386 if (strcmp(var->name,n) == 0) {
1387 res = (*var->set_attr)(p);
1388 break;
1389 }
1390 var = var->next;
1391 }
1392 if (res == 1 && !PyErr_Occurred()) {
1393 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
1394 }
1395 return res;
1396}
1397
1398SWIGINTERN PyTypeObject*
1400 static char varlink__doc__[] = "Swig var link object";
1401#ifndef Py_LIMITED_API
1402 static PyTypeObject varlink_type;
1403 static int type_init = 0;
1404 if (!type_init) {
1405 const PyTypeObject tmp = {
1406#if PY_VERSION_HEX >= 0x03000000
1407 PyVarObject_HEAD_INIT(NULL, 0)
1408#else
1409 PyObject_HEAD_INIT(NULL)
1410 0, /* ob_size */
1411#endif
1412 "swigvarlink", /* tp_name */
1413 sizeof(swig_varlinkobject), /* tp_basicsize */
1414 0, /* tp_itemsize */
1415 (destructor) swig_varlink_dealloc, /* tp_dealloc */
1416#if PY_VERSION_HEX < 0x030800b4
1417 (printfunc)0, /*tp_print*/
1418#else
1419 (Py_ssize_t)0, /*tp_vectorcall_offset*/
1420#endif
1421 (getattrfunc) swig_varlink_getattr, /* tp_getattr */
1422 (setattrfunc) swig_varlink_setattr, /* tp_setattr */
1423 0, /* tp_compare */
1424 (reprfunc) swig_varlink_repr, /* tp_repr */
1425 0, /* tp_as_number */
1426 0, /* tp_as_sequence */
1427 0, /* tp_as_mapping */
1428 0, /* tp_hash */
1429 0, /* tp_call */
1430 (reprfunc) swig_varlink_str, /* tp_str */
1431 0, /* tp_getattro */
1432 0, /* tp_setattro */
1433 0, /* tp_as_buffer */
1434 0, /* tp_flags */
1435 varlink__doc__, /* tp_doc */
1436 0, /* tp_traverse */
1437 0, /* tp_clear */
1438 0, /* tp_richcompare */
1439 0, /* tp_weaklistoffset */
1440 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
1441 0, /* tp_del */
1442 0, /* tp_version_tag */
1443#if PY_VERSION_HEX >= 0x03040000
1444 0, /* tp_finalize */
1445#endif
1446#if PY_VERSION_HEX >= 0x03080000
1447 0, /* tp_vectorcall */
1448#endif
1449#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1450 0, /* tp_print */
1451#endif
1452#if PY_VERSION_HEX >= 0x030C0000
1453 0, /* tp_watched */
1454#endif
1455#ifdef COUNT_ALLOCS
1456 0, /* tp_allocs */
1457 0, /* tp_frees */
1458 0, /* tp_maxalloc */
1459 0, /* tp_prev */
1460 0 /* tp_next */
1461#endif
1462 };
1463 varlink_type = tmp;
1464 type_init = 1;
1465 if (PyType_Ready(&varlink_type) < 0)
1466 return NULL;
1467 }
1468 return &varlink_type;
1469#else
1470 PyType_Slot slots[] = {
1471 { Py_tp_dealloc, (void *)swig_varlink_dealloc },
1472 { Py_tp_repr, (void *)swig_varlink_repr },
1473 { Py_tp_getattr, (void *)swig_varlink_getattr },
1474 { Py_tp_setattr, (void *)swig_varlink_setattr },
1475 { Py_tp_str, (void *)swig_varlink_str },
1476 { Py_tp_doc, (void *)varlink__doc__ },
1477 { 0, NULL }
1478 };
1479 PyType_Spec spec = {
1480 "swigvarlink",
1481 sizeof(swig_varlinkobject),
1482 0,
1483 Py_TPFLAGS_DEFAULT,
1484 slots
1485 };
1486 return (PyTypeObject *)PyType_FromSpec(&spec);
1487#endif
1488}
1489
1490/* Create a variable linking object for use later */
1491SWIGINTERN PyObject *
1493 swig_varlinkobject *result = PyObject_New(swig_varlinkobject, swig_varlink_type());
1494 if (result) {
1495 result->vars = 0;
1496 }
1497 return ((PyObject*) result);
1498}
1499
1500SWIGINTERN void
1501SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
1503 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
1504 if (gv) {
1505 size_t size = strlen(name)+1;
1506 gv->name = (char *)malloc(size);
1507 if (gv->name) {
1508 memcpy(gv->name, name, size);
1509 gv->get_attr = get_attr;
1510 gv->set_attr = set_attr;
1511 gv->next = v->vars;
1512 }
1513 }
1514 v->vars = gv;
1515}
1516
1517
1518static PyObject *Swig_Globals_global = NULL;
1519
1520SWIGINTERN PyObject *
1522 if (Swig_Globals_global == NULL) {
1524 }
1525 return Swig_Globals_global;
1526}
1527
1528#ifdef __cplusplus
1529}
1530#endif
1531
1532/* -----------------------------------------------------------------------------
1533 * Pointer declarations
1534 * ----------------------------------------------------------------------------- */
1535
1536/* Flags for new pointer objects */
1537#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1538#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1539
1540#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1541
1542#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1543#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1544
1545#ifdef __cplusplus
1546extern "C" {
1547#endif
1548
1549/* The python void return value */
1550
1551SWIGRUNTIMEINLINE PyObject *
1553{
1554 PyObject *none = Py_None;
1555 Py_INCREF(none);
1556 return none;
1557}
1558
1559/* SwigPyClientData */
1560
1561typedef struct {
1562 PyObject *klass;
1563 PyObject *newraw;
1564 PyObject *newargs;
1565 PyObject *destroy;
1568 PyTypeObject *pytype;
1570
1573{
1575 int fail = data ? data->implicitconv : 0;
1576 if (fail)
1577 PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
1578 return fail;
1579}
1580
1581SWIGRUNTIMEINLINE PyObject *
1583 SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1584 PyObject *klass = data ? data->klass : 0;
1585 return (klass ? klass : PyExc_RuntimeError);
1586}
1587
1588
1591{
1592 if (!obj) {
1593 return 0;
1594 } else {
1595 SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1596 /* the klass element */
1597 data->klass = obj;
1598 Py_INCREF(data->klass);
1599 /* the newraw method and newargs arguments used to create a new raw instance */
1600 if (PyClass_Check(obj)) {
1601 data->newraw = 0;
1602 Py_INCREF(obj);
1603 data->newargs = obj;
1604 } else {
1605 data->newraw = PyObject_GetAttrString(data->klass, "__new__");
1606 if (data->newraw) {
1607 data->newargs = PyTuple_New(1);
1608 if (data->newargs) {
1609 Py_INCREF(obj);
1610 PyTuple_SET_ITEM(data->newargs, 0, obj);
1611 } else {
1612 Py_DECREF(data->newraw);
1613 Py_DECREF(data->klass);
1614 free(data);
1615 return 0;
1616 }
1617 } else {
1618 Py_INCREF(obj);
1619 data->newargs = obj;
1620 }
1621 }
1622 /* the destroy method, aka as the C++ delete method */
1623 data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1624 if (PyErr_Occurred()) {
1625 PyErr_Clear();
1626 data->destroy = 0;
1627 }
1628 if (data->destroy) {
1629 data->delargs = !(PyCFunction_GET_FLAGS(data->destroy) & METH_O);
1630 } else {
1631 data->delargs = 0;
1632 }
1633 data->implicitconv = 0;
1634 data->pytype = 0;
1635 return data;
1636 }
1637}
1638
1639SWIGRUNTIME void
1641{
1642 Py_XDECREF(data->klass);
1643 Py_XDECREF(data->newraw);
1644 Py_XDECREF(data->newargs);
1645 Py_XDECREF(data->destroy);
1646 free(data);
1647}
1648
1649/* =============== SwigPyObject =====================*/
1650
1651typedef struct {
1652 PyObject_HEAD
1653 void *ptr;
1655 int own;
1656 PyObject *next;
1657#ifdef SWIGPYTHON_BUILTIN
1658 PyObject *dict;
1659#endif
1660} SwigPyObject;
1661
1662
1663#ifdef SWIGPYTHON_BUILTIN
1664
1665SWIGRUNTIME PyObject *
1666SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1667{
1668 SwigPyObject *sobj = (SwigPyObject *)v;
1669
1670 if (!sobj->dict)
1671 sobj->dict = PyDict_New();
1672
1673 Py_XINCREF(sobj->dict);
1674 return sobj->dict;
1675}
1676
1677#endif
1678
1679SWIGRUNTIME PyObject *
1681{
1682 return PyLong_FromVoidPtr(v->ptr);
1683}
1684
1685SWIGRUNTIME PyObject *
1687{
1688 PyObject *res = NULL;
1689 PyObject *args = PyTuple_New(1);
1690 if (args) {
1691 PyObject *val = SwigPyObject_long(v);
1692 if (val) {
1693 PyObject *ofmt;
1694 PyTuple_SET_ITEM(args, 0, val);
1695 ofmt = SWIG_Python_str_FromChar(fmt);
1696 if (ofmt) {
1697#if PY_VERSION_HEX >= 0x03000000
1698 res = PyUnicode_Format(ofmt,args);
1699#else
1700 res = PyString_Format(ofmt,args);
1701#endif
1702 Py_DECREF(ofmt);
1703 }
1704 }
1705 Py_DECREF(args);
1706 }
1707 return res;
1708}
1709
1710SWIGRUNTIME PyObject *
1712{
1713 return SwigPyObject_format("%o",v);
1714}
1715
1716SWIGRUNTIME PyObject *
1718{
1719 return SwigPyObject_format("%x",v);
1720}
1721
1722SWIGRUNTIME PyObject *
1724{
1725 const char *name = SWIG_TypePrettyName(v->ty);
1726 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1727 if (repr && v->next) {
1728 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1729 if (nrep) {
1730# if PY_VERSION_HEX >= 0x03000000
1731 PyObject *joined = PyUnicode_Concat(repr, nrep);
1732 Py_DecRef(repr);
1733 Py_DecRef(nrep);
1734 repr = joined;
1735# else
1736 PyString_ConcatAndDel(&repr,nrep);
1737# endif
1738 } else {
1739 Py_DecRef(repr);
1740 repr = NULL;
1741 }
1742 }
1743 return repr;
1744}
1745
1746/* We need a version taking two PyObject* parameters so it's a valid
1747 * PyCFunction to use in swigobject_methods[]. */
1748SWIGRUNTIME PyObject *
1749SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1750{
1751 return SwigPyObject_repr((SwigPyObject*)v);
1752}
1753
1754SWIGRUNTIME int
1756{
1757 void *i = v->ptr;
1758 void *j = w->ptr;
1759 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1760}
1761
1762/* Added for Python 3.x, would it also be useful for Python 2.x? */
1763SWIGRUNTIME PyObject*
1765{
1766 PyObject* res = NULL;
1767 if (!PyErr_Occurred()) {
1768 if (op != Py_EQ && op != Py_NE) {
1769 Py_INCREF(Py_NotImplemented);
1770 return Py_NotImplemented;
1771 }
1772 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1773 }
1774 return res;
1775}
1776
1777
1778SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1779
1780#ifdef SWIGPYTHON_BUILTIN
1781static swig_type_info *SwigPyObject_stype = 0;
1782SWIGRUNTIME PyTypeObject*
1783SwigPyObject_type(void) {
1784 SwigPyClientData *cd;
1785 assert(SwigPyObject_stype);
1786 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1787 assert(cd);
1788 assert(cd->pytype);
1789 return cd->pytype;
1790}
1791#else
1792SWIGRUNTIME PyTypeObject*
1794 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1795 return type;
1796}
1797#endif
1798
1800SwigPyObject_Check(PyObject *op) {
1801 PyTypeObject *target_tp = SwigPyObject_type();
1802 PyTypeObject *op_type = Py_TYPE(op);
1803#ifdef SWIGPYTHON_BUILTIN
1804 if (PyType_IsSubtype(op_type, target_tp))
1805 return 1;
1806 return (strcmp(op_type->tp_name, "SwigPyObject") == 0);
1807#else
1808 if (op_type == target_tp)
1809 return 1;
1810# ifdef Py_LIMITED_API
1811 int cmp;
1812 PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__");
1813 if (!tp_name)
1814 return 0;
1815 cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject");
1816 Py_DECREF(tp_name);
1817 return cmp == 0;
1818# else
1819 return (strcmp(op_type->tp_name, "SwigPyObject") == 0);
1820# endif
1821#endif
1822}
1823
1824SWIGRUNTIME PyObject *
1825SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1826
1827static PyObject* Swig_Capsule_global = NULL;
1828
1829SWIGRUNTIME void
1831{
1832 SwigPyObject *sobj = (SwigPyObject *) v;
1833 PyObject *next = sobj->next;
1834 if (sobj->own == SWIG_POINTER_OWN) {
1835 swig_type_info *ty = sobj->ty;
1836 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1837 PyObject *destroy = data ? data->destroy : 0;
1838 if (destroy) {
1839 /* destroy is always a VARARGS method */
1840 PyObject *res;
1841
1842 /* PyObject_CallFunction() has the potential to silently drop
1843 the active exception. In cases of unnamed temporary
1844 variable or where we just finished iterating over a generator
1845 StopIteration will be active right now, and this needs to
1846 remain true upon return from SwigPyObject_dealloc. So save
1847 and restore. */
1848
1849 PyObject *type = NULL, *value = NULL, *traceback = NULL;
1850 PyErr_Fetch(&type, &value, &traceback);
1851
1852 if (data->delargs) {
1853 /* we need to create a temporary object to carry the destroy operation */
1854 PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1855 if (tmp) {
1856 res = SWIG_Python_CallFunctor(destroy, tmp);
1857 } else {
1858 res = 0;
1859 }
1860 Py_XDECREF(tmp);
1861 } else {
1862 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1863 PyObject *mself = PyCFunction_GET_SELF(destroy);
1864 res = ((*meth)(mself, v));
1865 }
1866 if (!res)
1867 PyErr_WriteUnraisable(destroy);
1868
1869 PyErr_Restore(type, value, traceback);
1870
1871 Py_XDECREF(res);
1872 }
1873#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1874 else {
1875 const char *name = SWIG_TypePrettyName(ty);
1876 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1877 }
1878#endif
1879 Py_XDECREF(Swig_Capsule_global);
1880 }
1881 Py_XDECREF(next);
1882#ifdef SWIGPYTHON_BUILTIN
1883 Py_XDECREF(sobj->dict);
1884#endif
1885 PyObject_DEL(v);
1886}
1887
1888SWIGRUNTIME PyObject*
1889SwigPyObject_append(PyObject* v, PyObject* next)
1890{
1891 SwigPyObject *sobj = (SwigPyObject *) v;
1892 if (!SwigPyObject_Check(next)) {
1893 PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1894 return NULL;
1895 }
1896 ((SwigPyObject *)next)->next = sobj->next;
1897 sobj->next = next;
1898 Py_INCREF(next);
1899 return SWIG_Py_Void();
1900}
1901
1902SWIGRUNTIME PyObject*
1903SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1904{
1905 SwigPyObject *sobj = (SwigPyObject *) v;
1906 if (sobj->next) {
1907 Py_INCREF(sobj->next);
1908 return sobj->next;
1909 } else {
1910 return SWIG_Py_Void();
1911 }
1912}
1913
1914SWIGINTERN PyObject*
1915SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1916{
1917 SwigPyObject *sobj = (SwigPyObject *)v;
1918 sobj->own = 0;
1919 return SWIG_Py_Void();
1920}
1921
1922SWIGINTERN PyObject*
1923SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1924{
1925 SwigPyObject *sobj = (SwigPyObject *)v;
1926 sobj->own = SWIG_POINTER_OWN;
1927 return SWIG_Py_Void();
1928}
1929
1930SWIGINTERN PyObject*
1931SwigPyObject_own(PyObject *v, PyObject *args)
1932{
1933 PyObject *val = 0;
1934 if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1935 return NULL;
1936 } else {
1937 SwigPyObject *sobj = (SwigPyObject *)v;
1938 PyObject *obj = PyBool_FromLong(sobj->own);
1939 if (val) {
1940 if (PyObject_IsTrue(val)) {
1941 Py_DECREF(SwigPyObject_acquire(v,args));
1942 } else {
1943 Py_DECREF(SwigPyObject_disown(v,args));
1944 }
1945 }
1946 return obj;
1947 }
1948}
1949
1950static PyMethodDef
1952 {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
1953 {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
1954 {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
1955 {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
1956 {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
1957 {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
1958 {0, 0, 0, 0}
1959};
1960
1961SWIGRUNTIME PyTypeObject*
1963 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1964#ifndef Py_LIMITED_API
1965 static PyNumberMethods SwigPyObject_as_number = {
1966 (binaryfunc)0, /*nb_add*/
1967 (binaryfunc)0, /*nb_subtract*/
1968 (binaryfunc)0, /*nb_multiply*/
1969 /* nb_divide removed in Python 3 */
1970#if PY_VERSION_HEX < 0x03000000
1971 (binaryfunc)0, /*nb_divide*/
1972#endif
1973 (binaryfunc)0, /*nb_remainder*/
1974 (binaryfunc)0, /*nb_divmod*/
1975 (ternaryfunc)0,/*nb_power*/
1976 (unaryfunc)0, /*nb_negative*/
1977 (unaryfunc)0, /*nb_positive*/
1978 (unaryfunc)0, /*nb_absolute*/
1979 (inquiry)0, /*nb_nonzero*/
1980 0, /*nb_invert*/
1981 0, /*nb_lshift*/
1982 0, /*nb_rshift*/
1983 0, /*nb_and*/
1984 0, /*nb_xor*/
1985 0, /*nb_or*/
1986#if PY_VERSION_HEX < 0x03000000
1987 0, /*nb_coerce*/
1988#endif
1989 (unaryfunc)SwigPyObject_long, /*nb_int*/
1990#if PY_VERSION_HEX < 0x03000000
1991 (unaryfunc)SwigPyObject_long, /*nb_long*/
1992#else
1993 0, /*nb_reserved*/
1994#endif
1995 (unaryfunc)0, /*nb_float*/
1996#if PY_VERSION_HEX < 0x03000000
1997 (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1998 (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1999#endif
2000#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
2001 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
2002#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
2003 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
2004#else
2005 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
2006#endif
2007 };
2008
2009 static PyTypeObject swigpyobject_type;
2010 static int type_init = 0;
2011 if (!type_init) {
2012 const PyTypeObject tmp = {
2013#if PY_VERSION_HEX >= 0x03000000
2014 PyVarObject_HEAD_INIT(NULL, 0)
2015#else
2016 PyObject_HEAD_INIT(NULL)
2017 0, /* ob_size */
2018#endif
2019 "SwigPyObject", /* tp_name */
2020 sizeof(SwigPyObject), /* tp_basicsize */
2021 0, /* tp_itemsize */
2022 (destructor)SwigPyObject_dealloc, /* tp_dealloc */
2023#if PY_VERSION_HEX < 0x030800b4
2024 (printfunc)0, /*tp_print*/
2025#else
2026 (Py_ssize_t)0, /*tp_vectorcall_offset*/
2027#endif
2028 (getattrfunc)0, /* tp_getattr */
2029 (setattrfunc)0, /* tp_setattr */
2030#if PY_VERSION_HEX >= 0x03000000
2031 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
2032#else
2033 (cmpfunc)SwigPyObject_compare, /* tp_compare */
2034#endif
2035 (reprfunc)SwigPyObject_repr, /* tp_repr */
2036 &SwigPyObject_as_number, /* tp_as_number */
2037 0, /* tp_as_sequence */
2038 0, /* tp_as_mapping */
2039 (hashfunc)0, /* tp_hash */
2040 (ternaryfunc)0, /* tp_call */
2041 0, /* tp_str */
2042 PyObject_GenericGetAttr, /* tp_getattro */
2043 0, /* tp_setattro */
2044 0, /* tp_as_buffer */
2045 Py_TPFLAGS_DEFAULT, /* tp_flags */
2046 swigobject_doc, /* tp_doc */
2047 0, /* tp_traverse */
2048 0, /* tp_clear */
2049 (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
2050 0, /* tp_weaklistoffset */
2051 0, /* tp_iter */
2052 0, /* tp_iternext */
2053 swigobject_methods, /* tp_methods */
2054 0, /* tp_members */
2055 0, /* tp_getset */
2056 0, /* tp_base */
2057 0, /* tp_dict */
2058 0, /* tp_descr_get */
2059 0, /* tp_descr_set */
2060 0, /* tp_dictoffset */
2061 0, /* tp_init */
2062 0, /* tp_alloc */
2063 0, /* tp_new */
2064 0, /* tp_free */
2065 0, /* tp_is_gc */
2066 0, /* tp_bases */
2067 0, /* tp_mro */
2068 0, /* tp_cache */
2069 0, /* tp_subclasses */
2070 0, /* tp_weaklist */
2071 0, /* tp_del */
2072 0, /* tp_version_tag */
2073#if PY_VERSION_HEX >= 0x03040000
2074 0, /* tp_finalize */
2075#endif
2076#if PY_VERSION_HEX >= 0x03080000
2077 0, /* tp_vectorcall */
2078#endif
2079#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
2080 0, /* tp_print */
2081#endif
2082#if PY_VERSION_HEX >= 0x030C0000
2083 0, /* tp_watched */
2084#endif
2085#ifdef COUNT_ALLOCS
2086 0, /* tp_allocs */
2087 0, /* tp_frees */
2088 0, /* tp_maxalloc */
2089 0, /* tp_prev */
2090 0 /* tp_next */
2091#endif
2092 };
2093 swigpyobject_type = tmp;
2094 type_init = 1;
2095 if (PyType_Ready(&swigpyobject_type) != 0)
2096 return NULL;
2097 }
2098 return &swigpyobject_type;
2099#else
2100 PyType_Slot slots[] = {
2101 { Py_tp_dealloc, (void *)SwigPyObject_dealloc },
2102 { Py_tp_repr, (void *)SwigPyObject_repr },
2103 { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
2104 { Py_tp_doc, (void *)swigobject_doc },
2105 { Py_tp_richcompare, (void *)SwigPyObject_richcompare },
2106 { Py_tp_methods, (void *)swigobject_methods },
2107 { Py_nb_int, (void *)SwigPyObject_long },
2108 { 0, NULL }
2109 };
2110 PyType_Spec spec = {
2111 "SwigPyObject",
2112 sizeof(SwigPyObject),
2113 0,
2114 Py_TPFLAGS_DEFAULT,
2115 slots
2116 };
2117 return (PyTypeObject *)PyType_FromSpec(&spec);
2118#endif
2119}
2120
2121SWIGRUNTIME PyObject *
2122SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
2123{
2124 SwigPyObject *sobj = PyObject_New(SwigPyObject, SwigPyObject_type());
2125 if (sobj) {
2126 sobj->ptr = ptr;
2127 sobj->ty = ty;
2128 sobj->own = own;
2129 sobj->next = 0;
2130#ifdef SWIGPYTHON_BUILTIN
2131 sobj->dict = 0;
2132#endif
2133 if (own == SWIG_POINTER_OWN) {
2134 /* Obtain a reference to the Python capsule wrapping the module information, so that the
2135 * module information is correctly destroyed after all SWIG python objects have been freed
2136 * by the GC (and corresponding destructors invoked) */
2137 Py_XINCREF(Swig_Capsule_global);
2138 }
2139 }
2140 return (PyObject *)sobj;
2141}
2142
2143/* -----------------------------------------------------------------------------
2144 * Implements a simple Swig Packed type, and use it instead of string
2145 * ----------------------------------------------------------------------------- */
2146
2147typedef struct {
2148 PyObject_HEAD
2149 void *pack;
2151 size_t size;
2152} SwigPyPacked;
2153
2154SWIGRUNTIME PyObject *
2156{
2157 char result[SWIG_BUFFER_SIZE];
2158 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2159 return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
2160 } else {
2161 return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
2162 }
2163}
2164
2165SWIGRUNTIME PyObject *
2167{
2168 char result[SWIG_BUFFER_SIZE];
2169 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
2170 return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
2171 } else {
2172 return SWIG_Python_str_FromChar(v->ty->name);
2173 }
2174}
2175
2176SWIGRUNTIME int
2178{
2179 size_t i = v->size;
2180 size_t j = w->size;
2181 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2182 return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
2183}
2184
2185SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
2186
2187SWIGRUNTIME PyTypeObject*
2189 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2190 return type;
2191}
2192
2194SwigPyPacked_Check(PyObject *op) {
2195 PyTypeObject* op_type = Py_TYPE(op);
2196 if (op_type == SwigPyPacked_TypeOnce())
2197 return 1;
2198#ifdef Py_LIMITED_API
2199 int cmp;
2200 PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__");
2201 if (!tp_name)
2202 return 0;
2203 cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked");
2204 Py_DECREF(tp_name);
2205 return cmp == 0;
2206#else
2207 return (strcmp(op_type->tp_name, "SwigPyPacked") == 0);
2208#endif
2209}
2210
2211SWIGRUNTIME void
2213{
2214 if (SwigPyPacked_Check(v)) {
2215 SwigPyPacked *sobj = (SwigPyPacked *) v;
2216 free(sobj->pack);
2217 }
2218 PyObject_DEL(v);
2219}
2220
2221SWIGRUNTIME PyTypeObject*
2223 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
2224#ifndef Py_LIMITED_API
2225 static PyTypeObject swigpypacked_type;
2226 static int type_init = 0;
2227 if (!type_init) {
2228 const PyTypeObject tmp = {
2229#if PY_VERSION_HEX>=0x03000000
2230 PyVarObject_HEAD_INIT(NULL, 0)
2231#else
2232 PyObject_HEAD_INIT(NULL)
2233 0, /* ob_size */
2234#endif
2235 "SwigPyPacked", /* tp_name */
2236 sizeof(SwigPyPacked), /* tp_basicsize */
2237 0, /* tp_itemsize */
2238 (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
2239#if PY_VERSION_HEX < 0x030800b4
2240 (printfunc)0, /*tp_print*/
2241#else
2242 (Py_ssize_t)0, /*tp_vectorcall_offset*/
2243#endif
2244 (getattrfunc)0, /* tp_getattr */
2245 (setattrfunc)0, /* tp_setattr */
2246#if PY_VERSION_HEX>=0x03000000
2247 0, /* tp_reserved in 3.0.1 */
2248#else
2249 (cmpfunc)SwigPyPacked_compare, /* tp_compare */
2250#endif
2251 (reprfunc)SwigPyPacked_repr, /* tp_repr */
2252 0, /* tp_as_number */
2253 0, /* tp_as_sequence */
2254 0, /* tp_as_mapping */
2255 (hashfunc)0, /* tp_hash */
2256 (ternaryfunc)0, /* tp_call */
2257 (reprfunc)SwigPyPacked_str, /* tp_str */
2258 PyObject_GenericGetAttr, /* tp_getattro */
2259 0, /* tp_setattro */
2260 0, /* tp_as_buffer */
2261 Py_TPFLAGS_DEFAULT, /* tp_flags */
2262 swigpacked_doc, /* tp_doc */
2263 0, /* tp_traverse */
2264 0, /* tp_clear */
2265 0, /* tp_richcompare */
2266 0, /* tp_weaklistoffset */
2267 0, /* tp_iter */
2268 0, /* tp_iternext */
2269 0, /* tp_methods */
2270 0, /* tp_members */
2271 0, /* tp_getset */
2272 0, /* tp_base */
2273 0, /* tp_dict */
2274 0, /* tp_descr_get */
2275 0, /* tp_descr_set */
2276 0, /* tp_dictoffset */
2277 0, /* tp_init */
2278 0, /* tp_alloc */
2279 0, /* tp_new */
2280 0, /* tp_free */
2281 0, /* tp_is_gc */
2282 0, /* tp_bases */
2283 0, /* tp_mro */
2284 0, /* tp_cache */
2285 0, /* tp_subclasses */
2286 0, /* tp_weaklist */
2287 0, /* tp_del */
2288 0, /* tp_version_tag */
2289#if PY_VERSION_HEX >= 0x03040000
2290 0, /* tp_finalize */
2291#endif
2292#if PY_VERSION_HEX >= 0x03080000
2293 0, /* tp_vectorcall */
2294#endif
2295#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
2296 0, /* tp_print */
2297#endif
2298#if PY_VERSION_HEX >= 0x030C0000
2299 0, /* tp_watched */
2300#endif
2301#ifdef COUNT_ALLOCS
2302 0, /* tp_allocs */
2303 0, /* tp_frees */
2304 0, /* tp_maxalloc */
2305 0, /* tp_prev */
2306 0 /* tp_next */
2307#endif
2308 };
2309 swigpypacked_type = tmp;
2310 type_init = 1;
2311 if (PyType_Ready(&swigpypacked_type) != 0)
2312 return NULL;
2313 }
2314 return &swigpypacked_type;
2315#else
2316 PyType_Slot slots[] = {
2317 { Py_tp_dealloc, (void *)SwigPyPacked_dealloc },
2318 { Py_tp_repr, (void *)SwigPyPacked_repr },
2319 { Py_tp_str, (void *)SwigPyPacked_str },
2320 { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
2321 { Py_tp_doc, (void *)swigpacked_doc },
2322 { 0, NULL }
2323 };
2324 PyType_Spec spec = {
2325 "SwigPyPacked",
2326 sizeof(SwigPyPacked),
2327 0,
2328 Py_TPFLAGS_DEFAULT,
2329 slots
2330 };
2331 return (PyTypeObject *)PyType_FromSpec(&spec);
2332#endif
2333}
2334
2335SWIGRUNTIME PyObject *
2336SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2337{
2338 SwigPyPacked *sobj = PyObject_New(SwigPyPacked, SwigPyPacked_type());
2339 if (sobj) {
2340 void *pack = malloc(size);
2341 if (pack) {
2342 memcpy(pack, ptr, size);
2343 sobj->pack = pack;
2344 sobj->ty = ty;
2345 sobj->size = size;
2346 } else {
2347 PyObject_DEL((PyObject *) sobj);
2348 sobj = 0;
2349 }
2350 }
2351 return (PyObject *) sobj;
2352}
2353
2355SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2356{
2357 if (SwigPyPacked_Check(obj)) {
2358 SwigPyPacked *sobj = (SwigPyPacked *)obj;
2359 if (sobj->size != size) return 0;
2360 memcpy(ptr, sobj->pack, size);
2361 return sobj->ty;
2362 } else {
2363 return 0;
2364 }
2365}
2366
2367/* -----------------------------------------------------------------------------
2368 * pointers/data manipulation
2369 * ----------------------------------------------------------------------------- */
2370
2371static PyObject *Swig_This_global = NULL;
2372
2373SWIGRUNTIME PyObject *
2375{
2376 if (Swig_This_global == NULL)
2378 return Swig_This_global;
2379}
2380
2381/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2382
2383/* TODO: I don't know how to implement the fast getset in Python 3 right now */
2384#if PY_VERSION_HEX>=0x03000000
2385#define SWIG_PYTHON_SLOW_GETSET_THIS
2386#endif
2387
2390{
2391 PyObject *obj;
2392
2393 if (SwigPyObject_Check(pyobj))
2394 return (SwigPyObject *) pyobj;
2395
2396#ifdef SWIGPYTHON_BUILTIN
2397 (void)obj;
2398# ifdef PyWeakref_CheckProxy
2399 if (PyWeakref_CheckProxy(pyobj)) {
2400 pyobj = PyWeakref_GET_OBJECT(pyobj);
2401 if (pyobj && SwigPyObject_Check(pyobj))
2402 return (SwigPyObject*) pyobj;
2403 }
2404# endif
2405 return NULL;
2406#else
2407
2408 obj = 0;
2409
2410#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2411 if (PyInstance_Check(pyobj)) {
2412 obj = _PyInstance_Lookup(pyobj, SWIG_This());
2413 } else {
2414 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2415 if (dictptr != NULL) {
2416 PyObject *dict = *dictptr;
2417 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2418 } else {
2419#ifdef PyWeakref_CheckProxy
2420 if (PyWeakref_CheckProxy(pyobj)) {
2421 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2422 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2423 }
2424#endif
2425 obj = PyObject_GetAttr(pyobj,SWIG_This());
2426 if (obj) {
2427 Py_DECREF(obj);
2428 } else {
2429 if (PyErr_Occurred()) PyErr_Clear();
2430 return 0;
2431 }
2432 }
2433 }
2434#else
2435 obj = PyObject_GetAttr(pyobj,SWIG_This());
2436 if (obj) {
2437 Py_DECREF(obj);
2438 } else {
2439 if (PyErr_Occurred()) PyErr_Clear();
2440 return 0;
2441 }
2442#endif
2443 if (obj && !SwigPyObject_Check(obj)) {
2444 /* a PyObject is called 'this', try to get the 'real this'
2445 SwigPyObject from it */
2446 return SWIG_Python_GetSwigThis(obj);
2447 }
2448 return (SwigPyObject *)obj;
2449#endif
2450}
2451
2452/* Acquire a pointer value */
2453
2454SWIGRUNTIME int
2455SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2456 if (own == SWIG_POINTER_OWN) {
2458 if (sobj) {
2459 int oldown = sobj->own;
2460 sobj->own = own;
2461 return oldown;
2462 }
2463 }
2464 return 0;
2465}
2466
2467/* Convert a pointer value */
2468
2469SWIGRUNTIME int
2470SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2471 int res;
2472 SwigPyObject *sobj;
2473 int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2474
2475 if (!obj)
2476 return SWIG_ERROR;
2477 if (obj == Py_None && !implicit_conv) {
2478 if (ptr)
2479 *ptr = 0;
2481 }
2482
2483 res = SWIG_ERROR;
2484
2485 sobj = SWIG_Python_GetSwigThis(obj);
2486 if (own)
2487 *own = 0;
2488 while (sobj) {
2489 void *vptr = sobj->ptr;
2490 if (ty) {
2491 swig_type_info *to = sobj->ty;
2492 if (to == ty) {
2493 /* no type cast needed */
2494 if (ptr) *ptr = vptr;
2495 break;
2496 } else {
2497 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2498 if (!tc) {
2499 sobj = (SwigPyObject *)sobj->next;
2500 } else {
2501 if (ptr) {
2502 int newmemory = 0;
2503 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2504 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2505 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2506 if (own)
2507 *own = *own | SWIG_CAST_NEW_MEMORY;
2508 }
2509 }
2510 break;
2511 }
2512 }
2513 } else {
2514 if (ptr) *ptr = vptr;
2515 break;
2516 }
2517 }
2518 if (sobj) {
2519 if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !sobj->own) {
2521 } else {
2522 if (own)
2523 *own = *own | sobj->own;
2524 if (flags & SWIG_POINTER_DISOWN) {
2525 sobj->own = 0;
2526 }
2527 if (flags & SWIG_POINTER_CLEAR) {
2528 sobj->ptr = 0;
2529 }
2530 res = SWIG_OK;
2531 }
2532 } else {
2533 if (implicit_conv) {
2534 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2535 if (data && !data->implicitconv) {
2536 PyObject *klass = data->klass;
2537 if (klass) {
2538 PyObject *impconv;
2539 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2540 impconv = SWIG_Python_CallFunctor(klass, obj);
2541 data->implicitconv = 0;
2542 if (PyErr_Occurred()) {
2543 PyErr_Clear();
2544 impconv = 0;
2545 }
2546 if (impconv) {
2547 SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2548 if (iobj) {
2549 void *vptr;
2550 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2551 if (SWIG_IsOK(res)) {
2552 if (ptr) {
2553 *ptr = vptr;
2554 /* transfer the ownership to 'ptr' */
2555 iobj->own = 0;
2556 res = SWIG_AddCast(res);
2557 res = SWIG_AddNewMask(res);
2558 } else {
2559 res = SWIG_AddCast(res);
2560 }
2561 }
2562 }
2563 Py_DECREF(impconv);
2564 }
2565 }
2566 }
2567 if (!SWIG_IsOK(res) && obj == Py_None) {
2568 if (ptr)
2569 *ptr = 0;
2570 if (PyErr_Occurred())
2571 PyErr_Clear();
2572 res = SWIG_OK;
2573 }
2574 }
2575 }
2576 return res;
2577}
2578
2579/* Convert a function ptr value */
2580
2581SWIGRUNTIME int
2582SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2583 if (!PyCFunction_Check(obj)) {
2584 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2585 } else {
2586 void *vptr = 0;
2587 swig_cast_info *tc;
2588
2589 /* here we get the method pointer for callbacks */
2590#ifndef Py_LIMITED_API
2591 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2592#else
2593 PyObject* pystr_doc = PyObject_GetAttrString(obj, "__doc__");
2594 PyObject *bytes = NULL;
2595 const char *doc = pystr_doc ? SWIG_PyUnicode_AsUTF8AndSize(pystr_doc, NULL, &bytes) : 0;
2596#endif
2597 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2598 if (desc)
2599 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2600#ifdef Py_LIMITED_API
2601 Py_XDECREF(bytes);
2602 Py_XDECREF(pystr_doc);
2603#endif
2604 if (!desc)
2605 return SWIG_ERROR;
2606 tc = SWIG_TypeCheck(desc,ty);
2607 if (tc) {
2608 int newmemory = 0;
2609 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2610 assert(!newmemory); /* newmemory handling not yet implemented */
2611 } else {
2612 return SWIG_ERROR;
2613 }
2614 return SWIG_OK;
2615 }
2616}
2617
2618/* Convert a packed pointer value */
2619
2620SWIGRUNTIME int
2621SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2622 swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2623 if (!to) return SWIG_ERROR;
2624 if (ty) {
2625 if (to != ty) {
2626 /* check type cast? */
2627 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2628 if (!tc) return SWIG_ERROR;
2629 }
2630 }
2631 return SWIG_OK;
2632}
2633
2634/* -----------------------------------------------------------------------------
2635 * Create a new pointer object
2636 * ----------------------------------------------------------------------------- */
2637
2638/*
2639 Create a new instance object, without calling __init__, and set the
2640 'this' attribute.
2641*/
2642
2643SWIGRUNTIME PyObject*
2645{
2646 PyObject *inst = 0;
2647 PyObject *newraw = data->newraw;
2648 if (newraw) {
2649 inst = PyObject_Call(newraw, data->newargs, NULL);
2650 if (inst) {
2651#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2652 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2653 if (dictptr != NULL) {
2654 PyObject *dict = *dictptr;
2655 if (dict == NULL) {
2656 dict = PyDict_New();
2657 *dictptr = dict;
2658 }
2659 if (dict) {
2660 PyDict_SetItem(dict, SWIG_This(), swig_this);
2661 } else{
2662 Py_DECREF(inst);
2663 inst = 0;
2664 }
2665 }
2666#else
2667 if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2668 Py_DECREF(inst);
2669 inst = 0;
2670 }
2671#endif
2672 }
2673 } else {
2674#if PY_VERSION_HEX >= 0x03000000
2675 PyObject *empty_args = PyTuple_New(0);
2676 if (empty_args) {
2677 PyObject *empty_kwargs = PyDict_New();
2678 if (empty_kwargs) {
2679#ifndef Py_LIMITED_API
2680 newfunc newfn = ((PyTypeObject *)data->newargs)->tp_new;
2681#else
2682 newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new);
2683#endif
2684 inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
2685 Py_DECREF(empty_kwargs);
2686 if (inst) {
2687 if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2688 Py_DECREF(inst);
2689 inst = 0;
2690 } else {
2691 PyType_Modified(Py_TYPE(inst));
2692 }
2693 }
2694 }
2695 Py_DECREF(empty_args);
2696 }
2697#else
2698 PyObject *dict = PyDict_New();
2699 if (dict) {
2700 PyDict_SetItem(dict, SWIG_This(), swig_this);
2701 inst = PyInstance_NewRaw(data->newargs, dict);
2702 Py_DECREF(dict);
2703 }
2704#endif
2705 }
2706 return inst;
2707}
2708
2709SWIGRUNTIME int
2710SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2711{
2712#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2713 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2714 if (dictptr != NULL) {
2715 PyObject *dict = *dictptr;
2716 if (dict == NULL) {
2717 dict = PyDict_New();
2718 *dictptr = dict;
2719 }
2720 if (dict) {
2721 return PyDict_SetItem(dict, SWIG_This(), swig_this);
2722 } else{
2723 return -1;
2724 }
2725 }
2726#endif
2727 return PyObject_SetAttr(inst, SWIG_This(), swig_this);
2728}
2729
2730
2731SWIGINTERN PyObject *
2733 PyObject *obj[2];
2734 if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2735 return NULL;
2736 } else {
2737 SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2738 if (sthis) {
2739 Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1]));
2740 } else {
2741 if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
2742 return NULL;
2743 }
2744 return SWIG_Py_Void();
2745 }
2746}
2747
2748/* Create a new pointer object */
2749
2750SWIGRUNTIME PyObject *
2751SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2752 SwigPyClientData *clientdata;
2753 PyObject * robj;
2754 int own;
2755
2756 if (!ptr)
2757 return SWIG_Py_Void();
2758
2759 clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2760 own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2761 if (clientdata && clientdata->pytype) {
2762 SwigPyObject *newobj;
2763 if (flags & SWIG_BUILTIN_TP_INIT) {
2764 newobj = (SwigPyObject*) self;
2765 if (newobj->ptr) {
2766#ifndef Py_LIMITED_API
2767 allocfunc alloc = clientdata->pytype->tp_alloc;
2768#else
2769 allocfunc alloc = (allocfunc)PyType_GetSlot(clientdata->pytype, Py_tp_alloc);
2770#endif
2771 PyObject *next_self = alloc(clientdata->pytype, 0);
2772 while (newobj->next)
2773 newobj = (SwigPyObject *) newobj->next;
2774 newobj->next = next_self;
2775 newobj = (SwigPyObject *)next_self;
2776#ifdef SWIGPYTHON_BUILTIN
2777 newobj->dict = 0;
2778#endif
2779 }
2780 } else {
2781 newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2782#ifdef SWIGPYTHON_BUILTIN
2783 if (newobj) {
2784 newobj->dict = 0;
2785 }
2786#endif
2787 }
2788 if (newobj) {
2789 newobj->ptr = ptr;
2790 newobj->ty = type;
2791 newobj->own = own;
2792 newobj->next = 0;
2793 return (PyObject*) newobj;
2794 }
2795 return SWIG_Py_Void();
2796 }
2797
2798 assert(!(flags & SWIG_BUILTIN_TP_INIT));
2799
2800 robj = SwigPyObject_New(ptr, type, own);
2801 if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2802 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2803 Py_DECREF(robj);
2804 robj = inst;
2805 }
2806 return robj;
2807}
2808
2809/* Create a new packed object */
2810
2811SWIGRUNTIMEINLINE PyObject *
2812SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2813 return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2814}
2815
2816/* -----------------------------------------------------------------------------*
2817 * Get type list
2818 * -----------------------------------------------------------------------------*/
2819
2820#ifdef SWIG_LINK_RUNTIME
2821void *SWIG_ReturnGlobalTypeList(void *);
2822#endif
2823
2824static PyObject *Swig_TypeCache_global = NULL;
2825
2826/* The python cached type query */
2827SWIGRUNTIME PyObject *
2829 if (Swig_TypeCache_global == NULL) {
2830 Swig_TypeCache_global = PyDict_New();
2831 }
2832 return Swig_TypeCache_global;
2833}
2834
2837#ifdef SWIG_LINK_RUNTIME
2838 static void *type_pointer = (void *)0;
2839 /* first check if module already created */
2840 if (!type_pointer) {
2841 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2842 }
2843#else
2844 void *type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2845 if (PyErr_Occurred()) {
2846 PyErr_Clear();
2847 type_pointer = (void *)0;
2848 }
2849#endif
2850 return (swig_module_info *) type_pointer;
2851}
2852
2853
2854static int interpreter_counter = 0; /* how many (sub-)interpreters are using swig_module's types */
2855
2856SWIGRUNTIME void
2858{
2859 swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2860 swig_type_info **types = swig_module->types;
2861 size_t i;
2862 if (--interpreter_counter != 0) /* another sub-interpreter may still be using the swig_module's types */
2863 return;
2864 for (i =0; i < swig_module->size; ++i) {
2865 swig_type_info *ty = types[i];
2866 if (ty->owndata) {
2868 ty->clientdata = 0;
2869 if (data) SwigPyClientData_Del(data);
2870 }
2871 }
2872 Py_DECREF(SWIG_This());
2873 Swig_This_global = NULL;
2874 Py_DECREF(SWIG_globals());
2875 Swig_Globals_global = NULL;
2876 Py_DECREF(SWIG_Python_TypeCache());
2877 Swig_TypeCache_global = NULL;
2878 Swig_Capsule_global = NULL;
2879}
2880
2881SWIGRUNTIME void
2883#if PY_VERSION_HEX >= 0x03000000
2884 /* Add a dummy module object into sys.modules */
2885 PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2886#else
2887 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2888 PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2889#endif
2890 PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2891 if (pointer && module) {
2892 if (PyModule_AddObject(module, SWIGPY_CAPSULE_ATTR_NAME, pointer) == 0) {
2894 Swig_Capsule_global = pointer;
2895 } else {
2896 Py_DECREF(pointer);
2897 }
2898 } else {
2899 Py_XDECREF(pointer);
2900 }
2901}
2902
2904SWIG_Python_TypeQuery(const char *type)
2905{
2906 PyObject *cache = SWIG_Python_TypeCache();
2907 PyObject *key = SWIG_Python_str_FromChar(type);
2908 PyObject *obj = PyDict_GetItem(cache, key);
2909 swig_type_info *descriptor;
2910 if (obj) {
2911 descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2912 } else {
2913 swig_module_info *swig_module = SWIG_GetModule(0);
2914 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2915 if (descriptor) {
2916 obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2917 if (obj) {
2918 PyDict_SetItem(cache, key, obj);
2919 Py_DECREF(obj);
2920 }
2921 }
2922 }
2923 Py_DECREF(key);
2924 return descriptor;
2925}
2926
2927/*
2928 For backward compatibility only
2929*/
2930#define SWIG_POINTER_EXCEPTION 0
2931#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2932#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2933
2934SWIGRUNTIME int
2935SWIG_Python_AddErrMesg(const char* mesg, int infront)
2936{
2937 if (PyErr_Occurred()) {
2938 PyObject *type = 0;
2939 PyObject *value = 0;
2940 PyObject *traceback = 0;
2941 PyErr_Fetch(&type, &value, &traceback);
2942 if (value) {
2943 PyObject *old_str = PyObject_Str(value);
2944 PyObject *bytes = NULL;
2945 const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes);
2946 const char *errmesg = tmp ? tmp : "Invalid error message";
2947 Py_XINCREF(type);
2948 PyErr_Clear();
2949 if (infront) {
2950 PyErr_Format(type, "%s %s", mesg, errmesg);
2951 } else {
2952 PyErr_Format(type, "%s %s", errmesg, mesg);
2953 }
2954 Py_XDECREF(bytes);
2955 Py_DECREF(old_str);
2956 }
2957 return 1;
2958 } else {
2959 return 0;
2960 }
2961}
2962
2963SWIGRUNTIME int
2965{
2966 if (PyErr_Occurred()) {
2967 /* add information about failing argument */
2968 char mesg[256];
2969 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2970 return SWIG_Python_AddErrMesg(mesg, 1);
2971 } else {
2972 return 0;
2973 }
2974}
2975
2976SWIGRUNTIMEINLINE const char *
2978{
2979 SwigPyObject *v = (SwigPyObject *)self;
2980 swig_type_info *ty = v ? v->ty : 0;
2981 return ty ? ty->str : "";
2982}
2983
2984SWIGRUNTIME void
2985SWIG_Python_TypeError(const char *type, PyObject *obj)
2986{
2987 if (type) {
2988#if defined(SWIG_COBJECT_TYPES)
2989 if (obj && SwigPyObject_Check(obj)) {
2990 const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2991 if (otype) {
2992 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2993 type, otype);
2994 return;
2995 }
2996 } else
2997#endif
2998 {
2999#ifndef Py_LIMITED_API
3000 /* tp_name is not accessible */
3001 const char *otype = (obj ? obj->ob_type->tp_name : 0);
3002 if (otype) {
3003 PyObject *str = PyObject_Str(obj);
3004 PyObject *bytes = NULL;
3005 const char *cstr = str ? SWIG_PyUnicode_AsUTF8AndSize(str, NULL, &bytes) : 0;
3006 if (cstr) {
3007 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
3008 type, otype, cstr);
3009 } else {
3010 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
3011 type, otype);
3012 }
3013 Py_XDECREF(bytes);
3014 Py_XDECREF(str);
3015 return;
3016 }
3017#endif
3018 }
3019 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
3020 } else {
3021 PyErr_Format(PyExc_TypeError, "unexpected type is received");
3022 }
3023}
3024
3025
3026/* Convert a pointer value, signal an exception on a type mismatch */
3027SWIGRUNTIME void *
3028SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
3029 void *result;
3030 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
3031 PyErr_Clear();
3032 }
3033 return result;
3034}
3035
3036#ifdef SWIGPYTHON_BUILTIN
3037SWIGRUNTIME int
3038SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
3039 PyTypeObject *tp = obj->ob_type;
3040 PyObject *descr;
3041 PyObject *encoded_name;
3042 descrsetfunc f;
3043 int res = -1;
3044
3045# ifdef Py_USING_UNICODE
3046 if (PyString_Check(name)) {
3047 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
3048 if (!name)
3049 return -1;
3050 } else if (!PyUnicode_Check(name))
3051# else
3052 if (!PyString_Check(name))
3053# endif
3054 {
3055 PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
3056 return -1;
3057 } else {
3058 Py_INCREF(name);
3059 }
3060
3061 if (!tp->tp_dict) {
3062 if (PyType_Ready(tp) != 0)
3063 goto done;
3064 }
3065
3066 descr = _PyType_Lookup(tp, name);
3067 f = NULL;
3068 if (descr != NULL)
3069 f = descr->ob_type->tp_descr_set;
3070 if (!f) {
3071 if (PyString_Check(name)) {
3072 encoded_name = name;
3073 Py_INCREF(name);
3074 } else {
3075 encoded_name = PyUnicode_AsUTF8String(name);
3076 if (!encoded_name)
3077 goto done;
3078 }
3079 PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
3080 Py_DECREF(encoded_name);
3081 } else {
3082 res = f(descr, obj, value);
3083 }
3084
3085 done:
3086 Py_DECREF(name);
3087 return res;
3088}
3089#endif
3090
3091
3092#ifdef __cplusplus
3093}
3094#endif
3095/* -----------------------------------------------------------------------------*
3096 Standard SWIG API for use inside user code.
3097
3098 Don't include this file directly, run the command
3099 swig -python -external-runtime
3100 Also, read the Modules chapter of the SWIG Manual.
3101
3102 * -----------------------------------------------------------------------------*/
3103
3104#ifdef SWIG_MODULE_CLIENTDATA_TYPE
3105
3107SWIG_TypeQuery(SWIG_MODULE_CLIENTDATA_TYPE clientdata, const char *name) {
3108 swig_module_info *module = SWIG_GetModule(clientdata);
3109 return SWIG_TypeQueryModule(module, module, name);
3110}
3111
3113SWIG_MangledTypeQuery(SWIG_MODULE_CLIENTDATA_TYPE clientdata, const char *name) {
3114 swig_module_info *module = SWIG_GetModule(clientdata);
3115 return SWIG_MangledTypeQueryModule(module, module, name);
3116}
3117
3118#else
3119
3121SWIG_TypeQuery(const char *name) {
3122 swig_module_info *module = SWIG_GetModule(NULL);
3123 return SWIG_TypeQueryModule(module, module, name);
3124}
3125
3127SWIG_MangledTypeQuery(const char *name) {
3128 swig_module_info *module = SWIG_GetModule(NULL);
3129 return SWIG_MangledTypeQueryModule(module, module, name);
3130}
3131
3132#endif
PyTypeObject * pytype
PyObject_HEAD void * ptr
swig_type_info * ty
PyObject * next
swig_type_info * ty
PyObject_HEAD void * pack
swig_type_info * type
Definition swigluarun.h:347
struct swig_cast_info * prev
Definition swigluarun.h:350
struct swig_cast_info * next
Definition swigluarun.h:349
swig_converter_func converter
Definition swigluarun.h:348
const char * name
swig_type_info ** ptype
PyObject *(* get_attr)(void)
struct swig_globalvar * next
int(* set_attr)(PyObject *)
swig_type_info ** types
Definition swigluarun.h:357
swig_cast_info ** cast_initial
Definition swigluarun.h:361
swig_type_info ** type_initial
Definition swigluarun.h:360
struct swig_module_info * next
Definition swigluarun.h:359
swig_dycast_func dcast
Definition swigluarun.h:339
void * clientdata
Definition swigluarun.h:341
const char * name
Definition swigluarun.h:337
const char * str
Definition swigluarun.h:338
struct swig_cast_info * cast
Definition swigluarun.h:340
PyObject_HEAD swig_globalvar * vars
#define SWIG_MODULE_CLIENTDATA_TYPE
static swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
static PyObject * SWIG_Python_TypeCache(void)
static int interpreter_counter
static PyObject * SwigPyPacked_str(SwigPyPacked *v)
static int SWIG_TypeEquiv(const char *nb, const char *tb)
static int SwigPyObject_Check(PyObject *op)
static PyObject * Swig_This_global
static void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg)
#define SWIG_POINTER_OWN
#define SWIG_SyntaxError
static void SwigPyClientData_Del(SwigPyClientData *data)
#define SWIG_CheckState(r)
static int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty)
static SwigPyClientData * SwigPyClientData_New(PyObject *obj)
static void swig_varlink_dealloc(PyObject *o)
#define SWIG_BUFFER_SIZE
static PyObject * SwigPyObject_append(PyObject *v, PyObject *next)
#define SWIG_TypeError
static int SWIG_TypeCmp(const char *nb, const char *tb)
#define SWIG_POINTER_IMPLICIT_CONV
static void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
static char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
static void SWIG_Python_SetModule(swig_module_info *swig_module)
static int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
static swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)
#define SWIG_PYTHON_THREAD_END_BLOCK
#define SWIG_RuntimeError
static int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
#define SWIGPY_CAPSULE_ATTR_NAME
static PyObject * SWIG_Python_newvarlink(void)
static PyObject * SwigPyObject_hex(SwigPyObject *v)
static PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
static PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
#define PyObject_DEL
static int swig_varlink_setattr(PyObject *o, char *n, PyObject *p)
static char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
#define SWIGRUNTIME
static void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
static int SWIG_Python_ArgFail(int argnum)
static PyObject * SwigPyObject_repr2(PyObject *v, PyObject *)
static int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own)
static PyObject * SwigPyObject_long(SwigPyObject *v)
#define SWIG_POINTER_NOSHADOW
#define SWIG_ValueError
static PyMethodDef swigobject_methods[]
#define SWIG_AddCast(r)
static void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
static PyTypeObject * SwigPyPacked_TypeOnce(void)
static PyTypeObject * SwigPyPacked_type(void)
static void SwigPyObject_dealloc(PyObject *v)
#define SWIG_AttributeError
static void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int, int flags)
static void SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
#define SWIGUNUSEDPARM(p)
static PyObject * SwigPyObject_oct(SwigPyObject *v)
static PyObject * SwigPyObject_format(const char *fmt, SwigPyObject *v)
#define SWIG_POINTER_RELEASE
static int SwigPyPacked_Check(PyObject *op)
#define SWIG_Python_CallFunctor(functor, obj)
static PyTypeObject * SwigPyObject_type(void)
static const char * SWIG_TypePrettyName(const swig_type_info *type)
static PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags)
#define SWIG_POINTER_CLEAR
#define SWIG_ConvertPtr(obj, pptr, type, flags)
static PyObject * SwigPyPacked_repr(SwigPyPacked *v)
static PyObject * SWIG_Python_ErrorType(int code)
static PyObject * Swig_Globals_global
void *(* swig_converter_func)(void *, int *)
static swig_module_info * SWIG_Python_GetModule(void *)
static PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
static const char * SwigPyObject_GetDesc(PyObject *self)
static int SWIG_Python_TypeErrorOccurred(PyObject *obj)
static PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
#define SWIG_newvarlink()
static PyObject * SwigPyObject_disown(PyObject *v, PyObject *)
static PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
static swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
static PyObject * Swig_TypeCache_global
#define SWIGINTERN
static swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
static int SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
static PyObject * SwigPyObject_next(PyObject *v, PyObject *)
static const char * SWIG_TypeName(const swig_type_info *ty)
#define SWIGPY_CAPSULE_NAME
static void SWIG_Python_AddErrorMsg(const char *mesg)
static PyObject * SWIG_Python_AppendOutput(PyObject *result, PyObject *obj)
static swig_type_info * SWIG_MangledTypeQuery(const char *name)
static PyTypeObject * SwigPyObject_TypeOnce(void)
#define SWIG_POINTER_NO_NULL
#define SWIG_Python_str_FromFormat
static PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type)
struct swig_type_info *(* swig_dycast_func)(void **)
static swig_cast_info * SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty)
static PyObject * swig_varlink_str(PyObject *o)
#define SWIG_IOError
static swig_type_info * SWIG_Python_TypeQuery(const char *type)
#define SWIG_NullReferenceError
static PyObject * SWIG_Python_str_FromChar(const char *c)
static PyObject * SwigPyObject_acquire(PyObject *v, PyObject *)
static int SWIG_Python_AcquirePtr(PyObject *obj, int own)
#define SWIG_POINTER_DISOWN
#define SWIG_STATIC_POINTER(var)
static void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
static PyObject * swig_varlink_getattr(PyObject *o, char *n)
static int SWIG_Python_CheckImplicit(swig_type_info *ty)
static PyObject * SWIG_Py_Void(void)
static int SWIG_Python_AddErrMesg(const char *mesg, int infront)
static void SwigPyPacked_dealloc(PyObject *v)
static void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
static const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
static swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
static PyObject * SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
static Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
static const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
#define SWIG_GetModule(clientdata)
static PyObject * SwigPyObject_own(PyObject *v, PyObject *args)
static PyObject * SWIG_globals(void)
static void SWIG_Python_DestroyModule(PyObject *obj)
#define SWIG_ERROR_RELEASE_NOT_OWNED
static void SWIG_Python_RaiseOrModifyTypeError(const char *message)
#define SWIG_BUILTIN_TP_INIT
#define SWIG_CAST_NEW_MEMORY
static PyObject * SWIG_This(void)
static PyTypeObject * swig_varlink_type(void)
#define SWIG_ERROR
static int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
static PyObject * swig_varlink_repr(PyObject *)
static const char * SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes)
static int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty)
static swig_type_info * SWIG_TypeQuery(const char *name)
#define SWIG_MemoryError
#define SWIG_SystemError
#define SWIG_DivisionByZero
static int SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name)
static char * SWIG_PackData(char *c, void *ptr, size_t sz)
static PyObject * SwigPyObject_repr(SwigPyObject *v)
#define SWIG_OverflowError
#define SWIG_IsOK(r)
static const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
static PyObject * Swig_Capsule_global
#define SWIG_IndexError
#define SWIG_AddNewMask(r)
#define SWIG_OK
static void SWIG_Python_TypeError(const char *type, PyObject *obj)
#define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#define SWIGINTERNINLINE
static SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
#define Py_TYPE(op)
#define SWIGRUNTIMEINLINE