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 *newstr = 0;
783  str = PyUnicode_AsUTF8String(str);
784  if (str) {
785  char *cstr;
786  Py_ssize_t len;
787  PyBytes_AsStringAndSize(str, &cstr, &len);
788  newstr = (char *) malloc(len+1);
789  memcpy(newstr, cstr, len+1);
790  Py_XDECREF(str);
791  }
792  return newstr;
793 #else
794  return PyString_AsString(str);
795 #endif
796 }
797 
798 #if PY_VERSION_HEX >= 0x03000000
799 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
800 #else
801 # define SWIG_Python_str_DelForPy3(x)
802 #endif
803 
804 
805 SWIGINTERN PyObject*
807 {
808 #if PY_VERSION_HEX >= 0x03000000
809  return PyUnicode_FromString(c);
810 #else
811  return PyString_FromString(c);
812 #endif
813 }
814 
815 /* Add PyOS_snprintf for old Pythons */
816 #if PY_VERSION_HEX < 0x02020000
817 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
818 # define PyOS_snprintf _snprintf
819 # else
820 # define PyOS_snprintf snprintf
821 # endif
822 #endif
823 
824 /* A crude PyString_FromFormat implementation for old Pythons */
825 #if PY_VERSION_HEX < 0x02020000
826 
827 #ifndef SWIG_PYBUFFER_SIZE
828 # define SWIG_PYBUFFER_SIZE 1024
829 #endif
830 
831 static PyObject *
832 PyString_FromFormat(const char *fmt, ...) {
833  va_list ap;
834  char buf[SWIG_PYBUFFER_SIZE * 2];
835  int res;
836  va_start(ap, fmt);
837  res = vsnprintf(buf, sizeof(buf), fmt, ap);
838  va_end(ap);
839  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
840 }
841 #endif
842 
843 #ifndef PyObject_DEL
844 # define PyObject_DEL PyObject_Del
845 #endif
846 
847 /* A crude PyExc_StopIteration exception for old Pythons */
848 #if PY_VERSION_HEX < 0x02020000
849 # ifndef PyExc_StopIteration
850 # define PyExc_StopIteration PyExc_RuntimeError
851 # endif
852 # ifndef PyObject_GenericGetAttr
853 # define PyObject_GenericGetAttr 0
854 # endif
855 #endif
856 
857 /* Py_NotImplemented is defined in 2.1 and up. */
858 #if PY_VERSION_HEX < 0x02010000
859 # ifndef Py_NotImplemented
860 # define Py_NotImplemented PyExc_RuntimeError
861 # endif
862 #endif
863 
864 /* A crude PyString_AsStringAndSize implementation for old Pythons */
865 #if PY_VERSION_HEX < 0x02010000
866 # ifndef PyString_AsStringAndSize
867 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
868 # endif
869 #endif
870 
871 /* PySequence_Size for old Pythons */
872 #if PY_VERSION_HEX < 0x02000000
873 # ifndef PySequence_Size
874 # define PySequence_Size PySequence_Length
875 # endif
876 #endif
877 
878 /* PyBool_FromLong for old Pythons */
879 #if PY_VERSION_HEX < 0x02030000
880 static
881 PyObject *PyBool_FromLong(long ok)
882 {
883  PyObject *result = ok ? Py_True : Py_False;
884  Py_INCREF(result);
885  return result;
886 }
887 #endif
888 
889 /* Py_ssize_t for old Pythons */
890 /* This code is as recommended by: */
891 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
892 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
893 typedef int Py_ssize_t;
894 # define PY_SSIZE_T_MAX INT_MAX
895 # define PY_SSIZE_T_MIN INT_MIN
896 typedef inquiry lenfunc;
897 typedef intargfunc ssizeargfunc;
898 typedef intintargfunc ssizessizeargfunc;
899 typedef intobjargproc ssizeobjargproc;
900 typedef intintobjargproc ssizessizeobjargproc;
901 typedef getreadbufferproc readbufferproc;
902 typedef getwritebufferproc writebufferproc;
903 typedef getsegcountproc segcountproc;
904 typedef getcharbufferproc charbufferproc;
905 static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
906 {
907  long result = 0;
908  PyObject *i = PyNumber_Int(x);
909  if (i) {
910  result = PyInt_AsLong(i);
911  Py_DECREF(i);
912  }
913  return result;
914 }
915 #endif
916 
917 #if PY_VERSION_HEX < 0x02050000
918 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
919 #endif
920 
921 #if PY_VERSION_HEX < 0x02040000
922 #define Py_VISIT(op) \
923  do { \
924  if (op) { \
925  int vret = visit((op), arg); \
926  if (vret) \
927  return vret; \
928  } \
929  } while (0)
930 #endif
931 
932 #if PY_VERSION_HEX < 0x02030000
933 typedef struct {
934  PyTypeObject type;
935  PyNumberMethods as_number;
936  PyMappingMethods as_mapping;
937  PySequenceMethods as_sequence;
938  PyBufferProcs as_buffer;
939  PyObject *name, *slots;
941 #endif
942 
943 #if PY_VERSION_HEX < 0x02030000
944 typedef destructor freefunc;
945 #endif
946 
947 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
948  (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
949  (PY_MAJOR_VERSION > 3))
950 # define SWIGPY_USE_CAPSULE
951 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
952 #endif
953 
954 #if PY_VERSION_HEX < 0x03020000
955 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
956 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
957 #define Py_hash_t long
958 #endif
959 
960 /* -----------------------------------------------------------------------------
961  * error manipulation
962  * ----------------------------------------------------------------------------- */
963 
964 SWIGRUNTIME PyObject*
966  PyObject* type = 0;
967  switch(code) {
968  case SWIG_MemoryError:
969  type = PyExc_MemoryError;
970  break;
971  case SWIG_IOError:
972  type = PyExc_IOError;
973  break;
974  case SWIG_RuntimeError:
975  type = PyExc_RuntimeError;
976  break;
977  case SWIG_IndexError:
978  type = PyExc_IndexError;
979  break;
980  case SWIG_TypeError:
981  type = PyExc_TypeError;
982  break;
983  case SWIG_DivisionByZero:
984  type = PyExc_ZeroDivisionError;
985  break;
986  case SWIG_OverflowError:
987  type = PyExc_OverflowError;
988  break;
989  case SWIG_SyntaxError:
990  type = PyExc_SyntaxError;
991  break;
992  case SWIG_ValueError:
993  type = PyExc_ValueError;
994  break;
995  case SWIG_SystemError:
996  type = PyExc_SystemError;
997  break;
998  case SWIG_AttributeError:
999  type = PyExc_AttributeError;
1000  break;
1001  default:
1002  type = PyExc_RuntimeError;
1003  }
1004  return type;
1005 }
1006 
1007 
1008 SWIGRUNTIME void
1009 SWIG_Python_AddErrorMsg(const char* mesg)
1010 {
1011  PyObject *type = 0;
1012  PyObject *value = 0;
1013  PyObject *traceback = 0;
1014 
1015  if (PyErr_Occurred())
1016  PyErr_Fetch(&type, &value, &traceback);
1017  if (value) {
1018  PyObject *old_str = PyObject_Str(value);
1019  const char *tmp = SWIG_Python_str_AsChar(old_str);
1020  PyErr_Clear();
1021  Py_XINCREF(type);
1022  if (tmp)
1023  PyErr_Format(type, "%s %s", tmp, mesg);
1024  else
1025  PyErr_Format(type, "%s", mesg);
1027  Py_DECREF(old_str);
1028  Py_DECREF(value);
1029  } else {
1030  PyErr_SetString(PyExc_RuntimeError, mesg);
1031  }
1032 }
1033 
1034 #if defined(SWIG_PYTHON_NO_THREADS)
1035 # if defined(SWIG_PYTHON_THREADS)
1036 # undef SWIG_PYTHON_THREADS
1037 # endif
1038 #endif
1039 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
1040 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1041 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
1042 # define SWIG_PYTHON_USE_GIL
1043 # endif
1044 # endif
1045 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
1046 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
1047 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
1048 # endif
1049 # ifdef __cplusplus /* C++ code */
1050  class SWIG_Python_Thread_Block {
1051  bool status;
1052  PyGILState_STATE state;
1053  public:
1054  void end() { if (status) { PyGILState_Release(state); status = false;} }
1055  SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1056  ~SWIG_Python_Thread_Block() { end(); }
1057  };
1058  class SWIG_Python_Thread_Allow {
1059  bool status;
1060  PyThreadState *save;
1061  public:
1062  void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
1063  SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1064  ~SWIG_Python_Thread_Allow() { end(); }
1065  };
1066 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1067 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1068 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1069 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1070 # else /* C code */
1071 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1072 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1073 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1074 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1075 # endif
1076 # else /* Old thread way, not implemented, user must provide it */
1077 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1078 # define SWIG_PYTHON_INITIALIZE_THREADS
1079 # endif
1080 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1081 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1082 # endif
1083 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1084 # define SWIG_PYTHON_THREAD_END_BLOCK
1085 # endif
1086 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1087 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1088 # endif
1089 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1090 # define SWIG_PYTHON_THREAD_END_ALLOW
1091 # endif
1092 # endif
1093 #else /* No thread support */
1094 # define SWIG_PYTHON_INITIALIZE_THREADS
1095 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1096 # define SWIG_PYTHON_THREAD_END_BLOCK
1097 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1098 # define SWIG_PYTHON_THREAD_END_ALLOW
1099 #endif
1100 
1101 /* -----------------------------------------------------------------------------
1102  * Python API portion that goes into the runtime
1103  * ----------------------------------------------------------------------------- */
1104 
1105 #ifdef __cplusplus
1106 extern "C" {
1107 #endif
1108 
1109 /* -----------------------------------------------------------------------------
1110  * Constant declarations
1111  * ----------------------------------------------------------------------------- */
1112 
1113 /* Constant Types */
1114 #define SWIG_PY_POINTER 4
1115 #define SWIG_PY_BINARY 5
1116 
1117 /* Constant information structure */
1118 typedef struct swig_const_info {
1119  int type;
1120  char *name;
1121  long lvalue;
1122  double dvalue;
1123  void *pvalue;
1125 } swig_const_info;
1126 
1127 
1128 /* -----------------------------------------------------------------------------
1129  * Wrapper of PyInstanceMethod_New() used in Python 3
1130  * It is exported to the generated module, used for -fastproxy
1131  * ----------------------------------------------------------------------------- */
1132 #if PY_VERSION_HEX >= 0x03000000
1133 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
1134 {
1135  return PyInstanceMethod_New(func);
1136 }
1137 #else
1138 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
1139 {
1140  return NULL;
1141 }
1142 #endif
1143 
1144 #ifdef __cplusplus
1145 }
1146 #endif
1147 
1148 
1149 /* -----------------------------------------------------------------------------
1150  * pyrun.swg
1151  *
1152  * This file contains the runtime support for Python modules
1153  * and includes code for managing global variables and pointer
1154  * type checking.
1155  *
1156  * ----------------------------------------------------------------------------- */
1157 
1158 /* Common SWIG API */
1159 
1160 /* for raw pointers */
1161 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1162 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1163 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1164 
1165 #ifdef SWIGPYTHON_BUILTIN
1166 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1167 #else
1168 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1169 #endif
1170 
1171 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1172 
1173 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1174 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1175 #define swig_owntype int
1176 
1177 /* for raw packed data */
1178 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1179 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1180 
1181 /* for class or struct pointers */
1182 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1183 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1184 
1185 /* for C or C++ function pointers */
1186 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1187 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1188 
1189 /* for C++ member pointers, ie, member methods */
1190 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1191 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1192 
1193 
1194 /* Runtime API */
1195 
1196 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1197 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1198 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1199 
1200 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1201 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1202 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1203 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1204 #define SWIG_fail goto fail
1205 
1206 
1207 /* Runtime API implementation */
1208 
1209 /* Error manipulation */
1210 
1211 SWIGINTERN void
1212 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1214  PyErr_SetObject(errtype, obj);
1215  Py_DECREF(obj);
1217 }
1218 
1219 SWIGINTERN void
1220 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1222  PyErr_SetString(errtype, msg);
1224 }
1225 
1226 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1227 
1228 /* Set a constant value */
1229 
1230 #if defined(SWIGPYTHON_BUILTIN)
1231 
1232 SWIGINTERN void
1233 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1234  PyObject *s = PyString_InternFromString(key);
1235  PyList_Append(seq, s);
1236  Py_DECREF(s);
1237 }
1238 
1239 SWIGINTERN void
1240 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1241 #if PY_VERSION_HEX < 0x02030000
1242  PyDict_SetItemString(d, (char *)name, obj);
1243 #else
1244  PyDict_SetItemString(d, name, obj);
1245 #endif
1246  Py_DECREF(obj);
1247  if (public_interface)
1248  SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1249 }
1250 
1251 #else
1252 
1253 SWIGINTERN void
1254 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1255 #if PY_VERSION_HEX < 0x02030000
1256  PyDict_SetItemString(d, (char *)name, obj);
1257 #else
1258  PyDict_SetItemString(d, name, obj);
1259 #endif
1260  Py_DECREF(obj);
1261 }
1262 
1263 #endif
1264 
1265 /* Append a value to the result obj */
1266 
1267 SWIGINTERN PyObject*
1268 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1269 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1270  if (!result) {
1271  result = obj;
1272  } else if (result == Py_None) {
1273  Py_DECREF(result);
1274  result = obj;
1275  } else {
1276  if (!PyList_Check(result)) {
1277  PyObject *o2 = result;
1278  result = PyList_New(1);
1279  PyList_SetItem(result, 0, o2);
1280  }
1281  PyList_Append(result,obj);
1282  Py_DECREF(obj);
1283  }
1284  return result;
1285 #else
1286  PyObject* o2;
1287  PyObject* o3;
1288  if (!result) {
1289  result = obj;
1290  } else if (result == Py_None) {
1291  Py_DECREF(result);
1292  result = obj;
1293  } else {
1294  if (!PyTuple_Check(result)) {
1295  o2 = result;
1296  result = PyTuple_New(1);
1297  PyTuple_SET_ITEM(result, 0, o2);
1298  }
1299  o3 = PyTuple_New(1);
1300  PyTuple_SET_ITEM(o3, 0, obj);
1301  o2 = result;
1302  result = PySequence_Concat(o2, o3);
1303  Py_DECREF(o2);
1304  Py_DECREF(o3);
1305  }
1306  return result;
1307 #endif
1308 }
1309 
1310 /* Unpack the argument tuple */
1311 
1313 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1314 {
1315  if (!args) {
1316  if (!min && !max) {
1317  return 1;
1318  } else {
1319  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1320  name, (min == max ? "" : "at least "), (int)min);
1321  return 0;
1322  }
1323  }
1324  if (!PyTuple_Check(args)) {
1325  if (min <= 1 && max >= 1) {
1326  Py_ssize_t i;
1327  objs[0] = args;
1328  for (i = 1; i < max; ++i) {
1329  objs[i] = 0;
1330  }
1331  return 2;
1332  }
1333  PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1334  return 0;
1335  } else {
1336  Py_ssize_t l = PyTuple_GET_SIZE(args);
1337  if (l < min) {
1338  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1339  name, (min == max ? "" : "at least "), (int)min, (int)l);
1340  return 0;
1341  } else if (l > max) {
1342  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1343  name, (min == max ? "" : "at most "), (int)max, (int)l);
1344  return 0;
1345  } else {
1346  Py_ssize_t i;
1347  for (i = 0; i < l; ++i) {
1348  objs[i] = PyTuple_GET_ITEM(args, i);
1349  }
1350  for (; l < max; ++l) {
1351  objs[l] = 0;
1352  }
1353  return i + 1;
1354  }
1355  }
1356 }
1357 
1358 /* A functor is a function object with one single object argument */
1359 #if PY_VERSION_HEX >= 0x02020000
1360 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1361 #else
1362 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1363 #endif
1364 
1365 /*
1366  Helper for static pointer initialization for both C and C++ code, for example
1367  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1368 */
1369 #ifdef __cplusplus
1370 #define SWIG_STATIC_POINTER(var) var
1371 #else
1372 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1373 #endif
1374 
1375 /* -----------------------------------------------------------------------------
1376  * Pointer declarations
1377  * ----------------------------------------------------------------------------- */
1378 
1379 /* Flags for new pointer objects */
1380 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1381 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1382 
1383 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1384 
1385 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1386 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1387 
1388 #ifdef __cplusplus
1389 extern "C" {
1390 #endif
1391 
1392 /* How to access Py_None */
1393 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1394 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1395 # ifndef SWIG_PYTHON_BUILD_NONE
1396 # define SWIG_PYTHON_BUILD_NONE
1397 # endif
1398 # endif
1399 #endif
1400 
1401 #ifdef SWIG_PYTHON_BUILD_NONE
1402 # ifdef Py_None
1403 # undef Py_None
1404 # define Py_None SWIG_Py_None()
1405 # endif
1406 SWIGRUNTIMEINLINE PyObject *
1407 _SWIG_Py_None(void)
1408 {
1409  PyObject *none = Py_BuildValue((char*)"");
1410  Py_DECREF(none);
1411  return none;
1412 }
1413 SWIGRUNTIME PyObject *
1414 SWIG_Py_None(void)
1415 {
1416  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1417  return none;
1418 }
1419 #endif
1420 
1421 /* The python void return value */
1422 
1423 SWIGRUNTIMEINLINE PyObject *
1425 {
1426  PyObject *none = Py_None;
1427  Py_INCREF(none);
1428  return none;
1429 }
1430 
1431 /* SwigPyClientData */
1432 
1433 typedef struct {
1434  PyObject *klass;
1435  PyObject *newraw;
1436  PyObject *newargs;
1437  PyObject *destroy;
1438  int delargs;
1439  int implicitconv;
1440  PyTypeObject *pytype;
1442 
1443 SWIGRUNTIMEINLINE int
1445 {
1447  return data ? data->implicitconv : 0;
1448 }
1449 
1450 SWIGRUNTIMEINLINE PyObject *
1452  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1453  PyObject *klass = data ? data->klass : 0;
1454  return (klass ? klass : PyExc_RuntimeError);
1455 }
1456 
1457 
1459 SwigPyClientData_New(PyObject* obj)
1460 {
1461  if (!obj) {
1462  return 0;
1463  } else {
1464  SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1465  /* the klass element */
1466  data->klass = obj;
1467  Py_INCREF(data->klass);
1468  /* the newraw method and newargs arguments used to create a new raw instance */
1469  if (PyClass_Check(obj)) {
1470  data->newraw = 0;
1471  data->newargs = obj;
1472  Py_INCREF(obj);
1473  } else {
1474 #if (PY_VERSION_HEX < 0x02020000)
1475  data->newraw = 0;
1476 #else
1477  data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1478 #endif
1479  if (data->newraw) {
1480  Py_INCREF(data->newraw);
1481  data->newargs = PyTuple_New(1);
1482  PyTuple_SetItem(data->newargs, 0, obj);
1483  } else {
1484  data->newargs = obj;
1485  }
1486  Py_INCREF(data->newargs);
1487  }
1488  /* the destroy method, aka as the C++ delete method */
1489  data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1490  if (PyErr_Occurred()) {
1491  PyErr_Clear();
1492  data->destroy = 0;
1493  }
1494  if (data->destroy) {
1495  int flags;
1496  Py_INCREF(data->destroy);
1497  flags = PyCFunction_GET_FLAGS(data->destroy);
1498 #ifdef METH_O
1499  data->delargs = !(flags & (METH_O));
1500 #else
1501  data->delargs = 0;
1502 #endif
1503  } else {
1504  data->delargs = 0;
1505  }
1506  data->implicitconv = 0;
1507  data->pytype = 0;
1508  return data;
1509  }
1510 }
1511 
1512 SWIGRUNTIME void
1514  Py_XDECREF(data->newraw);
1515  Py_XDECREF(data->newargs);
1516  Py_XDECREF(data->destroy);
1517 }
1518 
1519 /* =============== SwigPyObject =====================*/
1520 
1521 typedef struct {
1522  PyObject_HEAD
1523  void *ptr;
1524  swig_type_info *ty;
1525  int own;
1526  PyObject *next;
1527 #ifdef SWIGPYTHON_BUILTIN
1528  PyObject *dict;
1529 #endif
1530 } SwigPyObject;
1531 
1532 
1533 #ifdef SWIGPYTHON_BUILTIN
1534 
1535 SWIGRUNTIME PyObject *
1536 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1537 {
1538  SwigPyObject *sobj = (SwigPyObject *)v;
1539 
1540  if (!sobj->dict)
1541  sobj->dict = PyDict_New();
1542 
1543  Py_INCREF(sobj->dict);
1544  return sobj->dict;
1545 }
1546 
1547 #endif
1548 
1549 SWIGRUNTIME PyObject *
1551 {
1552  return PyLong_FromVoidPtr(v->ptr);
1553 }
1554 
1555 SWIGRUNTIME PyObject *
1556 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1557 {
1558  PyObject *res = NULL;
1559  PyObject *args = PyTuple_New(1);
1560  if (args) {
1561  if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1562  PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1563  if (ofmt) {
1564 #if PY_VERSION_HEX >= 0x03000000
1565  res = PyUnicode_Format(ofmt,args);
1566 #else
1567  res = PyString_Format(ofmt,args);
1568 #endif
1569  Py_DECREF(ofmt);
1570  }
1571  Py_DECREF(args);
1572  }
1573  }
1574  return res;
1575 }
1576 
1577 SWIGRUNTIME PyObject *
1579 {
1580  return SwigPyObject_format("%o",v);
1581 }
1582 
1583 SWIGRUNTIME PyObject *
1585 {
1586  return SwigPyObject_format("%x",v);
1587 }
1588 
1589 SWIGRUNTIME PyObject *
1590 #ifdef METH_NOARGS
1592 #else
1593 SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1594 #endif
1595 {
1596  const char *name = SWIG_TypePrettyName(v->ty);
1597  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1598  if (v->next) {
1599 # ifdef METH_NOARGS
1600  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1601 # else
1602  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1603 # endif
1604 # if PY_VERSION_HEX >= 0x03000000
1605  PyObject *joined = PyUnicode_Concat(repr, nrep);
1606  Py_DecRef(repr);
1607  Py_DecRef(nrep);
1608  repr = joined;
1609 # else
1610  PyString_ConcatAndDel(&repr,nrep);
1611 # endif
1612  }
1613  return repr;
1614 }
1615 
1616 SWIGRUNTIME int
1618 {
1619  void *i = v->ptr;
1620  void *j = w->ptr;
1621  return (i < j) ? -1 : ((i > j) ? 1 : 0);
1622 }
1623 
1624 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1625 SWIGRUNTIME PyObject*
1627 {
1628  PyObject* res;
1629  if( op != Py_EQ && op != Py_NE ) {
1630  Py_INCREF(Py_NotImplemented);
1631  return Py_NotImplemented;
1632  }
1633  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1634  return res;
1635 }
1636 
1637 
1638 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1639 
1640 #ifdef SWIGPYTHON_BUILTIN
1641 static swig_type_info *SwigPyObject_stype = 0;
1642 SWIGRUNTIME PyTypeObject*
1643 SwigPyObject_type(void) {
1644  SwigPyClientData *cd;
1645  assert(SwigPyObject_stype);
1646  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1647  assert(cd);
1648  assert(cd->pytype);
1649  return cd->pytype;
1650 }
1651 #else
1652 SWIGRUNTIME PyTypeObject*
1654  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1655  return type;
1656 }
1657 #endif
1658 
1660 SwigPyObject_Check(PyObject *op) {
1661 #ifdef SWIGPYTHON_BUILTIN
1662  PyTypeObject *target_tp = SwigPyObject_type();
1663  if (PyType_IsSubtype(op->ob_type, target_tp))
1664  return 1;
1665  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1666 #else
1667  return (Py_TYPE(op) == SwigPyObject_type())
1668  || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1669 #endif
1670 }
1671 
1672 SWIGRUNTIME PyObject *
1673 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1674 
1675 SWIGRUNTIME void
1677 {
1678  SwigPyObject *sobj = (SwigPyObject *) v;
1679  PyObject *next = sobj->next;
1680  if (sobj->own == SWIG_POINTER_OWN) {
1681  swig_type_info *ty = sobj->ty;
1682  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1683  PyObject *destroy = data ? data->destroy : 0;
1684  if (destroy) {
1685  /* destroy is always a VARARGS method */
1686  PyObject *res;
1687 
1688  /* PyObject_CallFunction() has the potential to silently drop
1689  the active active exception. In cases of unnamed temporary
1690  variable or where we just finished iterating over a generator
1691  StopIteration will be active right now, and this needs to
1692  remain true upon return from SwigPyObject_dealloc. So save
1693  and restore. */
1694 
1695  PyObject *val = NULL, *type = NULL, *tb = NULL;
1696  PyErr_Fetch(&val, &type, &tb);
1697 
1698  if (data->delargs) {
1699  /* we need to create a temporary object to carry the destroy operation */
1700  PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1701  res = SWIG_Python_CallFunctor(destroy, tmp);
1702  Py_DECREF(tmp);
1703  } else {
1704  PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1705  PyObject *mself = PyCFunction_GET_SELF(destroy);
1706  res = ((*meth)(mself, v));
1707  }
1708  if (!res)
1709  PyErr_WriteUnraisable(destroy);
1710 
1711  PyErr_Restore(val, type, tb);
1712 
1713  Py_XDECREF(res);
1714  }
1715 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1716  else {
1717  const char *name = SWIG_TypePrettyName(ty);
1718  printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1719  }
1720 #endif
1721  }
1722  Py_XDECREF(next);
1723  PyObject_DEL(v);
1724 }
1725 
1726 SWIGRUNTIME PyObject*
1727 SwigPyObject_append(PyObject* v, PyObject* next)
1728 {
1729  SwigPyObject *sobj = (SwigPyObject *) v;
1730 #ifndef METH_O
1731  PyObject *tmp = 0;
1732  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1733  next = tmp;
1734 #endif
1735  if (!SwigPyObject_Check(next)) {
1736  PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1737  return NULL;
1738  }
1739  sobj->next = next;
1740  Py_INCREF(next);
1741  return SWIG_Py_Void();
1742 }
1743 
1744 SWIGRUNTIME PyObject*
1745 #ifdef METH_NOARGS
1746 SwigPyObject_next(PyObject* v)
1747 #else
1748 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1749 #endif
1750 {
1751  SwigPyObject *sobj = (SwigPyObject *) v;
1752  if (sobj->next) {
1753  Py_INCREF(sobj->next);
1754  return sobj->next;
1755  } else {
1756  return SWIG_Py_Void();
1757  }
1758 }
1759 
1760 SWIGINTERN PyObject*
1761 #ifdef METH_NOARGS
1762 SwigPyObject_disown(PyObject *v)
1763 #else
1764 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1765 #endif
1766 {
1767  SwigPyObject *sobj = (SwigPyObject *)v;
1768  sobj->own = 0;
1769  return SWIG_Py_Void();
1770 }
1771 
1772 SWIGINTERN PyObject*
1773 #ifdef METH_NOARGS
1774 SwigPyObject_acquire(PyObject *v)
1775 #else
1776 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1777 #endif
1778 {
1779  SwigPyObject *sobj = (SwigPyObject *)v;
1780  sobj->own = SWIG_POINTER_OWN;
1781  return SWIG_Py_Void();
1782 }
1783 
1784 SWIGINTERN PyObject*
1785 SwigPyObject_own(PyObject *v, PyObject *args)
1786 {
1787  PyObject *val = 0;
1788 #if (PY_VERSION_HEX < 0x02020000)
1789  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1790 #elif (PY_VERSION_HEX < 0x02050000)
1791  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1792 #else
1793  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
1794 #endif
1795  {
1796  return NULL;
1797  }
1798  else
1799  {
1800  SwigPyObject *sobj = (SwigPyObject *)v;
1801  PyObject *obj = PyBool_FromLong(sobj->own);
1802  if (val) {
1803 #ifdef METH_NOARGS
1804  if (PyObject_IsTrue(val)) {
1806  } else {
1808  }
1809 #else
1810  if (PyObject_IsTrue(val)) {
1811  SwigPyObject_acquire(v,args);
1812  } else {
1813  SwigPyObject_disown(v,args);
1814  }
1815 #endif
1816  }
1817  return obj;
1818  }
1819 }
1820 
1821 #ifdef METH_O
1822 static PyMethodDef
1823 swigobject_methods[] = {
1824  {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1825  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
1826  {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1827  {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
1828  {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1829  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
1830  {0, 0, 0, 0}
1831 };
1832 #else
1833 static PyMethodDef
1835  {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1836  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"},
1837  {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1838  {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1839  {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1840  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
1841  {0, 0, 0, 0}
1842 };
1843 #endif
1844 
1845 #if PY_VERSION_HEX < 0x02020000
1846 SWIGINTERN PyObject *
1848 {
1849  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1850 }
1851 #endif
1852 
1853 SWIGRUNTIME PyTypeObject*
1855  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1856 
1857  static PyNumberMethods SwigPyObject_as_number = {
1858  (binaryfunc)0, /*nb_add*/
1859  (binaryfunc)0, /*nb_subtract*/
1860  (binaryfunc)0, /*nb_multiply*/
1861  /* nb_divide removed in Python 3 */
1862 #if PY_VERSION_HEX < 0x03000000
1863  (binaryfunc)0, /*nb_divide*/
1864 #endif
1865  (binaryfunc)0, /*nb_remainder*/
1866  (binaryfunc)0, /*nb_divmod*/
1867  (ternaryfunc)0,/*nb_power*/
1868  (unaryfunc)0, /*nb_negative*/
1869  (unaryfunc)0, /*nb_positive*/
1870  (unaryfunc)0, /*nb_absolute*/
1871  (inquiry)0, /*nb_nonzero*/
1872  0, /*nb_invert*/
1873  0, /*nb_lshift*/
1874  0, /*nb_rshift*/
1875  0, /*nb_and*/
1876  0, /*nb_xor*/
1877  0, /*nb_or*/
1878 #if PY_VERSION_HEX < 0x03000000
1879  0, /*nb_coerce*/
1880 #endif
1881  (unaryfunc)SwigPyObject_long, /*nb_int*/
1882 #if PY_VERSION_HEX < 0x03000000
1883  (unaryfunc)SwigPyObject_long, /*nb_long*/
1884 #else
1885  0, /*nb_reserved*/
1886 #endif
1887  (unaryfunc)0, /*nb_float*/
1888 #if PY_VERSION_HEX < 0x03000000
1889  (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1890  (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1891 #endif
1892 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1893  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1894 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1895  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1896 #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1897  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1898 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1899  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1900 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1901  0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1902 #endif
1903  };
1904 
1905  static PyTypeObject swigpyobject_type;
1906  static int type_init = 0;
1907  if (!type_init) {
1908  const PyTypeObject tmp = {
1909 #if PY_VERSION_HEX >= 0x03000000
1910  PyVarObject_HEAD_INIT(NULL, 0)
1911 #else
1912  PyObject_HEAD_INIT(NULL)
1913  0, /* ob_size */
1914 #endif
1915  (char *)"SwigPyObject", /* tp_name */
1916  sizeof(SwigPyObject), /* tp_basicsize */
1917  0, /* tp_itemsize */
1918  (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1919  0, /* tp_print */
1920 #if PY_VERSION_HEX < 0x02020000
1921  (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
1922 #else
1923  (getattrfunc)0, /* tp_getattr */
1924 #endif
1925  (setattrfunc)0, /* tp_setattr */
1926 #if PY_VERSION_HEX >= 0x03000000
1927  0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1928 #else
1929  (cmpfunc)SwigPyObject_compare, /* tp_compare */
1930 #endif
1931  (reprfunc)SwigPyObject_repr, /* tp_repr */
1932  &SwigPyObject_as_number, /* tp_as_number */
1933  0, /* tp_as_sequence */
1934  0, /* tp_as_mapping */
1935  (hashfunc)0, /* tp_hash */
1936  (ternaryfunc)0, /* tp_call */
1937  0, /* tp_str */
1938  PyObject_GenericGetAttr, /* tp_getattro */
1939  0, /* tp_setattro */
1940  0, /* tp_as_buffer */
1941  Py_TPFLAGS_DEFAULT, /* tp_flags */
1942  swigobject_doc, /* tp_doc */
1943  0, /* tp_traverse */
1944  0, /* tp_clear */
1945  (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1946  0, /* tp_weaklistoffset */
1947 #if PY_VERSION_HEX >= 0x02020000
1948  0, /* tp_iter */
1949  0, /* tp_iternext */
1950  swigobject_methods, /* tp_methods */
1951  0, /* tp_members */
1952  0, /* tp_getset */
1953  0, /* tp_base */
1954  0, /* tp_dict */
1955  0, /* tp_descr_get */
1956  0, /* tp_descr_set */
1957  0, /* tp_dictoffset */
1958  0, /* tp_init */
1959  0, /* tp_alloc */
1960  0, /* tp_new */
1961  0, /* tp_free */
1962  0, /* tp_is_gc */
1963  0, /* tp_bases */
1964  0, /* tp_mro */
1965  0, /* tp_cache */
1966  0, /* tp_subclasses */
1967  0, /* tp_weaklist */
1968 #endif
1969 #if PY_VERSION_HEX >= 0x02030000
1970  0, /* tp_del */
1971 #endif
1972 #if PY_VERSION_HEX >= 0x02060000
1973  0, /* tp_version_tag */
1974 #endif
1975 #if PY_VERSION_HEX >= 0x03040000
1976  0, /* tp_finalize */
1977 #endif
1978 #ifdef COUNT_ALLOCS
1979  0, /* tp_allocs */
1980  0, /* tp_frees */
1981  0, /* tp_maxalloc */
1982 #if PY_VERSION_HEX >= 0x02050000
1983  0, /* tp_prev */
1984 #endif
1985  0 /* tp_next */
1986 #endif
1987  };
1988  swigpyobject_type = tmp;
1989  type_init = 1;
1990 #if PY_VERSION_HEX < 0x02020000
1991  swigpyobject_type.ob_type = &PyType_Type;
1992 #else
1993  if (PyType_Ready(&swigpyobject_type) < 0)
1994  return NULL;
1995 #endif
1996  }
1997  return &swigpyobject_type;
1998 }
1999 
2000 SWIGRUNTIME PyObject *
2001 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
2002 {
2003  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
2004  if (sobj) {
2005  sobj->ptr = ptr;
2006  sobj->ty = ty;
2007  sobj->own = own;
2008  sobj->next = 0;
2009  }
2010  return (PyObject *)sobj;
2011 }
2012 
2013 /* -----------------------------------------------------------------------------
2014  * Implements a simple Swig Packed type, and use it instead of string
2015  * ----------------------------------------------------------------------------- */
2016 
2017 typedef struct {
2018  PyObject_HEAD
2019  void *pack;
2020  swig_type_info *ty;
2021  size_t size;
2022 } SwigPyPacked;
2023 
2024 SWIGRUNTIME int
2026 {
2027  char result[SWIG_BUFFER_SIZE];
2028  fputs("<Swig Packed ", fp);
2029  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2030  fputs("at ", fp);
2031  fputs(result, fp);
2032  }
2033  fputs(v->ty->name,fp);
2034  fputs(">", fp);
2035  return 0;
2036 }
2037 
2038 SWIGRUNTIME PyObject *
2040 {
2041  char result[SWIG_BUFFER_SIZE];
2042  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2043  return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
2044  } else {
2045  return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
2046  }
2047 }
2048 
2049 SWIGRUNTIME PyObject *
2051 {
2052  char result[SWIG_BUFFER_SIZE];
2053  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
2054  return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
2055  } else {
2056  return SWIG_Python_str_FromChar(v->ty->name);
2057  }
2058 }
2059 
2060 SWIGRUNTIME int
2062 {
2063  size_t i = v->size;
2064  size_t j = w->size;
2065  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2066  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
2067 }
2068 
2069 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
2070 
2071 SWIGRUNTIME PyTypeObject*
2073  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2074  return type;
2075 }
2076 
2078 SwigPyPacked_Check(PyObject *op) {
2079  return ((op)->ob_type == SwigPyPacked_TypeOnce())
2080  || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
2081 }
2082 
2083 SWIGRUNTIME void
2085 {
2086  if (SwigPyPacked_Check(v)) {
2087  SwigPyPacked *sobj = (SwigPyPacked *) v;
2088  free(sobj->pack);
2089  }
2090  PyObject_DEL(v);
2091 }
2092 
2093 SWIGRUNTIME PyTypeObject*
2095  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
2096  static PyTypeObject swigpypacked_type;
2097  static int type_init = 0;
2098  if (!type_init) {
2099  const PyTypeObject tmp = {
2100 #if PY_VERSION_HEX>=0x03000000
2101  PyVarObject_HEAD_INIT(NULL, 0)
2102 #else
2103  PyObject_HEAD_INIT(NULL)
2104  0, /* ob_size */
2105 #endif
2106  (char *)"SwigPyPacked", /* tp_name */
2107  sizeof(SwigPyPacked), /* tp_basicsize */
2108  0, /* tp_itemsize */
2109  (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
2110  (printfunc)SwigPyPacked_print, /* tp_print */
2111  (getattrfunc)0, /* tp_getattr */
2112  (setattrfunc)0, /* tp_setattr */
2113 #if PY_VERSION_HEX>=0x03000000
2114  0, /* tp_reserved in 3.0.1 */
2115 #else
2116  (cmpfunc)SwigPyPacked_compare, /* tp_compare */
2117 #endif
2118  (reprfunc)SwigPyPacked_repr, /* tp_repr */
2119  0, /* tp_as_number */
2120  0, /* tp_as_sequence */
2121  0, /* tp_as_mapping */
2122  (hashfunc)0, /* tp_hash */
2123  (ternaryfunc)0, /* tp_call */
2124  (reprfunc)SwigPyPacked_str, /* tp_str */
2125  PyObject_GenericGetAttr, /* tp_getattro */
2126  0, /* tp_setattro */
2127  0, /* tp_as_buffer */
2128  Py_TPFLAGS_DEFAULT, /* tp_flags */
2129  swigpacked_doc, /* tp_doc */
2130  0, /* tp_traverse */
2131  0, /* tp_clear */
2132  0, /* tp_richcompare */
2133  0, /* tp_weaklistoffset */
2134 #if PY_VERSION_HEX >= 0x02020000
2135  0, /* tp_iter */
2136  0, /* tp_iternext */
2137  0, /* tp_methods */
2138  0, /* tp_members */
2139  0, /* tp_getset */
2140  0, /* tp_base */
2141  0, /* tp_dict */
2142  0, /* tp_descr_get */
2143  0, /* tp_descr_set */
2144  0, /* tp_dictoffset */
2145  0, /* tp_init */
2146  0, /* tp_alloc */
2147  0, /* tp_new */
2148  0, /* tp_free */
2149  0, /* tp_is_gc */
2150  0, /* tp_bases */
2151  0, /* tp_mro */
2152  0, /* tp_cache */
2153  0, /* tp_subclasses */
2154  0, /* tp_weaklist */
2155 #endif
2156 #if PY_VERSION_HEX >= 0x02030000
2157  0, /* tp_del */
2158 #endif
2159 #if PY_VERSION_HEX >= 0x02060000
2160  0, /* tp_version_tag */
2161 #endif
2162 #if PY_VERSION_HEX >= 0x03040000
2163  0, /* tp_finalize */
2164 #endif
2165 #ifdef COUNT_ALLOCS
2166  0, /* tp_allocs */
2167  0, /* tp_frees */
2168  0, /* tp_maxalloc */
2169 #if PY_VERSION_HEX >= 0x02050000
2170  0, /* tp_prev */
2171 #endif
2172  0 /* tp_next */
2173 #endif
2174  };
2175  swigpypacked_type = tmp;
2176  type_init = 1;
2177 #if PY_VERSION_HEX < 0x02020000
2178  swigpypacked_type.ob_type = &PyType_Type;
2179 #else
2180  if (PyType_Ready(&swigpypacked_type) < 0)
2181  return NULL;
2182 #endif
2183  }
2184  return &swigpypacked_type;
2185 }
2186 
2187 SWIGRUNTIME PyObject *
2188 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2189 {
2190  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
2191  if (sobj) {
2192  void *pack = malloc(size);
2193  if (pack) {
2194  memcpy(pack, ptr, size);
2195  sobj->pack = pack;
2196  sobj->ty = ty;
2197  sobj->size = size;
2198  } else {
2199  PyObject_DEL((PyObject *) sobj);
2200  sobj = 0;
2201  }
2202  }
2203  return (PyObject *) sobj;
2204 }
2205 
2207 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2208 {
2209  if (SwigPyPacked_Check(obj)) {
2210  SwigPyPacked *sobj = (SwigPyPacked *)obj;
2211  if (sobj->size != size) return 0;
2212  memcpy(ptr, sobj->pack, size);
2213  return sobj->ty;
2214  } else {
2215  return 0;
2216  }
2217 }
2218 
2219 /* -----------------------------------------------------------------------------
2220  * pointers/data manipulation
2221  * ----------------------------------------------------------------------------- */
2222 
2223 SWIGRUNTIMEINLINE PyObject *
2225 {
2226  return SWIG_Python_str_FromChar("this");
2227 }
2228 
2229 static PyObject *swig_this = NULL;
2230 
2231 SWIGRUNTIME PyObject *
2233 {
2234  if (swig_this == NULL)
2235  swig_this = _SWIG_This();
2236  return swig_this;
2237 }
2238 
2239 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2240 
2241 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2242 #if PY_VERSION_HEX>=0x03000000
2243 #define SWIG_PYTHON_SLOW_GETSET_THIS
2244 #endif
2245 
2247 SWIG_Python_GetSwigThis(PyObject *pyobj)
2248 {
2249  PyObject *obj;
2250 
2251  if (SwigPyObject_Check(pyobj))
2252  return (SwigPyObject *) pyobj;
2253 
2254 #ifdef SWIGPYTHON_BUILTIN
2255  (void)obj;
2256 # ifdef PyWeakref_CheckProxy
2257  if (PyWeakref_CheckProxy(pyobj)) {
2258  pyobj = PyWeakref_GET_OBJECT(pyobj);
2259  if (pyobj && SwigPyObject_Check(pyobj))
2260  return (SwigPyObject*) pyobj;
2261  }
2262 # endif
2263  return NULL;
2264 #else
2265 
2266  obj = 0;
2267 
2268 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2269  if (PyInstance_Check(pyobj)) {
2270  obj = _PyInstance_Lookup(pyobj, SWIG_This());
2271  } else {
2272  PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2273  if (dictptr != NULL) {
2274  PyObject *dict = *dictptr;
2275  obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2276  } else {
2277 #ifdef PyWeakref_CheckProxy
2278  if (PyWeakref_CheckProxy(pyobj)) {
2279  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2280  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2281  }
2282 #endif
2283  obj = PyObject_GetAttr(pyobj,SWIG_This());
2284  if (obj) {
2285  Py_DECREF(obj);
2286  } else {
2287  if (PyErr_Occurred()) PyErr_Clear();
2288  return 0;
2289  }
2290  }
2291  }
2292 #else
2293  obj = PyObject_GetAttr(pyobj,SWIG_This());
2294  if (obj) {
2295  Py_DECREF(obj);
2296  } else {
2297  if (PyErr_Occurred()) PyErr_Clear();
2298  return 0;
2299  }
2300 #endif
2301  if (obj && !SwigPyObject_Check(obj)) {
2302  /* a PyObject is called 'this', try to get the 'real this'
2303  SwigPyObject from it */
2304  return SWIG_Python_GetSwigThis(obj);
2305  }
2306  return (SwigPyObject *)obj;
2307 #endif
2308 }
2309 
2310 /* Acquire a pointer value */
2311 
2312 SWIGRUNTIME int
2313 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2314  if (own == SWIG_POINTER_OWN) {
2316  if (sobj) {
2317  int oldown = sobj->own;
2318  sobj->own = own;
2319  return oldown;
2320  }
2321  }
2322  return 0;
2323 }
2324 
2325 /* Convert a pointer value */
2326 
2327 SWIGRUNTIME int
2328 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2329  int res;
2330  SwigPyObject *sobj;
2331  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2332 
2333  if (!obj)
2334  return SWIG_ERROR;
2335  if (obj == Py_None && !implicit_conv) {
2336  if (ptr)
2337  *ptr = 0;
2338  return SWIG_OK;
2339  }
2340 
2341  res = SWIG_ERROR;
2342 
2343  sobj = SWIG_Python_GetSwigThis(obj);
2344  if (own)
2345  *own = 0;
2346  while (sobj) {
2347  void *vptr = sobj->ptr;
2348  if (ty) {
2349  swig_type_info *to = sobj->ty;
2350  if (to == ty) {
2351  /* no type cast needed */
2352  if (ptr) *ptr = vptr;
2353  break;
2354  } else {
2355  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2356  if (!tc) {
2357  sobj = (SwigPyObject *)sobj->next;
2358  } else {
2359  if (ptr) {
2360  int newmemory = 0;
2361  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2362  if (newmemory == SWIG_CAST_NEW_MEMORY) {
2363  assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2364  if (own)
2365  *own = *own | SWIG_CAST_NEW_MEMORY;
2366  }
2367  }
2368  break;
2369  }
2370  }
2371  } else {
2372  if (ptr) *ptr = vptr;
2373  break;
2374  }
2375  }
2376  if (sobj) {
2377  if (own)
2378  *own = *own | sobj->own;
2379  if (flags & SWIG_POINTER_DISOWN) {
2380  sobj->own = 0;
2381  }
2382  res = SWIG_OK;
2383  } else {
2384  if (implicit_conv) {
2385  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2386  if (data && !data->implicitconv) {
2387  PyObject *klass = data->klass;
2388  if (klass) {
2389  PyObject *impconv;
2390  data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2391  impconv = SWIG_Python_CallFunctor(klass, obj);
2392  data->implicitconv = 0;
2393  if (PyErr_Occurred()) {
2394  PyErr_Clear();
2395  impconv = 0;
2396  }
2397  if (impconv) {
2398  SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2399  if (iobj) {
2400  void *vptr;
2401  res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2402  if (SWIG_IsOK(res)) {
2403  if (ptr) {
2404  *ptr = vptr;
2405  /* transfer the ownership to 'ptr' */
2406  iobj->own = 0;
2407  res = SWIG_AddCast(res);
2408  res = SWIG_AddNewMask(res);
2409  } else {
2410  res = SWIG_AddCast(res);
2411  }
2412  }
2413  }
2414  Py_DECREF(impconv);
2415  }
2416  }
2417  }
2418  }
2419  if (!SWIG_IsOK(res) && obj == Py_None) {
2420  if (ptr)
2421  *ptr = 0;
2422  if (PyErr_Occurred())
2423  PyErr_Clear();
2424  res = SWIG_OK;
2425  }
2426  }
2427  return res;
2428 }
2429 
2430 /* Convert a function ptr value */
2431 
2432 SWIGRUNTIME int
2433 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2434  if (!PyCFunction_Check(obj)) {
2435  return SWIG_ConvertPtr(obj, ptr, ty, 0);
2436  } else {
2437  void *vptr = 0;
2438  swig_cast_info *tc;
2439 
2440  /* here we get the method pointer for callbacks */
2441  const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2442  const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2443  if (desc)
2444  desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2445  if (!desc)
2446  return SWIG_ERROR;
2447  tc = SWIG_TypeCheck(desc,ty);
2448  if (tc) {
2449  int newmemory = 0;
2450  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2451  assert(!newmemory); /* newmemory handling not yet implemented */
2452  } else {
2453  return SWIG_ERROR;
2454  }
2455  return SWIG_OK;
2456  }
2457 }
2458 
2459 /* Convert a packed value value */
2460 
2461 SWIGRUNTIME int
2462 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2463  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2464  if (!to) return SWIG_ERROR;
2465  if (ty) {
2466  if (to != ty) {
2467  /* check type cast? */
2468  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2469  if (!tc) return SWIG_ERROR;
2470  }
2471  }
2472  return SWIG_OK;
2473 }
2474 
2475 /* -----------------------------------------------------------------------------
2476  * Create a new pointer object
2477  * ----------------------------------------------------------------------------- */
2478 
2479 /*
2480  Create a new instance object, without calling __init__, and set the
2481  'this' attribute.
2482 */
2483 
2484 SWIGRUNTIME PyObject*
2486 {
2487 #if (PY_VERSION_HEX >= 0x02020000)
2488  PyObject *inst = 0;
2489  PyObject *newraw = data->newraw;
2490  if (newraw) {
2491  inst = PyObject_Call(newraw, data->newargs, NULL);
2492  if (inst) {
2493 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2494  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2495  if (dictptr != NULL) {
2496  PyObject *dict = *dictptr;
2497  if (dict == NULL) {
2498  dict = PyDict_New();
2499  *dictptr = dict;
2500  PyDict_SetItem(dict, SWIG_This(), swig_this);
2501  }
2502  }
2503 #else
2504  PyObject *key = SWIG_This();
2505  PyObject_SetAttr(inst, key, swig_this);
2506 #endif
2507  }
2508  } else {
2509 #if PY_VERSION_HEX >= 0x03000000
2510  inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2511  if (inst) {
2512  PyObject_SetAttr(inst, SWIG_This(), swig_this);
2513  Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2514  }
2515 #else
2516  PyObject *dict = PyDict_New();
2517  if (dict) {
2518  PyDict_SetItem(dict, SWIG_This(), swig_this);
2519  inst = PyInstance_NewRaw(data->newargs, dict);
2520  Py_DECREF(dict);
2521  }
2522 #endif
2523  }
2524  return inst;
2525 #else
2526 #if (PY_VERSION_HEX >= 0x02010000)
2527  PyObject *inst = 0;
2528  PyObject *dict = PyDict_New();
2529  if (dict) {
2530  PyDict_SetItem(dict, SWIG_This(), swig_this);
2531  inst = PyInstance_NewRaw(data->newargs, dict);
2532  Py_DECREF(dict);
2533  }
2534  return (PyObject *) inst;
2535 #else
2536  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2537  if (inst == NULL) {
2538  return NULL;
2539  }
2540  inst->in_class = (PyClassObject *)data->newargs;
2541  Py_INCREF(inst->in_class);
2542  inst->in_dict = PyDict_New();
2543  if (inst->in_dict == NULL) {
2544  Py_DECREF(inst);
2545  return NULL;
2546  }
2547 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2548  inst->in_weakreflist = NULL;
2549 #endif
2550 #ifdef Py_TPFLAGS_GC
2551  PyObject_GC_Init(inst);
2552 #endif
2553  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2554  return (PyObject *) inst;
2555 #endif
2556 #endif
2557 }
2558 
2559 SWIGRUNTIME void
2560 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2561 {
2562  PyObject *dict;
2563 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2564  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2565  if (dictptr != NULL) {
2566  dict = *dictptr;
2567  if (dict == NULL) {
2568  dict = PyDict_New();
2569  *dictptr = dict;
2570  }
2571  PyDict_SetItem(dict, SWIG_This(), swig_this);
2572  return;
2573  }
2574 #endif
2575  dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2576  PyDict_SetItem(dict, SWIG_This(), swig_this);
2577  Py_DECREF(dict);
2578 }
2579 
2580 
2581 SWIGINTERN PyObject *
2583  PyObject *obj[2];
2584  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2585  return NULL;
2586  } else {
2587  SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2588  if (sthis) {
2589  SwigPyObject_append((PyObject*) sthis, obj[1]);
2590  } else {
2591  SWIG_Python_SetSwigThis(obj[0], obj[1]);
2592  }
2593  return SWIG_Py_Void();
2594  }
2595 }
2596 
2597 /* Create a new pointer object */
2598 
2599 SWIGRUNTIME PyObject *
2600 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2601  SwigPyClientData *clientdata;
2602  PyObject * robj;
2603  int own;
2604 
2605  if (!ptr)
2606  return SWIG_Py_Void();
2607 
2608  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2609  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2610  if (clientdata && clientdata->pytype) {
2611  SwigPyObject *newobj;
2612  if (flags & SWIG_BUILTIN_TP_INIT) {
2613  newobj = (SwigPyObject*) self;
2614  if (newobj->ptr) {
2615  PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2616  while (newobj->next)
2617  newobj = (SwigPyObject *) newobj->next;
2618  newobj->next = next_self;
2619  newobj = (SwigPyObject *)next_self;
2620 #ifdef SWIGPYTHON_BUILTIN
2621  newobj->dict = 0;
2622 #endif
2623  }
2624  } else {
2625  newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2626 #ifdef SWIGPYTHON_BUILTIN
2627  newobj->dict = 0;
2628 #endif
2629  }
2630  if (newobj) {
2631  newobj->ptr = ptr;
2632  newobj->ty = type;
2633  newobj->own = own;
2634  newobj->next = 0;
2635  return (PyObject*) newobj;
2636  }
2637  return SWIG_Py_Void();
2638  }
2639 
2640  assert(!(flags & SWIG_BUILTIN_TP_INIT));
2641 
2642  robj = SwigPyObject_New(ptr, type, own);
2643  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2644  PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2645  Py_DECREF(robj);
2646  robj = inst;
2647  }
2648  return robj;
2649 }
2650 
2651 /* Create a new packed object */
2652 
2653 SWIGRUNTIMEINLINE PyObject *
2654 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2655  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2656 }
2657 
2658 /* -----------------------------------------------------------------------------*
2659  * Get type list
2660  * -----------------------------------------------------------------------------*/
2661 
2662 #ifdef SWIG_LINK_RUNTIME
2663 void *SWIG_ReturnGlobalTypeList(void *);
2664 #endif
2665 
2668  static void *type_pointer = (void *)0;
2669  /* first check if module already created */
2670  if (!type_pointer) {
2671 #ifdef SWIG_LINK_RUNTIME
2672  type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2673 #else
2674 # ifdef SWIGPY_USE_CAPSULE
2675  type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2676 # else
2677  type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2678  (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2679 # endif
2680  if (PyErr_Occurred()) {
2681  PyErr_Clear();
2682  type_pointer = (void *)0;
2683  }
2684 #endif
2685  }
2686  return (swig_module_info *) type_pointer;
2687 }
2688 
2689 #if PY_MAJOR_VERSION < 2
2690 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2691  is copied out of Python/modsupport.c in python version 2.3.4 */
2692 SWIGINTERN int
2693 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2694 {
2695  PyObject *dict;
2696  if (!PyModule_Check(m)) {
2697  PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
2698  return SWIG_ERROR;
2699  }
2700  if (!o) {
2701  PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
2702  return SWIG_ERROR;
2703  }
2704 
2705  dict = PyModule_GetDict(m);
2706  if (dict == NULL) {
2707  /* Internal error -- modules must have a dict! */
2708  PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2709  PyModule_GetName(m));
2710  return SWIG_ERROR;
2711  }
2712  if (PyDict_SetItemString(dict, name, o))
2713  return SWIG_ERROR;
2714  Py_DECREF(o);
2715  return SWIG_OK;
2716 }
2717 #endif
2718 
2719 SWIGRUNTIME void
2720 #ifdef SWIGPY_USE_CAPSULE
2721 SWIG_Python_DestroyModule(PyObject *obj)
2722 #else
2724 #endif
2725 {
2726 #ifdef SWIGPY_USE_CAPSULE
2727  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2728 #else
2730 #endif
2731  swig_type_info **types = swig_module->types;
2732  size_t i;
2733  for (i =0; i < swig_module->size; ++i) {
2734  swig_type_info *ty = types[i];
2735  if (ty->owndata) {
2737  if (data) SwigPyClientData_Del(data);
2738  }
2739  }
2740  Py_DECREF(SWIG_This());
2741  swig_this = NULL;
2742 }
2743 
2744 SWIGRUNTIME void
2746 #if PY_VERSION_HEX >= 0x03000000
2747  /* Add a dummy module object into sys.modules */
2748  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2749 #else
2750  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2751  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2752 #endif
2753 #ifdef SWIGPY_USE_CAPSULE
2754  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2755  if (pointer && module) {
2756  PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2757  } else {
2758  Py_XDECREF(pointer);
2759  }
2760 #else
2761  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2762  if (pointer && module) {
2763  PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2764  } else {
2765  Py_XDECREF(pointer);
2766  }
2767 #endif
2768 }
2769 
2770 /* The python cached type query */
2771 SWIGRUNTIME PyObject *
2773  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2774  return cache;
2775 }
2776 
2778 SWIG_Python_TypeQuery(const char *type)
2779 {
2780  PyObject *cache = SWIG_Python_TypeCache();
2781  PyObject *key = SWIG_Python_str_FromChar(type);
2782  PyObject *obj = PyDict_GetItem(cache, key);
2783  swig_type_info *descriptor;
2784  if (obj) {
2785 #ifdef SWIGPY_USE_CAPSULE
2786  descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2787 #else
2788  descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2789 #endif
2790  } else {
2792  descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2793  if (descriptor) {
2794 #ifdef SWIGPY_USE_CAPSULE
2795  obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2796 #else
2797  obj = PyCObject_FromVoidPtr(descriptor, NULL);
2798 #endif
2799  PyDict_SetItem(cache, key, obj);
2800  Py_DECREF(obj);
2801  }
2802  }
2803  Py_DECREF(key);
2804  return descriptor;
2805 }
2806 
2807 /*
2808  For backward compatibility only
2809 */
2810 #define SWIG_POINTER_EXCEPTION 0
2811 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2812 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2813 
2814 SWIGRUNTIME int
2815 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2816 {
2817  if (PyErr_Occurred()) {
2818  PyObject *type = 0;
2819  PyObject *value = 0;
2820  PyObject *traceback = 0;
2821  PyErr_Fetch(&type, &value, &traceback);
2822  if (value) {
2823  PyObject *old_str = PyObject_Str(value);
2824  const char *tmp = SWIG_Python_str_AsChar(old_str);
2825  if (!tmp)
2826  tmp = "Invalid error message";
2827  Py_XINCREF(type);
2828  PyErr_Clear();
2829  if (infront) {
2830  PyErr_Format(type, "%s %s", mesg, tmp);
2831  } else {
2832  PyErr_Format(type, "%s %s", tmp, mesg);
2833  }
2835  Py_DECREF(old_str);
2836  }
2837  return 1;
2838  } else {
2839  return 0;
2840  }
2841 }
2842 
2843 SWIGRUNTIME int
2845 {
2846  if (PyErr_Occurred()) {
2847  /* add information about failing argument */
2848  char mesg[256];
2849  PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2850  return SWIG_Python_AddErrMesg(mesg, 1);
2851  } else {
2852  return 0;
2853  }
2854 }
2855 
2856 SWIGRUNTIMEINLINE const char *
2857 SwigPyObject_GetDesc(PyObject *self)
2858 {
2859  SwigPyObject *v = (SwigPyObject *)self;
2860  swig_type_info *ty = v ? v->ty : 0;
2861  return ty ? ty->str : "";
2862 }
2863 
2864 SWIGRUNTIME void
2865 SWIG_Python_TypeError(const char *type, PyObject *obj)
2866 {
2867  if (type) {
2868 #if defined(SWIG_COBJECT_TYPES)
2869  if (obj && SwigPyObject_Check(obj)) {
2870  const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2871  if (otype) {
2872  PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2873  type, otype);
2874  return;
2875  }
2876  } else
2877 #endif
2878  {
2879  const char *otype = (obj ? obj->ob_type->tp_name : 0);
2880  if (otype) {
2881  PyObject *str = PyObject_Str(obj);
2882  const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2883  if (cstr) {
2884  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2885  type, otype, cstr);
2887  } else {
2888  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2889  type, otype);
2890  }
2891  Py_XDECREF(str);
2892  return;
2893  }
2894  }
2895  PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2896  } else {
2897  PyErr_Format(PyExc_TypeError, "unexpected type is received");
2898  }
2899 }
2900 
2901 
2902 /* Convert a pointer value, signal an exception on a type mismatch */
2903 SWIGRUNTIME void *
2904 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2905  void *result;
2906  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2907  PyErr_Clear();
2908 #if SWIG_POINTER_EXCEPTION
2909  if (flags) {
2911  SWIG_Python_ArgFail(argnum);
2912  }
2913 #endif
2914  }
2915  return result;
2916 }
2917 
2918 #ifdef SWIGPYTHON_BUILTIN
2919 SWIGRUNTIME int
2920 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2921  PyTypeObject *tp = obj->ob_type;
2922  PyObject *descr;
2923  PyObject *encoded_name;
2924  descrsetfunc f;
2925  int res = -1;
2926 
2927 # ifdef Py_USING_UNICODE
2928  if (PyString_Check(name)) {
2929  name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2930  if (!name)
2931  return -1;
2932  } else if (!PyUnicode_Check(name))
2933 # else
2934  if (!PyString_Check(name))
2935 # endif
2936  {
2937  PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2938  return -1;
2939  } else {
2940  Py_INCREF(name);
2941  }
2942 
2943  if (!tp->tp_dict) {
2944  if (PyType_Ready(tp) < 0)
2945  goto done;
2946  }
2947 
2948  descr = _PyType_Lookup(tp, name);
2949  f = NULL;
2950  if (descr != NULL)
2951  f = descr->ob_type->tp_descr_set;
2952  if (!f) {
2953  if (PyString_Check(name)) {
2954  encoded_name = name;
2955  Py_INCREF(name);
2956  } else {
2957  encoded_name = PyUnicode_AsUTF8String(name);
2958  if (!encoded_name)
2959  return -1;
2960  }
2961  PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2962  Py_DECREF(encoded_name);
2963  } else {
2964  res = f(descr, obj, value);
2965  }
2966 
2967  done:
2968  Py_DECREF(name);
2969  return res;
2970 }
2971 #endif
2972 
2973 
2974 #ifdef __cplusplus
2975 }
2976 #endif
2977 
2978 
2979 
2980 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2981 
2982 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2983 
2984 
2985 
2986 /* -------- TYPES TABLE (BEGIN) -------- */
2987 
2988 #define SWIGTYPE_p_char swig_types[0]
2990 static swig_module_info swig_module = {swig_types, 1, 0, 0, 0, 0};
2991 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2992 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2993 
2994 /* -------- TYPES TABLE (END) -------- */
2995 
2996 #if (PY_VERSION_HEX <= 0x02000000)
2997 # if !defined(SWIG_PYTHON_CLASSIC)
2998 # error "This python version requires swig to be run with the '-classic' option"
2999 # endif
3000 #endif
3001 
3002 /*-----------------------------------------------
3003  @(target):= _Pltk_init.so
3004  ------------------------------------------------*/
3005 #if PY_VERSION_HEX >= 0x03000000
3006 # define SWIG_init PyInit__Pltk_init
3007 
3008 #else
3009 # define SWIG_init init_Pltk_init
3010 
3011 #endif
3012 #define SWIG_name "_Pltk_init"
3013 
3014 #define SWIGVERSION 0x030012
3015 #define SWIG_VERSION SWIGVERSION
3016 
3017 
3018 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
3019 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
3020 
3021 
3022 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
3023 #include <Python.h>
3024 #include <arrayobject.h>
3025 #include "plplot.h"
3026 #include "plplotP.h"
3027 
3028 #include <tcl.h>
3029 #include "pltk.h"
3030 
3031 // Initialize the PLtk extension. The single argument of this routine
3032 // is the address of the Tcl interpreter into which the Pltk extension
3033 // is to be injected.
3034 
3035  void Pltk_init( long x )
3036  {
3037  Tcl_Interp *interp = (Tcl_Interp *) x;
3038 
3039  if ( Pltk_Init( interp ) == TCL_ERROR )
3040  {
3041  printf( "Initialization of Pltk Tcl extension failed!\n" );
3042  }
3043  }
3044 
3045 
3046 SWIGINTERN int
3047 SWIG_AsVal_double (PyObject *obj, double *val)
3048 {
3049  int res = SWIG_TypeError;
3050  if (PyFloat_Check(obj)) {
3051  if (val) *val = PyFloat_AsDouble(obj);
3052  return SWIG_OK;
3053 #if PY_VERSION_HEX < 0x03000000
3054  } else if (PyInt_Check(obj)) {
3055  if (val) *val = (double) PyInt_AsLong(obj);
3056  return SWIG_OK;
3057 #endif
3058  } else if (PyLong_Check(obj)) {
3059  double v = PyLong_AsDouble(obj);
3060  if (!PyErr_Occurred()) {
3061  if (val) *val = v;
3062  return SWIG_OK;
3063  } else {
3064  PyErr_Clear();
3065  }
3066  }
3067 #ifdef SWIG_PYTHON_CAST_MODE
3068  {
3069  int dispatch = 0;
3070  double d = PyFloat_AsDouble(obj);
3071  if (!PyErr_Occurred()) {
3072  if (val) *val = d;
3073  return SWIG_AddCast(SWIG_OK);
3074  } else {
3075  PyErr_Clear();
3076  }
3077  if (!dispatch) {
3078  long v = PyLong_AsLong(obj);
3079  if (!PyErr_Occurred()) {
3080  if (val) *val = v;
3082  } else {
3083  PyErr_Clear();
3084  }
3085  }
3086  }
3087 #endif
3088  return res;
3089 }
3090 
3091 
3092 #include <float.h>
3093 
3094 
3095 #include <math.h>
3096 
3097 
3098 SWIGINTERNINLINE int
3099 SWIG_CanCastAsInteger(double *d, double min, double max) {
3100  double x = *d;
3101  if ((min <= x && x <= max)) {
3102  double fx = floor(x);
3103  double cx = ceil(x);
3104  double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3105  if ((errno == EDOM) || (errno == ERANGE)) {
3106  errno = 0;
3107  } else {
3108  double summ, reps, diff;
3109  if (rd < x) {
3110  diff = x - rd;
3111  } else if (rd > x) {
3112  diff = rd - x;
3113  } else {
3114  return 1;
3115  }
3116  summ = rd + x;
3117  reps = diff/summ;
3118  if (reps < 8*DBL_EPSILON) {
3119  *d = rd;
3120  return 1;
3121  }
3122  }
3123  }
3124  return 0;
3125 }
3126 
3127 
3128 SWIGINTERN int
3129 SWIG_AsVal_long (PyObject *obj, long* val)
3130 {
3131 #if PY_VERSION_HEX < 0x03000000
3132  if (PyInt_Check(obj)) {
3133  if (val) *val = PyInt_AsLong(obj);
3134  return SWIG_OK;
3135  } else
3136 #endif
3137  if (PyLong_Check(obj)) {
3138  long v = PyLong_AsLong(obj);
3139  if (!PyErr_Occurred()) {
3140  if (val) *val = v;
3141  return SWIG_OK;
3142  } else {
3143  PyErr_Clear();
3144  return SWIG_OverflowError;
3145  }
3146  }
3147 #ifdef SWIG_PYTHON_CAST_MODE
3148  {
3149  int dispatch = 0;
3150  long v = PyInt_AsLong(obj);
3151  if (!PyErr_Occurred()) {
3152  if (val) *val = v;
3153  return SWIG_AddCast(SWIG_OK);
3154  } else {
3155  PyErr_Clear();
3156  }
3157  if (!dispatch) {
3158  double d;
3159  int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3160  if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3161  if (val) *val = (long)(d);
3162  return res;
3163  }
3164  }
3165  }
3166 #endif
3167  return SWIG_TypeError;
3168 }
3169 
3170 #ifdef __cplusplus
3171 extern "C" {
3172 #endif
3173 SWIGINTERN PyObject *_wrap_Pltk_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3174  PyObject *resultobj = 0;
3175  long arg1 ;
3176  long val1 ;
3177  int ecode1 = 0 ;
3178  PyObject * obj0 = 0 ;
3179 
3180  if (!PyArg_ParseTuple(args,(char *)"O:Pltk_init",&obj0)) SWIG_fail;
3181  ecode1 = SWIG_AsVal_long(obj0, &val1);
3182  if (!SWIG_IsOK(ecode1)) {
3183  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Pltk_init" "', argument " "1"" of type '" "long""'");
3184  }
3185  arg1 = (long)(val1);
3186  Pltk_init(arg1);
3187  resultobj = SWIG_Py_Void();
3188  return resultobj;
3189 fail:
3190  return NULL;
3191 }
3192 
3193 
3194 static PyMethodDef SwigMethods[] = {
3195  { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
3196  { (char *)"Pltk_init", _wrap_Pltk_init, METH_VARARGS, NULL},
3197  { NULL, NULL, 0, NULL }
3198 };
3199 
3200 
3201 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3202 
3203 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3204 
3206  &_swigt__p_char,
3207 };
3208 
3209 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3210 
3213 };
3214 
3215 
3216 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3217 
3219 {0, 0, 0, 0.0, 0, 0}};
3220 
3221 #ifdef __cplusplus
3222 }
3223 #endif
3224 /* -----------------------------------------------------------------------------
3225  * Type initialization:
3226  * This problem is tough by the requirement that no dynamic
3227  * memory is used. Also, since swig_type_info structures store pointers to
3228  * swig_cast_info structures and swig_cast_info structures store pointers back
3229  * to swig_type_info structures, we need some lookup code at initialization.
3230  * The idea is that swig generates all the structures that are needed.
3231  * The runtime then collects these partially filled structures.
3232  * The SWIG_InitializeModule function takes these initial arrays out of
3233  * swig_module, and does all the lookup, filling in the swig_module.types
3234  * array with the correct data and linking the correct swig_cast_info
3235  * structures together.
3236  *
3237  * The generated swig_type_info structures are assigned statically to an initial
3238  * array. We just loop through that array, and handle each type individually.
3239  * First we lookup if this type has been already loaded, and if so, use the
3240  * loaded structure instead of the generated one. Then we have to fill in the
3241  * cast linked list. The cast data is initially stored in something like a
3242  * two-dimensional array. Each row corresponds to a type (there are the same
3243  * number of rows as there are in the swig_type_initial array). Each entry in
3244  * a column is one of the swig_cast_info structures for that type.
3245  * The cast_initial array is actually an array of arrays, because each row has
3246  * a variable number of columns. So to actually build the cast linked list,
3247  * we find the array of casts associated with the type, and loop through it
3248  * adding the casts to the list. The one last trick we need to do is making
3249  * sure the type pointer in the swig_cast_info struct is correct.
3250  *
3251  * First off, we lookup the cast->type name to see if it is already loaded.
3252  * There are three cases to handle:
3253  * 1) If the cast->type has already been loaded AND the type we are adding
3254  * casting info to has not been loaded (it is in this module), THEN we
3255  * replace the cast->type pointer with the type pointer that has already
3256  * been loaded.
3257  * 2) If BOTH types (the one we are adding casting info to, and the
3258  * cast->type) are loaded, THEN the cast info has already been loaded by
3259  * the previous module so we just ignore it.
3260  * 3) Finally, if cast->type has not already been loaded, then we add that
3261  * swig_cast_info to the linked list (because the cast->type) pointer will
3262  * be correct.
3263  * ----------------------------------------------------------------------------- */
3264 
3265 #ifdef __cplusplus
3266 extern "C" {
3267 #if 0
3268 } /* c-mode */
3269 #endif
3270 #endif
3271 
3272 #if 0
3273 #define SWIGRUNTIME_DEBUG
3274 #endif
3275 
3276 
3277 SWIGRUNTIME void
3278 SWIG_InitializeModule(void *clientdata) {
3279  size_t i;
3280  swig_module_info *module_head, *iter;
3281  int init;
3282 
3283  /* check to see if the circular list has been setup, if not, set it up */
3284  if (swig_module.next==0) {
3285  /* Initialize the swig_module */
3289  init = 1;
3290  } else {
3291  init = 0;
3292  }
3293 
3294  /* Try and load any already created modules */
3295  module_head = SWIG_GetModule(clientdata);
3296  if (!module_head) {
3297  /* This is the first module loaded for this interpreter */
3298  /* so set the swig module into the interpreter */
3299  SWIG_SetModule(clientdata, &swig_module);
3300  } else {
3301  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3302  iter=module_head;
3303  do {
3304  if (iter==&swig_module) {
3305  /* Our module is already in the list, so there's nothing more to do. */
3306  return;
3307  }
3308  iter=iter->next;
3309  } while (iter!= module_head);
3310 
3311  /* otherwise we must add our module into the list */
3312  swig_module.next = module_head->next;
3313  module_head->next = &swig_module;
3314  }
3315 
3316  /* When multiple interpreters are used, a module could have already been initialized in
3317  a different interpreter, but not yet have a pointer in this interpreter.
3318  In this case, we do not want to continue adding types... everything should be
3319  set up already */
3320  if (init == 0) return;
3321 
3322  /* Now work on filling in swig_module.types */
3323 #ifdef SWIGRUNTIME_DEBUG
3324  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
3325 #endif
3326  for (i = 0; i < swig_module.size; ++i) {
3327  swig_type_info *type = 0;
3328  swig_type_info *ret;
3329  swig_cast_info *cast;
3330 
3331 #ifdef SWIGRUNTIME_DEBUG
3332  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3333 #endif
3334 
3335  /* if there is another module already loaded */
3336  if (swig_module.next != &swig_module) {
3338  }
3339  if (type) {
3340  /* Overwrite clientdata field */
3341 #ifdef SWIGRUNTIME_DEBUG
3342  printf("SWIG_InitializeModule: found type %s\n", type->name);
3343 #endif
3346 #ifdef SWIGRUNTIME_DEBUG
3347  printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
3348 #endif
3349  }
3350  } else {
3351  type = swig_module.type_initial[i];
3352  }
3353 
3354  /* Insert casting types */
3355  cast = swig_module.cast_initial[i];
3356  while (cast->type) {
3357  /* Don't need to add information already in the list */
3358  ret = 0;
3359 #ifdef SWIGRUNTIME_DEBUG
3360  printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
3361 #endif
3362  if (swig_module.next != &swig_module) {
3364 #ifdef SWIGRUNTIME_DEBUG
3365  if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
3366 #endif
3367  }
3368  if (ret) {
3369  if (type == swig_module.type_initial[i]) {
3370 #ifdef SWIGRUNTIME_DEBUG
3371  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
3372 #endif
3373  cast->type = ret;
3374  ret = 0;
3375  } else {
3376  /* Check for casting already in the list */
3377  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
3378 #ifdef SWIGRUNTIME_DEBUG
3379  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
3380 #endif
3381  if (!ocast) ret = 0;
3382  }
3383  }
3384 
3385  if (!ret) {
3386 #ifdef SWIGRUNTIME_DEBUG
3387  printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
3388 #endif
3389  if (type->cast) {
3390  type->cast->prev = cast;
3391  cast->next = type->cast;
3392  }
3393  type->cast = cast;
3394  }
3395  cast++;
3396  }
3397  /* Set entry in modules->types array equal to the type */
3398  swig_module.types[i] = type;
3399  }
3400  swig_module.types[i] = 0;
3401 
3402 #ifdef SWIGRUNTIME_DEBUG
3403  printf("**** SWIG_InitializeModule: Cast List ******\n");
3404  for (i = 0; i < swig_module.size; ++i) {
3405  int j = 0;
3407  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3408  while (cast->type) {
3409  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
3410  cast++;
3411  ++j;
3412  }
3413  printf("---- Total casts: %d\n",j);
3414  }
3415  printf("**** SWIG_InitializeModule: Cast List ******\n");
3416 #endif
3417 }
3418 
3419 /* This function will propagate the clientdata field of type to
3420 * any new swig_type_info structures that have been added into the list
3421 * of equivalent types. It is like calling
3422 * SWIG_TypeClientData(type, clientdata) a second time.
3423 */
3424 SWIGRUNTIME void
3426  size_t i;
3427  swig_cast_info *equiv;
3428  static int init_run = 0;
3429 
3430  if (init_run) return;
3431  init_run = 1;
3432 
3433  for (i = 0; i < swig_module.size; i++) {
3434  if (swig_module.types[i]->clientdata) {
3435  equiv = swig_module.types[i]->cast;
3436  while (equiv) {
3437  if (!equiv->converter) {
3438  if (equiv->type && !equiv->type->clientdata)
3440  }
3441  equiv = equiv->next;
3442  }
3443  }
3444  }
3445 }
3446 
3447 #ifdef __cplusplus
3448 #if 0
3449 {
3450  /* c-mode */
3451 #endif
3452 }
3453 #endif
3454 
3455 
3456 
3457 #ifdef __cplusplus
3458 extern "C" {
3459 #endif
3460 
3461  /* Python-specific SWIG API */
3462 #define SWIG_newvarlink() SWIG_Python_newvarlink()
3463 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
3464 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
3465 
3466  /* -----------------------------------------------------------------------------
3467  * global variable support code.
3468  * ----------------------------------------------------------------------------- */
3469 
3470  typedef struct swig_globalvar {
3471  char *name; /* Name of global variable */
3472  PyObject *(*get_attr)(void); /* Return the current value */
3473  int (*set_attr)(PyObject *); /* Set the value */
3474  struct swig_globalvar *next;
3475  } swig_globalvar;
3476 
3477  typedef struct swig_varlinkobject {
3478  PyObject_HEAD
3481 
3482  SWIGINTERN PyObject *
3484 #if PY_VERSION_HEX >= 0x03000000
3485  return PyUnicode_InternFromString("<Swig global variables>");
3486 #else
3487  return PyString_FromString("<Swig global variables>");
3488 #endif
3489  }
3490 
3491  SWIGINTERN PyObject *
3493 #if PY_VERSION_HEX >= 0x03000000
3494  PyObject *str = PyUnicode_InternFromString("(");
3495  PyObject *tail;
3496  PyObject *joined;
3497  swig_globalvar *var;
3498  for (var = v->vars; var; var=var->next) {
3499  tail = PyUnicode_FromString(var->name);
3500  joined = PyUnicode_Concat(str, tail);
3501  Py_DecRef(str);
3502  Py_DecRef(tail);
3503  str = joined;
3504  if (var->next) {
3505  tail = PyUnicode_InternFromString(", ");
3506  joined = PyUnicode_Concat(str, tail);
3507  Py_DecRef(str);
3508  Py_DecRef(tail);
3509  str = joined;
3510  }
3511  }
3512  tail = PyUnicode_InternFromString(")");
3513  joined = PyUnicode_Concat(str, tail);
3514  Py_DecRef(str);
3515  Py_DecRef(tail);
3516  str = joined;
3517 #else
3518  PyObject *str = PyString_FromString("(");
3519  swig_globalvar *var;
3520  for (var = v->vars; var; var=var->next) {
3521  PyString_ConcatAndDel(&str,PyString_FromString(var->name));
3522  if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
3523  }
3524  PyString_ConcatAndDel(&str,PyString_FromString(")"));
3525 #endif
3526  return str;
3527  }
3528 
3529  SWIGINTERN int
3531  PyObject *str = swig_varlink_str(v);
3532  const char *tmp = SWIG_Python_str_AsChar(str);
3533  fprintf(fp,"Swig global variables ");
3534  fprintf(fp,"%s\n", tmp ? tmp : "Invalid global variable");
3536  Py_DECREF(str);
3537  return 0;
3538  }
3539 
3540  SWIGINTERN void
3542  swig_globalvar *var = v->vars;
3543  while (var) {
3544  swig_globalvar *n = var->next;
3545  free(var->name);
3546  free(var);
3547  var = n;
3548  }
3549  }
3550 
3551  SWIGINTERN PyObject *
3553  PyObject *res = NULL;
3554  swig_globalvar *var = v->vars;
3555  while (var) {
3556  if (strcmp(var->name,n) == 0) {
3557  res = (*var->get_attr)();
3558  break;
3559  }
3560  var = var->next;
3561  }
3562  if (res == NULL && !PyErr_Occurred()) {
3563  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
3564  }
3565  return res;
3566  }
3567 
3568  SWIGINTERN int
3569  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
3570  int res = 1;
3571  swig_globalvar *var = v->vars;
3572  while (var) {
3573  if (strcmp(var->name,n) == 0) {
3574  res = (*var->set_attr)(p);
3575  break;
3576  }
3577  var = var->next;
3578  }
3579  if (res == 1 && !PyErr_Occurred()) {
3580  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
3581  }
3582  return res;
3583  }
3584 
3585  SWIGINTERN PyTypeObject*
3587  static char varlink__doc__[] = "Swig var link object";
3588  static PyTypeObject varlink_type;
3589  static int type_init = 0;
3590  if (!type_init) {
3591  const PyTypeObject tmp = {
3592 #if PY_VERSION_HEX >= 0x03000000
3593  PyVarObject_HEAD_INIT(NULL, 0)
3594 #else
3595  PyObject_HEAD_INIT(NULL)
3596  0, /* ob_size */
3597 #endif
3598  (char *)"swigvarlink", /* tp_name */
3599  sizeof(swig_varlinkobject), /* tp_basicsize */
3600  0, /* tp_itemsize */
3601  (destructor) swig_varlink_dealloc, /* tp_dealloc */
3602  (printfunc) swig_varlink_print, /* tp_print */
3603  (getattrfunc) swig_varlink_getattr, /* tp_getattr */
3604  (setattrfunc) swig_varlink_setattr, /* tp_setattr */
3605  0, /* tp_compare */
3606  (reprfunc) swig_varlink_repr, /* tp_repr */
3607  0, /* tp_as_number */
3608  0, /* tp_as_sequence */
3609  0, /* tp_as_mapping */
3610  0, /* tp_hash */
3611  0, /* tp_call */
3612  (reprfunc) swig_varlink_str, /* tp_str */
3613  0, /* tp_getattro */
3614  0, /* tp_setattro */
3615  0, /* tp_as_buffer */
3616  0, /* tp_flags */
3617  varlink__doc__, /* tp_doc */
3618  0, /* tp_traverse */
3619  0, /* tp_clear */
3620  0, /* tp_richcompare */
3621  0, /* tp_weaklistoffset */
3622 #if PY_VERSION_HEX >= 0x02020000
3623  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
3624 #endif
3625 #if PY_VERSION_HEX >= 0x02030000
3626  0, /* tp_del */
3627 #endif
3628 #if PY_VERSION_HEX >= 0x02060000
3629  0, /* tp_version_tag */
3630 #endif
3631 #if PY_VERSION_HEX >= 0x03040000
3632  0, /* tp_finalize */
3633 #endif
3634 #ifdef COUNT_ALLOCS
3635  0, /* tp_allocs */
3636  0, /* tp_frees */
3637  0, /* tp_maxalloc */
3638 #if PY_VERSION_HEX >= 0x02050000
3639  0, /* tp_prev */
3640 #endif
3641  0 /* tp_next */
3642 #endif
3643  };
3644  varlink_type = tmp;
3645  type_init = 1;
3646 #if PY_VERSION_HEX < 0x02020000
3647  varlink_type.ob_type = &PyType_Type;
3648 #else
3649  if (PyType_Ready(&varlink_type) < 0)
3650  return NULL;
3651 #endif
3652  }
3653  return &varlink_type;
3654  }
3655 
3656  /* Create a variable linking object for use later */
3657  SWIGINTERN PyObject *
3659  swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
3660  if (result) {
3661  result->vars = 0;
3662  }
3663  return ((PyObject*) result);
3664  }
3665 
3666  SWIGINTERN void
3667  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
3669  swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
3670  if (gv) {
3671  size_t size = strlen(name)+1;
3672  gv->name = (char *)malloc(size);
3673  if (gv->name) {
3674  strncpy(gv->name,name,size);
3675  gv->get_attr = get_attr;
3676  gv->set_attr = set_attr;
3677  gv->next = v->vars;
3678  }
3679  }
3680  v->vars = gv;
3681  }
3682 
3683  SWIGINTERN PyObject *
3685  static PyObject *_SWIG_globals = 0;
3686  if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
3687  return _SWIG_globals;
3688  }
3689 
3690  /* -----------------------------------------------------------------------------
3691  * constants/methods manipulation
3692  * ----------------------------------------------------------------------------- */
3693 
3694  /* Install Constants */
3695  SWIGINTERN void
3696  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
3697  PyObject *obj = 0;
3698  size_t i;
3699  for (i = 0; constants[i].type; ++i) {
3700  switch(constants[i].type) {
3701  case SWIG_PY_POINTER:
3702  obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
3703  break;
3704  case SWIG_PY_BINARY:
3705  obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
3706  break;
3707  default:
3708  obj = 0;
3709  break;
3710  }
3711  if (obj) {
3712  PyDict_SetItemString(d, constants[i].name, obj);
3713  Py_DECREF(obj);
3714  }
3715  }
3716  }
3717 
3718  /* -----------------------------------------------------------------------------*/
3719  /* Fix SwigMethods to carry the callback ptrs when needed */
3720  /* -----------------------------------------------------------------------------*/
3721 
3722  SWIGINTERN void
3723  SWIG_Python_FixMethods(PyMethodDef *methods,
3724  swig_const_info *const_table,
3725  swig_type_info **types,
3726  swig_type_info **types_initial) {
3727  size_t i;
3728  for (i = 0; methods[i].ml_name; ++i) {
3729  const char *c = methods[i].ml_doc;
3730  if (!c) continue;
3731  c = strstr(c, "swig_ptr: ");
3732  if (c) {
3733  int j;
3734  swig_const_info *ci = 0;
3735  const char *name = c + 10;
3736  for (j = 0; const_table[j].type; ++j) {
3737  if (strncmp(const_table[j].name, name,
3738  strlen(const_table[j].name)) == 0) {
3739  ci = &(const_table[j]);
3740  break;
3741  }
3742  }
3743  if (ci) {
3744  void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
3745  if (ptr) {
3746  size_t shift = (ci->ptype) - types;
3747  swig_type_info *ty = types_initial[shift];
3748  size_t ldoc = (c - methods[i].ml_doc);
3749  size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
3750  char *ndoc = (char*)malloc(ldoc + lptr + 10);
3751  if (ndoc) {
3752  char *buff = ndoc;
3753  memcpy(buff, methods[i].ml_doc, ldoc);
3754  buff += ldoc;
3755  memcpy(buff, "swig_ptr: ", 10);
3756  buff += 10;
3757  SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
3758  methods[i].ml_doc = ndoc;
3759  }
3760  }
3761  }
3762  }
3763  }
3764  }
3765 
3766 #ifdef __cplusplus
3767 }
3768 #endif
3769 
3770 /* -----------------------------------------------------------------------------*
3771  * Partial Init method
3772  * -----------------------------------------------------------------------------*/
3773 
3774 #ifdef __cplusplus
3775 extern "C"
3776 #endif
3777 
3778 SWIGEXPORT
3779 #if PY_VERSION_HEX >= 0x03000000
3780 PyObject*
3781 #else
3782 void
3783 #endif
3784 SWIG_init(void) {
3785  PyObject *m, *d, *md;
3786 #if PY_VERSION_HEX >= 0x03000000
3787  static struct PyModuleDef SWIG_module = {
3788 # if PY_VERSION_HEX >= 0x03020000
3789  PyModuleDef_HEAD_INIT,
3790 # else
3791  {
3792  PyObject_HEAD_INIT(NULL)
3793  NULL, /* m_init */
3794  0, /* m_index */
3795  NULL, /* m_copy */
3796  },
3797 # endif
3798  (char *) SWIG_name,
3799  NULL,
3800  -1,
3801  SwigMethods,
3802  NULL,
3803  NULL,
3804  NULL,
3805  NULL
3806  };
3807 #endif
3808 
3809 #if defined(SWIGPYTHON_BUILTIN)
3810  static SwigPyClientData SwigPyObject_clientdata = {
3811  0, 0, 0, 0, 0, 0, 0
3812  };
3813  static PyGetSetDef this_getset_def = {
3814  (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
3815  };
3816  static SwigPyGetSet thisown_getset_closure = {
3817  (PyCFunction) SwigPyObject_own,
3818  (PyCFunction) SwigPyObject_own
3819  };
3820  static PyGetSetDef thisown_getset_def = {
3821  (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
3822  };
3823  PyTypeObject *builtin_pytype;
3824  int builtin_base_count;
3825  swig_type_info *builtin_basetype;
3826  PyObject *tuple;
3827  PyGetSetDescrObject *static_getset;
3828  PyTypeObject *metatype;
3829  PyTypeObject *swigpyobject;
3830  SwigPyClientData *cd;
3831  PyObject *public_interface, *public_symbol;
3832  PyObject *this_descr;
3833  PyObject *thisown_descr;
3834  PyObject *self = 0;
3835  int i;
3836 
3837  (void)builtin_pytype;
3838  (void)builtin_base_count;
3839  (void)builtin_basetype;
3840  (void)tuple;
3841  (void)static_getset;
3842  (void)self;
3843 
3844  /* Metaclass is used to implement static member variables */
3845  metatype = SwigPyObjectType();
3846  assert(metatype);
3847 #endif
3848 
3849  /* Fix SwigMethods to carry the callback ptrs when needed */
3851 
3852 #if PY_VERSION_HEX >= 0x03000000
3853  m = PyModule_Create(&SWIG_module);
3854 #else
3855  m = Py_InitModule((char *) SWIG_name, SwigMethods);
3856 #endif
3857 
3858  md = d = PyModule_GetDict(m);
3859  (void)md;
3860 
3862 
3863 #ifdef SWIGPYTHON_BUILTIN
3864  swigpyobject = SwigPyObject_TypeOnce();
3865 
3866  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
3867  assert(SwigPyObject_stype);
3868  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
3869  if (!cd) {
3870  SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
3871  SwigPyObject_clientdata.pytype = swigpyobject;
3872  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
3873  PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
3874 # if PY_VERSION_HEX >= 0x03000000
3875  return NULL;
3876 # else
3877  return;
3878 # endif
3879  }
3880 
3881  /* All objects have a 'this' attribute */
3882  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
3883  (void)this_descr;
3884 
3885  /* All objects have a 'thisown' attribute */
3886  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
3887  (void)thisown_descr;
3888 
3889  public_interface = PyList_New(0);
3890  public_symbol = 0;
3891  (void)public_symbol;
3892 
3893  PyDict_SetItemString(md, "__all__", public_interface);
3894  Py_DECREF(public_interface);
3895  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
3896  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
3897  for (i = 0; swig_const_table[i].name != 0; ++i)
3898  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
3899 #endif
3900 
3902 
3903 #if PY_VERSION_HEX >= 0x03000000
3904  return m;
3905 #else
3906  return;
3907 #endif
3908 }
3909 
#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)