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