Bike-X  0.8
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Wrap_wrap.c
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 2.0.11
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 
11 #define SWIGPYTHON
12 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
13 
14 /* -----------------------------------------------------------------------------
15  * This section contains generic SWIG labels for method/variable
16  * declarations/attributes, and other compiler dependent labels.
17  * ----------------------------------------------------------------------------- */
18 
19 /* template workaround for compilers that cannot correctly implement the C++ standard */
20 #ifndef SWIGTEMPLATEDISAMBIGUATOR
21 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
22 # define SWIGTEMPLATEDISAMBIGUATOR template
23 # elif defined(__HP_aCC)
24 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
25 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
26 # define SWIGTEMPLATEDISAMBIGUATOR template
27 # else
28 # define SWIGTEMPLATEDISAMBIGUATOR
29 # endif
30 #endif
31 
32 /* inline attribute */
33 #ifndef SWIGINLINE
34 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
35 # define SWIGINLINE inline
36 # else
37 # define SWIGINLINE
38 # endif
39 #endif
40 
41 /* attribute recognised by some compilers to avoid 'unused' warnings */
42 #ifndef SWIGUNUSED
43 # if defined(__GNUC__)
44 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
45 # define SWIGUNUSED __attribute__ ((__unused__))
46 # else
47 # define SWIGUNUSED
48 # endif
49 # elif defined(__ICC)
50 # define SWIGUNUSED __attribute__ ((__unused__))
51 # else
52 # define SWIGUNUSED
53 # endif
54 #endif
55 
56 #ifndef SWIG_MSC_UNSUPPRESS_4505
57 # if defined(_MSC_VER)
58 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
59 # endif
60 #endif
61 
62 #ifndef SWIGUNUSEDPARM
63 # ifdef __cplusplus
64 # define SWIGUNUSEDPARM(p)
65 # else
66 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
67 # endif
68 #endif
69 
70 /* internal SWIG method */
71 #ifndef SWIGINTERN
72 # define SWIGINTERN static SWIGUNUSED
73 #endif
74 
75 /* internal inline SWIG method */
76 #ifndef SWIGINTERNINLINE
77 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
78 #endif
79 
80 /* exporting methods */
81 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
82 # ifndef GCC_HASCLASSVISIBILITY
83 # define GCC_HASCLASSVISIBILITY
84 # endif
85 #endif
86 
87 #ifndef SWIGEXPORT
88 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
89 # if defined(STATIC_LINKED)
90 # define SWIGEXPORT
91 # else
92 # define SWIGEXPORT __declspec(dllexport)
93 # endif
94 # else
95 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
96 # define SWIGEXPORT __attribute__ ((visibility("default")))
97 # else
98 # define SWIGEXPORT
99 # endif
100 # endif
101 #endif
102 
103 /* calling conventions for Windows */
104 #ifndef SWIGSTDCALL
105 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
106 # define SWIGSTDCALL __stdcall
107 # else
108 # define SWIGSTDCALL
109 # endif
110 #endif
111 
112 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
113 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
114 # define _CRT_SECURE_NO_DEPRECATE
115 #endif
116 
117 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
118 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
119 # define _SCL_SECURE_NO_DEPRECATE
120 #endif
121 
122 
123 
124 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
125 /* Use debug wrappers with the Python release dll */
126 # undef _DEBUG
127 # include <Python.h>
128 # define _DEBUG
129 #else
130 # include <Python.h>
131 #endif
132 
133 /* -----------------------------------------------------------------------------
134  * swigrun.swg
135  *
136  * This file contains generic C API SWIG runtime support for pointer
137  * type checking.
138  * ----------------------------------------------------------------------------- */
139 
140 /* This should only be incremented when either the layout of swig_type_info changes,
141  or for whatever reason, the runtime changes incompatibly */
142 #define SWIG_RUNTIME_VERSION "4"
143 
144 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
145 #ifdef SWIG_TYPE_TABLE
146 # define SWIG_QUOTE_STRING(x) #x
147 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
148 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
149 #else
150 # define SWIG_TYPE_TABLE_NAME
151 #endif
152 
153 /*
154  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
155  creating a static or dynamic library from the SWIG runtime code.
156  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
157 
158  But only do this if strictly necessary, ie, if you have problems
159  with your compiler or suchlike.
160 */
161 
162 #ifndef SWIGRUNTIME
163 # define SWIGRUNTIME SWIGINTERN
164 #endif
165 
166 #ifndef SWIGRUNTIMEINLINE
167 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
168 #endif
169 
170 /* Generic buffer size */
171 #ifndef SWIG_BUFFER_SIZE
172 # define SWIG_BUFFER_SIZE 1024
173 #endif
174 
175 /* Flags for pointer conversions */
176 #define SWIG_POINTER_DISOWN 0x1
177 #define SWIG_CAST_NEW_MEMORY 0x2
178 
179 /* Flags for new pointer objects */
180 #define SWIG_POINTER_OWN 0x1
181 
182 
183 /*
184  Flags/methods for returning states.
185 
186  The SWIG conversion methods, as ConvertPtr, return an integer
187  that tells if the conversion was successful or not. And if not,
188  an error code can be returned (see swigerrors.swg for the codes).
189 
190  Use the following macros/flags to set or process the returning
191  states.
192 
193  In old versions of SWIG, code such as the following was usually written:
194 
195  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
196  // success code
197  } else {
198  //fail code
199  }
200 
201  Now you can be more explicit:
202 
203  int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
204  if (SWIG_IsOK(res)) {
205  // success code
206  } else {
207  // fail code
208  }
209 
210  which is the same really, but now you can also do
211 
212  Type *ptr;
213  int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
214  if (SWIG_IsOK(res)) {
215  // success code
216  if (SWIG_IsNewObj(res) {
217  ...
218  delete *ptr;
219  } else {
220  ...
221  }
222  } else {
223  // fail code
224  }
225 
226  I.e., now SWIG_ConvertPtr can return new objects and you can
227  identify the case and take care of the deallocation. Of course that
228  also requires SWIG_ConvertPtr to return new result values, such as
229 
230  int SWIG_ConvertPtr(obj, ptr,...) {
231  if (<obj is ok>) {
232  if (<need new object>) {
233  *ptr = <ptr to new allocated object>;
234  return SWIG_NEWOBJ;
235  } else {
236  *ptr = <ptr to old object>;
237  return SWIG_OLDOBJ;
238  }
239  } else {
240  return SWIG_BADOBJ;
241  }
242  }
243 
244  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
245  more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
246  SWIG errors code.
247 
248  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
249  allows to return the 'cast rank', for example, if you have this
250 
251  int food(double)
252  int fooi(int);
253 
254  and you call
255 
256  food(1) // cast rank '1' (1 -> 1.0)
257  fooi(1) // cast rank '0'
258 
259  just use the SWIG_AddCast()/SWIG_CheckState()
260 */
261 
262 #define SWIG_OK (0)
263 #define SWIG_ERROR (-1)
264 #define SWIG_IsOK(r) (r >= 0)
265 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
266 
267 /* The CastRankLimit says how many bits are used for the cast rank */
268 #define SWIG_CASTRANKLIMIT (1 << 8)
269 /* The NewMask denotes the object was created (using new/malloc) */
270 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
271 /* The TmpMask is for in/out typemaps that use temporal objects */
272 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
273 /* Simple returning values */
274 #define SWIG_BADOBJ (SWIG_ERROR)
275 #define SWIG_OLDOBJ (SWIG_OK)
276 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
277 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
278 /* Check, add and del mask methods */
279 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
280 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
281 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
282 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
283 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
284 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
285 
286 /* Cast-Rank Mode */
287 #if defined(SWIG_CASTRANK_MODE)
288 # ifndef SWIG_TypeRank
289 # define SWIG_TypeRank unsigned long
290 # endif
291 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
292 # define SWIG_MAXCASTRANK (2)
293 # endif
294 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
295 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
297  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
298 }
300  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
301 }
302 #else /* no cast-rank mode */
303 # define SWIG_AddCast(r) (r)
304 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
305 #endif
306 
307 
308 #include <string.h>
309 
310 #ifdef __cplusplus
311 extern "C" {
312 #endif
313 
314 typedef void *(*swig_converter_func)(void *, int *);
315 typedef struct swig_type_info *(*swig_dycast_func)(void **);
316 
317 /* Structure to store information on one type */
318 typedef struct swig_type_info {
319  const char *name; /* mangled name of this type */
320  const char *str; /* human readable name of this type */
321  swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
322  struct swig_cast_info *cast; /* linked list of types that can cast into this type */
323  void *clientdata; /* language specific type data */
324  int owndata; /* flag if the structure owns the clientdata */
326 
327 /* Structure to store a type and conversion function used for casting */
328 typedef struct swig_cast_info {
329  swig_type_info *type; /* pointer to type that is equivalent to this type */
330  swig_converter_func converter; /* function to cast the void pointers */
331  struct swig_cast_info *next; /* pointer to next cast in linked list */
332  struct swig_cast_info *prev; /* pointer to the previous cast */
334 
335 /* Structure used to store module information
336  * Each module generates one structure like this, and the runtime collects
337  * all of these structures and stores them in a circularly linked list.*/
338 typedef struct swig_module_info {
339  swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
340  size_t size; /* Number of types in this module */
341  struct swig_module_info *next; /* Pointer to next element in circularly linked list */
342  swig_type_info **type_initial; /* Array of initially generated type structures */
343  swig_cast_info **cast_initial; /* Array of initially generated casting structures */
344  void *clientdata; /* Language specific module data */
346 
347 /*
348  Compare two type names skipping the space characters, therefore
349  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
350 
351  Return 0 when the two name types are equivalent, as in
352  strncmp, but skipping ' '.
353 */
354 SWIGRUNTIME int
355 SWIG_TypeNameComp(const char *f1, const char *l1,
356  const char *f2, const char *l2) {
357  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
358  while ((*f1 == ' ') && (f1 != l1)) ++f1;
359  while ((*f2 == ' ') && (f2 != l2)) ++f2;
360  if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
361  }
362  return (int)((l1 - f1) - (l2 - f2));
363 }
364 
365 /*
366  Check type equivalence in a name list like <name1>|<name2>|...
367  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
368 */
369 SWIGRUNTIME int
370 SWIG_TypeCmp(const char *nb, const char *tb) {
371  int equiv = 1;
372  const char* te = tb + strlen(tb);
373  const char* ne = nb;
374  while (equiv != 0 && *ne) {
375  for (nb = ne; *ne; ++ne) {
376  if (*ne == '|') break;
377  }
378  equiv = SWIG_TypeNameComp(nb, ne, tb, te);
379  if (*ne) ++ne;
380  }
381  return equiv;
382 }
383 
384 /*
385  Check type equivalence in a name list like <name1>|<name2>|...
386  Return 0 if not equal, 1 if equal
387 */
388 SWIGRUNTIME int
389 SWIG_TypeEquiv(const char *nb, const char *tb) {
390  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
391 }
392 
393 /*
394  Check the typename
395 */
397 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
398  if (ty) {
399  swig_cast_info *iter = ty->cast;
400  while (iter) {
401  if (strcmp(iter->type->name, c) == 0) {
402  if (iter == ty->cast)
403  return iter;
404  /* Move iter to the top of the linked list */
405  iter->prev->next = iter->next;
406  if (iter->next)
407  iter->next->prev = iter->prev;
408  iter->next = ty->cast;
409  iter->prev = 0;
410  if (ty->cast) ty->cast->prev = iter;
411  ty->cast = iter;
412  return iter;
413  }
414  iter = iter->next;
415  }
416  }
417  return 0;
418 }
419 
420 /*
421  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
422 */
425  if (ty) {
426  swig_cast_info *iter = ty->cast;
427  while (iter) {
428  if (iter->type == from) {
429  if (iter == ty->cast)
430  return iter;
431  /* Move iter to the top of the linked list */
432  iter->prev->next = iter->next;
433  if (iter->next)
434  iter->next->prev = iter->prev;
435  iter->next = ty->cast;
436  iter->prev = 0;
437  if (ty->cast) ty->cast->prev = iter;
438  ty->cast = iter;
439  return iter;
440  }
441  iter = iter->next;
442  }
443  }
444  return 0;
445 }
446 
447 /*
448  Cast a pointer up an inheritance hierarchy
449 */
450 SWIGRUNTIMEINLINE void *
451 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
452  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
453 }
454 
455 /*
456  Dynamic pointer casting. Down an inheritance hierarchy
457 */
460  swig_type_info *lastty = ty;
461  if (!ty || !ty->dcast) return ty;
462  while (ty && (ty->dcast)) {
463  ty = (*ty->dcast)(ptr);
464  if (ty) lastty = ty;
465  }
466  return lastty;
467 }
468 
469 /*
470  Return the name associated with this type
471 */
472 SWIGRUNTIMEINLINE const char *
474  return ty->name;
475 }
476 
477 /*
478  Return the pretty name associated with this type,
479  that is an unmangled type name in a form presentable to the user.
480 */
481 SWIGRUNTIME const char *
483  /* The "str" field contains the equivalent pretty names of the
484  type, separated by vertical-bar characters. We choose
485  to print the last name, as it is often (?) the most
486  specific. */
487  if (!type) return NULL;
488  if (type->str != NULL) {
489  const char *last_name = type->str;
490  const char *s;
491  for (s = type->str; *s; s++)
492  if (*s == '|') last_name = s+1;
493  return last_name;
494  }
495  else
496  return type->name;
497 }
498 
499 /*
500  Set the clientdata field for a type
501 */
502 SWIGRUNTIME void
504  swig_cast_info *cast = ti->cast;
505  /* if (ti->clientdata == clientdata) return; */
506  ti->clientdata = clientdata;
507 
508  while (cast) {
509  if (!cast->converter) {
510  swig_type_info *tc = cast->type;
511  if (!tc->clientdata) {
512  SWIG_TypeClientData(tc, clientdata);
513  }
514  }
515  cast = cast->next;
516  }
517 }
518 SWIGRUNTIME void
520  SWIG_TypeClientData(ti, clientdata);
521  ti->owndata = 1;
522 }
523 
524 /*
525  Search for a swig_type_info structure only by mangled name
526  Search is a O(log #types)
527 
528  We start searching at module start, and finish searching when start == end.
529  Note: if start == end at the beginning of the function, we go all the way around
530  the circular list.
531 */
534  swig_module_info *end,
535  const char *name) {
536  swig_module_info *iter = start;
537  do {
538  if (iter->size) {
539  register size_t l = 0;
540  register size_t r = iter->size - 1;
541  do {
542  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
543  register size_t i = (l + r) >> 1;
544  const char *iname = iter->types[i]->name;
545  if (iname) {
546  register int compare = strcmp(name, iname);
547  if (compare == 0) {
548  return iter->types[i];
549  } else if (compare < 0) {
550  if (i) {
551  r = i - 1;
552  } else {
553  break;
554  }
555  } else if (compare > 0) {
556  l = i + 1;
557  }
558  } else {
559  break; /* should never happen */
560  }
561  } while (l <= r);
562  }
563  iter = iter->next;
564  } while (iter != end);
565  return 0;
566 }
567 
568 /*
569  Search for a swig_type_info structure for either a mangled name or a human readable name.
570  It first searches the mangled names of the types, which is a O(log #types)
571  If a type is not found it then searches the human readable names, which is O(#types).
572 
573  We start searching at module start, and finish searching when start == end.
574  Note: if start == end at the beginning of the function, we go all the way around
575  the circular list.
576 */
579  swig_module_info *end,
580  const char *name) {
581  /* STEP 1: Search the name field using binary search */
582  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
583  if (ret) {
584  return ret;
585  } else {
586  /* STEP 2: If the type hasn't been found, do a complete search
587  of the str field (the human readable name) */
588  swig_module_info *iter = start;
589  do {
590  register size_t i = 0;
591  for (; i < iter->size; ++i) {
592  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
593  return iter->types[i];
594  }
595  iter = iter->next;
596  } while (iter != end);
597  }
598 
599  /* neither found a match */
600  return 0;
601 }
602 
603 /*
604  Pack binary data into a string
605 */
606 SWIGRUNTIME char *
607 SWIG_PackData(char *c, void *ptr, size_t sz) {
608  static const char hex[17] = "0123456789abcdef";
609  register const unsigned char *u = (unsigned char *) ptr;
610  register const unsigned char *eu = u + sz;
611  for (; u != eu; ++u) {
612  register unsigned char uu = *u;
613  *(c++) = hex[(uu & 0xf0) >> 4];
614  *(c++) = hex[uu & 0xf];
615  }
616  return c;
617 }
618 
619 /*
620  Unpack binary data from a string
621 */
622 SWIGRUNTIME const char *
623 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
624  register unsigned char *u = (unsigned char *) ptr;
625  register const unsigned char *eu = u + sz;
626  for (; u != eu; ++u) {
627  register char d = *(c++);
628  register unsigned char uu;
629  if ((d >= '0') && (d <= '9'))
630  uu = ((d - '0') << 4);
631  else if ((d >= 'a') && (d <= 'f'))
632  uu = ((d - ('a'-10)) << 4);
633  else
634  return (char *) 0;
635  d = *(c++);
636  if ((d >= '0') && (d <= '9'))
637  uu |= (d - '0');
638  else if ((d >= 'a') && (d <= 'f'))
639  uu |= (d - ('a'-10));
640  else
641  return (char *) 0;
642  *u = uu;
643  }
644  return c;
645 }
646 
647 /*
648  Pack 'void *' into a string buffer.
649 */
650 SWIGRUNTIME char *
651 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
652  char *r = buff;
653  if ((2*sizeof(void *) + 2) > bsz) return 0;
654  *(r++) = '_';
655  r = SWIG_PackData(r,&ptr,sizeof(void *));
656  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
657  strcpy(r,name);
658  return buff;
659 }
660 
661 SWIGRUNTIME const char *
662 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
663  if (*c != '_') {
664  if (strcmp(c,"NULL") == 0) {
665  *ptr = (void *) 0;
666  return name;
667  } else {
668  return 0;
669  }
670  }
671  return SWIG_UnpackData(++c,ptr,sizeof(void *));
672 }
673 
674 SWIGRUNTIME char *
675 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
676  char *r = buff;
677  size_t lname = (name ? strlen(name) : 0);
678  if ((2*sz + 2 + lname) > bsz) return 0;
679  *(r++) = '_';
680  r = SWIG_PackData(r,ptr,sz);
681  if (lname) {
682  strncpy(r,name,lname+1);
683  } else {
684  *r = 0;
685  }
686  return buff;
687 }
688 
689 SWIGRUNTIME const char *
690 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
691  if (*c != '_') {
692  if (strcmp(c,"NULL") == 0) {
693  memset(ptr,0,sz);
694  return name;
695  } else {
696  return 0;
697  }
698  }
699  return SWIG_UnpackData(++c,ptr,sz);
700 }
701 
702 #ifdef __cplusplus
703 }
704 #endif
705 
706 /* Errors in SWIG */
707 #define SWIG_UnknownError -1
708 #define SWIG_IOError -2
709 #define SWIG_RuntimeError -3
710 #define SWIG_IndexError -4
711 #define SWIG_TypeError -5
712 #define SWIG_DivisionByZero -6
713 #define SWIG_OverflowError -7
714 #define SWIG_SyntaxError -8
715 #define SWIG_ValueError -9
716 #define SWIG_SystemError -10
717 #define SWIG_AttributeError -11
718 #define SWIG_MemoryError -12
719 #define SWIG_NullReferenceError -13
720 
721 
722 
723 /* Compatibility macros for Python 3 */
724 #if PY_VERSION_HEX >= 0x03000000
725 
726 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
727 #define PyInt_Check(x) PyLong_Check(x)
728 #define PyInt_AsLong(x) PyLong_AsLong(x)
729 #define PyInt_FromLong(x) PyLong_FromLong(x)
730 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
731 #define PyString_Check(name) PyBytes_Check(name)
732 #define PyString_FromString(x) PyUnicode_FromString(x)
733 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
734 #define PyString_AsString(str) PyBytes_AsString(str)
735 #define PyString_Size(str) PyBytes_Size(str)
736 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
737 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
738 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
739 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
740 
741 #endif
742 
743 #ifndef Py_TYPE
744 # define Py_TYPE(op) ((op)->ob_type)
745 #endif
746 
747 /* SWIG APIs for compatibility of both Python 2 & 3 */
748 
749 #if PY_VERSION_HEX >= 0x03000000
750 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
751 #else
752 # define SWIG_Python_str_FromFormat PyString_FromFormat
753 #endif
754 
755 
756 /* Warning: This function will allocate a new string in Python 3,
757  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
758  */
759 SWIGINTERN char*
761 {
762 #if PY_VERSION_HEX >= 0x03000000
763  char *cstr;
764  char *newstr;
765  Py_ssize_t len;
766  str = PyUnicode_AsUTF8String(str);
767  PyBytes_AsStringAndSize(str, &cstr, &len);
768  newstr = (char *) malloc(len+1);
769  memcpy(newstr, cstr, len+1);
770  Py_XDECREF(str);
771  return newstr;
772 #else
773  return PyString_AsString(str);
774 #endif
775 }
776 
777 #if PY_VERSION_HEX >= 0x03000000
778 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
779 #else
780 # define SWIG_Python_str_DelForPy3(x)
781 #endif
782 
783 
784 SWIGINTERN PyObject*
786 {
787 #if PY_VERSION_HEX >= 0x03000000
788  return PyUnicode_FromString(c);
789 #else
790  return PyString_FromString(c);
791 #endif
792 }
793 
794 /* Add PyOS_snprintf for old Pythons */
795 #if PY_VERSION_HEX < 0x02020000
796 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
797 # define PyOS_snprintf _snprintf
798 # else
799 # define PyOS_snprintf snprintf
800 # endif
801 #endif
802 
803 /* A crude PyString_FromFormat implementation for old Pythons */
804 #if PY_VERSION_HEX < 0x02020000
805 
806 #ifndef SWIG_PYBUFFER_SIZE
807 # define SWIG_PYBUFFER_SIZE 1024
808 #endif
809 
810 static PyObject *
811 PyString_FromFormat(const char *fmt, ...) {
812  va_list ap;
813  char buf[SWIG_PYBUFFER_SIZE * 2];
814  int res;
815  va_start(ap, fmt);
816  res = vsnprintf(buf, sizeof(buf), fmt, ap);
817  va_end(ap);
818  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
819 }
820 #endif
821 
822 /* Add PyObject_Del for old Pythons */
823 #if PY_VERSION_HEX < 0x01060000
824 # define PyObject_Del(op) PyMem_DEL((op))
825 #endif
826 #ifndef PyObject_DEL
827 # define PyObject_DEL PyObject_Del
828 #endif
829 
830 /* A crude PyExc_StopIteration exception for old Pythons */
831 #if PY_VERSION_HEX < 0x02020000
832 # ifndef PyExc_StopIteration
833 # define PyExc_StopIteration PyExc_RuntimeError
834 # endif
835 # ifndef PyObject_GenericGetAttr
836 # define PyObject_GenericGetAttr 0
837 # endif
838 #endif
839 
840 /* Py_NotImplemented is defined in 2.1 and up. */
841 #if PY_VERSION_HEX < 0x02010000
842 # ifndef Py_NotImplemented
843 # define Py_NotImplemented PyExc_RuntimeError
844 # endif
845 #endif
846 
847 /* A crude PyString_AsStringAndSize implementation for old Pythons */
848 #if PY_VERSION_HEX < 0x02010000
849 # ifndef PyString_AsStringAndSize
850 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
851 # endif
852 #endif
853 
854 /* PySequence_Size for old Pythons */
855 #if PY_VERSION_HEX < 0x02000000
856 # ifndef PySequence_Size
857 # define PySequence_Size PySequence_Length
858 # endif
859 #endif
860 
861 /* PyBool_FromLong for old Pythons */
862 #if PY_VERSION_HEX < 0x02030000
863 static
864 PyObject *PyBool_FromLong(long ok)
865 {
866  PyObject *result = ok ? Py_True : Py_False;
867  Py_INCREF(result);
868  return result;
869 }
870 #endif
871 
872 /* Py_ssize_t for old Pythons */
873 /* This code is as recommended by: */
874 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
875 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
876 typedef int Py_ssize_t;
877 # define PY_SSIZE_T_MAX INT_MAX
878 # define PY_SSIZE_T_MIN INT_MIN
879 typedef inquiry lenfunc;
880 typedef intargfunc ssizeargfunc;
881 typedef intintargfunc ssizessizeargfunc;
882 typedef intobjargproc ssizeobjargproc;
883 typedef intintobjargproc ssizessizeobjargproc;
884 typedef getreadbufferproc readbufferproc;
885 typedef getwritebufferproc writebufferproc;
886 typedef getsegcountproc segcountproc;
887 typedef getcharbufferproc charbufferproc;
888 static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
889 {
890  long result = 0;
891  PyObject *i = PyNumber_Int(x);
892  if (i) {
893  result = PyInt_AsLong(i);
894  Py_DECREF(i);
895  }
896  return result;
897 }
898 #endif
899 
900 #if PY_VERSION_HEX < 0x02050000
901 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
902 #endif
903 
904 #if PY_VERSION_HEX < 0x02040000
905 #define Py_VISIT(op) \
906  do { \
907  if (op) { \
908  int vret = visit((op), arg); \
909  if (vret) \
910  return vret; \
911  } \
912  } while (0)
913 #endif
914 
915 #if PY_VERSION_HEX < 0x02030000
916 typedef struct {
917  PyTypeObject type;
918  PyNumberMethods as_number;
919  PyMappingMethods as_mapping;
920  PySequenceMethods as_sequence;
921  PyBufferProcs as_buffer;
922  PyObject *name, *slots;
924 #endif
925 
926 #if PY_VERSION_HEX < 0x02030000
927 typedef destructor freefunc;
928 #endif
929 
930 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
931  (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
932  (PY_MAJOR_VERSION > 3))
933 # define SWIGPY_USE_CAPSULE
934 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
935 #endif
936 
937 #if PY_VERSION_HEX < 0x03020000
938 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
939 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
940 #endif
941 
942 /* -----------------------------------------------------------------------------
943  * error manipulation
944  * ----------------------------------------------------------------------------- */
945 
946 SWIGRUNTIME PyObject*
948  PyObject* type = 0;
949  switch(code) {
950  case SWIG_MemoryError:
951  type = PyExc_MemoryError;
952  break;
953  case SWIG_IOError:
954  type = PyExc_IOError;
955  break;
956  case SWIG_RuntimeError:
957  type = PyExc_RuntimeError;
958  break;
959  case SWIG_IndexError:
960  type = PyExc_IndexError;
961  break;
962  case SWIG_TypeError:
963  type = PyExc_TypeError;
964  break;
965  case SWIG_DivisionByZero:
966  type = PyExc_ZeroDivisionError;
967  break;
968  case SWIG_OverflowError:
969  type = PyExc_OverflowError;
970  break;
971  case SWIG_SyntaxError:
972  type = PyExc_SyntaxError;
973  break;
974  case SWIG_ValueError:
975  type = PyExc_ValueError;
976  break;
977  case SWIG_SystemError:
978  type = PyExc_SystemError;
979  break;
980  case SWIG_AttributeError:
981  type = PyExc_AttributeError;
982  break;
983  default:
984  type = PyExc_RuntimeError;
985  }
986  return type;
987 }
988 
989 
990 SWIGRUNTIME void
991 SWIG_Python_AddErrorMsg(const char* mesg)
992 {
993  PyObject *type = 0;
994  PyObject *value = 0;
995  PyObject *traceback = 0;
996 
997  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
998  if (value) {
999  char *tmp;
1000  PyObject *old_str = PyObject_Str(value);
1001  PyErr_Clear();
1002  Py_XINCREF(type);
1003 
1004  PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
1006  Py_DECREF(old_str);
1007  Py_DECREF(value);
1008  } else {
1009  PyErr_SetString(PyExc_RuntimeError, mesg);
1010  }
1011 }
1012 
1013 #if defined(SWIG_PYTHON_NO_THREADS)
1014 # if defined(SWIG_PYTHON_THREADS)
1015 # undef SWIG_PYTHON_THREADS
1016 # endif
1017 #endif
1018 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
1019 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1020 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
1021 # define SWIG_PYTHON_USE_GIL
1022 # endif
1023 # endif
1024 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
1025 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
1026 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
1027 # endif
1028 # ifdef __cplusplus /* C++ code */
1029  class SWIG_Python_Thread_Block {
1030  bool status;
1031  PyGILState_STATE state;
1032  public:
1033  void end() { if (status) { PyGILState_Release(state); status = false;} }
1034  SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1035  ~SWIG_Python_Thread_Block() { end(); }
1036  };
1037  class SWIG_Python_Thread_Allow {
1038  bool status;
1039  PyThreadState *save;
1040  public:
1041  void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
1042  SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1043  ~SWIG_Python_Thread_Allow() { end(); }
1044  };
1045 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1046 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1047 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1048 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1049 # else /* C code */
1050 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1051 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1052 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1053 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1054 # endif
1055 # else /* Old thread way, not implemented, user must provide it */
1056 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1057 # define SWIG_PYTHON_INITIALIZE_THREADS
1058 # endif
1059 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1060 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1061 # endif
1062 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1063 # define SWIG_PYTHON_THREAD_END_BLOCK
1064 # endif
1065 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1066 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1067 # endif
1068 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1069 # define SWIG_PYTHON_THREAD_END_ALLOW
1070 # endif
1071 # endif
1072 #else /* No thread support */
1073 # define SWIG_PYTHON_INITIALIZE_THREADS
1074 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1075 # define SWIG_PYTHON_THREAD_END_BLOCK
1076 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1077 # define SWIG_PYTHON_THREAD_END_ALLOW
1078 #endif
1079 
1080 /* -----------------------------------------------------------------------------
1081  * Python API portion that goes into the runtime
1082  * ----------------------------------------------------------------------------- */
1083 
1084 #ifdef __cplusplus
1085 extern "C" {
1086 #endif
1087 
1088 /* -----------------------------------------------------------------------------
1089  * Constant declarations
1090  * ----------------------------------------------------------------------------- */
1091 
1092 /* Constant Types */
1093 #define SWIG_PY_POINTER 4
1094 #define SWIG_PY_BINARY 5
1095 
1096 /* Constant information structure */
1097 typedef struct swig_const_info {
1098  int type;
1099  char *name;
1100  long lvalue;
1101  double dvalue;
1102  void *pvalue;
1104 } swig_const_info;
1105 
1106 
1107 /* -----------------------------------------------------------------------------
1108  * Wrapper of PyInstanceMethod_New() used in Python 3
1109  * It is exported to the generated module, used for -fastproxy
1110  * ----------------------------------------------------------------------------- */
1111 #if PY_VERSION_HEX >= 0x03000000
1112 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
1113 {
1114  return PyInstanceMethod_New(func);
1115 }
1116 #else
1117 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
1118 {
1119  return NULL;
1120 }
1121 #endif
1122 
1123 #ifdef __cplusplus
1124 }
1125 #endif
1126 
1127 
1128 /* -----------------------------------------------------------------------------
1129  * pyrun.swg
1130  *
1131  * This file contains the runtime support for Python modules
1132  * and includes code for managing global variables and pointer
1133  * type checking.
1134  *
1135  * ----------------------------------------------------------------------------- */
1136 
1137 /* Common SWIG API */
1138 
1139 /* for raw pointers */
1140 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1141 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1142 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1143 
1144 #ifdef SWIGPYTHON_BUILTIN
1145 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1146 #else
1147 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1148 #endif
1149 
1150 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1151 
1152 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1153 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1154 #define swig_owntype int
1155 
1156 /* for raw packed data */
1157 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1158 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1159 
1160 /* for class or struct pointers */
1161 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1162 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1163 
1164 /* for C or C++ function pointers */
1165 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1166 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1167 
1168 /* for C++ member pointers, ie, member methods */
1169 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1170 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1171 
1172 
1173 /* Runtime API */
1174 
1175 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1176 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1177 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1178 
1179 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1180 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1181 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1182 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1183 #define SWIG_fail goto fail
1184 
1185 
1186 /* Runtime API implementation */
1187 
1188 /* Error manipulation */
1189 
1190 SWIGINTERN void
1191 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1193  PyErr_SetObject(errtype, obj);
1194  Py_DECREF(obj);
1196 }
1197 
1198 SWIGINTERN void
1199 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1201  PyErr_SetString(errtype, msg);
1203 }
1204 
1205 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1206 
1207 /* Set a constant value */
1208 
1209 #if defined(SWIGPYTHON_BUILTIN)
1210 
1211 SWIGINTERN void
1212 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1213  PyObject *s = PyString_InternFromString(key);
1214  PyList_Append(seq, s);
1215  Py_DECREF(s);
1216 }
1217 
1218 SWIGINTERN void
1219 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1220 #if PY_VERSION_HEX < 0x02030000
1221  PyDict_SetItemString(d, (char *)name, obj);
1222 #else
1223  PyDict_SetItemString(d, name, obj);
1224 #endif
1225  Py_DECREF(obj);
1226  if (public_interface)
1227  SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1228 }
1229 
1230 #else
1231 
1232 SWIGINTERN void
1233 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1234 #if PY_VERSION_HEX < 0x02030000
1235  PyDict_SetItemString(d, (char *)name, obj);
1236 #else
1237  PyDict_SetItemString(d, name, obj);
1238 #endif
1239  Py_DECREF(obj);
1240 }
1241 
1242 #endif
1243 
1244 /* Append a value to the result obj */
1245 
1246 SWIGINTERN PyObject*
1247 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1248 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1249  if (!result) {
1250  result = obj;
1251  } else if (result == Py_None) {
1252  Py_DECREF(result);
1253  result = obj;
1254  } else {
1255  if (!PyList_Check(result)) {
1256  PyObject *o2 = result;
1257  result = PyList_New(1);
1258  PyList_SetItem(result, 0, o2);
1259  }
1260  PyList_Append(result,obj);
1261  Py_DECREF(obj);
1262  }
1263  return result;
1264 #else
1265  PyObject* o2;
1266  PyObject* o3;
1267  if (!result) {
1268  result = obj;
1269  } else if (result == Py_None) {
1270  Py_DECREF(result);
1271  result = obj;
1272  } else {
1273  if (!PyTuple_Check(result)) {
1274  o2 = result;
1275  result = PyTuple_New(1);
1276  PyTuple_SET_ITEM(result, 0, o2);
1277  }
1278  o3 = PyTuple_New(1);
1279  PyTuple_SET_ITEM(o3, 0, obj);
1280  o2 = result;
1281  result = PySequence_Concat(o2, o3);
1282  Py_DECREF(o2);
1283  Py_DECREF(o3);
1284  }
1285  return result;
1286 #endif
1287 }
1288 
1289 /* Unpack the argument tuple */
1290 
1291 SWIGINTERN int
1292 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1293 {
1294  if (!args) {
1295  if (!min && !max) {
1296  return 1;
1297  } else {
1298  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1299  name, (min == max ? "" : "at least "), (int)min);
1300  return 0;
1301  }
1302  }
1303  if (!PyTuple_Check(args)) {
1304  if (min <= 1 && max >= 1) {
1305  register int i;
1306  objs[0] = args;
1307  for (i = 1; i < max; ++i) {
1308  objs[i] = 0;
1309  }
1310  return 2;
1311  }
1312  PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1313  return 0;
1314  } else {
1315  register Py_ssize_t l = PyTuple_GET_SIZE(args);
1316  if (l < min) {
1317  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1318  name, (min == max ? "" : "at least "), (int)min, (int)l);
1319  return 0;
1320  } else if (l > max) {
1321  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1322  name, (min == max ? "" : "at most "), (int)max, (int)l);
1323  return 0;
1324  } else {
1325  register int i;
1326  for (i = 0; i < l; ++i) {
1327  objs[i] = PyTuple_GET_ITEM(args, i);
1328  }
1329  for (; l < max; ++l) {
1330  objs[l] = 0;
1331  }
1332  return i + 1;
1333  }
1334  }
1335 }
1336 
1337 /* A functor is a function object with one single object argument */
1338 #if PY_VERSION_HEX >= 0x02020000
1339 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1340 #else
1341 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1342 #endif
1343 
1344 /*
1345  Helper for static pointer initialization for both C and C++ code, for example
1346  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1347 */
1348 #ifdef __cplusplus
1349 #define SWIG_STATIC_POINTER(var) var
1350 #else
1351 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1352 #endif
1353 
1354 /* -----------------------------------------------------------------------------
1355  * Pointer declarations
1356  * ----------------------------------------------------------------------------- */
1357 
1358 /* Flags for new pointer objects */
1359 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1360 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1361 
1362 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1363 
1364 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1365 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1366 
1367 #ifdef __cplusplus
1368 extern "C" {
1369 #endif
1370 
1371 /* How to access Py_None */
1372 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1373 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1374 # ifndef SWIG_PYTHON_BUILD_NONE
1375 # define SWIG_PYTHON_BUILD_NONE
1376 # endif
1377 # endif
1378 #endif
1379 
1380 #ifdef SWIG_PYTHON_BUILD_NONE
1381 # ifdef Py_None
1382 # undef Py_None
1383 # define Py_None SWIG_Py_None()
1384 # endif
1385 SWIGRUNTIMEINLINE PyObject *
1386 _SWIG_Py_None(void)
1387 {
1388  PyObject *none = Py_BuildValue((char*)"");
1389  Py_DECREF(none);
1390  return none;
1391 }
1392 SWIGRUNTIME PyObject *
1393 SWIG_Py_None(void)
1394 {
1395  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1396  return none;
1397 }
1398 #endif
1399 
1400 /* The python void return value */
1401 
1402 SWIGRUNTIMEINLINE PyObject *
1404 {
1405  PyObject *none = Py_None;
1406  Py_INCREF(none);
1407  return none;
1408 }
1409 
1410 /* SwigPyClientData */
1411 
1412 typedef struct {
1413  PyObject *klass;
1414  PyObject *newraw;
1415  PyObject *newargs;
1416  PyObject *destroy;
1417  int delargs;
1419  PyTypeObject *pytype;
1421 
1422 SWIGRUNTIMEINLINE int
1424 {
1426  return data ? data->implicitconv : 0;
1427 }
1428 
1429 SWIGRUNTIMEINLINE PyObject *
1431  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1432  PyObject *klass = data ? data->klass : 0;
1433  return (klass ? klass : PyExc_RuntimeError);
1434 }
1435 
1436 
1438 SwigPyClientData_New(PyObject* obj)
1439 {
1440  if (!obj) {
1441  return 0;
1442  } else {
1443  SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1444  /* the klass element */
1445  data->klass = obj;
1446  Py_INCREF(data->klass);
1447  /* the newraw method and newargs arguments used to create a new raw instance */
1448  if (PyClass_Check(obj)) {
1449  data->newraw = 0;
1450  data->newargs = obj;
1451  Py_INCREF(obj);
1452  } else {
1453 #if (PY_VERSION_HEX < 0x02020000)
1454  data->newraw = 0;
1455 #else
1456  data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1457 #endif
1458  if (data->newraw) {
1459  Py_INCREF(data->newraw);
1460  data->newargs = PyTuple_New(1);
1461  PyTuple_SetItem(data->newargs, 0, obj);
1462  } else {
1463  data->newargs = obj;
1464  }
1465  Py_INCREF(data->newargs);
1466  }
1467  /* the destroy method, aka as the C++ delete method */
1468  data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1469  if (PyErr_Occurred()) {
1470  PyErr_Clear();
1471  data->destroy = 0;
1472  }
1473  if (data->destroy) {
1474  int flags;
1475  Py_INCREF(data->destroy);
1476  flags = PyCFunction_GET_FLAGS(data->destroy);
1477 #ifdef METH_O
1478  data->delargs = !(flags & (METH_O));
1479 #else
1480  data->delargs = 0;
1481 #endif
1482  } else {
1483  data->delargs = 0;
1484  }
1485  data->implicitconv = 0;
1486  data->pytype = 0;
1487  return data;
1488  }
1489 }
1490 
1491 SWIGRUNTIME void
1493  Py_XDECREF(data->newraw);
1494  Py_XDECREF(data->newargs);
1495  Py_XDECREF(data->destroy);
1496 }
1497 
1498 /* =============== SwigPyObject =====================*/
1499 
1500 typedef struct {
1501  PyObject_HEAD
1502  void *ptr;
1504  int own;
1505  PyObject *next;
1506 #ifdef SWIGPYTHON_BUILTIN
1507  PyObject *dict;
1508 #endif
1509 } SwigPyObject;
1510 
1511 SWIGRUNTIME PyObject *
1513 {
1514  return PyLong_FromVoidPtr(v->ptr);
1515 }
1516 
1517 SWIGRUNTIME PyObject *
1518 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1519 {
1520  PyObject *res = NULL;
1521  PyObject *args = PyTuple_New(1);
1522  if (args) {
1523  if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1524  PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1525  if (ofmt) {
1526 #if PY_VERSION_HEX >= 0x03000000
1527  res = PyUnicode_Format(ofmt,args);
1528 #else
1529  res = PyString_Format(ofmt,args);
1530 #endif
1531  Py_DECREF(ofmt);
1532  }
1533  Py_DECREF(args);
1534  }
1535  }
1536  return res;
1537 }
1538 
1539 SWIGRUNTIME PyObject *
1541 {
1542  return SwigPyObject_format("%o",v);
1543 }
1544 
1545 SWIGRUNTIME PyObject *
1547 {
1548  return SwigPyObject_format("%x",v);
1549 }
1550 
1551 SWIGRUNTIME PyObject *
1552 #ifdef METH_NOARGS
1554 #else
1555 SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1556 #endif
1557 {
1558  const char *name = SWIG_TypePrettyName(v->ty);
1559  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1560  if (v->next) {
1561 # ifdef METH_NOARGS
1562  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1563 # else
1564  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1565 # endif
1566 # if PY_VERSION_HEX >= 0x03000000
1567  PyObject *joined = PyUnicode_Concat(repr, nrep);
1568  Py_DecRef(repr);
1569  Py_DecRef(nrep);
1570  repr = joined;
1571 # else
1572  PyString_ConcatAndDel(&repr,nrep);
1573 # endif
1574  }
1575  return repr;
1576 }
1577 
1578 SWIGRUNTIME int
1580 {
1581  void *i = v->ptr;
1582  void *j = w->ptr;
1583  return (i < j) ? -1 : ((i > j) ? 1 : 0);
1584 }
1585 
1586 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1587 SWIGRUNTIME PyObject*
1589 {
1590  PyObject* res;
1591  if( op != Py_EQ && op != Py_NE ) {
1592  Py_INCREF(Py_NotImplemented);
1593  return Py_NotImplemented;
1594  }
1595  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1596  return res;
1597 }
1598 
1599 
1600 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1601 
1602 #ifdef SWIGPYTHON_BUILTIN
1603 static swig_type_info *SwigPyObject_stype = 0;
1604 SWIGRUNTIME PyTypeObject*
1605 SwigPyObject_type(void) {
1606  SwigPyClientData *cd;
1607  assert(SwigPyObject_stype);
1608  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1609  assert(cd);
1610  assert(cd->pytype);
1611  return cd->pytype;
1612 }
1613 #else
1614 SWIGRUNTIME PyTypeObject*
1616  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1617  return type;
1618 }
1619 #endif
1620 
1622 SwigPyObject_Check(PyObject *op) {
1623 #ifdef SWIGPYTHON_BUILTIN
1624  PyTypeObject *target_tp = SwigPyObject_type();
1625  if (PyType_IsSubtype(op->ob_type, target_tp))
1626  return 1;
1627  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1628 #else
1629  return (Py_TYPE(op) == SwigPyObject_type())
1630  || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1631 #endif
1632 }
1633 
1634 SWIGRUNTIME PyObject *
1635 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1636 
1637 SWIGRUNTIME void
1639 {
1640  SwigPyObject *sobj = (SwigPyObject *) v;
1641  PyObject *next = sobj->next;
1642  if (sobj->own == SWIG_POINTER_OWN) {
1643  swig_type_info *ty = sobj->ty;
1644  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1645  PyObject *destroy = data ? data->destroy : 0;
1646  if (destroy) {
1647  /* destroy is always a VARARGS method */
1648  PyObject *res;
1649  if (data->delargs) {
1650  /* we need to create a temporary object to carry the destroy operation */
1651  PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1652  res = SWIG_Python_CallFunctor(destroy, tmp);
1653  Py_DECREF(tmp);
1654  } else {
1655  PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1656  PyObject *mself = PyCFunction_GET_SELF(destroy);
1657  res = ((*meth)(mself, v));
1658  }
1659  Py_XDECREF(res);
1660  }
1661 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1662  else {
1663  const char *name = SWIG_TypePrettyName(ty);
1664  printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1665  }
1666 #endif
1667  }
1668  Py_XDECREF(next);
1669  PyObject_DEL(v);
1670 }
1671 
1672 SWIGRUNTIME PyObject*
1673 SwigPyObject_append(PyObject* v, PyObject* next)
1674 {
1675  SwigPyObject *sobj = (SwigPyObject *) v;
1676 #ifndef METH_O
1677  PyObject *tmp = 0;
1678  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1679  next = tmp;
1680 #endif
1681  if (!SwigPyObject_Check(next)) {
1682  return NULL;
1683  }
1684  sobj->next = next;
1685  Py_INCREF(next);
1686  return SWIG_Py_Void();
1687 }
1688 
1689 SWIGRUNTIME PyObject*
1690 #ifdef METH_NOARGS
1691 SwigPyObject_next(PyObject* v)
1692 #else
1693 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1694 #endif
1695 {
1696  SwigPyObject *sobj = (SwigPyObject *) v;
1697  if (sobj->next) {
1698  Py_INCREF(sobj->next);
1699  return sobj->next;
1700  } else {
1701  return SWIG_Py_Void();
1702  }
1703 }
1704 
1705 SWIGINTERN PyObject*
1706 #ifdef METH_NOARGS
1707 SwigPyObject_disown(PyObject *v)
1708 #else
1709 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1710 #endif
1711 {
1712  SwigPyObject *sobj = (SwigPyObject *)v;
1713  sobj->own = 0;
1714  return SWIG_Py_Void();
1715 }
1716 
1717 SWIGINTERN PyObject*
1718 #ifdef METH_NOARGS
1719 SwigPyObject_acquire(PyObject *v)
1720 #else
1721 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1722 #endif
1723 {
1724  SwigPyObject *sobj = (SwigPyObject *)v;
1725  sobj->own = SWIG_POINTER_OWN;
1726  return SWIG_Py_Void();
1727 }
1728 
1729 SWIGINTERN PyObject*
1730 SwigPyObject_own(PyObject *v, PyObject *args)
1731 {
1732  PyObject *val = 0;
1733 #if (PY_VERSION_HEX < 0x02020000)
1734  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1735 #elif (PY_VERSION_HEX < 0x02050000)
1736  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1737 #else
1738  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
1739 #endif
1740  {
1741  return NULL;
1742  }
1743  else
1744  {
1745  SwigPyObject *sobj = (SwigPyObject *)v;
1746  PyObject *obj = PyBool_FromLong(sobj->own);
1747  if (val) {
1748 #ifdef METH_NOARGS
1749  if (PyObject_IsTrue(val)) {
1751  } else {
1753  }
1754 #else
1755  if (PyObject_IsTrue(val)) {
1756  SwigPyObject_acquire(v,args);
1757  } else {
1758  SwigPyObject_disown(v,args);
1759  }
1760 #endif
1761  }
1762  return obj;
1763  }
1764 }
1765 
1766 #ifdef METH_O
1767 static PyMethodDef
1768 swigobject_methods[] = {
1769  {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1770  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
1771  {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1772  {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
1773  {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1774  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
1775  {0, 0, 0, 0}
1776 };
1777 #else
1778 static PyMethodDef
1779 swigobject_methods[] = {
1780  {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1781  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
1782  {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1783  {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1784  {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1785  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
1786  {0, 0, 0, 0}
1787 };
1788 #endif
1789 
1790 #if PY_VERSION_HEX < 0x02020000
1791 SWIGINTERN PyObject *
1793 {
1794  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1795 }
1796 #endif
1797 
1798 SWIGRUNTIME PyTypeObject*
1800  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1801 
1802  static PyNumberMethods SwigPyObject_as_number = {
1803  (binaryfunc)0, /*nb_add*/
1804  (binaryfunc)0, /*nb_subtract*/
1805  (binaryfunc)0, /*nb_multiply*/
1806  /* nb_divide removed in Python 3 */
1807 #if PY_VERSION_HEX < 0x03000000
1808  (binaryfunc)0, /*nb_divide*/
1809 #endif
1810  (binaryfunc)0, /*nb_remainder*/
1811  (binaryfunc)0, /*nb_divmod*/
1812  (ternaryfunc)0,/*nb_power*/
1813  (unaryfunc)0, /*nb_negative*/
1814  (unaryfunc)0, /*nb_positive*/
1815  (unaryfunc)0, /*nb_absolute*/
1816  (inquiry)0, /*nb_nonzero*/
1817  0, /*nb_invert*/
1818  0, /*nb_lshift*/
1819  0, /*nb_rshift*/
1820  0, /*nb_and*/
1821  0, /*nb_xor*/
1822  0, /*nb_or*/
1823 #if PY_VERSION_HEX < 0x03000000
1824  0, /*nb_coerce*/
1825 #endif
1826  (unaryfunc)SwigPyObject_long, /*nb_int*/
1827 #if PY_VERSION_HEX < 0x03000000
1828  (unaryfunc)SwigPyObject_long, /*nb_long*/
1829 #else
1830  0, /*nb_reserved*/
1831 #endif
1832  (unaryfunc)0, /*nb_float*/
1833 #if PY_VERSION_HEX < 0x03000000
1834  (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1835  (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1836 #endif
1837 #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1838  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1839 #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1840  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1841 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1842  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1843 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1844  0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1845 #endif
1846  };
1847 
1848  static PyTypeObject swigpyobject_type;
1849  static int type_init = 0;
1850  if (!type_init) {
1851  const PyTypeObject tmp = {
1852  /* PyObject header changed in Python 3 */
1853 #if PY_VERSION_HEX >= 0x03000000
1854  PyVarObject_HEAD_INIT(NULL, 0)
1855 #else
1856  PyObject_HEAD_INIT(NULL)
1857  0, /* ob_size */
1858 #endif
1859  (char *)"SwigPyObject", /* tp_name */
1860  sizeof(SwigPyObject), /* tp_basicsize */
1861  0, /* tp_itemsize */
1862  (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1863  0, /* tp_print */
1864 #if PY_VERSION_HEX < 0x02020000
1865  (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
1866 #else
1867  (getattrfunc)0, /* tp_getattr */
1868 #endif
1869  (setattrfunc)0, /* tp_setattr */
1870 #if PY_VERSION_HEX >= 0x03000000
1871  0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1872 #else
1873  (cmpfunc)SwigPyObject_compare, /* tp_compare */
1874 #endif
1875  (reprfunc)SwigPyObject_repr, /* tp_repr */
1876  &SwigPyObject_as_number, /* tp_as_number */
1877  0, /* tp_as_sequence */
1878  0, /* tp_as_mapping */
1879  (hashfunc)0, /* tp_hash */
1880  (ternaryfunc)0, /* tp_call */
1881  0, /* tp_str */
1882  PyObject_GenericGetAttr, /* tp_getattro */
1883  0, /* tp_setattro */
1884  0, /* tp_as_buffer */
1885  Py_TPFLAGS_DEFAULT, /* tp_flags */
1886  swigobject_doc, /* tp_doc */
1887  0, /* tp_traverse */
1888  0, /* tp_clear */
1889  (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1890  0, /* tp_weaklistoffset */
1891 #if PY_VERSION_HEX >= 0x02020000
1892  0, /* tp_iter */
1893  0, /* tp_iternext */
1894  swigobject_methods, /* tp_methods */
1895  0, /* tp_members */
1896  0, /* tp_getset */
1897  0, /* tp_base */
1898  0, /* tp_dict */
1899  0, /* tp_descr_get */
1900  0, /* tp_descr_set */
1901  0, /* tp_dictoffset */
1902  0, /* tp_init */
1903  0, /* tp_alloc */
1904  0, /* tp_new */
1905  0, /* tp_free */
1906  0, /* tp_is_gc */
1907  0, /* tp_bases */
1908  0, /* tp_mro */
1909  0, /* tp_cache */
1910  0, /* tp_subclasses */
1911  0, /* tp_weaklist */
1912 #endif
1913 #if PY_VERSION_HEX >= 0x02030000
1914  0, /* tp_del */
1915 #endif
1916 #if PY_VERSION_HEX >= 0x02060000
1917  0, /* tp_version */
1918 #endif
1919 #ifdef COUNT_ALLOCS
1920  0,0,0,0 /* tp_alloc -> tp_next */
1921 #endif
1922  };
1923  swigpyobject_type = tmp;
1924  type_init = 1;
1925 #if PY_VERSION_HEX < 0x02020000
1926  swigpyobject_type.ob_type = &PyType_Type;
1927 #else
1928  if (PyType_Ready(&swigpyobject_type) < 0)
1929  return NULL;
1930 #endif
1931  }
1932  return &swigpyobject_type;
1933 }
1934 
1935 SWIGRUNTIME PyObject *
1936 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1937 {
1938  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1939  if (sobj) {
1940  sobj->ptr = ptr;
1941  sobj->ty = ty;
1942  sobj->own = own;
1943  sobj->next = 0;
1944  }
1945  return (PyObject *)sobj;
1946 }
1947 
1948 /* -----------------------------------------------------------------------------
1949  * Implements a simple Swig Packed type, and use it instead of string
1950  * ----------------------------------------------------------------------------- */
1951 
1952 typedef struct {
1953  PyObject_HEAD
1954  void *pack;
1956  size_t size;
1957 } SwigPyPacked;
1958 
1959 SWIGRUNTIME int
1961 {
1962  char result[SWIG_BUFFER_SIZE];
1963  fputs("<Swig Packed ", fp);
1964  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1965  fputs("at ", fp);
1966  fputs(result, fp);
1967  }
1968  fputs(v->ty->name,fp);
1969  fputs(">", fp);
1970  return 0;
1971 }
1972 
1973 SWIGRUNTIME PyObject *
1975 {
1976  char result[SWIG_BUFFER_SIZE];
1977  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1978  return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1979  } else {
1980  return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1981  }
1982 }
1983 
1984 SWIGRUNTIME PyObject *
1986 {
1987  char result[SWIG_BUFFER_SIZE];
1988  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1989  return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1990  } else {
1991  return SWIG_Python_str_FromChar(v->ty->name);
1992  }
1993 }
1994 
1995 SWIGRUNTIME int
1997 {
1998  size_t i = v->size;
1999  size_t j = w->size;
2000  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2001  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
2002 }
2003 
2004 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
2005 
2006 SWIGRUNTIME PyTypeObject*
2008  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2009  return type;
2010 }
2011 
2013 SwigPyPacked_Check(PyObject *op) {
2014  return ((op)->ob_type == SwigPyPacked_TypeOnce())
2015  || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
2016 }
2017 
2018 SWIGRUNTIME void
2020 {
2021  if (SwigPyPacked_Check(v)) {
2022  SwigPyPacked *sobj = (SwigPyPacked *) v;
2023  free(sobj->pack);
2024  }
2025  PyObject_DEL(v);
2026 }
2027 
2028 SWIGRUNTIME PyTypeObject*
2030  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
2031  static PyTypeObject swigpypacked_type;
2032  static int type_init = 0;
2033  if (!type_init) {
2034  const PyTypeObject tmp = {
2035  /* PyObject header changed in Python 3 */
2036 #if PY_VERSION_HEX>=0x03000000
2037  PyVarObject_HEAD_INIT(NULL, 0)
2038 #else
2039  PyObject_HEAD_INIT(NULL)
2040  0, /* ob_size */
2041 #endif
2042  (char *)"SwigPyPacked", /* tp_name */
2043  sizeof(SwigPyPacked), /* tp_basicsize */
2044  0, /* tp_itemsize */
2045  (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
2046  (printfunc)SwigPyPacked_print, /* tp_print */
2047  (getattrfunc)0, /* tp_getattr */
2048  (setattrfunc)0, /* tp_setattr */
2049 #if PY_VERSION_HEX>=0x03000000
2050  0, /* tp_reserved in 3.0.1 */
2051 #else
2052  (cmpfunc)SwigPyPacked_compare, /* tp_compare */
2053 #endif
2054  (reprfunc)SwigPyPacked_repr, /* tp_repr */
2055  0, /* tp_as_number */
2056  0, /* tp_as_sequence */
2057  0, /* tp_as_mapping */
2058  (hashfunc)0, /* tp_hash */
2059  (ternaryfunc)0, /* tp_call */
2060  (reprfunc)SwigPyPacked_str, /* tp_str */
2061  PyObject_GenericGetAttr, /* tp_getattro */
2062  0, /* tp_setattro */
2063  0, /* tp_as_buffer */
2064  Py_TPFLAGS_DEFAULT, /* tp_flags */
2065  swigpacked_doc, /* tp_doc */
2066  0, /* tp_traverse */
2067  0, /* tp_clear */
2068  0, /* tp_richcompare */
2069  0, /* tp_weaklistoffset */
2070 #if PY_VERSION_HEX >= 0x02020000
2071  0, /* tp_iter */
2072  0, /* tp_iternext */
2073  0, /* tp_methods */
2074  0, /* tp_members */
2075  0, /* tp_getset */
2076  0, /* tp_base */
2077  0, /* tp_dict */
2078  0, /* tp_descr_get */
2079  0, /* tp_descr_set */
2080  0, /* tp_dictoffset */
2081  0, /* tp_init */
2082  0, /* tp_alloc */
2083  0, /* tp_new */
2084  0, /* tp_free */
2085  0, /* tp_is_gc */
2086  0, /* tp_bases */
2087  0, /* tp_mro */
2088  0, /* tp_cache */
2089  0, /* tp_subclasses */
2090  0, /* tp_weaklist */
2091 #endif
2092 #if PY_VERSION_HEX >= 0x02030000
2093  0, /* tp_del */
2094 #endif
2095 #if PY_VERSION_HEX >= 0x02060000
2096  0, /* tp_version */
2097 #endif
2098 #ifdef COUNT_ALLOCS
2099  0,0,0,0 /* tp_alloc -> tp_next */
2100 #endif
2101  };
2102  swigpypacked_type = tmp;
2103  type_init = 1;
2104 #if PY_VERSION_HEX < 0x02020000
2105  swigpypacked_type.ob_type = &PyType_Type;
2106 #else
2107  if (PyType_Ready(&swigpypacked_type) < 0)
2108  return NULL;
2109 #endif
2110  }
2111  return &swigpypacked_type;
2112 }
2113 
2114 SWIGRUNTIME PyObject *
2115 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2116 {
2117  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
2118  if (sobj) {
2119  void *pack = malloc(size);
2120  if (pack) {
2121  memcpy(pack, ptr, size);
2122  sobj->pack = pack;
2123  sobj->ty = ty;
2124  sobj->size = size;
2125  } else {
2126  PyObject_DEL((PyObject *) sobj);
2127  sobj = 0;
2128  }
2129  }
2130  return (PyObject *) sobj;
2131 }
2132 
2134 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2135 {
2136  if (SwigPyPacked_Check(obj)) {
2137  SwigPyPacked *sobj = (SwigPyPacked *)obj;
2138  if (sobj->size != size) return 0;
2139  memcpy(ptr, sobj->pack, size);
2140  return sobj->ty;
2141  } else {
2142  return 0;
2143  }
2144 }
2145 
2146 /* -----------------------------------------------------------------------------
2147  * pointers/data manipulation
2148  * ----------------------------------------------------------------------------- */
2149 
2150 SWIGRUNTIMEINLINE PyObject *
2152 {
2153  return SWIG_Python_str_FromChar("this");
2154 }
2155 
2156 static PyObject *swig_this = NULL;
2157 
2158 SWIGRUNTIME PyObject *
2160 {
2161  if (swig_this == NULL)
2162  swig_this = _SWIG_This();
2163  return swig_this;
2164 }
2165 
2166 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2167 
2168 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2169 #if PY_VERSION_HEX>=0x03000000
2170 #define SWIG_PYTHON_SLOW_GETSET_THIS
2171 #endif
2172 
2174 SWIG_Python_GetSwigThis(PyObject *pyobj)
2175 {
2176  PyObject *obj;
2177 
2178  if (SwigPyObject_Check(pyobj))
2179  return (SwigPyObject *) pyobj;
2180 
2181 #ifdef SWIGPYTHON_BUILTIN
2182  (void)obj;
2183 # ifdef PyWeakref_CheckProxy
2184  if (PyWeakref_CheckProxy(pyobj)) {
2185  pyobj = PyWeakref_GET_OBJECT(pyobj);
2186  if (pyobj && SwigPyObject_Check(pyobj))
2187  return (SwigPyObject*) pyobj;
2188  }
2189 # endif
2190  return NULL;
2191 #else
2192 
2193  obj = 0;
2194 
2195 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2196  if (PyInstance_Check(pyobj)) {
2197  obj = _PyInstance_Lookup(pyobj, SWIG_This());
2198  } else {
2199  PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2200  if (dictptr != NULL) {
2201  PyObject *dict = *dictptr;
2202  obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2203  } else {
2204 #ifdef PyWeakref_CheckProxy
2205  if (PyWeakref_CheckProxy(pyobj)) {
2206  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2207  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2208  }
2209 #endif
2210  obj = PyObject_GetAttr(pyobj,SWIG_This());
2211  if (obj) {
2212  Py_DECREF(obj);
2213  } else {
2214  if (PyErr_Occurred()) PyErr_Clear();
2215  return 0;
2216  }
2217  }
2218  }
2219 #else
2220  obj = PyObject_GetAttr(pyobj,SWIG_This());
2221  if (obj) {
2222  Py_DECREF(obj);
2223  } else {
2224  if (PyErr_Occurred()) PyErr_Clear();
2225  return 0;
2226  }
2227 #endif
2228  if (obj && !SwigPyObject_Check(obj)) {
2229  /* a PyObject is called 'this', try to get the 'real this'
2230  SwigPyObject from it */
2231  return SWIG_Python_GetSwigThis(obj);
2232  }
2233  return (SwigPyObject *)obj;
2234 #endif
2235 }
2236 
2237 /* Acquire a pointer value */
2238 
2239 SWIGRUNTIME int
2240 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2241  if (own == SWIG_POINTER_OWN) {
2243  if (sobj) {
2244  int oldown = sobj->own;
2245  sobj->own = own;
2246  return oldown;
2247  }
2248  }
2249  return 0;
2250 }
2251 
2252 /* Convert a pointer value */
2253 
2254 SWIGRUNTIME int
2255 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2256  int res;
2257  SwigPyObject *sobj;
2258  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2259 
2260  if (!obj)
2261  return SWIG_ERROR;
2262  if (obj == Py_None && !implicit_conv) {
2263  if (ptr)
2264  *ptr = 0;
2265  return SWIG_OK;
2266  }
2267 
2268  res = SWIG_ERROR;
2269 
2270  sobj = SWIG_Python_GetSwigThis(obj);
2271  if (own)
2272  *own = 0;
2273  while (sobj) {
2274  void *vptr = sobj->ptr;
2275  if (ty) {
2276  swig_type_info *to = sobj->ty;
2277  if (to == ty) {
2278  /* no type cast needed */
2279  if (ptr) *ptr = vptr;
2280  break;
2281  } else {
2282  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2283  if (!tc) {
2284  sobj = (SwigPyObject *)sobj->next;
2285  } else {
2286  if (ptr) {
2287  int newmemory = 0;
2288  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2289  if (newmemory == SWIG_CAST_NEW_MEMORY) {
2290  assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2291  if (own)
2292  *own = *own | SWIG_CAST_NEW_MEMORY;
2293  }
2294  }
2295  break;
2296  }
2297  }
2298  } else {
2299  if (ptr) *ptr = vptr;
2300  break;
2301  }
2302  }
2303  if (sobj) {
2304  if (own)
2305  *own = *own | sobj->own;
2306  if (flags & SWIG_POINTER_DISOWN) {
2307  sobj->own = 0;
2308  }
2309  res = SWIG_OK;
2310  } else {
2311  if (implicit_conv) {
2312  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2313  if (data && !data->implicitconv) {
2314  PyObject *klass = data->klass;
2315  if (klass) {
2316  PyObject *impconv;
2317  data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2318  impconv = SWIG_Python_CallFunctor(klass, obj);
2319  data->implicitconv = 0;
2320  if (PyErr_Occurred()) {
2321  PyErr_Clear();
2322  impconv = 0;
2323  }
2324  if (impconv) {
2325  SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2326  if (iobj) {
2327  void *vptr;
2328  res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2329  if (SWIG_IsOK(res)) {
2330  if (ptr) {
2331  *ptr = vptr;
2332  /* transfer the ownership to 'ptr' */
2333  iobj->own = 0;
2334  res = SWIG_AddCast(res);
2335  res = SWIG_AddNewMask(res);
2336  } else {
2337  res = SWIG_AddCast(res);
2338  }
2339  }
2340  }
2341  Py_DECREF(impconv);
2342  }
2343  }
2344  }
2345  }
2346  if (!SWIG_IsOK(res) && obj == Py_None) {
2347  if (ptr)
2348  *ptr = 0;
2349  if (PyErr_Occurred())
2350  PyErr_Clear();
2351  res = SWIG_OK;
2352  }
2353  }
2354  return res;
2355 }
2356 
2357 /* Convert a function ptr value */
2358 
2359 SWIGRUNTIME int
2360 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2361  if (!PyCFunction_Check(obj)) {
2362  return SWIG_ConvertPtr(obj, ptr, ty, 0);
2363  } else {
2364  void *vptr = 0;
2365 
2366  /* here we get the method pointer for callbacks */
2367  const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2368  const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2369  if (desc)
2370  desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2371  if (!desc)
2372  return SWIG_ERROR;
2373  if (ty) {
2374  swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2375  if (tc) {
2376  int newmemory = 0;
2377  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2378  assert(!newmemory); /* newmemory handling not yet implemented */
2379  } else {
2380  return SWIG_ERROR;
2381  }
2382  } else {
2383  *ptr = vptr;
2384  }
2385  return SWIG_OK;
2386  }
2387 }
2388 
2389 /* Convert a packed value value */
2390 
2391 SWIGRUNTIME int
2392 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2393  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2394  if (!to) return SWIG_ERROR;
2395  if (ty) {
2396  if (to != ty) {
2397  /* check type cast? */
2398  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2399  if (!tc) return SWIG_ERROR;
2400  }
2401  }
2402  return SWIG_OK;
2403 }
2404 
2405 /* -----------------------------------------------------------------------------
2406  * Create a new pointer object
2407  * ----------------------------------------------------------------------------- */
2408 
2409 /*
2410  Create a new instance object, without calling __init__, and set the
2411  'this' attribute.
2412 */
2413 
2414 SWIGRUNTIME PyObject*
2416 {
2417 #if (PY_VERSION_HEX >= 0x02020000)
2418  PyObject *inst = 0;
2419  PyObject *newraw = data->newraw;
2420  if (newraw) {
2421  inst = PyObject_Call(newraw, data->newargs, NULL);
2422  if (inst) {
2423 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2424  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2425  if (dictptr != NULL) {
2426  PyObject *dict = *dictptr;
2427  if (dict == NULL) {
2428  dict = PyDict_New();
2429  *dictptr = dict;
2430  PyDict_SetItem(dict, SWIG_This(), swig_this);
2431  }
2432  }
2433 #else
2434  PyObject *key = SWIG_This();
2435  PyObject_SetAttr(inst, key, swig_this);
2436 #endif
2437  }
2438  } else {
2439 #if PY_VERSION_HEX >= 0x03000000
2440  inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2441  if (inst) {
2442  PyObject_SetAttr(inst, SWIG_This(), swig_this);
2443  Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2444  }
2445 #else
2446  PyObject *dict = PyDict_New();
2447  if (dict) {
2448  PyDict_SetItem(dict, SWIG_This(), swig_this);
2449  inst = PyInstance_NewRaw(data->newargs, dict);
2450  Py_DECREF(dict);
2451  }
2452 #endif
2453  }
2454  return inst;
2455 #else
2456 #if (PY_VERSION_HEX >= 0x02010000)
2457  PyObject *inst = 0;
2458  PyObject *dict = PyDict_New();
2459  if (dict) {
2460  PyDict_SetItem(dict, SWIG_This(), swig_this);
2461  inst = PyInstance_NewRaw(data->newargs, dict);
2462  Py_DECREF(dict);
2463  }
2464  return (PyObject *) inst;
2465 #else
2466  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2467  if (inst == NULL) {
2468  return NULL;
2469  }
2470  inst->in_class = (PyClassObject *)data->newargs;
2471  Py_INCREF(inst->in_class);
2472  inst->in_dict = PyDict_New();
2473  if (inst->in_dict == NULL) {
2474  Py_DECREF(inst);
2475  return NULL;
2476  }
2477 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2478  inst->in_weakreflist = NULL;
2479 #endif
2480 #ifdef Py_TPFLAGS_GC
2481  PyObject_GC_Init(inst);
2482 #endif
2483  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2484  return (PyObject *) inst;
2485 #endif
2486 #endif
2487 }
2488 
2489 SWIGRUNTIME void
2490 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2491 {
2492  PyObject *dict;
2493 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2494  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2495  if (dictptr != NULL) {
2496  dict = *dictptr;
2497  if (dict == NULL) {
2498  dict = PyDict_New();
2499  *dictptr = dict;
2500  }
2501  PyDict_SetItem(dict, SWIG_This(), swig_this);
2502  return;
2503  }
2504 #endif
2505  dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2506  PyDict_SetItem(dict, SWIG_This(), swig_this);
2507  Py_DECREF(dict);
2508 }
2509 
2510 
2511 SWIGINTERN PyObject *
2513  PyObject *obj[2];
2514  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2515  return NULL;
2516  } else {
2517  SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2518  if (sthis) {
2519  SwigPyObject_append((PyObject*) sthis, obj[1]);
2520  } else {
2521  SWIG_Python_SetSwigThis(obj[0], obj[1]);
2522  }
2523  return SWIG_Py_Void();
2524  }
2525 }
2526 
2527 /* Create a new pointer object */
2528 
2529 SWIGRUNTIME PyObject *
2530 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2531  SwigPyClientData *clientdata;
2532  PyObject * robj;
2533  int own;
2534 
2535  if (!ptr)
2536  return SWIG_Py_Void();
2537 
2538  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2539  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2540  if (clientdata && clientdata->pytype) {
2541  SwigPyObject *newobj;
2542  if (flags & SWIG_BUILTIN_TP_INIT) {
2543  newobj = (SwigPyObject*) self;
2544  if (newobj->ptr) {
2545  PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2546  while (newobj->next)
2547  newobj = (SwigPyObject *) newobj->next;
2548  newobj->next = next_self;
2549  newobj = (SwigPyObject *)next_self;
2550  }
2551  } else {
2552  newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2553  }
2554  if (newobj) {
2555  newobj->ptr = ptr;
2556  newobj->ty = type;
2557  newobj->own = own;
2558  newobj->next = 0;
2559 #ifdef SWIGPYTHON_BUILTIN
2560  newobj->dict = 0;
2561 #endif
2562  return (PyObject*) newobj;
2563  }
2564  return SWIG_Py_Void();
2565  }
2566 
2567  assert(!(flags & SWIG_BUILTIN_TP_INIT));
2568 
2569  robj = SwigPyObject_New(ptr, type, own);
2570  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2571  PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2572  Py_DECREF(robj);
2573  robj = inst;
2574  }
2575  return robj;
2576 }
2577 
2578 /* Create a new packed object */
2579 
2580 SWIGRUNTIMEINLINE PyObject *
2581 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2582  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2583 }
2584 
2585 /* -----------------------------------------------------------------------------*
2586  * Get type list
2587  * -----------------------------------------------------------------------------*/
2588 
2589 #ifdef SWIG_LINK_RUNTIME
2590 void *SWIG_ReturnGlobalTypeList(void *);
2591 #endif
2592 
2595  static void *type_pointer = (void *)0;
2596  /* first check if module already created */
2597  if (!type_pointer) {
2598 #ifdef SWIG_LINK_RUNTIME
2599  type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2600 #else
2601 # ifdef SWIGPY_USE_CAPSULE
2602  type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2603 # else
2604  type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2605  (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2606 # endif
2607  if (PyErr_Occurred()) {
2608  PyErr_Clear();
2609  type_pointer = (void *)0;
2610  }
2611 #endif
2612  }
2613  return (swig_module_info *) type_pointer;
2614 }
2615 
2616 #if PY_MAJOR_VERSION < 2
2617 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2618  is copied out of Python/modsupport.c in python version 2.3.4 */
2619 SWIGINTERN int
2620 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2621 {
2622  PyObject *dict;
2623  if (!PyModule_Check(m)) {
2624  PyErr_SetString(PyExc_TypeError,
2625  "PyModule_AddObject() needs module as first arg");
2626  return SWIG_ERROR;
2627  }
2628  if (!o) {
2629  PyErr_SetString(PyExc_TypeError,
2630  "PyModule_AddObject() needs non-NULL value");
2631  return SWIG_ERROR;
2632  }
2633 
2634  dict = PyModule_GetDict(m);
2635  if (dict == NULL) {
2636  /* Internal error -- modules must have a dict! */
2637  PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2638  PyModule_GetName(m));
2639  return SWIG_ERROR;
2640  }
2641  if (PyDict_SetItemString(dict, name, o))
2642  return SWIG_ERROR;
2643  Py_DECREF(o);
2644  return SWIG_OK;
2645 }
2646 #endif
2647 
2648 SWIGRUNTIME void
2649 #ifdef SWIGPY_USE_CAPSULE
2650 SWIG_Python_DestroyModule(PyObject *obj)
2651 #else
2653 #endif
2654 {
2655 #ifdef SWIGPY_USE_CAPSULE
2656  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2657 #else
2658  swig_module_info *swig_module = (swig_module_info *) vptr;
2659 #endif
2660  swig_type_info **types = swig_module->types;
2661  size_t i;
2662  for (i =0; i < swig_module->size; ++i) {
2663  swig_type_info *ty = types[i];
2664  if (ty->owndata) {
2666  if (data) SwigPyClientData_Del(data);
2667  }
2668  }
2669  Py_DECREF(SWIG_This());
2670  swig_this = NULL;
2671 }
2672 
2673 SWIGRUNTIME void
2675 #if PY_VERSION_HEX >= 0x03000000
2676  /* Add a dummy module object into sys.modules */
2677  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2678 #else
2679  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2680  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2681 #endif
2682 #ifdef SWIGPY_USE_CAPSULE
2683  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2684  if (pointer && module) {
2685  PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2686  } else {
2687  Py_XDECREF(pointer);
2688  }
2689 #else
2690  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2691  if (pointer && module) {
2692  PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2693  } else {
2694  Py_XDECREF(pointer);
2695  }
2696 #endif
2697 }
2698 
2699 /* The python cached type query */
2700 SWIGRUNTIME PyObject *
2702  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2703  return cache;
2704 }
2705 
2707 SWIG_Python_TypeQuery(const char *type)
2708 {
2709  PyObject *cache = SWIG_Python_TypeCache();
2710  PyObject *key = SWIG_Python_str_FromChar(type);
2711  PyObject *obj = PyDict_GetItem(cache, key);
2712  swig_type_info *descriptor;
2713  if (obj) {
2714 #ifdef SWIGPY_USE_CAPSULE
2715  descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2716 #else
2717  descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2718 #endif
2719  } else {
2721  descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2722  if (descriptor) {
2723 #ifdef SWIGPY_USE_CAPSULE
2724  obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2725 #else
2726  obj = PyCObject_FromVoidPtr(descriptor, NULL);
2727 #endif
2728  PyDict_SetItem(cache, key, obj);
2729  Py_DECREF(obj);
2730  }
2731  }
2732  Py_DECREF(key);
2733  return descriptor;
2734 }
2735 
2736 /*
2737  For backward compatibility only
2738 */
2739 #define SWIG_POINTER_EXCEPTION 0
2740 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2741 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2742 
2743 SWIGRUNTIME int
2744 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2745 {
2746  if (PyErr_Occurred()) {
2747  PyObject *type = 0;
2748  PyObject *value = 0;
2749  PyObject *traceback = 0;
2750  PyErr_Fetch(&type, &value, &traceback);
2751  if (value) {
2752  char *tmp;
2753  PyObject *old_str = PyObject_Str(value);
2754  Py_XINCREF(type);
2755  PyErr_Clear();
2756  if (infront) {
2757  PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2758  } else {
2759  PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2760  }
2762  Py_DECREF(old_str);
2763  }
2764  return 1;
2765  } else {
2766  return 0;
2767  }
2768 }
2769 
2770 SWIGRUNTIME int
2772 {
2773  if (PyErr_Occurred()) {
2774  /* add information about failing argument */
2775  char mesg[256];
2776  PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2777  return SWIG_Python_AddErrMesg(mesg, 1);
2778  } else {
2779  return 0;
2780  }
2781 }
2782 
2783 SWIGRUNTIMEINLINE const char *
2784 SwigPyObject_GetDesc(PyObject *self)
2785 {
2786  SwigPyObject *v = (SwigPyObject *)self;
2787  swig_type_info *ty = v ? v->ty : 0;
2788  return ty ? ty->str : "";
2789 }
2790 
2791 SWIGRUNTIME void
2792 SWIG_Python_TypeError(const char *type, PyObject *obj)
2793 {
2794  if (type) {
2795 #if defined(SWIG_COBJECT_TYPES)
2796  if (obj && SwigPyObject_Check(obj)) {
2797  const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2798  if (otype) {
2799  PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2800  type, otype);
2801  return;
2802  }
2803  } else
2804 #endif
2805  {
2806  const char *otype = (obj ? obj->ob_type->tp_name : 0);
2807  if (otype) {
2808  PyObject *str = PyObject_Str(obj);
2809  const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2810  if (cstr) {
2811  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2812  type, otype, cstr);
2814  } else {
2815  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2816  type, otype);
2817  }
2818  Py_XDECREF(str);
2819  return;
2820  }
2821  }
2822  PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2823  } else {
2824  PyErr_Format(PyExc_TypeError, "unexpected type is received");
2825  }
2826 }
2827 
2828 
2829 /* Convert a pointer value, signal an exception on a type mismatch */
2830 SWIGRUNTIME void *
2831 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2832  void *result;
2833  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2834  PyErr_Clear();
2835 #if SWIG_POINTER_EXCEPTION
2836  if (flags) {
2838  SWIG_Python_ArgFail(argnum);
2839  }
2840 #endif
2841  }
2842  return result;
2843 }
2844 
2845 #ifdef SWIGPYTHON_BUILTIN
2846 SWIGRUNTIME int
2847 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2848  PyTypeObject *tp = obj->ob_type;
2849  PyObject *descr;
2850  PyObject *encoded_name;
2851  descrsetfunc f;
2852  int res = -1;
2853 
2854 # ifdef Py_USING_UNICODE
2855  if (PyString_Check(name)) {
2856  name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2857  if (!name)
2858  return -1;
2859  } else if (!PyUnicode_Check(name))
2860 # else
2861  if (!PyString_Check(name))
2862 # endif
2863  {
2864  PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2865  return -1;
2866  } else {
2867  Py_INCREF(name);
2868  }
2869 
2870  if (!tp->tp_dict) {
2871  if (PyType_Ready(tp) < 0)
2872  goto done;
2873  }
2874 
2875  descr = _PyType_Lookup(tp, name);
2876  f = NULL;
2877  if (descr != NULL)
2878  f = descr->ob_type->tp_descr_set;
2879  if (!f) {
2880  if (PyString_Check(name)) {
2881  encoded_name = name;
2882  Py_INCREF(name);
2883  } else {
2884  encoded_name = PyUnicode_AsUTF8String(name);
2885  }
2886  PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2887  Py_DECREF(encoded_name);
2888  } else {
2889  res = f(descr, obj, value);
2890  }
2891 
2892  done:
2893  Py_DECREF(name);
2894  return res;
2895 }
2896 #endif
2897 
2898 
2899 #ifdef __cplusplus
2900 }
2901 #endif
2902 
2903 
2904 
2905 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2906 
2907 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2908 
2909 
2910 
2911 /* -------- TYPES TABLE (BEGIN) -------- */
2912 
2913 #define SWIGTYPE_p_char swig_types[0]
2915 static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
2916 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2917 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2918 
2919 /* -------- TYPES TABLE (END) -------- */
2920 
2921 #if (PY_VERSION_HEX <= 0x02000000)
2922 # if !defined(SWIG_PYTHON_CLASSIC)
2923 # error "This python version requires swig to be run with the '-classic' option"
2924 # endif
2925 #endif
2926 
2927 /*-----------------------------------------------
2928  @(target):= _startx.so
2929  ------------------------------------------------*/
2930 #if PY_VERSION_HEX >= 0x03000000
2931 # define SWIG_init PyInit__startx
2932 
2933 #else
2934 # define SWIG_init init_startx
2935 
2936 #endif
2937 #define SWIG_name "_startx"
2938 
2939 #define SWIGVERSION 0x020011
2940 #define SWIG_VERSION SWIGVERSION
2941 
2942 
2943 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
2944 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
2945 
2946 
2947 SWIGINTERNINLINE PyObject*
2948  SWIG_From_int (int value)
2949 {
2950  return PyInt_FromLong((long) value);
2951 }
2952 
2953 
2956 {
2957  static int init = 0;
2958  static swig_type_info* info = 0;
2959  if (!init) {
2960  info = SWIG_TypeQuery("_p_char");
2961  init = 1;
2962  }
2963  return info;
2964 }
2965 
2966 
2967 SWIGINTERNINLINE PyObject *
2968 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2969 {
2970  if (carray) {
2971  if (size > INT_MAX) {
2972  swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2973  return pchar_descriptor ?
2974  SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
2975  } else {
2976 #if PY_VERSION_HEX >= 0x03000000
2977  return PyUnicode_FromStringAndSize(carray, (int)(size));
2978 #else
2979  return PyString_FromStringAndSize(carray, (int)(size));
2980 #endif
2981  }
2982  } else {
2983  return SWIG_Py_Void();
2984  }
2985 }
2986 
2987 
2988 SWIGINTERNINLINE PyObject *
2989 SWIG_FromCharPtr(const char *cptr)
2990 {
2991  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2992 }
2993 
2994 #ifdef __cplusplus
2995 extern "C" {
2996 #endif
2997 static PyMethodDef SwigMethods[] = {
2998  { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
2999  { NULL, NULL, 0, NULL }
3000 };
3001 
3002 
3003 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3004 
3005 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3006 
3008  &_swigt__p_char,
3009 };
3010 
3011 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3012 
3015 };
3016 
3017 
3018 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3019 
3021 {0, 0, 0, 0.0, 0, 0}};
3022 
3023 #ifdef __cplusplus
3024 }
3025 #endif
3026 /* -----------------------------------------------------------------------------
3027  * Type initialization:
3028  * This problem is tough by the requirement that no dynamic
3029  * memory is used. Also, since swig_type_info structures store pointers to
3030  * swig_cast_info structures and swig_cast_info structures store pointers back
3031  * to swig_type_info structures, we need some lookup code at initialization.
3032  * The idea is that swig generates all the structures that are needed.
3033  * The runtime then collects these partially filled structures.
3034  * The SWIG_InitializeModule function takes these initial arrays out of
3035  * swig_module, and does all the lookup, filling in the swig_module.types
3036  * array with the correct data and linking the correct swig_cast_info
3037  * structures together.
3038  *
3039  * The generated swig_type_info structures are assigned staticly to an initial
3040  * array. We just loop through that array, and handle each type individually.
3041  * First we lookup if this type has been already loaded, and if so, use the
3042  * loaded structure instead of the generated one. Then we have to fill in the
3043  * cast linked list. The cast data is initially stored in something like a
3044  * two-dimensional array. Each row corresponds to a type (there are the same
3045  * number of rows as there are in the swig_type_initial array). Each entry in
3046  * a column is one of the swig_cast_info structures for that type.
3047  * The cast_initial array is actually an array of arrays, because each row has
3048  * a variable number of columns. So to actually build the cast linked list,
3049  * we find the array of casts associated with the type, and loop through it
3050  * adding the casts to the list. The one last trick we need to do is making
3051  * sure the type pointer in the swig_cast_info struct is correct.
3052  *
3053  * First off, we lookup the cast->type name to see if it is already loaded.
3054  * There are three cases to handle:
3055  * 1) If the cast->type has already been loaded AND the type we are adding
3056  * casting info to has not been loaded (it is in this module), THEN we
3057  * replace the cast->type pointer with the type pointer that has already
3058  * been loaded.
3059  * 2) If BOTH types (the one we are adding casting info to, and the
3060  * cast->type) are loaded, THEN the cast info has already been loaded by
3061  * the previous module so we just ignore it.
3062  * 3) Finally, if cast->type has not already been loaded, then we add that
3063  * swig_cast_info to the linked list (because the cast->type) pointer will
3064  * be correct.
3065  * ----------------------------------------------------------------------------- */
3066 
3067 #ifdef __cplusplus
3068 extern "C" {
3069 #if 0
3070 } /* c-mode */
3071 #endif
3072 #endif
3073 
3074 #if 0
3075 #define SWIGRUNTIME_DEBUG
3076 #endif
3077 
3078 
3079 SWIGRUNTIME void
3080 SWIG_InitializeModule(void *clientdata) {
3081  size_t i;
3082  swig_module_info *module_head, *iter;
3083  int found, init;
3084 
3085  /* check to see if the circular list has been setup, if not, set it up */
3086  if (swig_module.next==0) {
3087  /* Initialize the swig_module */
3088  swig_module.type_initial = swig_type_initial;
3089  swig_module.cast_initial = swig_cast_initial;
3090  swig_module.next = &swig_module;
3091  init = 1;
3092  } else {
3093  init = 0;
3094  }
3095 
3096  /* Try and load any already created modules */
3097  module_head = SWIG_GetModule(clientdata);
3098  if (!module_head) {
3099  /* This is the first module loaded for this interpreter */
3100  /* so set the swig module into the interpreter */
3101  SWIG_SetModule(clientdata, &swig_module);
3102  module_head = &swig_module;
3103  } else {
3104  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3105  found=0;
3106  iter=module_head;
3107  do {
3108  if (iter==&swig_module) {
3109  found=1;
3110  break;
3111  }
3112  iter=iter->next;
3113  } while (iter!= module_head);
3114 
3115  /* if the is found in the list, then all is done and we may leave */
3116  if (found) return;
3117  /* otherwise we must add out module into the list */
3118  swig_module.next = module_head->next;
3119  module_head->next = &swig_module;
3120  }
3121 
3122  /* When multiple interpreters are used, a module could have already been initialized in
3123  a different interpreter, but not yet have a pointer in this interpreter.
3124  In this case, we do not want to continue adding types... everything should be
3125  set up already */
3126  if (init == 0) return;
3127 
3128  /* Now work on filling in swig_module.types */
3129 #ifdef SWIGRUNTIME_DEBUG
3130  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
3131 #endif
3132  for (i = 0; i < swig_module.size; ++i) {
3133  swig_type_info *type = 0;
3134  swig_type_info *ret;
3135  swig_cast_info *cast;
3136 
3137 #ifdef SWIGRUNTIME_DEBUG
3138  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3139 #endif
3140 
3141  /* if there is another module already loaded */
3142  if (swig_module.next != &swig_module) {
3143  type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
3144  }
3145  if (type) {
3146  /* Overwrite clientdata field */
3147 #ifdef SWIGRUNTIME_DEBUG
3148  printf("SWIG_InitializeModule: found type %s\n", type->name);
3149 #endif
3150  if (swig_module.type_initial[i]->clientdata) {
3151  type->clientdata = swig_module.type_initial[i]->clientdata;
3152 #ifdef SWIGRUNTIME_DEBUG
3153  printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
3154 #endif
3155  }
3156  } else {
3157  type = swig_module.type_initial[i];
3158  }
3159 
3160  /* Insert casting types */
3161  cast = swig_module.cast_initial[i];
3162  while (cast->type) {
3163  /* Don't need to add information already in the list */
3164  ret = 0;
3165 #ifdef SWIGRUNTIME_DEBUG
3166  printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
3167 #endif
3168  if (swig_module.next != &swig_module) {
3169  ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
3170 #ifdef SWIGRUNTIME_DEBUG
3171  if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
3172 #endif
3173  }
3174  if (ret) {
3175  if (type == swig_module.type_initial[i]) {
3176 #ifdef SWIGRUNTIME_DEBUG
3177  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
3178 #endif
3179  cast->type = ret;
3180  ret = 0;
3181  } else {
3182  /* Check for casting already in the list */
3183  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
3184 #ifdef SWIGRUNTIME_DEBUG
3185  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
3186 #endif
3187  if (!ocast) ret = 0;
3188  }
3189  }
3190 
3191  if (!ret) {
3192 #ifdef SWIGRUNTIME_DEBUG
3193  printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
3194 #endif
3195  if (type->cast) {
3196  type->cast->prev = cast;
3197  cast->next = type->cast;
3198  }
3199  type->cast = cast;
3200  }
3201  cast++;
3202  }
3203  /* Set entry in modules->types array equal to the type */
3204  swig_module.types[i] = type;
3205  }
3206  swig_module.types[i] = 0;
3207 
3208 #ifdef SWIGRUNTIME_DEBUG
3209  printf("**** SWIG_InitializeModule: Cast List ******\n");
3210  for (i = 0; i < swig_module.size; ++i) {
3211  int j = 0;
3212  swig_cast_info *cast = swig_module.cast_initial[i];
3213  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3214  while (cast->type) {
3215  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
3216  cast++;
3217  ++j;
3218  }
3219  printf("---- Total casts: %d\n",j);
3220  }
3221  printf("**** SWIG_InitializeModule: Cast List ******\n");
3222 #endif
3223 }
3224 
3225 /* This function will propagate the clientdata field of type to
3226 * any new swig_type_info structures that have been added into the list
3227 * of equivalent types. It is like calling
3228 * SWIG_TypeClientData(type, clientdata) a second time.
3229 */
3230 SWIGRUNTIME void
3232  size_t i;
3233  swig_cast_info *equiv;
3234  static int init_run = 0;
3235 
3236  if (init_run) return;
3237  init_run = 1;
3238 
3239  for (i = 0; i < swig_module.size; i++) {
3240  if (swig_module.types[i]->clientdata) {
3241  equiv = swig_module.types[i]->cast;
3242  while (equiv) {
3243  if (!equiv->converter) {
3244  if (equiv->type && !equiv->type->clientdata)
3245  SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
3246  }
3247  equiv = equiv->next;
3248  }
3249  }
3250  }
3251 }
3252 
3253 #ifdef __cplusplus
3254 #if 0
3255 {
3256  /* c-mode */
3257 #endif
3258 }
3259 #endif
3260 
3261 
3262 
3263 #ifdef __cplusplus
3264 extern "C" {
3265 #endif
3266 
3267  /* Python-specific SWIG API */
3268 #define SWIG_newvarlink() SWIG_Python_newvarlink()
3269 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
3270 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
3271 
3272  /* -----------------------------------------------------------------------------
3273  * global variable support code.
3274  * ----------------------------------------------------------------------------- */
3275 
3276  typedef struct swig_globalvar {
3277  char *name; /* Name of global variable */
3278  PyObject *(*get_attr)(void); /* Return the current value */
3279  int (*set_attr)(PyObject *); /* Set the value */
3281  } swig_globalvar;
3282 
3283  typedef struct swig_varlinkobject {
3284  PyObject_HEAD
3287 
3288  SWIGINTERN PyObject *
3290 #if PY_VERSION_HEX >= 0x03000000
3291  return PyUnicode_InternFromString("<Swig global variables>");
3292 #else
3293  return PyString_FromString("<Swig global variables>");
3294 #endif
3295  }
3296 
3297  SWIGINTERN PyObject *
3299 #if PY_VERSION_HEX >= 0x03000000
3300  PyObject *str = PyUnicode_InternFromString("(");
3301  PyObject *tail;
3302  PyObject *joined;
3303  swig_globalvar *var;
3304  for (var = v->vars; var; var=var->next) {
3305  tail = PyUnicode_FromString(var->name);
3306  joined = PyUnicode_Concat(str, tail);
3307  Py_DecRef(str);
3308  Py_DecRef(tail);
3309  str = joined;
3310  if (var->next) {
3311  tail = PyUnicode_InternFromString(", ");
3312  joined = PyUnicode_Concat(str, tail);
3313  Py_DecRef(str);
3314  Py_DecRef(tail);
3315  str = joined;
3316  }
3317  }
3318  tail = PyUnicode_InternFromString(")");
3319  joined = PyUnicode_Concat(str, tail);
3320  Py_DecRef(str);
3321  Py_DecRef(tail);
3322  str = joined;
3323 #else
3324  PyObject *str = PyString_FromString("(");
3325  swig_globalvar *var;
3326  for (var = v->vars; var; var=var->next) {
3327  PyString_ConcatAndDel(&str,PyString_FromString(var->name));
3328  if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
3329  }
3330  PyString_ConcatAndDel(&str,PyString_FromString(")"));
3331 #endif
3332  return str;
3333  }
3334 
3335  SWIGINTERN int
3337  char *tmp;
3338  PyObject *str = swig_varlink_str(v);
3339  fprintf(fp,"Swig global variables ");
3340  fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
3342  Py_DECREF(str);
3343  return 0;
3344  }
3345 
3346  SWIGINTERN void
3348  swig_globalvar *var = v->vars;
3349  while (var) {
3350  swig_globalvar *n = var->next;
3351  free(var->name);
3352  free(var);
3353  var = n;
3354  }
3355  }
3356 
3357  SWIGINTERN PyObject *
3359  PyObject *res = NULL;
3360  swig_globalvar *var = v->vars;
3361  while (var) {
3362  if (strcmp(var->name,n) == 0) {
3363  res = (*var->get_attr)();
3364  break;
3365  }
3366  var = var->next;
3367  }
3368  if (res == NULL && !PyErr_Occurred()) {
3369  PyErr_SetString(PyExc_NameError,"Unknown C global variable");
3370  }
3371  return res;
3372  }
3373 
3374  SWIGINTERN int
3375  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
3376  int res = 1;
3377  swig_globalvar *var = v->vars;
3378  while (var) {
3379  if (strcmp(var->name,n) == 0) {
3380  res = (*var->set_attr)(p);
3381  break;
3382  }
3383  var = var->next;
3384  }
3385  if (res == 1 && !PyErr_Occurred()) {
3386  PyErr_SetString(PyExc_NameError,"Unknown C global variable");
3387  }
3388  return res;
3389  }
3390 
3391  SWIGINTERN PyTypeObject*
3393  static char varlink__doc__[] = "Swig var link object";
3394  static PyTypeObject varlink_type;
3395  static int type_init = 0;
3396  if (!type_init) {
3397  const PyTypeObject tmp = {
3398  /* PyObject header changed in Python 3 */
3399 #if PY_VERSION_HEX >= 0x03000000
3400  PyVarObject_HEAD_INIT(NULL, 0)
3401 #else
3402  PyObject_HEAD_INIT(NULL)
3403  0, /* ob_size */
3404 #endif
3405  (char *)"swigvarlink", /* tp_name */
3406  sizeof(swig_varlinkobject), /* tp_basicsize */
3407  0, /* tp_itemsize */
3408  (destructor) swig_varlink_dealloc, /* tp_dealloc */
3409  (printfunc) swig_varlink_print, /* tp_print */
3410  (getattrfunc) swig_varlink_getattr, /* tp_getattr */
3411  (setattrfunc) swig_varlink_setattr, /* tp_setattr */
3412  0, /* tp_compare */
3413  (reprfunc) swig_varlink_repr, /* tp_repr */
3414  0, /* tp_as_number */
3415  0, /* tp_as_sequence */
3416  0, /* tp_as_mapping */
3417  0, /* tp_hash */
3418  0, /* tp_call */
3419  (reprfunc) swig_varlink_str, /* tp_str */
3420  0, /* tp_getattro */
3421  0, /* tp_setattro */
3422  0, /* tp_as_buffer */
3423  0, /* tp_flags */
3424  varlink__doc__, /* tp_doc */
3425  0, /* tp_traverse */
3426  0, /* tp_clear */
3427  0, /* tp_richcompare */
3428  0, /* tp_weaklistoffset */
3429 #if PY_VERSION_HEX >= 0x02020000
3430  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
3431 #endif
3432 #if PY_VERSION_HEX >= 0x02030000
3433  0, /* tp_del */
3434 #endif
3435 #if PY_VERSION_HEX >= 0x02060000
3436  0, /* tp_version */
3437 #endif
3438 #ifdef COUNT_ALLOCS
3439  0,0,0,0 /* tp_alloc -> tp_next */
3440 #endif
3441  };
3442  varlink_type = tmp;
3443  type_init = 1;
3444 #if PY_VERSION_HEX < 0x02020000
3445  varlink_type.ob_type = &PyType_Type;
3446 #else
3447  if (PyType_Ready(&varlink_type) < 0)
3448  return NULL;
3449 #endif
3450  }
3451  return &varlink_type;
3452  }
3453 
3454  /* Create a variable linking object for use later */
3455  SWIGINTERN PyObject *
3457  swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
3458  if (result) {
3459  result->vars = 0;
3460  }
3461  return ((PyObject*) result);
3462  }
3463 
3464  SWIGINTERN void
3465  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
3467  swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
3468  if (gv) {
3469  size_t size = strlen(name)+1;
3470  gv->name = (char *)malloc(size);
3471  if (gv->name) {
3472  strncpy(gv->name,name,size);
3473  gv->get_attr = get_attr;
3474  gv->set_attr = set_attr;
3475  gv->next = v->vars;
3476  }
3477  }
3478  v->vars = gv;
3479  }
3480 
3481  SWIGINTERN PyObject *
3483  static PyObject *_SWIG_globals = 0;
3484  if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
3485  return _SWIG_globals;
3486  }
3487 
3488  /* -----------------------------------------------------------------------------
3489  * constants/methods manipulation
3490  * ----------------------------------------------------------------------------- */
3491 
3492  /* Install Constants */
3493  SWIGINTERN void
3494  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
3495  PyObject *obj = 0;
3496  size_t i;
3497  for (i = 0; constants[i].type; ++i) {
3498  switch(constants[i].type) {
3499  case SWIG_PY_POINTER:
3500  obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
3501  break;
3502  case SWIG_PY_BINARY:
3503  obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
3504  break;
3505  default:
3506  obj = 0;
3507  break;
3508  }
3509  if (obj) {
3510  PyDict_SetItemString(d, constants[i].name, obj);
3511  Py_DECREF(obj);
3512  }
3513  }
3514  }
3515 
3516  /* -----------------------------------------------------------------------------*/
3517  /* Fix SwigMethods to carry the callback ptrs when needed */
3518  /* -----------------------------------------------------------------------------*/
3519 
3520  SWIGINTERN void
3521  SWIG_Python_FixMethods(PyMethodDef *methods,
3522  swig_const_info *const_table,
3523  swig_type_info **types,
3524  swig_type_info **types_initial) {
3525  size_t i;
3526  for (i = 0; methods[i].ml_name; ++i) {
3527  const char *c = methods[i].ml_doc;
3528  if (c && (c = strstr(c, "swig_ptr: "))) {
3529  int j;
3530  swig_const_info *ci = 0;
3531  const char *name = c + 10;
3532  for (j = 0; const_table[j].type; ++j) {
3533  if (strncmp(const_table[j].name, name,
3534  strlen(const_table[j].name)) == 0) {
3535  ci = &(const_table[j]);
3536  break;
3537  }
3538  }
3539  if (ci) {
3540  void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
3541  if (ptr) {
3542  size_t shift = (ci->ptype) - types;
3543  swig_type_info *ty = types_initial[shift];
3544  size_t ldoc = (c - methods[i].ml_doc);
3545  size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
3546  char *ndoc = (char*)malloc(ldoc + lptr + 10);
3547  if (ndoc) {
3548  char *buff = ndoc;
3549  strncpy(buff, methods[i].ml_doc, ldoc);
3550  buff += ldoc;
3551  strncpy(buff, "swig_ptr: ", 10);
3552  buff += 10;
3553  SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
3554  methods[i].ml_doc = ndoc;
3555  }
3556  }
3557  }
3558  }
3559  }
3560  }
3561 
3562 #ifdef __cplusplus
3563 }
3564 #endif
3565 
3566 /* -----------------------------------------------------------------------------*
3567  * Partial Init method
3568  * -----------------------------------------------------------------------------*/
3569 
3570 #ifdef __cplusplus
3571 extern "C"
3572 #endif
3573 
3574 SWIGEXPORT
3575 #if PY_VERSION_HEX >= 0x03000000
3576 PyObject*
3577 #else
3578 void
3579 #endif
3580 SWIG_init(void) {
3581  PyObject *m, *d, *md;
3582 #if PY_VERSION_HEX >= 0x03000000
3583  static struct PyModuleDef SWIG_module = {
3584 # if PY_VERSION_HEX >= 0x03020000
3585  PyModuleDef_HEAD_INIT,
3586 # else
3587  {
3588  PyObject_HEAD_INIT(NULL)
3589  NULL, /* m_init */
3590  0, /* m_index */
3591  NULL, /* m_copy */
3592  },
3593 # endif
3594  (char *) SWIG_name,
3595  NULL,
3596  -1,
3597  SwigMethods,
3598  NULL,
3599  NULL,
3600  NULL,
3601  NULL
3602  };
3603 #endif
3604 
3605 #if defined(SWIGPYTHON_BUILTIN)
3606  static SwigPyClientData SwigPyObject_clientdata = {
3607  0, 0, 0, 0, 0, 0, 0
3608  };
3609  static PyGetSetDef this_getset_def = {
3610  (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
3611  };
3612  static SwigPyGetSet thisown_getset_closure = {
3613  (PyCFunction) SwigPyObject_own,
3614  (PyCFunction) SwigPyObject_own
3615  };
3616  static PyGetSetDef thisown_getset_def = {
3617  (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
3618  };
3619  PyObject *metatype_args;
3620  PyTypeObject *builtin_pytype;
3621  int builtin_base_count;
3622  swig_type_info *builtin_basetype;
3623  PyObject *tuple;
3624  PyGetSetDescrObject *static_getset;
3625  PyTypeObject *metatype;
3626  SwigPyClientData *cd;
3627  PyObject *public_interface, *public_symbol;
3628  PyObject *this_descr;
3629  PyObject *thisown_descr;
3630  int i;
3631 
3632  (void)builtin_pytype;
3633  (void)builtin_base_count;
3634  (void)builtin_basetype;
3635  (void)tuple;
3636  (void)static_getset;
3637 
3638  /* metatype is used to implement static member variables. */
3639  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
3640  assert(metatype_args);
3641  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
3642  assert(metatype);
3643  Py_DECREF(metatype_args);
3644  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
3645  assert(PyType_Ready(metatype) >= 0);
3646 #endif
3647 
3648  /* Fix SwigMethods to carry the callback ptrs when needed */
3649  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
3650 
3651 #if PY_VERSION_HEX >= 0x03000000
3652  m = PyModule_Create(&SWIG_module);
3653 #else
3654  m = Py_InitModule((char *) SWIG_name, SwigMethods);
3655 #endif
3656  md = d = PyModule_GetDict(m);
3657  (void)md;
3658 
3660 
3661 #ifdef SWIGPYTHON_BUILTIN
3662  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
3663  assert(SwigPyObject_stype);
3664  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
3665  if (!cd) {
3666  SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
3667  SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
3668  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
3669  PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
3670 # if PY_VERSION_HEX >= 0x03000000
3671  return NULL;
3672 # else
3673  return;
3674 # endif
3675  }
3676 
3677  /* All objects have a 'this' attribute */
3678  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
3679  (void)this_descr;
3680 
3681  /* All objects have a 'thisown' attribute */
3682  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
3683  (void)thisown_descr;
3684 
3685  public_interface = PyList_New(0);
3686  public_symbol = 0;
3687  (void)public_symbol;
3688 
3689  PyDict_SetItemString(md, "__all__", public_interface);
3690  Py_DECREF(public_interface);
3691  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
3692  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
3693  for (i = 0; swig_const_table[i].name != 0; ++i)
3694  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
3695 #endif
3696 
3698 
3699  SWIG_Python_SetConstant(d, "SIG1",SWIG_From_int((int)(30)));
3700  SWIG_Python_SetConstant(d, "SIG2",SWIG_From_int((int)(31)));
3701  SWIG_Python_SetConstant(d, "SIG3",SWIG_From_int((int)(14)));
3702  SWIG_Python_SetConstant(d, "ACTIVE_FILE",SWIG_FromCharPtr("/tmp/bikex_active"));
3703  SWIG_Python_SetConstant(d, "PASSIVE_FILE",SWIG_FromCharPtr("/tmp/bikex_passive"));
3704  SWIG_Python_SetConstant(d, "ALL_VALUES",SWIG_From_int((int)(0)));
3705  SWIG_Python_SetConstant(d, "DIRECTION_MSP",SWIG_From_int((int)(1)));
3706  SWIG_Python_SetConstant(d, "VELOCITY_MSP",SWIG_From_int((int)(2)));
3707  SWIG_Python_SetConstant(d, "BREAK_MSP",SWIG_From_int((int)(3)));
3708 #if PY_VERSION_HEX >= 0x03000000
3709  return m;
3710 #else
3711  return;
3712 #endif
3713 }
3714 
getwritebufferproc writebufferproc
Definition: Wrap_wrap.c:885
static PyMethodDef swigobject_methods[]
Definition: Wrap_wrap.c:1779
SWIGINTERN int PyModule_AddObject(PyObject *m, char *name, PyObject *o)
Definition: Wrap_wrap.c:2620
SWIGINTERN PyObject * SWIG_Python_newvarlink(void)
Definition: Wrap_wrap.c:3456
#define SWIG_PYTHON_THREAD_END_BLOCK
Definition: Wrap_wrap.c:1075
SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
Definition: Wrap_wrap.c:3465
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
Definition: Wrap_wrap.c:533
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
Definition: Wrap_wrap.c:662
SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n)
Definition: Wrap_wrap.c:3358
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
Definition: Wrap_wrap.c:473
#define SWIGRUNTIME
Definition: Wrap_wrap.c:163
getreadbufferproc readbufferproc
Definition: Wrap_wrap.c:884
intintobjargproc ssizessizeobjargproc
Definition: Wrap_wrap.c:883
#define SWIG_POINTER_IMPLICIT_CONV
Definition: Wrap_wrap.c:1362
PyMappingMethods as_mapping
Definition: Wrap_wrap.c:919
#define SWIG_InternalNewPointerObj(ptr, type, flags)
Definition: Wrap_wrap.c:1150
SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module)
Definition: Wrap_wrap.c:2674
SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v)
Definition: Wrap_wrap.c:1512
getsegcountproc segcountproc
Definition: Wrap_wrap.c:886
static swig_cast_info _swigc__p_char[]
Definition: Wrap_wrap.c:3011
SWIGRUNTIME int SWIG_Python_AddErrMesg(const char *mesg, int infront)
Definition: Wrap_wrap.c:2744
#define SWIG_name
Definition: Wrap_wrap.c:2937
SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v)
Definition: Wrap_wrap.c:2019
struct swig_cast_info * prev
Definition: Wrap_wrap.c:332
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
Definition: Wrap_wrap.c:690
#define SWIG_DivisionByZero
Definition: Wrap_wrap.c:712
static PyObject * PyBool_FromLong(long ok)
Definition: Wrap_wrap.c:864
intobjargproc ssizeobjargproc
Definition: Wrap_wrap.c:882
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
Definition: Wrap_wrap.c:397
struct swig_globalvar * next
Definition: Wrap_wrap.c:3280
#define SWIG_RUNTIME_VERSION
Definition: Wrap_wrap.c:142
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
Definition: Wrap_wrap.c:2701
#define NULL
__BEGIN_NAMESPACE_STD void * memcpy(void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull((1
swig_type_info * ty
Definition: Wrap_wrap.c:1503
SWIGINTERN PyObject * SWIG_globals(void)
Definition: Wrap_wrap.c:3482
SWIGRUNTIME PyObject * SwigPyObject_format(const char *fmt, SwigPyObject *v)
Definition: Wrap_wrap.c:1518
#define SWIG_PYBUFFER_SIZE
Definition: Wrap_wrap.c:807
SWIGRUNTIME PyObject * SwigPyObject_append(PyObject *v, PyObject *next)
Definition: Wrap_wrap.c:1673
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD char * strcpy(char *__restrict __dest, const char *__restrict __src) __THROW __nonnull((1
SWIGRUNTIMEINLINE PyObject * _SWIG_This(void)
Definition: Wrap_wrap.c:2151
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
Definition: Wrap_wrap.c:785
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
Definition: Wrap_wrap.c:355
#define SWIG_TypeQuery(name)
Definition: Wrap_wrap.c:2916
SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
Definition: Wrap_wrap.c:1579
#define SWIG_IndexError
Definition: Wrap_wrap.c:710
#define SWIG_STATIC_POINTER(var)
Definition: Wrap_wrap.c:1351
#define SWIG_GetModule(clientdata)
Definition: Wrap_wrap.c:1175
#define SWIG_MangledTypeQuery(name)
Definition: Wrap_wrap.c:2917
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
Definition: Wrap_wrap.c:651
struct swig_globalvar swig_globalvar
getcharbufferproc charbufferproc
Definition: Wrap_wrap.c:887
#define SWIG_IsOK(r)
Definition: Wrap_wrap.c:264
#define SWIG_MemoryError
Definition: Wrap_wrap.c:718
__END_NAMESPACE_STD char char __BEGIN_NAMESPACE_STD size_t strlen(const char *__s) __THROW __attribute_pure__ __nonnull((1))
swig_cast_info ** cast_initial
Definition: Wrap_wrap.c:343
SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
Definition: Wrap_wrap.c:2134
SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type)
Definition: Wrap_wrap.c:2707
SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v)
Definition: Wrap_wrap.c:3298
#define SWIGINTERNINLINE
Definition: Wrap_wrap.c:77
SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
Definition: Wrap_wrap.c:3336
#define SWIG_SetModule(clientdata, pointer)
Definition: Wrap_wrap.c:1176
#define SWIGEXPORT
Definition: Wrap_wrap.c:98
#define SWIG_Python_str_DelForPy3(x)
Definition: Wrap_wrap.c:780
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
Definition: Wrap_wrap.c:623
SWIGRUNTIME PyObject * SWIG_Python_ErrorType(int code)
Definition: Wrap_wrap.c:947
SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj)
Definition: Wrap_wrap.c:2792
SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
Definition: Wrap_wrap.c:3375
PyTypeObject * pytype
Definition: Wrap_wrap.c:1419
#define SWIG_RuntimeError
Definition: Wrap_wrap.c:709
#define SWIG_CheckState(r)
Definition: Wrap_wrap.c:304
SWIGRUNTIME PyObject * SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: Wrap_wrap.c:1693
static swig_type_info * swig_types[2]
Definition: Wrap_wrap.c:2914
#define SWIG_PYTHON_THREAD_BEGIN_BLOCK
Definition: Wrap_wrap.c:1074
struct swig_type_info *(* swig_dycast_func)(void **)
Definition: Wrap_wrap.c:315
swig_type_info ** ptype
Definition: Wrap_wrap.c:1103
#define PyOS_snprintf
Definition: Wrap_wrap.c:799
void * clientdata
Definition: Wrap_wrap.c:323
SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty)
Definition: Wrap_wrap.c:1423
struct swig_varlinkobject swig_varlinkobject
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
Definition: Wrap_wrap.c:607
struct swig_type_info swig_type_info
SWIGINTERN PyObject * SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: Wrap_wrap.c:1721
#define SWIG_CAST_NEW_MEMORY
Definition: Wrap_wrap.c:177
#define SWIG_SyntaxError
Definition: Wrap_wrap.c:714
SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op)
Definition: Wrap_wrap.c:2013
SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
Definition: Wrap_wrap.c:2490
SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
Definition: Wrap_wrap.c:1191
SWIGRUNTIME PyObject * SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
Definition: Wrap_wrap.c:1117
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
Definition: Wrap_wrap.c:503
const char * name
Definition: Wrap_wrap.c:319
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD char char * strncpy(char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull((1
PyObject * next
Definition: Wrap_wrap.c:1505
SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void)
Definition: Wrap_wrap.c:1403
inquiry lenfunc
Definition: Wrap_wrap.c:879
SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char *carray, size_t size)
Definition: Wrap_wrap.c:2968
PyNumberMethods as_number
Definition: Wrap_wrap.c:918
static PyMethodDef SwigMethods[]
Definition: Wrap_wrap.c:2997
SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v)
Definition: Wrap_wrap.c:3347
static swig_const_info swig_const_table[]
Definition: Wrap_wrap.c:3020
#define SWIG_OverflowError
Definition: Wrap_wrap.c:713
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
Definition: Wrap_wrap.c:578
SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata))
Definition: Wrap_wrap.c:2594
#define SWIGRUNTIMEINLINE
Definition: Wrap_wrap.c:167
SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
Definition: Wrap_wrap.c:1233
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD char char char char int strcmp(const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull((1
SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own)
Definition: Wrap_wrap.c:2240
static swig_type_info * swig_type_initial[]
Definition: Wrap_wrap.c:3007
SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg)
Definition: Wrap_wrap.c:1199
PyObject * slots
Definition: Wrap_wrap.c:922
struct swig_module_info swig_module_info
SWIGINTERN PyObject * SWIG_Python_AppendOutput(PyObject *result, PyObject *obj)
Definition: Wrap_wrap.c:1247
SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self)
Definition: Wrap_wrap.c:2784
#define SWIG_PY_POINTER
Definition: Wrap_wrap.c:1093
#define SWIG_newvarlink()
Definition: Wrap_wrap.c:3268
#define SWIGINTERN
Definition: Wrap_wrap.c:72
SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
Definition: Wrap_wrap.c:1996
SWIGRUNTIME PyObject * SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
Definition: Wrap_wrap.c:2415
#define SWIG_SystemError
Definition: Wrap_wrap.c:716
int(* set_attr)(PyObject *)
Definition: Wrap_wrap.c:3279
struct swig_cast_info swig_cast_info
#define SWIG_AddNewMask(r)
Definition: Wrap_wrap.c:279
#define SWIG_AttributeError
Definition: Wrap_wrap.c:717
#define SWIG_OK
Definition: Wrap_wrap.c:262
PySequenceMethods as_sequence
Definition: Wrap_wrap.c:920
PyBufferProcs as_buffer
Definition: Wrap_wrap.c:921
SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty)
Definition: Wrap_wrap.c:2360
SWIGINTERN PyObject * SwigPyObject_getattr(SwigPyObject *sobj, char *name)
Definition: Wrap_wrap.c:1792
static PyObject * swig_this
Definition: Wrap_wrap.c:2156
const char * str
Definition: Wrap_wrap.c:320
SWIGRUNTIME int SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
Definition: Wrap_wrap.c:1960
#define SWIG_TypeError
Definition: Wrap_wrap.c:711
static long PyNumber_AsSsize_t(PyObject *x, void *SWIGUNUSEDPARM(exc))
Definition: Wrap_wrap.c:888
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD char char char char int int strncmp(const char *__s1, const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull((1
SWIGINTERN PyTypeObject * swig_varlink_type(void)
Definition: Wrap_wrap.c:3392
PyObject * newargs
Definition: Wrap_wrap.c:1415
static swig_cast_info * swig_cast_initial[]
Definition: Wrap_wrap.c:3013
SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v)
Definition: Wrap_wrap.c:1638
#define PyObject_GenericGetAttr
Definition: Wrap_wrap.c:836
#define Py_TYPE(op)
Definition: Wrap_wrap.c:744
#define Py_NotImplemented
Definition: Wrap_wrap.c:843
swig_dycast_func dcast
Definition: Wrap_wrap.c:321
intargfunc ssizeargfunc
Definition: Wrap_wrap.c:880
#define SWIG_Python_str_FromFormat
Definition: Wrap_wrap.c:752
SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v))
Definition: Wrap_wrap.c:3289
SWIGINTERN swig_type_info * SWIG_pchar_descriptor(void)
Definition: Wrap_wrap.c:2955
#define SWIG_init
Definition: Wrap_wrap.c:2934
SWIGRUNTIME PyTypeObject * SwigPyObject_TypeOnce(void)
Definition: Wrap_wrap.c:1799
PyObject *(* get_attr)(void)
Definition: Wrap_wrap.c:3278
SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data)
Definition: Wrap_wrap.c:1492
static swig_module_info swig_module
Definition: Wrap_wrap.c:2915
SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v)
Definition: Wrap_wrap.c:1540
PyObject * newraw
Definition: Wrap_wrap.c:1414
struct swig_cast_info * cast
Definition: Wrap_wrap.c:322
#define SWIG_TYPE_TABLE_NAME
Definition: Wrap_wrap.c:150
swig_type_info * ty
Definition: Wrap_wrap.c:1955
SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
Definition: Wrap_wrap.c:1936
SWIGINTERNINLINE PyObject * SWIG_From_int(int value)
Definition: Wrap_wrap.c:2948
#define SWIG_NewPackedObj(ptr, sz, type)
Definition: Wrap_wrap.c:1158
SWIGRUNTIME PyObject * SWIG_This(void)
Definition: Wrap_wrap.c:2159
#define SWIG_ERROR
Definition: Wrap_wrap.c:263
SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty)
Definition: Wrap_wrap.c:2392
#define SWIG_ConvertPtr(obj, pptr, type, flags)
Definition: Wrap_wrap.c:1141
SWIGINTERN int SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
Definition: Wrap_wrap.c:1292
swig_type_info * type
Definition: Wrap_wrap.c:329
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
Definition: Wrap_wrap.c:424
SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags)
Definition: Wrap_wrap.c:2831
PyObject * klass
Definition: Wrap_wrap.c:1413
PyObject_HEAD void * ptr
Definition: Wrap_wrap.c:1502
SWIGINTERNINLINE PyObject * SWIG_FromCharPtr(const char *cptr)
Definition: Wrap_wrap.c:2989
#define SWIG_POINTER_DISOWN
Definition: Wrap_wrap.c:176
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
Definition: Wrap_wrap.c:3080
SWIGRUNTIME PyTypeObject * SwigPyObject_type(void)
Definition: Wrap_wrap.c:1615
#define SWIG_ValueError
Definition: Wrap_wrap.c:715
SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v)
Definition: Wrap_wrap.c:1974
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
Definition: Wrap_wrap.c:482
SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
Definition: Wrap_wrap.c:1430
#define SWIG_InstallConstants(d, constants)
Definition: Wrap_wrap.c:3270
SWIGRUNTIME void SWIG_PropagateClientData(void)
Definition: Wrap_wrap.c:3231
#define SWIG_IOError
Definition: Wrap_wrap.c:708
#define SWIG_POINTER_OWN
Definition: Wrap_wrap.c:180
destructor freefunc
Definition: Wrap_wrap.c:927
SWIGRUNTIME void SWIG_Python_DestroyModule(void *vptr)
Definition: Wrap_wrap.c:2652
#define SWIG_AddCast(r)
Definition: Wrap_wrap.c:303
#define SWIG_PY_BINARY
Definition: Wrap_wrap.c:1094
PyTypeObject type
Definition: Wrap_wrap.c:917
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
Definition: Wrap_wrap.c:519
#define SWIG_Python_CallFunctor(functor, obj)
Definition: Wrap_wrap.c:1341
SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own)
Definition: Wrap_wrap.c:2255
SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[])
Definition: Wrap_wrap.c:3494
swig_type_info ** types
Definition: Wrap_wrap.c:339
__BEGIN_NAMESPACE_STD void void __END_NAMESPACE_STD void __BEGIN_NAMESPACE_STD void * memset(void *__s, int __c, size_t __n) __THROW __nonnull((1))
SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v)
Definition: Wrap_wrap.c:1546
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
Definition: Wrap_wrap.c:370
SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg)
Definition: Wrap_wrap.c:991
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
Definition: Wrap_wrap.c:459
SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags)
Definition: Wrap_wrap.c:2530
SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type)
Definition: Wrap_wrap.c:2581
#define SWIG_BUFFER_SIZE
Definition: Wrap_wrap.c:172
SWIGRUNTIME PyTypeObject * SwigPyPacked_TypeOnce(void)
Definition: Wrap_wrap.c:2029
swig_converter_func converter
Definition: Wrap_wrap.c:330
static PyObject * PyString_FromFormat(const char *fmt,...)
Definition: Wrap_wrap.c:811
struct swig_const_info swig_const_info
SWIGINTERN PyObject * SwigPyObject_own(PyObject *v, PyObject *args)
Definition: Wrap_wrap.c:1730
int Py_ssize_t
Definition: Wrap_wrap.c:876
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
Definition: Wrap_wrap.c:675
SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op)
Definition: Wrap_wrap.c:1622
SWIGRUNTIME PyTypeObject * SwigPyPacked_type(void)
Definition: Wrap_wrap.c:2007
SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
Definition: Wrap_wrap.c:2115
SWIGINTERN char * SWIG_Python_str_AsChar(PyObject *str)
Definition: Wrap_wrap.c:760
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
Definition: Wrap_wrap.c:1985
#define SWIGUNUSEDPARM(p)
Definition: Wrap_wrap.c:66
SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject *obj)
Definition: Wrap_wrap.c:1438
static swig_type_info _swigt__p_char
Definition: Wrap_wrap.c:3005
struct swig_cast_info * next
Definition: Wrap_wrap.c:331
SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v, PyObject *args)
Definition: Wrap_wrap.c:1555
SWIGINTERN PyObject * SwigPyObject_disown(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: Wrap_wrap.c:1709
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
Definition: Wrap_wrap.c:2512
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
Definition: Wrap_wrap.c:3521
intintargfunc ssizessizeargfunc
Definition: Wrap_wrap.c:881
swig_type_info ** type_initial
Definition: Wrap_wrap.c:342
void *(* swig_converter_func)(void *, int *)
Definition: Wrap_wrap.c:314
struct swig_module_info * next
Definition: Wrap_wrap.c:341
PyObject_HEAD void * pack
Definition: Wrap_wrap.c:1954
#define SWIG_POINTER_NOSHADOW
Definition: Wrap_wrap.c:1359
SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
Definition: Wrap_wrap.c:2174
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
Definition: Wrap_wrap.c:451
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
Definition: Wrap_wrap.c:389
PyObject * destroy
Definition: Wrap_wrap.c:1416
__END_NAMESPACE_STD __BEGIN_NAMESPACE_STD size_t size_t char char * strstr(const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull((1
SWIGRUNTIME PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
Definition: Wrap_wrap.c:1588
SWIGRUNTIME int SWIG_Python_ArgFail(int argnum)
Definition: Wrap_wrap.c:2771
#define PyObject_DEL
Definition: Wrap_wrap.c:827
#define SWIG_BUILTIN_TP_INIT
Definition: Wrap_wrap.c:1364
PyObject_HEAD swig_globalvar * vars
Definition: Wrap_wrap.c:3285
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)
Definition: Wrap_wrap.c:1140
size_t size
Definition: Wrap_wrap.c:1956
void * clientdata
Definition: Wrap_wrap.c:344