1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.2
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 
11 
12 #ifndef SWIGPYTHON
13 #define SWIGPYTHON
14 #endif
15 
16 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
17 #define SWIGPYTHON_BUILTIN
18 
19 /* -----------------------------------------------------------------------------
20  *  This section contains generic SWIG labels for method/variable
21  *  declarations/attributes, and other compiler dependent labels.
22  * ----------------------------------------------------------------------------- */
23 
24 /* template workaround for compilers that cannot correctly implement the C++ standard */
25 #ifndef SWIGTEMPLATEDISAMBIGUATOR
26 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
27 #  define SWIGTEMPLATEDISAMBIGUATOR template
28 # elif defined(__HP_aCC)
29 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
30 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
31 #  define SWIGTEMPLATEDISAMBIGUATOR template
32 # else
33 #  define SWIGTEMPLATEDISAMBIGUATOR
34 # endif
35 #endif
36 
37 /* inline attribute */
38 #ifndef SWIGINLINE
39 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
40 #   define SWIGINLINE inline
41 # else
42 #   define SWIGINLINE
43 # endif
44 #endif
45 
46 /* attribute recognised by some compilers to avoid 'unused' warnings */
47 #ifndef SWIGUNUSED
48 # if defined(__GNUC__)
49 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
50 #     define SWIGUNUSED __attribute__ ((__unused__))
51 #   else
52 #     define SWIGUNUSED
53 #   endif
54 # elif defined(__ICC)
55 #   define SWIGUNUSED __attribute__ ((__unused__))
56 # else
57 #   define SWIGUNUSED
58 # endif
59 #endif
60 
61 #ifndef SWIG_MSC_UNSUPPRESS_4505
62 # if defined(_MSC_VER)
63 #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
64 # endif
65 #endif
66 
67 #ifndef SWIGUNUSEDPARM
68 # ifdef __cplusplus
69 #   define SWIGUNUSEDPARM(p)
70 # else
71 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
72 # endif
73 #endif
74 
75 /* internal SWIG method */
76 #ifndef SWIGINTERN
77 # define SWIGINTERN static SWIGUNUSED
78 #endif
79 
80 /* internal inline SWIG method */
81 #ifndef SWIGINTERNINLINE
82 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
83 #endif
84 
85 /* exporting methods */
86 #if defined(__GNUC__)
87 #  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
88 #    ifndef GCC_HASCLASSVISIBILITY
89 #      define GCC_HASCLASSVISIBILITY
90 #    endif
91 #  endif
92 #endif
93 
94 #ifndef SWIGEXPORT
95 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
96 #   if defined(STATIC_LINKED)
97 #     define SWIGEXPORT
98 #   else
99 #     define SWIGEXPORT __declspec(dllexport)
100 #   endif
101 # else
102 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
103 #     define SWIGEXPORT __attribute__ ((visibility("default")))
104 #   else
105 #     define SWIGEXPORT
106 #   endif
107 # endif
108 #endif
109 
110 /* calling conventions for Windows */
111 #ifndef SWIGSTDCALL
112 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
113 #   define SWIGSTDCALL __stdcall
114 # else
115 #   define SWIGSTDCALL
116 # endif
117 #endif
118 
119 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
120 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
121 # define _CRT_SECURE_NO_DEPRECATE
122 #endif
123 
124 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
125 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
126 # define _SCL_SECURE_NO_DEPRECATE
127 #endif
128 
129 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
130 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
131 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
132 #endif
133 
134 /* Intel's compiler complains if a variable which was never initialised is
135  * cast to void, which is a common idiom which we use to indicate that we
136  * are aware a variable isn't used.  So we just silence that warning.
137  * See: https://github.com/swig/swig/issues/192 for more discussion.
138  */
139 #ifdef __INTEL_COMPILER
140 # pragma warning disable 592
141 #endif
142 
143 
144 #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
145 /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
146 # include <math.h>
147 #endif
148 
149 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
150 /* Use debug wrappers with the Python release dll */
151 # undef _DEBUG
152 # include <Python.h>
153 # define _DEBUG 1
154 #else
155 # include <Python.h>
156 #endif
157 
158 /* -----------------------------------------------------------------------------
159  * swigrun.swg
160  *
161  * This file contains generic C API SWIG runtime support for pointer
162  * type checking.
163  * ----------------------------------------------------------------------------- */
164 
165 /* This should only be incremented when either the layout of swig_type_info changes,
166    or for whatever reason, the runtime changes incompatibly */
167 #define SWIG_RUNTIME_VERSION "4"
168 
169 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
170 #ifdef SWIG_TYPE_TABLE
171 # define SWIG_QUOTE_STRING(x) #x
172 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
173 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
174 #else
175 # define SWIG_TYPE_TABLE_NAME
176 #endif
177 
178 /*
179   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
180   creating a static or dynamic library from the SWIG runtime code.
181   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
182 
183   But only do this if strictly necessary, ie, if you have problems
184   with your compiler or suchlike.
185 */
186 
187 #ifndef SWIGRUNTIME
188 # define SWIGRUNTIME SWIGINTERN
189 #endif
190 
191 #ifndef SWIGRUNTIMEINLINE
192 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
193 #endif
194 
195 /*  Generic buffer size */
196 #ifndef SWIG_BUFFER_SIZE
197 # define SWIG_BUFFER_SIZE 1024
198 #endif
199 
200 /* Flags for pointer conversions */
201 #define SWIG_POINTER_DISOWN        0x1
202 #define SWIG_CAST_NEW_MEMORY       0x2
203 #define SWIG_POINTER_NO_NULL       0x4
204 
205 /* Flags for new pointer objects */
206 #define SWIG_POINTER_OWN           0x1
207 
208 
209 /*
210    Flags/methods for returning states.
211 
212    The SWIG conversion methods, as ConvertPtr, return an integer
213    that tells if the conversion was successful or not. And if not,
214    an error code can be returned (see swigerrors.swg for the codes).
215 
216    Use the following macros/flags to set or process the returning
217    states.
218 
219    In old versions of SWIG, code such as the following was usually written:
220 
221      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
222        // success code
223      } else {
224        //fail code
225      }
226 
227    Now you can be more explicit:
228 
229     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
230     if (SWIG_IsOK(res)) {
231       // success code
232     } else {
233       // fail code
234     }
235 
236    which is the same really, but now you can also do
237 
238     Type *ptr;
239     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
240     if (SWIG_IsOK(res)) {
241       // success code
242       if (SWIG_IsNewObj(res) {
243         ...
244 	delete *ptr;
245       } else {
246         ...
247       }
248     } else {
249       // fail code
250     }
251 
252    I.e., now SWIG_ConvertPtr can return new objects and you can
253    identify the case and take care of the deallocation. Of course that
254    also requires SWIG_ConvertPtr to return new result values, such as
255 
256       int SWIG_ConvertPtr(obj, ptr,...) {
257         if (<obj is ok>) {
258           if (<need new object>) {
259             *ptr = <ptr to new allocated object>;
260             return SWIG_NEWOBJ;
261           } else {
262             *ptr = <ptr to old object>;
263             return SWIG_OLDOBJ;
264           }
265         } else {
266           return SWIG_BADOBJ;
267         }
268       }
269 
270    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
271    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
272    SWIG errors code.
273 
274    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
275    allows to return the 'cast rank', for example, if you have this
276 
277        int food(double)
278        int fooi(int);
279 
280    and you call
281 
282       food(1)   // cast rank '1'  (1 -> 1.0)
283       fooi(1)   // cast rank '0'
284 
285    just use the SWIG_AddCast()/SWIG_CheckState()
286 */
287 
288 #define SWIG_OK                    (0)
289 #define SWIG_ERROR                 (-1)
290 #define SWIG_IsOK(r)               (r >= 0)
291 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
292 
293 /* The CastRankLimit says how many bits are used for the cast rank */
294 #define SWIG_CASTRANKLIMIT         (1 << 8)
295 /* The NewMask denotes the object was created (using new/malloc) */
296 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
297 /* The TmpMask is for in/out typemaps that use temporal objects */
298 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
299 /* Simple returning values */
300 #define SWIG_BADOBJ                (SWIG_ERROR)
301 #define SWIG_OLDOBJ                (SWIG_OK)
302 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
303 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
304 /* Check, add and del mask methods */
305 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
306 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
307 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
308 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
309 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
310 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
311 
312 /* Cast-Rank Mode */
313 #if defined(SWIG_CASTRANK_MODE)
314 #  ifndef SWIG_TypeRank
315 #    define SWIG_TypeRank             unsigned long
316 #  endif
317 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
318 #    define SWIG_MAXCASTRANK          (2)
319 #  endif
320 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
321 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)322 SWIGINTERNINLINE int SWIG_AddCast(int r) {
323   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
324 }
SWIG_CheckState(int r)325 SWIGINTERNINLINE int SWIG_CheckState(int r) {
326   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
327 }
328 #else /* no cast-rank mode */
329 #  define SWIG_AddCast(r) (r)
330 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
331 #endif
332 
333 
334 #include <string.h>
335 
336 #ifdef __cplusplus
337 extern "C" {
338 #endif
339 
340 typedef void *(*swig_converter_func)(void *, int *);
341 typedef struct swig_type_info *(*swig_dycast_func)(void **);
342 
343 /* Structure to store information on one type */
344 typedef struct swig_type_info {
345   const char             *name;			/* mangled name of this type */
346   const char             *str;			/* human readable name of this type */
347   swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
348   struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
349   void                   *clientdata;		/* language specific type data */
350   int                    owndata;		/* flag if the structure owns the clientdata */
351 } swig_type_info;
352 
353 /* Structure to store a type and conversion function used for casting */
354 typedef struct swig_cast_info {
355   swig_type_info         *type;			/* pointer to type that is equivalent to this type */
356   swig_converter_func     converter;		/* function to cast the void pointers */
357   struct swig_cast_info  *next;			/* pointer to next cast in linked list */
358   struct swig_cast_info  *prev;			/* pointer to the previous cast */
359 } swig_cast_info;
360 
361 /* Structure used to store module information
362  * Each module generates one structure like this, and the runtime collects
363  * all of these structures and stores them in a circularly linked list.*/
364 typedef struct swig_module_info {
365   swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
366   size_t                 size;		        /* Number of types in this module */
367   struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
368   swig_type_info         **type_initial;	/* Array of initially generated type structures */
369   swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
370   void                    *clientdata;		/* Language specific module data */
371 } swig_module_info;
372 
373 /*
374   Compare two type names skipping the space characters, therefore
375   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
376 
377   Return 0 when the two name types are equivalent, as in
378   strncmp, but skipping ' '.
379 */
380 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)381 SWIG_TypeNameComp(const char *f1, const char *l1,
382 		  const char *f2, const char *l2) {
383   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
384     while ((*f1 == ' ') && (f1 != l1)) ++f1;
385     while ((*f2 == ' ') && (f2 != l2)) ++f2;
386     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
387   }
388   return (int)((l1 - f1) - (l2 - f2));
389 }
390 
391 /*
392   Check type equivalence in a name list like <name1>|<name2>|...
393   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
394 */
395 SWIGRUNTIME int
SWIG_TypeCmp(const char * nb,const char * tb)396 SWIG_TypeCmp(const char *nb, const char *tb) {
397   int equiv = 1;
398   const char* te = tb + strlen(tb);
399   const char* ne = nb;
400   while (equiv != 0 && *ne) {
401     for (nb = ne; *ne; ++ne) {
402       if (*ne == '|') break;
403     }
404     equiv = SWIG_TypeNameComp(nb, ne, tb, te);
405     if (*ne) ++ne;
406   }
407   return equiv;
408 }
409 
410 /*
411   Check type equivalence in a name list like <name1>|<name2>|...
412   Return 0 if not equal, 1 if equal
413 */
414 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)415 SWIG_TypeEquiv(const char *nb, const char *tb) {
416   return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
417 }
418 
419 /*
420   Check the typename
421 */
422 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)423 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
424   if (ty) {
425     swig_cast_info *iter = ty->cast;
426     while (iter) {
427       if (strcmp(iter->type->name, c) == 0) {
428         if (iter == ty->cast)
429           return iter;
430         /* Move iter to the top of the linked list */
431         iter->prev->next = iter->next;
432         if (iter->next)
433           iter->next->prev = iter->prev;
434         iter->next = ty->cast;
435         iter->prev = 0;
436         if (ty->cast) ty->cast->prev = iter;
437         ty->cast = iter;
438         return iter;
439       }
440       iter = iter->next;
441     }
442   }
443   return 0;
444 }
445 
446 /*
447   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
448 */
449 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)450 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
451   if (ty) {
452     swig_cast_info *iter = ty->cast;
453     while (iter) {
454       if (iter->type == from) {
455         if (iter == ty->cast)
456           return iter;
457         /* Move iter to the top of the linked list */
458         iter->prev->next = iter->next;
459         if (iter->next)
460           iter->next->prev = iter->prev;
461         iter->next = ty->cast;
462         iter->prev = 0;
463         if (ty->cast) ty->cast->prev = iter;
464         ty->cast = iter;
465         return iter;
466       }
467       iter = iter->next;
468     }
469   }
470   return 0;
471 }
472 
473 /*
474   Cast a pointer up an inheritance hierarchy
475 */
476 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)477 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
478   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
479 }
480 
481 /*
482    Dynamic pointer casting. Down an inheritance hierarchy
483 */
484 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)485 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
486   swig_type_info *lastty = ty;
487   if (!ty || !ty->dcast) return ty;
488   while (ty && (ty->dcast)) {
489     ty = (*ty->dcast)(ptr);
490     if (ty) lastty = ty;
491   }
492   return lastty;
493 }
494 
495 /*
496   Return the name associated with this type
497 */
498 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)499 SWIG_TypeName(const swig_type_info *ty) {
500   return ty->name;
501 }
502 
503 /*
504   Return the pretty name associated with this type,
505   that is an unmangled type name in a form presentable to the user.
506 */
507 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)508 SWIG_TypePrettyName(const swig_type_info *type) {
509   /* The "str" field contains the equivalent pretty names of the
510      type, separated by vertical-bar characters.  We choose
511      to print the last name, as it is often (?) the most
512      specific. */
513   if (!type) return NULL;
514   if (type->str != NULL) {
515     const char *last_name = type->str;
516     const char *s;
517     for (s = type->str; *s; s++)
518       if (*s == '|') last_name = s+1;
519     return last_name;
520   }
521   else
522     return type->name;
523 }
524 
525 /*
526    Set the clientdata field for a type
527 */
528 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)529 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
530   swig_cast_info *cast = ti->cast;
531   /* if (ti->clientdata == clientdata) return; */
532   ti->clientdata = clientdata;
533 
534   while (cast) {
535     if (!cast->converter) {
536       swig_type_info *tc = cast->type;
537       if (!tc->clientdata) {
538 	SWIG_TypeClientData(tc, clientdata);
539       }
540     }
541     cast = cast->next;
542   }
543 }
544 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)545 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
546   SWIG_TypeClientData(ti, clientdata);
547   ti->owndata = 1;
548 }
549 
550 /*
551   Search for a swig_type_info structure only by mangled name
552   Search is a O(log #types)
553 
554   We start searching at module start, and finish searching when start == end.
555   Note: if start == end at the beginning of the function, we go all the way around
556   the circular list.
557 */
558 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)559 SWIG_MangledTypeQueryModule(swig_module_info *start,
560                             swig_module_info *end,
561 		            const char *name) {
562   swig_module_info *iter = start;
563   do {
564     if (iter->size) {
565       size_t l = 0;
566       size_t r = iter->size - 1;
567       do {
568 	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
569 	size_t i = (l + r) >> 1;
570 	const char *iname = iter->types[i]->name;
571 	if (iname) {
572 	  int compare = strcmp(name, iname);
573 	  if (compare == 0) {
574 	    return iter->types[i];
575 	  } else if (compare < 0) {
576 	    if (i) {
577 	      r = i - 1;
578 	    } else {
579 	      break;
580 	    }
581 	  } else if (compare > 0) {
582 	    l = i + 1;
583 	  }
584 	} else {
585 	  break; /* should never happen */
586 	}
587       } while (l <= r);
588     }
589     iter = iter->next;
590   } while (iter != end);
591   return 0;
592 }
593 
594 /*
595   Search for a swig_type_info structure for either a mangled name or a human readable name.
596   It first searches the mangled names of the types, which is a O(log #types)
597   If a type is not found it then searches the human readable names, which is O(#types).
598 
599   We start searching at module start, and finish searching when start == end.
600   Note: if start == end at the beginning of the function, we go all the way around
601   the circular list.
602 */
603 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)604 SWIG_TypeQueryModule(swig_module_info *start,
605                      swig_module_info *end,
606 		     const char *name) {
607   /* STEP 1: Search the name field using binary search */
608   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
609   if (ret) {
610     return ret;
611   } else {
612     /* STEP 2: If the type hasn't been found, do a complete search
613        of the str field (the human readable name) */
614     swig_module_info *iter = start;
615     do {
616       size_t i = 0;
617       for (; i < iter->size; ++i) {
618 	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
619 	  return iter->types[i];
620       }
621       iter = iter->next;
622     } while (iter != end);
623   }
624 
625   /* neither found a match */
626   return 0;
627 }
628 
629 /*
630    Pack binary data into a string
631 */
632 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)633 SWIG_PackData(char *c, void *ptr, size_t sz) {
634   static const char hex[17] = "0123456789abcdef";
635   const unsigned char *u = (unsigned char *) ptr;
636   const unsigned char *eu =  u + sz;
637   for (; u != eu; ++u) {
638     unsigned char uu = *u;
639     *(c++) = hex[(uu & 0xf0) >> 4];
640     *(c++) = hex[uu & 0xf];
641   }
642   return c;
643 }
644 
645 /*
646    Unpack binary data from a string
647 */
648 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)649 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
650   unsigned char *u = (unsigned char *) ptr;
651   const unsigned char *eu = u + sz;
652   for (; u != eu; ++u) {
653     char d = *(c++);
654     unsigned char uu;
655     if ((d >= '0') && (d <= '9'))
656       uu = (unsigned char)((d - '0') << 4);
657     else if ((d >= 'a') && (d <= 'f'))
658       uu = (unsigned char)((d - ('a'-10)) << 4);
659     else
660       return (char *) 0;
661     d = *(c++);
662     if ((d >= '0') && (d <= '9'))
663       uu |= (unsigned char)(d - '0');
664     else if ((d >= 'a') && (d <= 'f'))
665       uu |= (unsigned char)(d - ('a'-10));
666     else
667       return (char *) 0;
668     *u = uu;
669   }
670   return c;
671 }
672 
673 /*
674    Pack 'void *' into a string buffer.
675 */
676 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)677 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
678   char *r = buff;
679   if ((2*sizeof(void *) + 2) > bsz) return 0;
680   *(r++) = '_';
681   r = SWIG_PackData(r,&ptr,sizeof(void *));
682   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
683   strcpy(r,name);
684   return buff;
685 }
686 
687 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)688 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
689   if (*c != '_') {
690     if (strcmp(c,"NULL") == 0) {
691       *ptr = (void *) 0;
692       return name;
693     } else {
694       return 0;
695     }
696   }
697   return SWIG_UnpackData(++c,ptr,sizeof(void *));
698 }
699 
700 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)701 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
702   char *r = buff;
703   size_t lname = (name ? strlen(name) : 0);
704   if ((2*sz + 2 + lname) > bsz) return 0;
705   *(r++) = '_';
706   r = SWIG_PackData(r,ptr,sz);
707   if (lname) {
708     strncpy(r,name,lname+1);
709   } else {
710     *r = 0;
711   }
712   return buff;
713 }
714 
715 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)716 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
717   if (*c != '_') {
718     if (strcmp(c,"NULL") == 0) {
719       memset(ptr,0,sz);
720       return name;
721     } else {
722       return 0;
723     }
724   }
725   return SWIG_UnpackData(++c,ptr,sz);
726 }
727 
728 #ifdef __cplusplus
729 }
730 #endif
731 
732 /*  Errors in SWIG */
733 #define  SWIG_UnknownError    	   -1
734 #define  SWIG_IOError        	   -2
735 #define  SWIG_RuntimeError   	   -3
736 #define  SWIG_IndexError     	   -4
737 #define  SWIG_TypeError      	   -5
738 #define  SWIG_DivisionByZero 	   -6
739 #define  SWIG_OverflowError  	   -7
740 #define  SWIG_SyntaxError    	   -8
741 #define  SWIG_ValueError     	   -9
742 #define  SWIG_SystemError    	   -10
743 #define  SWIG_AttributeError 	   -11
744 #define  SWIG_MemoryError    	   -12
745 #define  SWIG_NullReferenceError   -13
746 
747 
748 
749 /* Compatibility macros for Python 3 */
750 #if PY_VERSION_HEX >= 0x03000000
751 
752 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
753 #define PyInt_Check(x) PyLong_Check(x)
754 #define PyInt_AsLong(x) PyLong_AsLong(x)
755 #define PyInt_FromLong(x) PyLong_FromLong(x)
756 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
757 #define PyString_Check(name) PyBytes_Check(name)
758 #define PyString_FromString(x) PyUnicode_FromString(x)
759 #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
760 #define PyString_AsString(str) PyBytes_AsString(str)
761 #define PyString_Size(str) PyBytes_Size(str)
762 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
763 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
764 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
765 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
766 
767 #endif
768 
769 #ifndef Py_TYPE
770 #  define Py_TYPE(op) ((op)->ob_type)
771 #endif
772 
773 /* SWIG APIs for compatibility of both Python 2 & 3 */
774 
775 #if PY_VERSION_HEX >= 0x03000000
776 #  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
777 #else
778 #  define SWIG_Python_str_FromFormat PyString_FromFormat
779 #endif
780 
781 
782 /* Warning: This function will allocate a new string in Python 3,
783  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
784  */
785 SWIGINTERN char*
SWIG_Python_str_AsChar(PyObject * str)786 SWIG_Python_str_AsChar(PyObject *str)
787 {
788 #if PY_VERSION_HEX >= 0x03030000
789   return (char *)PyUnicode_AsUTF8(str);
790 #elif PY_VERSION_HEX >= 0x03000000
791   char *newstr = 0;
792   str = PyUnicode_AsUTF8String(str);
793   if (str) {
794     char *cstr;
795     Py_ssize_t len;
796     if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
797       newstr = (char *) malloc(len+1);
798       if (newstr)
799         memcpy(newstr, cstr, len+1);
800     }
801     Py_XDECREF(str);
802   }
803   return newstr;
804 #else
805   return PyString_AsString(str);
806 #endif
807 }
808 
809 #if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
810 #  define SWIG_Python_str_DelForPy3(x)
811 #else
812 #  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
813 #endif
814 
815 
816 SWIGINTERN PyObject*
SWIG_Python_str_FromChar(const char * c)817 SWIG_Python_str_FromChar(const char *c)
818 {
819 #if PY_VERSION_HEX >= 0x03000000
820   return PyUnicode_FromString(c);
821 #else
822   return PyString_FromString(c);
823 #endif
824 }
825 
826 #ifndef PyObject_DEL
827 # define PyObject_DEL PyObject_Del
828 #endif
829 
830 // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
831 // interface files check for it.
832 # define SWIGPY_USE_CAPSULE
833 # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
834 
835 #if PY_VERSION_HEX < 0x03020000
836 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
837 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
838 #define Py_hash_t long
839 #endif
840 
841 /* -----------------------------------------------------------------------------
842  * error manipulation
843  * ----------------------------------------------------------------------------- */
844 
845 SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code)846 SWIG_Python_ErrorType(int code) {
847   PyObject* type = 0;
848   switch(code) {
849   case SWIG_MemoryError:
850     type = PyExc_MemoryError;
851     break;
852   case SWIG_IOError:
853     type = PyExc_IOError;
854     break;
855   case SWIG_RuntimeError:
856     type = PyExc_RuntimeError;
857     break;
858   case SWIG_IndexError:
859     type = PyExc_IndexError;
860     break;
861   case SWIG_TypeError:
862     type = PyExc_TypeError;
863     break;
864   case SWIG_DivisionByZero:
865     type = PyExc_ZeroDivisionError;
866     break;
867   case SWIG_OverflowError:
868     type = PyExc_OverflowError;
869     break;
870   case SWIG_SyntaxError:
871     type = PyExc_SyntaxError;
872     break;
873   case SWIG_ValueError:
874     type = PyExc_ValueError;
875     break;
876   case SWIG_SystemError:
877     type = PyExc_SystemError;
878     break;
879   case SWIG_AttributeError:
880     type = PyExc_AttributeError;
881     break;
882   default:
883     type = PyExc_RuntimeError;
884   }
885   return type;
886 }
887 
888 
889 SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char * mesg)890 SWIG_Python_AddErrorMsg(const char* mesg)
891 {
892   PyObject *type = 0;
893   PyObject *value = 0;
894   PyObject *traceback = 0;
895 
896   if (PyErr_Occurred())
897     PyErr_Fetch(&type, &value, &traceback);
898   if (value) {
899     PyObject *old_str = PyObject_Str(value);
900     const char *tmp = SWIG_Python_str_AsChar(old_str);
901     PyErr_Clear();
902     Py_XINCREF(type);
903     if (tmp)
904       PyErr_Format(type, "%s %s", tmp, mesg);
905     else
906       PyErr_Format(type, "%s", mesg);
907     SWIG_Python_str_DelForPy3(tmp);
908     Py_DECREF(old_str);
909     Py_DECREF(value);
910   } else {
911     PyErr_SetString(PyExc_RuntimeError, mesg);
912   }
913 }
914 
915 SWIGRUNTIME int
SWIG_Python_TypeErrorOccurred(PyObject * obj)916 SWIG_Python_TypeErrorOccurred(PyObject *obj)
917 {
918   PyObject *error;
919   if (obj)
920     return 0;
921   error = PyErr_Occurred();
922   return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
923 }
924 
925 SWIGRUNTIME void
SWIG_Python_RaiseOrModifyTypeError(const char * message)926 SWIG_Python_RaiseOrModifyTypeError(const char *message)
927 {
928   if (SWIG_Python_TypeErrorOccurred(NULL)) {
929     /* Use existing TypeError to preserve stacktrace and enhance with given message */
930     PyObject *newvalue;
931     PyObject *type = NULL, *value = NULL, *traceback = NULL;
932     PyErr_Fetch(&type, &value, &traceback);
933 #if PY_VERSION_HEX >= 0x03000000
934     newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
935 #else
936     newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
937 #endif
938     Py_XDECREF(value);
939     PyErr_Restore(type, newvalue, traceback);
940   } else {
941     /* Raise TypeError using given message */
942     PyErr_SetString(PyExc_TypeError, message);
943   }
944 }
945 
946 #if defined(SWIG_PYTHON_NO_THREADS)
947 #  if defined(SWIG_PYTHON_THREADS)
948 #    undef SWIG_PYTHON_THREADS
949 #  endif
950 #endif
951 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
952 #  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
953 #    define SWIG_PYTHON_USE_GIL
954 #  endif
955 #  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
956 #    ifndef SWIG_PYTHON_INITIALIZE_THREADS
957 #     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads()
958 #    endif
959 #    ifdef __cplusplus /* C++ code */
960        class SWIG_Python_Thread_Block {
961          bool status;
962          PyGILState_STATE state;
963        public:
end()964          void end() { if (status) { PyGILState_Release(state); status = false;} }
SWIG_Python_Thread_Block()965          SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
~SWIG_Python_Thread_Block()966          ~SWIG_Python_Thread_Block() { end(); }
967        };
968        class SWIG_Python_Thread_Allow {
969          bool status;
970          PyThreadState *save;
971        public:
end()972          void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
SWIG_Python_Thread_Allow()973          SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
~SWIG_Python_Thread_Allow()974          ~SWIG_Python_Thread_Allow() { end(); }
975        };
976 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
977 #      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
978 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
979 #      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
980 #    else /* C code */
981 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
982 #      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
983 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
984 #      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
985 #    endif
986 #  else /* Old thread way, not implemented, user must provide it */
987 #    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
988 #      define SWIG_PYTHON_INITIALIZE_THREADS
989 #    endif
990 #    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
991 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
992 #    endif
993 #    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
994 #      define SWIG_PYTHON_THREAD_END_BLOCK
995 #    endif
996 #    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
997 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
998 #    endif
999 #    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1000 #      define SWIG_PYTHON_THREAD_END_ALLOW
1001 #    endif
1002 #  endif
1003 #else /* No thread support */
1004 #  define SWIG_PYTHON_INITIALIZE_THREADS
1005 #  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1006 #  define SWIG_PYTHON_THREAD_END_BLOCK
1007 #  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1008 #  define SWIG_PYTHON_THREAD_END_ALLOW
1009 #endif
1010 
1011 /* -----------------------------------------------------------------------------
1012  * Python API portion that goes into the runtime
1013  * ----------------------------------------------------------------------------- */
1014 
1015 #ifdef __cplusplus
1016 extern "C" {
1017 #endif
1018 
1019 /* -----------------------------------------------------------------------------
1020  * Constant declarations
1021  * ----------------------------------------------------------------------------- */
1022 
1023 /* Constant Types */
1024 #define SWIG_PY_POINTER 4
1025 #define SWIG_PY_BINARY  5
1026 
1027 /* Constant information structure */
1028 typedef struct swig_const_info {
1029   int type;
1030   const char *name;
1031   long lvalue;
1032   double dvalue;
1033   void   *pvalue;
1034   swig_type_info **ptype;
1035 } swig_const_info;
1036 
1037 #ifdef __cplusplus
1038 }
1039 #endif
1040 
1041 
1042 /* -----------------------------------------------------------------------------
1043  * pyrun.swg
1044  *
1045  * This file contains the runtime support for Python modules
1046  * and includes code for managing global variables and pointer
1047  * type checking.
1048  *
1049  * ----------------------------------------------------------------------------- */
1050 
1051 #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
1052 # error "This version of SWIG only supports Python >= 2.7"
1053 #endif
1054 
1055 #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
1056 # error "This version of SWIG only supports Python 3 >= 3.2"
1057 #endif
1058 
1059 /* Common SWIG API */
1060 
1061 /* for raw pointers */
1062 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1063 #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1064 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1065 
1066 #ifdef SWIGPYTHON_BUILTIN
1067 #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
1068 #else
1069 #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1070 #endif
1071 
1072 #define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1073 
1074 #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty)
1075 #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
1076 #define swig_owntype                                    int
1077 
1078 /* for raw packed data */
1079 #define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1080 #define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
1081 
1082 /* for class or struct pointers */
1083 #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
1084 #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
1085 
1086 /* for C or C++ function pointers */
1087 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1088 #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1089 
1090 /* for C++ member pointers, ie, member methods */
1091 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1092 #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
1093 
1094 
1095 /* Runtime API */
1096 
1097 #define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule(clientdata)
1098 #define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
1099 #define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
1100 
1101 #define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj
1102 #define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg
1103 #define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)
1104 #define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1105 #define SWIG_fail                        		goto fail
1106 
1107 
1108 /* Runtime API implementation */
1109 
1110 /* Error manipulation */
1111 
1112 SWIGINTERN void
SWIG_Python_SetErrorObj(PyObject * errtype,PyObject * obj)1113 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1114   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1115   PyErr_SetObject(errtype, obj);
1116   Py_DECREF(obj);
1117   SWIG_PYTHON_THREAD_END_BLOCK;
1118 }
1119 
1120 SWIGINTERN void
SWIG_Python_SetErrorMsg(PyObject * errtype,const char * msg)1121 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1122   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1123   PyErr_SetString(errtype, msg);
1124   SWIG_PYTHON_THREAD_END_BLOCK;
1125 }
1126 
1127 #define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1128 
1129 /* Set a constant value */
1130 
1131 #if defined(SWIGPYTHON_BUILTIN)
1132 
1133 SWIGINTERN void
SwigPyBuiltin_AddPublicSymbol(PyObject * seq,const char * key)1134 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1135   PyObject *s = PyString_InternFromString(key);
1136   PyList_Append(seq, s);
1137   Py_DECREF(s);
1138 }
1139 
1140 SWIGINTERN void
SWIG_Python_SetConstant(PyObject * d,PyObject * public_interface,const char * name,PyObject * obj)1141 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1142   PyDict_SetItemString(d, name, obj);
1143   Py_DECREF(obj);
1144   if (public_interface)
1145     SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1146 }
1147 
1148 #else
1149 
1150 SWIGINTERN void
SWIG_Python_SetConstant(PyObject * d,const char * name,PyObject * obj)1151 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1152   PyDict_SetItemString(d, name, obj);
1153   Py_DECREF(obj);
1154 }
1155 
1156 #endif
1157 
1158 /* Append a value to the result obj */
1159 
1160 SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject * result,PyObject * obj)1161 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1162   if (!result) {
1163     result = obj;
1164   } else if (result == Py_None) {
1165     Py_DECREF(result);
1166     result = obj;
1167   } else {
1168     if (!PyList_Check(result)) {
1169       PyObject *o2 = result;
1170       result = PyList_New(1);
1171       PyList_SetItem(result, 0, o2);
1172     }
1173     PyList_Append(result,obj);
1174     Py_DECREF(obj);
1175   }
1176   return result;
1177 }
1178 
1179 /* Unpack the argument tuple */
1180 
1181 SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject * args,const char * name,Py_ssize_t min,Py_ssize_t max,PyObject ** objs)1182 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1183 {
1184   if (!args) {
1185     if (!min && !max) {
1186       return 1;
1187     } else {
1188       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1189 		   name, (min == max ? "" : "at least "), (int)min);
1190       return 0;
1191     }
1192   }
1193   if (!PyTuple_Check(args)) {
1194     if (min <= 1 && max >= 1) {
1195       Py_ssize_t i;
1196       objs[0] = args;
1197       for (i = 1; i < max; ++i) {
1198 	objs[i] = 0;
1199       }
1200       return 2;
1201     }
1202     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1203     return 0;
1204   } else {
1205     Py_ssize_t l = PyTuple_GET_SIZE(args);
1206     if (l < min) {
1207       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1208 		   name, (min == max ? "" : "at least "), (int)min, (int)l);
1209       return 0;
1210     } else if (l > max) {
1211       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1212 		   name, (min == max ? "" : "at most "), (int)max, (int)l);
1213       return 0;
1214     } else {
1215       Py_ssize_t i;
1216       for (i = 0; i < l; ++i) {
1217 	objs[i] = PyTuple_GET_ITEM(args, i);
1218       }
1219       for (; l < max; ++l) {
1220 	objs[l] = 0;
1221       }
1222       return i + 1;
1223     }
1224   }
1225 }
1226 
1227 SWIGINTERN int
SWIG_Python_CheckNoKeywords(PyObject * kwargs,const char * name)1228 SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
1229   int no_kwargs = 1;
1230   if (kwargs) {
1231     assert(PyDict_Check(kwargs));
1232     if (PyDict_Size(kwargs) > 0) {
1233       PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
1234       no_kwargs = 0;
1235     }
1236   }
1237   return no_kwargs;
1238 }
1239 
1240 /* A functor is a function object with one single object argument */
1241 #define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
1242 
1243 /*
1244   Helper for static pointer initialization for both C and C++ code, for example
1245   static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1246 */
1247 #ifdef __cplusplus
1248 #define SWIG_STATIC_POINTER(var)  var
1249 #else
1250 #define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
1251 #endif
1252 
1253 /* -----------------------------------------------------------------------------
1254  * Pointer declarations
1255  * ----------------------------------------------------------------------------- */
1256 
1257 /* Flags for new pointer objects */
1258 #define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
1259 #define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1260 
1261 #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
1262 
1263 #define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
1264 #define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1265 
1266 #ifdef __cplusplus
1267 extern "C" {
1268 #endif
1269 
1270 /* The python void return value */
1271 
1272 SWIGRUNTIMEINLINE PyObject *
SWIG_Py_Void(void)1273 SWIG_Py_Void(void)
1274 {
1275   PyObject *none = Py_None;
1276   Py_INCREF(none);
1277   return none;
1278 }
1279 
1280 /* SwigPyClientData */
1281 
1282 typedef struct {
1283   PyObject *klass;
1284   PyObject *newraw;
1285   PyObject *newargs;
1286   PyObject *destroy;
1287   int delargs;
1288   int implicitconv;
1289   PyTypeObject *pytype;
1290 } SwigPyClientData;
1291 
1292 SWIGRUNTIMEINLINE int
SWIG_Python_CheckImplicit(swig_type_info * ty)1293 SWIG_Python_CheckImplicit(swig_type_info *ty)
1294 {
1295   SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1296   int fail = data ? data->implicitconv : 0;
1297   if (fail)
1298     PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
1299   return fail;
1300 }
1301 
1302 SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info * desc)1303 SWIG_Python_ExceptionType(swig_type_info *desc) {
1304   SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1305   PyObject *klass = data ? data->klass : 0;
1306   return (klass ? klass : PyExc_RuntimeError);
1307 }
1308 
1309 
1310 SWIGRUNTIME SwigPyClientData *
SwigPyClientData_New(PyObject * obj)1311 SwigPyClientData_New(PyObject* obj)
1312 {
1313   if (!obj) {
1314     return 0;
1315   } else {
1316     SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1317     /* the klass element */
1318     data->klass = obj;
1319     Py_INCREF(data->klass);
1320     /* the newraw method and newargs arguments used to create a new raw instance */
1321     if (PyClass_Check(obj)) {
1322       data->newraw = 0;
1323       data->newargs = obj;
1324       Py_INCREF(obj);
1325     } else {
1326       data->newraw = PyObject_GetAttrString(data->klass, "__new__");
1327       if (data->newraw) {
1328 	Py_INCREF(data->newraw);
1329 	data->newargs = PyTuple_New(1);
1330 	PyTuple_SetItem(data->newargs, 0, obj);
1331       } else {
1332 	data->newargs = obj;
1333       }
1334       Py_INCREF(data->newargs);
1335     }
1336     /* the destroy method, aka as the C++ delete method */
1337     data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1338     if (PyErr_Occurred()) {
1339       PyErr_Clear();
1340       data->destroy = 0;
1341     }
1342     if (data->destroy) {
1343       int flags;
1344       Py_INCREF(data->destroy);
1345       flags = PyCFunction_GET_FLAGS(data->destroy);
1346       data->delargs = !(flags & (METH_O));
1347     } else {
1348       data->delargs = 0;
1349     }
1350     data->implicitconv = 0;
1351     data->pytype = 0;
1352     return data;
1353   }
1354 }
1355 
1356 SWIGRUNTIME void
SwigPyClientData_Del(SwigPyClientData * data)1357 SwigPyClientData_Del(SwigPyClientData *data) {
1358   Py_XDECREF(data->newraw);
1359   Py_XDECREF(data->newargs);
1360   Py_XDECREF(data->destroy);
1361 }
1362 
1363 /* =============== SwigPyObject =====================*/
1364 
1365 typedef struct {
1366   PyObject_HEAD
1367   void *ptr;
1368   swig_type_info *ty;
1369   int own;
1370   PyObject *next;
1371 #ifdef SWIGPYTHON_BUILTIN
1372   PyObject *dict;
1373 #endif
1374 } SwigPyObject;
1375 
1376 
1377 #ifdef SWIGPYTHON_BUILTIN
1378 
1379 SWIGRUNTIME PyObject *
SwigPyObject_get___dict__(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1380 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1381 {
1382   SwigPyObject *sobj = (SwigPyObject *)v;
1383 
1384   if (!sobj->dict)
1385     sobj->dict = PyDict_New();
1386 
1387   Py_INCREF(sobj->dict);
1388   return sobj->dict;
1389 }
1390 
1391 #endif
1392 
1393 SWIGRUNTIME PyObject *
SwigPyObject_long(SwigPyObject * v)1394 SwigPyObject_long(SwigPyObject *v)
1395 {
1396   return PyLong_FromVoidPtr(v->ptr);
1397 }
1398 
1399 SWIGRUNTIME PyObject *
SwigPyObject_format(const char * fmt,SwigPyObject * v)1400 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1401 {
1402   PyObject *res = NULL;
1403   PyObject *args = PyTuple_New(1);
1404   if (args) {
1405     if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1406       PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1407       if (ofmt) {
1408 #if PY_VERSION_HEX >= 0x03000000
1409 	res = PyUnicode_Format(ofmt,args);
1410 #else
1411 	res = PyString_Format(ofmt,args);
1412 #endif
1413 	Py_DECREF(ofmt);
1414       }
1415       Py_DECREF(args);
1416     }
1417   }
1418   return res;
1419 }
1420 
1421 SWIGRUNTIME PyObject *
SwigPyObject_oct(SwigPyObject * v)1422 SwigPyObject_oct(SwigPyObject *v)
1423 {
1424   return SwigPyObject_format("%o",v);
1425 }
1426 
1427 SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject * v)1428 SwigPyObject_hex(SwigPyObject *v)
1429 {
1430   return SwigPyObject_format("%x",v);
1431 }
1432 
1433 SWIGRUNTIME PyObject *
SwigPyObject_repr(SwigPyObject * v)1434 SwigPyObject_repr(SwigPyObject *v)
1435 {
1436   const char *name = SWIG_TypePrettyName(v->ty);
1437   PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1438   if (v->next) {
1439     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1440 # if PY_VERSION_HEX >= 0x03000000
1441     PyObject *joined = PyUnicode_Concat(repr, nrep);
1442     Py_DecRef(repr);
1443     Py_DecRef(nrep);
1444     repr = joined;
1445 # else
1446     PyString_ConcatAndDel(&repr,nrep);
1447 # endif
1448   }
1449   return repr;
1450 }
1451 
1452 /* We need a version taking two PyObject* parameters so it's a valid
1453  * PyCFunction to use in swigobject_methods[]. */
1454 SWIGRUNTIME PyObject *
SwigPyObject_repr2(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1455 SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1456 {
1457   return SwigPyObject_repr((SwigPyObject*)v);
1458 }
1459 
1460 SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject * v,SwigPyObject * w)1461 SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1462 {
1463   void *i = v->ptr;
1464   void *j = w->ptr;
1465   return (i < j) ? -1 : ((i > j) ? 1 : 0);
1466 }
1467 
1468 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1469 SWIGRUNTIME PyObject*
SwigPyObject_richcompare(SwigPyObject * v,SwigPyObject * w,int op)1470 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1471 {
1472   PyObject* res;
1473   if( op != Py_EQ && op != Py_NE ) {
1474     Py_INCREF(Py_NotImplemented);
1475     return Py_NotImplemented;
1476   }
1477   res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1478   return res;
1479 }
1480 
1481 
1482 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1483 
1484 #ifdef SWIGPYTHON_BUILTIN
1485 static swig_type_info *SwigPyObject_stype = 0;
1486 SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void)1487 SwigPyObject_type(void) {
1488     SwigPyClientData *cd;
1489     assert(SwigPyObject_stype);
1490     cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1491     assert(cd);
1492     assert(cd->pytype);
1493     return cd->pytype;
1494 }
1495 #else
1496 SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void)1497 SwigPyObject_type(void) {
1498   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1499   return type;
1500 }
1501 #endif
1502 
1503 SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject * op)1504 SwigPyObject_Check(PyObject *op) {
1505 #ifdef SWIGPYTHON_BUILTIN
1506   PyTypeObject *target_tp = SwigPyObject_type();
1507   if (PyType_IsSubtype(op->ob_type, target_tp))
1508     return 1;
1509   return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1510 #else
1511   return (Py_TYPE(op) == SwigPyObject_type())
1512     || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1513 #endif
1514 }
1515 
1516 SWIGRUNTIME PyObject *
1517 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1518 
1519 SWIGRUNTIME void
SwigPyObject_dealloc(PyObject * v)1520 SwigPyObject_dealloc(PyObject *v)
1521 {
1522   SwigPyObject *sobj = (SwigPyObject *) v;
1523   PyObject *next = sobj->next;
1524   if (sobj->own == SWIG_POINTER_OWN) {
1525     swig_type_info *ty = sobj->ty;
1526     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1527     PyObject *destroy = data ? data->destroy : 0;
1528     if (destroy) {
1529       /* destroy is always a VARARGS method */
1530       PyObject *res;
1531 
1532       /* PyObject_CallFunction() has the potential to silently drop
1533          the active exception.  In cases of unnamed temporary
1534          variable or where we just finished iterating over a generator
1535          StopIteration will be active right now, and this needs to
1536          remain true upon return from SwigPyObject_dealloc.  So save
1537          and restore. */
1538 
1539       PyObject *type = NULL, *value = NULL, *traceback = NULL;
1540       PyErr_Fetch(&type, &value, &traceback);
1541 
1542       if (data->delargs) {
1543         /* we need to create a temporary object to carry the destroy operation */
1544         PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1545         res = SWIG_Python_CallFunctor(destroy, tmp);
1546         Py_DECREF(tmp);
1547       } else {
1548         PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1549         PyObject *mself = PyCFunction_GET_SELF(destroy);
1550         res = ((*meth)(mself, v));
1551       }
1552       if (!res)
1553         PyErr_WriteUnraisable(destroy);
1554 
1555       PyErr_Restore(type, value, traceback);
1556 
1557       Py_XDECREF(res);
1558     }
1559 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1560     else {
1561       const char *name = SWIG_TypePrettyName(ty);
1562       printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1563     }
1564 #endif
1565   }
1566   Py_XDECREF(next);
1567   PyObject_DEL(v);
1568 }
1569 
1570 SWIGRUNTIME PyObject*
SwigPyObject_append(PyObject * v,PyObject * next)1571 SwigPyObject_append(PyObject* v, PyObject* next)
1572 {
1573   SwigPyObject *sobj = (SwigPyObject *) v;
1574   if (!SwigPyObject_Check(next)) {
1575     PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1576     return NULL;
1577   }
1578   sobj->next = next;
1579   Py_INCREF(next);
1580   return SWIG_Py_Void();
1581 }
1582 
1583 SWIGRUNTIME PyObject*
SwigPyObject_next(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1584 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1585 {
1586   SwigPyObject *sobj = (SwigPyObject *) v;
1587   if (sobj->next) {
1588     Py_INCREF(sobj->next);
1589     return sobj->next;
1590   } else {
1591     return SWIG_Py_Void();
1592   }
1593 }
1594 
1595 SWIGINTERN PyObject*
SwigPyObject_disown(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1596 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1597 {
1598   SwigPyObject *sobj = (SwigPyObject *)v;
1599   sobj->own = 0;
1600   return SWIG_Py_Void();
1601 }
1602 
1603 SWIGINTERN PyObject*
SwigPyObject_acquire(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1604 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1605 {
1606   SwigPyObject *sobj = (SwigPyObject *)v;
1607   sobj->own = SWIG_POINTER_OWN;
1608   return SWIG_Py_Void();
1609 }
1610 
1611 SWIGINTERN PyObject*
SwigPyObject_own(PyObject * v,PyObject * args)1612 SwigPyObject_own(PyObject *v, PyObject *args)
1613 {
1614   PyObject *val = 0;
1615   if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1616     return NULL;
1617   } else {
1618     SwigPyObject *sobj = (SwigPyObject *)v;
1619     PyObject *obj = PyBool_FromLong(sobj->own);
1620     if (val) {
1621       if (PyObject_IsTrue(val)) {
1622         SwigPyObject_acquire(v,args);
1623       } else {
1624         SwigPyObject_disown(v,args);
1625       }
1626     }
1627     return obj;
1628   }
1629 }
1630 
1631 static PyMethodDef
1632 swigobject_methods[] = {
1633   {"disown",  SwigPyObject_disown,  METH_NOARGS,  "releases ownership of the pointer"},
1634   {"acquire", SwigPyObject_acquire, METH_NOARGS,  "acquires ownership of the pointer"},
1635   {"own",     SwigPyObject_own,     METH_VARARGS, "returns/sets ownership of the pointer"},
1636   {"append",  SwigPyObject_append,  METH_O,       "appends another 'this' object"},
1637   {"next",    SwigPyObject_next,    METH_NOARGS,  "returns the next 'this' object"},
1638   {"__repr__",SwigPyObject_repr2,   METH_NOARGS,  "returns object representation"},
1639   {0, 0, 0, 0}
1640 };
1641 
1642 SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void)1643 SwigPyObject_TypeOnce(void) {
1644   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1645 
1646   static PyNumberMethods SwigPyObject_as_number = {
1647     (binaryfunc)0, /*nb_add*/
1648     (binaryfunc)0, /*nb_subtract*/
1649     (binaryfunc)0, /*nb_multiply*/
1650     /* nb_divide removed in Python 3 */
1651 #if PY_VERSION_HEX < 0x03000000
1652     (binaryfunc)0, /*nb_divide*/
1653 #endif
1654     (binaryfunc)0, /*nb_remainder*/
1655     (binaryfunc)0, /*nb_divmod*/
1656     (ternaryfunc)0,/*nb_power*/
1657     (unaryfunc)0,  /*nb_negative*/
1658     (unaryfunc)0,  /*nb_positive*/
1659     (unaryfunc)0,  /*nb_absolute*/
1660     (inquiry)0,    /*nb_nonzero*/
1661     0,		   /*nb_invert*/
1662     0,		   /*nb_lshift*/
1663     0,		   /*nb_rshift*/
1664     0,		   /*nb_and*/
1665     0,		   /*nb_xor*/
1666     0,		   /*nb_or*/
1667 #if PY_VERSION_HEX < 0x03000000
1668     0,   /*nb_coerce*/
1669 #endif
1670     (unaryfunc)SwigPyObject_long, /*nb_int*/
1671 #if PY_VERSION_HEX < 0x03000000
1672     (unaryfunc)SwigPyObject_long, /*nb_long*/
1673 #else
1674     0, /*nb_reserved*/
1675 #endif
1676     (unaryfunc)0,                 /*nb_float*/
1677 #if PY_VERSION_HEX < 0x03000000
1678     (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
1679     (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
1680 #endif
1681 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1682     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1683 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1684     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1685 #else
1686     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1687 #endif
1688   };
1689 
1690   static PyTypeObject swigpyobject_type;
1691   static int type_init = 0;
1692   if (!type_init) {
1693     const PyTypeObject tmp = {
1694 #if PY_VERSION_HEX >= 0x03000000
1695       PyVarObject_HEAD_INIT(NULL, 0)
1696 #else
1697       PyObject_HEAD_INIT(NULL)
1698       0,                                    /* ob_size */
1699 #endif
1700       "SwigPyObject",                       /* tp_name */
1701       sizeof(SwigPyObject),                 /* tp_basicsize */
1702       0,                                    /* tp_itemsize */
1703       (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
1704       0,                                    /* tp_print */
1705       (getattrfunc)0,                       /* tp_getattr */
1706       (setattrfunc)0,                       /* tp_setattr */
1707 #if PY_VERSION_HEX >= 0x03000000
1708       0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1709 #else
1710       (cmpfunc)SwigPyObject_compare,        /* tp_compare */
1711 #endif
1712       (reprfunc)SwigPyObject_repr,          /* tp_repr */
1713       &SwigPyObject_as_number,              /* tp_as_number */
1714       0,                                    /* tp_as_sequence */
1715       0,                                    /* tp_as_mapping */
1716       (hashfunc)0,                          /* tp_hash */
1717       (ternaryfunc)0,                       /* tp_call */
1718       0,                                    /* tp_str */
1719       PyObject_GenericGetAttr,              /* tp_getattro */
1720       0,                                    /* tp_setattro */
1721       0,                                    /* tp_as_buffer */
1722       Py_TPFLAGS_DEFAULT,                   /* tp_flags */
1723       swigobject_doc,                       /* tp_doc */
1724       0,                                    /* tp_traverse */
1725       0,                                    /* tp_clear */
1726       (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1727       0,                                    /* tp_weaklistoffset */
1728       0,                                    /* tp_iter */
1729       0,                                    /* tp_iternext */
1730       swigobject_methods,                   /* tp_methods */
1731       0,                                    /* tp_members */
1732       0,                                    /* tp_getset */
1733       0,                                    /* tp_base */
1734       0,                                    /* tp_dict */
1735       0,                                    /* tp_descr_get */
1736       0,                                    /* tp_descr_set */
1737       0,                                    /* tp_dictoffset */
1738       0,                                    /* tp_init */
1739       0,                                    /* tp_alloc */
1740       0,                                    /* tp_new */
1741       0,                                    /* tp_free */
1742       0,                                    /* tp_is_gc */
1743       0,                                    /* tp_bases */
1744       0,                                    /* tp_mro */
1745       0,                                    /* tp_cache */
1746       0,                                    /* tp_subclasses */
1747       0,                                    /* tp_weaklist */
1748       0,                                    /* tp_del */
1749       0,                                    /* tp_version_tag */
1750 #if PY_VERSION_HEX >= 0x03040000
1751       0,                                    /* tp_finalize */
1752 #endif
1753 #if PY_VERSION_HEX >= 0x03080000
1754       0,                                    /* tp_vectorcall */
1755 #endif
1756 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1757       0,                                    /* tp_print */
1758 #endif
1759 #ifdef COUNT_ALLOCS
1760       0,                                    /* tp_allocs */
1761       0,                                    /* tp_frees */
1762       0,                                    /* tp_maxalloc */
1763       0,                                    /* tp_prev */
1764       0                                     /* tp_next */
1765 #endif
1766     };
1767     swigpyobject_type = tmp;
1768     type_init = 1;
1769     if (PyType_Ready(&swigpyobject_type) < 0)
1770       return NULL;
1771   }
1772   return &swigpyobject_type;
1773 }
1774 
1775 SWIGRUNTIME PyObject *
SwigPyObject_New(void * ptr,swig_type_info * ty,int own)1776 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1777 {
1778   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1779   if (sobj) {
1780     sobj->ptr  = ptr;
1781     sobj->ty   = ty;
1782     sobj->own  = own;
1783     sobj->next = 0;
1784   }
1785   return (PyObject *)sobj;
1786 }
1787 
1788 /* -----------------------------------------------------------------------------
1789  * Implements a simple Swig Packed type, and use it instead of string
1790  * ----------------------------------------------------------------------------- */
1791 
1792 typedef struct {
1793   PyObject_HEAD
1794   void *pack;
1795   swig_type_info *ty;
1796   size_t size;
1797 } SwigPyPacked;
1798 
1799 SWIGRUNTIME PyObject *
SwigPyPacked_repr(SwigPyPacked * v)1800 SwigPyPacked_repr(SwigPyPacked *v)
1801 {
1802   char result[SWIG_BUFFER_SIZE];
1803   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1804     return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1805   } else {
1806     return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1807   }
1808 }
1809 
1810 SWIGRUNTIME PyObject *
SwigPyPacked_str(SwigPyPacked * v)1811 SwigPyPacked_str(SwigPyPacked *v)
1812 {
1813   char result[SWIG_BUFFER_SIZE];
1814   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1815     return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1816   } else {
1817     return SWIG_Python_str_FromChar(v->ty->name);
1818   }
1819 }
1820 
1821 SWIGRUNTIME int
SwigPyPacked_compare(SwigPyPacked * v,SwigPyPacked * w)1822 SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
1823 {
1824   size_t i = v->size;
1825   size_t j = w->size;
1826   int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1827   return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
1828 }
1829 
1830 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
1831 
1832 SWIGRUNTIME PyTypeObject*
SwigPyPacked_type(void)1833 SwigPyPacked_type(void) {
1834   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1835   return type;
1836 }
1837 
1838 SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject * op)1839 SwigPyPacked_Check(PyObject *op) {
1840   return ((op)->ob_type == SwigPyPacked_TypeOnce())
1841     || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1842 }
1843 
1844 SWIGRUNTIME void
SwigPyPacked_dealloc(PyObject * v)1845 SwigPyPacked_dealloc(PyObject *v)
1846 {
1847   if (SwigPyPacked_Check(v)) {
1848     SwigPyPacked *sobj = (SwigPyPacked *) v;
1849     free(sobj->pack);
1850   }
1851   PyObject_DEL(v);
1852 }
1853 
1854 SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void)1855 SwigPyPacked_TypeOnce(void) {
1856   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1857   static PyTypeObject swigpypacked_type;
1858   static int type_init = 0;
1859   if (!type_init) {
1860     const PyTypeObject tmp = {
1861 #if PY_VERSION_HEX>=0x03000000
1862       PyVarObject_HEAD_INIT(NULL, 0)
1863 #else
1864       PyObject_HEAD_INIT(NULL)
1865       0,                                    /* ob_size */
1866 #endif
1867       "SwigPyPacked",                       /* tp_name */
1868       sizeof(SwigPyPacked),                 /* tp_basicsize */
1869       0,                                    /* tp_itemsize */
1870       (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
1871       0,                                    /* tp_print */
1872       (getattrfunc)0,                       /* tp_getattr */
1873       (setattrfunc)0,                       /* tp_setattr */
1874 #if PY_VERSION_HEX>=0x03000000
1875       0, /* tp_reserved in 3.0.1 */
1876 #else
1877       (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
1878 #endif
1879       (reprfunc)SwigPyPacked_repr,          /* tp_repr */
1880       0,                                    /* tp_as_number */
1881       0,                                    /* tp_as_sequence */
1882       0,                                    /* tp_as_mapping */
1883       (hashfunc)0,                          /* tp_hash */
1884       (ternaryfunc)0,                       /* tp_call */
1885       (reprfunc)SwigPyPacked_str,           /* tp_str */
1886       PyObject_GenericGetAttr,              /* tp_getattro */
1887       0,                                    /* tp_setattro */
1888       0,                                    /* tp_as_buffer */
1889       Py_TPFLAGS_DEFAULT,                   /* tp_flags */
1890       swigpacked_doc,                       /* tp_doc */
1891       0,                                    /* tp_traverse */
1892       0,                                    /* tp_clear */
1893       0,                                    /* tp_richcompare */
1894       0,                                    /* tp_weaklistoffset */
1895       0,                                    /* tp_iter */
1896       0,                                    /* tp_iternext */
1897       0,                                    /* tp_methods */
1898       0,                                    /* tp_members */
1899       0,                                    /* tp_getset */
1900       0,                                    /* tp_base */
1901       0,                                    /* tp_dict */
1902       0,                                    /* tp_descr_get */
1903       0,                                    /* tp_descr_set */
1904       0,                                    /* tp_dictoffset */
1905       0,                                    /* tp_init */
1906       0,                                    /* tp_alloc */
1907       0,                                    /* tp_new */
1908       0,                                    /* tp_free */
1909       0,                                    /* tp_is_gc */
1910       0,                                    /* tp_bases */
1911       0,                                    /* tp_mro */
1912       0,                                    /* tp_cache */
1913       0,                                    /* tp_subclasses */
1914       0,                                    /* tp_weaklist */
1915       0,                                    /* tp_del */
1916       0,                                    /* tp_version_tag */
1917 #if PY_VERSION_HEX >= 0x03040000
1918       0,                                    /* tp_finalize */
1919 #endif
1920 #if PY_VERSION_HEX >= 0x03080000
1921       0,                                    /* tp_vectorcall */
1922 #endif
1923 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1924       0,                                    /* tp_print */
1925 #endif
1926 #ifdef COUNT_ALLOCS
1927       0,                                    /* tp_allocs */
1928       0,                                    /* tp_frees */
1929       0,                                    /* tp_maxalloc */
1930       0,                                    /* tp_prev */
1931       0                                     /* tp_next */
1932 #endif
1933     };
1934     swigpypacked_type = tmp;
1935     type_init = 1;
1936     if (PyType_Ready(&swigpypacked_type) < 0)
1937       return NULL;
1938   }
1939   return &swigpypacked_type;
1940 }
1941 
1942 SWIGRUNTIME PyObject *
SwigPyPacked_New(void * ptr,size_t size,swig_type_info * ty)1943 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
1944 {
1945   SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
1946   if (sobj) {
1947     void *pack = malloc(size);
1948     if (pack) {
1949       memcpy(pack, ptr, size);
1950       sobj->pack = pack;
1951       sobj->ty   = ty;
1952       sobj->size = size;
1953     } else {
1954       PyObject_DEL((PyObject *) sobj);
1955       sobj = 0;
1956     }
1957   }
1958   return (PyObject *) sobj;
1959 }
1960 
1961 SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject * obj,void * ptr,size_t size)1962 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1963 {
1964   if (SwigPyPacked_Check(obj)) {
1965     SwigPyPacked *sobj = (SwigPyPacked *)obj;
1966     if (sobj->size != size) return 0;
1967     memcpy(ptr, sobj->pack, size);
1968     return sobj->ty;
1969   } else {
1970     return 0;
1971   }
1972 }
1973 
1974 /* -----------------------------------------------------------------------------
1975  * pointers/data manipulation
1976  * ----------------------------------------------------------------------------- */
1977 
1978 static PyObject *Swig_This_global = NULL;
1979 
1980 SWIGRUNTIME PyObject *
SWIG_This(void)1981 SWIG_This(void)
1982 {
1983   if (Swig_This_global == NULL)
1984     Swig_This_global = SWIG_Python_str_FromChar("this");
1985   return Swig_This_global;
1986 }
1987 
1988 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1989 
1990 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
1991 #if PY_VERSION_HEX>=0x03000000
1992 #define SWIG_PYTHON_SLOW_GETSET_THIS
1993 #endif
1994 
1995 SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject * pyobj)1996 SWIG_Python_GetSwigThis(PyObject *pyobj)
1997 {
1998   PyObject *obj;
1999 
2000   if (SwigPyObject_Check(pyobj))
2001     return (SwigPyObject *) pyobj;
2002 
2003 #ifdef SWIGPYTHON_BUILTIN
2004   (void)obj;
2005 # ifdef PyWeakref_CheckProxy
2006   if (PyWeakref_CheckProxy(pyobj)) {
2007     pyobj = PyWeakref_GET_OBJECT(pyobj);
2008     if (pyobj && SwigPyObject_Check(pyobj))
2009       return (SwigPyObject*) pyobj;
2010   }
2011 # endif
2012   return NULL;
2013 #else
2014 
2015   obj = 0;
2016 
2017 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2018   if (PyInstance_Check(pyobj)) {
2019     obj = _PyInstance_Lookup(pyobj, SWIG_This());
2020   } else {
2021     PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2022     if (dictptr != NULL) {
2023       PyObject *dict = *dictptr;
2024       obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2025     } else {
2026 #ifdef PyWeakref_CheckProxy
2027       if (PyWeakref_CheckProxy(pyobj)) {
2028 	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2029 	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2030       }
2031 #endif
2032       obj = PyObject_GetAttr(pyobj,SWIG_This());
2033       if (obj) {
2034 	Py_DECREF(obj);
2035       } else {
2036 	if (PyErr_Occurred()) PyErr_Clear();
2037 	return 0;
2038       }
2039     }
2040   }
2041 #else
2042   obj = PyObject_GetAttr(pyobj,SWIG_This());
2043   if (obj) {
2044     Py_DECREF(obj);
2045   } else {
2046     if (PyErr_Occurred()) PyErr_Clear();
2047     return 0;
2048   }
2049 #endif
2050   if (obj && !SwigPyObject_Check(obj)) {
2051     /* a PyObject is called 'this', try to get the 'real this'
2052        SwigPyObject from it */
2053     return SWIG_Python_GetSwigThis(obj);
2054   }
2055   return (SwigPyObject *)obj;
2056 #endif
2057 }
2058 
2059 /* Acquire a pointer value */
2060 
2061 SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject * obj,int own)2062 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2063   if (own == SWIG_POINTER_OWN) {
2064     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2065     if (sobj) {
2066       int oldown = sobj->own;
2067       sobj->own = own;
2068       return oldown;
2069     }
2070   }
2071   return 0;
2072 }
2073 
2074 /* Convert a pointer value */
2075 
2076 SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject * obj,void ** ptr,swig_type_info * ty,int flags,int * own)2077 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2078   int res;
2079   SwigPyObject *sobj;
2080   int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2081 
2082   if (!obj)
2083     return SWIG_ERROR;
2084   if (obj == Py_None && !implicit_conv) {
2085     if (ptr)
2086       *ptr = 0;
2087     return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
2088   }
2089 
2090   res = SWIG_ERROR;
2091 
2092   sobj = SWIG_Python_GetSwigThis(obj);
2093   if (own)
2094     *own = 0;
2095   while (sobj) {
2096     void *vptr = sobj->ptr;
2097     if (ty) {
2098       swig_type_info *to = sobj->ty;
2099       if (to == ty) {
2100         /* no type cast needed */
2101         if (ptr) *ptr = vptr;
2102         break;
2103       } else {
2104         swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2105         if (!tc) {
2106           sobj = (SwigPyObject *)sobj->next;
2107         } else {
2108           if (ptr) {
2109             int newmemory = 0;
2110             *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2111             if (newmemory == SWIG_CAST_NEW_MEMORY) {
2112               assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2113               if (own)
2114                 *own = *own | SWIG_CAST_NEW_MEMORY;
2115             }
2116           }
2117           break;
2118         }
2119       }
2120     } else {
2121       if (ptr) *ptr = vptr;
2122       break;
2123     }
2124   }
2125   if (sobj) {
2126     if (own)
2127       *own = *own | sobj->own;
2128     if (flags & SWIG_POINTER_DISOWN) {
2129       sobj->own = 0;
2130     }
2131     res = SWIG_OK;
2132   } else {
2133     if (implicit_conv) {
2134       SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2135       if (data && !data->implicitconv) {
2136         PyObject *klass = data->klass;
2137         if (klass) {
2138           PyObject *impconv;
2139           data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2140           impconv = SWIG_Python_CallFunctor(klass, obj);
2141           data->implicitconv = 0;
2142           if (PyErr_Occurred()) {
2143             PyErr_Clear();
2144             impconv = 0;
2145           }
2146           if (impconv) {
2147             SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2148             if (iobj) {
2149               void *vptr;
2150               res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2151               if (SWIG_IsOK(res)) {
2152                 if (ptr) {
2153                   *ptr = vptr;
2154                   /* transfer the ownership to 'ptr' */
2155                   iobj->own = 0;
2156                   res = SWIG_AddCast(res);
2157                   res = SWIG_AddNewMask(res);
2158                 } else {
2159                   res = SWIG_AddCast(res);
2160                 }
2161               }
2162             }
2163             Py_DECREF(impconv);
2164           }
2165         }
2166       }
2167       if (!SWIG_IsOK(res) && obj == Py_None) {
2168         if (ptr)
2169           *ptr = 0;
2170         if (PyErr_Occurred())
2171           PyErr_Clear();
2172         res = SWIG_OK;
2173       }
2174     }
2175   }
2176   return res;
2177 }
2178 
2179 /* Convert a function ptr value */
2180 
2181 SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject * obj,void ** ptr,swig_type_info * ty)2182 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2183   if (!PyCFunction_Check(obj)) {
2184     return SWIG_ConvertPtr(obj, ptr, ty, 0);
2185   } else {
2186     void *vptr = 0;
2187     swig_cast_info *tc;
2188 
2189     /* here we get the method pointer for callbacks */
2190     const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2191     const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2192     if (desc)
2193       desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2194     if (!desc)
2195       return SWIG_ERROR;
2196     tc = SWIG_TypeCheck(desc,ty);
2197     if (tc) {
2198       int newmemory = 0;
2199       *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2200       assert(!newmemory); /* newmemory handling not yet implemented */
2201     } else {
2202       return SWIG_ERROR;
2203     }
2204     return SWIG_OK;
2205   }
2206 }
2207 
2208 /* Convert a packed pointer value */
2209 
2210 SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject * obj,void * ptr,size_t sz,swig_type_info * ty)2211 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2212   swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2213   if (!to) return SWIG_ERROR;
2214   if (ty) {
2215     if (to != ty) {
2216       /* check type cast? */
2217       swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2218       if (!tc) return SWIG_ERROR;
2219     }
2220   }
2221   return SWIG_OK;
2222 }
2223 
2224 /* -----------------------------------------------------------------------------
2225  * Create a new pointer object
2226  * ----------------------------------------------------------------------------- */
2227 
2228 /*
2229   Create a new instance object, without calling __init__, and set the
2230   'this' attribute.
2231 */
2232 
2233 SWIGRUNTIME PyObject*
SWIG_Python_NewShadowInstance(SwigPyClientData * data,PyObject * swig_this)2234 SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2235 {
2236   PyObject *inst = 0;
2237   PyObject *newraw = data->newraw;
2238   if (newraw) {
2239     inst = PyObject_Call(newraw, data->newargs, NULL);
2240     if (inst) {
2241 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2242       PyObject **dictptr = _PyObject_GetDictPtr(inst);
2243       if (dictptr != NULL) {
2244 	PyObject *dict = *dictptr;
2245 	if (dict == NULL) {
2246 	  dict = PyDict_New();
2247 	  *dictptr = dict;
2248 	  PyDict_SetItem(dict, SWIG_This(), swig_this);
2249 	}
2250       }
2251 #else
2252       if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2253         Py_DECREF(inst);
2254         inst = 0;
2255       }
2256 #endif
2257     }
2258   } else {
2259 #if PY_VERSION_HEX >= 0x03000000
2260     PyObject *empty_args = PyTuple_New(0);
2261     if (empty_args) {
2262       PyObject *empty_kwargs = PyDict_New();
2263       if (empty_kwargs) {
2264         inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
2265         Py_DECREF(empty_kwargs);
2266         if (inst) {
2267           if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2268             Py_DECREF(inst);
2269             inst = 0;
2270           } else {
2271             Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2272           }
2273         }
2274       }
2275       Py_DECREF(empty_args);
2276     }
2277 #else
2278     PyObject *dict = PyDict_New();
2279     if (dict) {
2280       PyDict_SetItem(dict, SWIG_This(), swig_this);
2281       inst = PyInstance_NewRaw(data->newargs, dict);
2282       Py_DECREF(dict);
2283     }
2284 #endif
2285   }
2286   return inst;
2287 }
2288 
2289 SWIGRUNTIME int
SWIG_Python_SetSwigThis(PyObject * inst,PyObject * swig_this)2290 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2291 {
2292 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2293   PyObject **dictptr = _PyObject_GetDictPtr(inst);
2294   if (dictptr != NULL) {
2295     PyObject *dict = *dictptr;
2296     if (dict == NULL) {
2297       dict = PyDict_New();
2298       *dictptr = dict;
2299     }
2300     return PyDict_SetItem(dict, SWIG_This(), swig_this);
2301   }
2302 #endif
2303   return PyObject_SetAttr(inst, SWIG_This(), swig_this);
2304 }
2305 
2306 
2307 SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject * args)2308 SWIG_Python_InitShadowInstance(PyObject *args) {
2309   PyObject *obj[2];
2310   if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2311     return NULL;
2312   } else {
2313     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2314     if (sthis) {
2315       SwigPyObject_append((PyObject*) sthis, obj[1]);
2316     } else {
2317       if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
2318         return NULL;
2319     }
2320     return SWIG_Py_Void();
2321   }
2322 }
2323 
2324 /* Create a new pointer object */
2325 
2326 SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(PyObject * self,void * ptr,swig_type_info * type,int flags)2327 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2328   SwigPyClientData *clientdata;
2329   PyObject * robj;
2330   int own;
2331 
2332   if (!ptr)
2333     return SWIG_Py_Void();
2334 
2335   clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2336   own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2337   if (clientdata && clientdata->pytype) {
2338     SwigPyObject *newobj;
2339     if (flags & SWIG_BUILTIN_TP_INIT) {
2340       newobj = (SwigPyObject*) self;
2341       if (newobj->ptr) {
2342         PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2343         while (newobj->next)
2344 	  newobj = (SwigPyObject *) newobj->next;
2345         newobj->next = next_self;
2346         newobj = (SwigPyObject *)next_self;
2347 #ifdef SWIGPYTHON_BUILTIN
2348         newobj->dict = 0;
2349 #endif
2350       }
2351     } else {
2352       newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2353 #ifdef SWIGPYTHON_BUILTIN
2354       newobj->dict = 0;
2355 #endif
2356     }
2357     if (newobj) {
2358       newobj->ptr = ptr;
2359       newobj->ty = type;
2360       newobj->own = own;
2361       newobj->next = 0;
2362       return (PyObject*) newobj;
2363     }
2364     return SWIG_Py_Void();
2365   }
2366 
2367   assert(!(flags & SWIG_BUILTIN_TP_INIT));
2368 
2369   robj = SwigPyObject_New(ptr, type, own);
2370   if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2371     PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2372     Py_DECREF(robj);
2373     robj = inst;
2374   }
2375   return robj;
2376 }
2377 
2378 /* Create a new packed object */
2379 
2380 SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void * ptr,size_t sz,swig_type_info * type)2381 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2382   return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2383 }
2384 
2385 /* -----------------------------------------------------------------------------*
2386  *  Get type list
2387  * -----------------------------------------------------------------------------*/
2388 
2389 #ifdef SWIG_LINK_RUNTIME
2390 void *SWIG_ReturnGlobalTypeList(void *);
2391 #endif
2392 
2393 SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void * SWIGUNUSEDPARM (clientdata))2394 SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
2395   static void *type_pointer = (void *)0;
2396   /* first check if module already created */
2397   if (!type_pointer) {
2398 #ifdef SWIG_LINK_RUNTIME
2399     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2400 #else
2401     type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2402     if (PyErr_Occurred()) {
2403       PyErr_Clear();
2404       type_pointer = (void *)0;
2405     }
2406 #endif
2407   }
2408   return (swig_module_info *) type_pointer;
2409 }
2410 
2411 SWIGRUNTIME void
SWIG_Python_DestroyModule(PyObject * obj)2412 SWIG_Python_DestroyModule(PyObject *obj)
2413 {
2414   swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2415   swig_type_info **types = swig_module->types;
2416   size_t i;
2417   for (i =0; i < swig_module->size; ++i) {
2418     swig_type_info *ty = types[i];
2419     if (ty->owndata) {
2420       SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2421       if (data) SwigPyClientData_Del(data);
2422     }
2423   }
2424   Py_DECREF(SWIG_This());
2425   Swig_This_global = NULL;
2426 }
2427 
2428 SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info * swig_module)2429 SWIG_Python_SetModule(swig_module_info *swig_module) {
2430 #if PY_VERSION_HEX >= 0x03000000
2431  /* Add a dummy module object into sys.modules */
2432   PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2433 #else
2434   static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2435   PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2436 #endif
2437   PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2438   if (pointer && module) {
2439     PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2440   } else {
2441     Py_XDECREF(pointer);
2442   }
2443 }
2444 
2445 /* The python cached type query */
2446 SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void)2447 SWIG_Python_TypeCache(void) {
2448   static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2449   return cache;
2450 }
2451 
2452 SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char * type)2453 SWIG_Python_TypeQuery(const char *type)
2454 {
2455   PyObject *cache = SWIG_Python_TypeCache();
2456   PyObject *key = SWIG_Python_str_FromChar(type);
2457   PyObject *obj = PyDict_GetItem(cache, key);
2458   swig_type_info *descriptor;
2459   if (obj) {
2460     descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2461   } else {
2462     swig_module_info *swig_module = SWIG_GetModule(0);
2463     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2464     if (descriptor) {
2465       obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2466       PyDict_SetItem(cache, key, obj);
2467       Py_DECREF(obj);
2468     }
2469   }
2470   Py_DECREF(key);
2471   return descriptor;
2472 }
2473 
2474 /*
2475    For backward compatibility only
2476 */
2477 #define SWIG_POINTER_EXCEPTION  0
2478 #define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
2479 #define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
2480 
2481 SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char * mesg,int infront)2482 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2483 {
2484   if (PyErr_Occurred()) {
2485     PyObject *type = 0;
2486     PyObject *value = 0;
2487     PyObject *traceback = 0;
2488     PyErr_Fetch(&type, &value, &traceback);
2489     if (value) {
2490       PyObject *old_str = PyObject_Str(value);
2491       const char *tmp = SWIG_Python_str_AsChar(old_str);
2492       const char *errmesg = tmp ? tmp : "Invalid error message";
2493       Py_XINCREF(type);
2494       PyErr_Clear();
2495       if (infront) {
2496 	PyErr_Format(type, "%s %s", mesg, errmesg);
2497       } else {
2498 	PyErr_Format(type, "%s %s", errmesg, mesg);
2499       }
2500       SWIG_Python_str_DelForPy3(tmp);
2501       Py_DECREF(old_str);
2502     }
2503     return 1;
2504   } else {
2505     return 0;
2506   }
2507 }
2508 
2509 SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)2510 SWIG_Python_ArgFail(int argnum)
2511 {
2512   if (PyErr_Occurred()) {
2513     /* add information about failing argument */
2514     char mesg[256];
2515     PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2516     return SWIG_Python_AddErrMesg(mesg, 1);
2517   } else {
2518     return 0;
2519   }
2520 }
2521 
2522 SWIGRUNTIMEINLINE const char *
SwigPyObject_GetDesc(PyObject * self)2523 SwigPyObject_GetDesc(PyObject *self)
2524 {
2525   SwigPyObject *v = (SwigPyObject *)self;
2526   swig_type_info *ty = v ? v->ty : 0;
2527   return ty ? ty->str : "";
2528 }
2529 
2530 SWIGRUNTIME void
SWIG_Python_TypeError(const char * type,PyObject * obj)2531 SWIG_Python_TypeError(const char *type, PyObject *obj)
2532 {
2533   if (type) {
2534 #if defined(SWIG_COBJECT_TYPES)
2535     if (obj && SwigPyObject_Check(obj)) {
2536       const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2537       if (otype) {
2538 	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2539 		     type, otype);
2540 	return;
2541       }
2542     } else
2543 #endif
2544     {
2545       const char *otype = (obj ? obj->ob_type->tp_name : 0);
2546       if (otype) {
2547 	PyObject *str = PyObject_Str(obj);
2548 	const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2549 	if (cstr) {
2550 	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2551 		       type, otype, cstr);
2552           SWIG_Python_str_DelForPy3(cstr);
2553 	} else {
2554 	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2555 		       type, otype);
2556 	}
2557 	Py_XDECREF(str);
2558 	return;
2559       }
2560     }
2561     PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2562   } else {
2563     PyErr_Format(PyExc_TypeError, "unexpected type is received");
2564   }
2565 }
2566 
2567 
2568 /* Convert a pointer value, signal an exception on a type mismatch */
2569 SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject * obj,swig_type_info * ty,int SWIGUNUSEDPARM (argnum),int flags)2570 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2571   void *result;
2572   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2573     PyErr_Clear();
2574 #if SWIG_POINTER_EXCEPTION
2575     if (flags) {
2576       SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2577       SWIG_Python_ArgFail(argnum);
2578     }
2579 #endif
2580   }
2581   return result;
2582 }
2583 
2584 #ifdef SWIGPYTHON_BUILTIN
2585 SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject * obj,PyObject * name,PyObject * value)2586 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2587   PyTypeObject *tp = obj->ob_type;
2588   PyObject *descr;
2589   PyObject *encoded_name;
2590   descrsetfunc f;
2591   int res = -1;
2592 
2593 # ifdef Py_USING_UNICODE
2594   if (PyString_Check(name)) {
2595     name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2596     if (!name)
2597       return -1;
2598   } else if (!PyUnicode_Check(name))
2599 # else
2600   if (!PyString_Check(name))
2601 # endif
2602   {
2603     PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2604     return -1;
2605   } else {
2606     Py_INCREF(name);
2607   }
2608 
2609   if (!tp->tp_dict) {
2610     if (PyType_Ready(tp) < 0)
2611       goto done;
2612   }
2613 
2614   descr = _PyType_Lookup(tp, name);
2615   f = NULL;
2616   if (descr != NULL)
2617     f = descr->ob_type->tp_descr_set;
2618   if (!f) {
2619     if (PyString_Check(name)) {
2620       encoded_name = name;
2621       Py_INCREF(name);
2622     } else {
2623       encoded_name = PyUnicode_AsUTF8String(name);
2624       if (!encoded_name)
2625         return -1;
2626     }
2627     PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2628     Py_DECREF(encoded_name);
2629   } else {
2630     res = f(descr, obj, value);
2631   }
2632 
2633   done:
2634   Py_DECREF(name);
2635   return res;
2636 }
2637 #endif
2638 
2639 
2640 #ifdef __cplusplus
2641 }
2642 #endif
2643 
2644 #ifdef __cplusplus
2645 extern "C" {
2646 #endif
2647 
2648 SWIGINTERN Py_hash_t
SwigPyObject_hash(PyObject * obj)2649 SwigPyObject_hash(PyObject *obj) {
2650   SwigPyObject *sobj = (SwigPyObject *)obj;
2651   void *ptr = sobj->ptr;
2652   return (Py_hash_t)ptr;
2653 }
2654 
2655 SWIGINTERN Py_hash_t
SWIG_PyNumber_AsPyHash(PyObject * obj)2656 SWIG_PyNumber_AsPyHash(PyObject *obj) {
2657   Py_hash_t result = -1;
2658 #if PY_VERSION_HEX < 0x03020000
2659   if (PyInt_Check(obj))
2660     result = PyInt_AsLong(obj);
2661   else if (PyLong_Check(obj))
2662     result = PyLong_AsLong(obj);
2663 #else
2664   if (PyNumber_Check(obj))
2665     result = PyNumber_AsSsize_t(obj, NULL);
2666 #endif
2667   else
2668     PyErr_Format(PyExc_TypeError, "Wrong type for hash function");
2669   return PyErr_Occurred() ? -1 : result;
2670 }
2671 
2672 SWIGINTERN int
SwigPyBuiltin_BadInit(PyObject * self,PyObject * SWIGUNUSEDPARM (args),PyObject * SWIGUNUSEDPARM (kwds))2673 SwigPyBuiltin_BadInit(PyObject *self, PyObject *SWIGUNUSEDPARM(args), PyObject *SWIGUNUSEDPARM(kwds)) {
2674   PyErr_Format(PyExc_TypeError, "Cannot create new instances of type '%.300s'", self->ob_type->tp_name);
2675   return -1;
2676 }
2677 
2678 SWIGINTERN void
SwigPyBuiltin_BadDealloc(PyObject * obj)2679 SwigPyBuiltin_BadDealloc(PyObject *obj) {
2680   SwigPyObject *sobj = (SwigPyObject *)obj;
2681   if (sobj->own) {
2682     PyErr_Format(PyExc_TypeError, "Swig detected a memory leak in type '%.300s': no callable destructor found.", obj->ob_type->tp_name);
2683   }
2684 }
2685 
2686 typedef struct {
2687   PyCFunction get;
2688   PyCFunction set;
2689 } SwigPyGetSet;
2690 
2691 SWIGINTERN PyObject *
SwigPyBuiltin_GetterClosure(PyObject * obj,void * closure)2692 SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) {
2693   SwigPyGetSet *getset;
2694   PyObject *tuple, *result;
2695   if (!closure)
2696     return SWIG_Py_Void();
2697   getset = (SwigPyGetSet *)closure;
2698   if (!getset->get)
2699     return SWIG_Py_Void();
2700   tuple = PyTuple_New(0);
2701   assert(tuple);
2702   result = (*getset->get)(obj, tuple);
2703   Py_DECREF(tuple);
2704   return result;
2705 }
2706 
2707 SWIGINTERN PyObject *
SwigPyBuiltin_FunpackGetterClosure(PyObject * obj,void * closure)2708 SwigPyBuiltin_FunpackGetterClosure (PyObject *obj, void *closure) {
2709   SwigPyGetSet *getset;
2710   PyObject *result;
2711   if (!closure)
2712     return SWIG_Py_Void();
2713   getset = (SwigPyGetSet *)closure;
2714   if (!getset->get)
2715     return SWIG_Py_Void();
2716   result = (*getset->get)(obj, NULL);
2717   return result;
2718 }
2719 
2720 SWIGINTERN int
SwigPyBuiltin_SetterClosure(PyObject * obj,PyObject * val,void * closure)2721 SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) {
2722   SwigPyGetSet *getset;
2723   PyObject *tuple, *result;
2724   if (!closure) {
2725     PyErr_Format(PyExc_TypeError, "Missing getset closure");
2726     return -1;
2727   }
2728   getset = (SwigPyGetSet *)closure;
2729   if (!getset->set) {
2730     PyErr_Format(PyExc_TypeError, "Illegal member variable assignment in type '%.300s'", obj->ob_type->tp_name);
2731     return -1;
2732   }
2733   tuple = PyTuple_New(1);
2734   assert(tuple);
2735   Py_INCREF(val);
2736   PyTuple_SET_ITEM(tuple, 0, val);
2737   result = (*getset->set)(obj, tuple);
2738   Py_DECREF(tuple);
2739   Py_XDECREF(result);
2740   return result ? 0 : -1;
2741 }
2742 
2743 SWIGINTERN int
SwigPyBuiltin_FunpackSetterClosure(PyObject * obj,PyObject * val,void * closure)2744 SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) {
2745   SwigPyGetSet *getset;
2746   PyObject *result;
2747   if (!closure) {
2748     PyErr_Format(PyExc_TypeError, "Missing getset closure");
2749     return -1;
2750   }
2751   getset = (SwigPyGetSet *)closure;
2752   if (!getset->set) {
2753     PyErr_Format(PyExc_TypeError, "Illegal member variable assignment in type '%.300s'", obj->ob_type->tp_name);
2754     return -1;
2755   }
2756   result = (*getset->set)(obj, val);
2757   Py_XDECREF(result);
2758   return result ? 0 : -1;
2759 }
2760 
2761 SWIGINTERN void
SwigPyStaticVar_dealloc(PyDescrObject * descr)2762 SwigPyStaticVar_dealloc(PyDescrObject *descr) {
2763   PyObject_GC_UnTrack(descr);
2764   Py_XDECREF(PyDescr_TYPE(descr));
2765   Py_XDECREF(PyDescr_NAME(descr));
2766   PyObject_GC_Del(descr);
2767 }
2768 
2769 SWIGINTERN PyObject *
SwigPyStaticVar_repr(PyGetSetDescrObject * descr)2770 SwigPyStaticVar_repr(PyGetSetDescrObject *descr) {
2771 #if PY_VERSION_HEX >= 0x03000000
2772 
2773   return PyUnicode_FromFormat("<class attribute '%S' of type '%s'>", PyDescr_NAME(descr), PyDescr_TYPE(descr)->tp_name);
2774 #else
2775   return PyString_FromFormat("<class attribute '%s' of type '%s'>", PyString_AsString(PyDescr_NAME(descr)), PyDescr_TYPE(descr)->tp_name);
2776 #endif
2777 }
2778 
2779 SWIGINTERN int
SwigPyStaticVar_traverse(PyObject * self,visitproc visit,void * arg)2780 SwigPyStaticVar_traverse(PyObject *self, visitproc visit, void *arg) {
2781   PyDescrObject *descr;
2782   descr = (PyDescrObject *)self;
2783   Py_VISIT((PyObject*) PyDescr_TYPE(descr));
2784   return 0;
2785 }
2786 
2787 SWIGINTERN PyObject *
SwigPyStaticVar_get(PyGetSetDescrObject * descr,PyObject * obj,PyObject * SWIGUNUSEDPARM (type))2788 SwigPyStaticVar_get(PyGetSetDescrObject *descr, PyObject *obj, PyObject *SWIGUNUSEDPARM(type)) {
2789   if (descr->d_getset->get != NULL)
2790     return descr->d_getset->get(obj, descr->d_getset->closure);
2791 #if PY_VERSION_HEX >= 0x03000000
2792   PyErr_Format(PyExc_AttributeError, "attribute '%.300S' of '%.100s' objects is not readable", PyDescr_NAME(descr), PyDescr_TYPE(descr)->tp_name);
2793 #else
2794   PyErr_Format(PyExc_AttributeError, "attribute '%.300s' of '%.100s' objects is not readable", PyString_AsString(PyDescr_NAME(descr)), PyDescr_TYPE(descr)->tp_name);
2795 #endif
2796   return NULL;
2797 }
2798 
2799 SWIGINTERN int
SwigPyStaticVar_set(PyGetSetDescrObject * descr,PyObject * obj,PyObject * value)2800 SwigPyStaticVar_set(PyGetSetDescrObject *descr, PyObject *obj, PyObject *value) {
2801   if (descr->d_getset->set != NULL)
2802     return descr->d_getset->set(obj, value, descr->d_getset->closure);
2803 #if PY_VERSION_HEX >= 0x03000000
2804   PyErr_Format(PyExc_AttributeError, "attribute '%.300S' of '%.100s' objects is not writable", PyDescr_NAME(descr), PyDescr_TYPE(descr)->tp_name);
2805 #else
2806   PyErr_Format(PyExc_AttributeError, "attribute '%.300s' of '%.100s' objects is not writable", PyString_AsString(PyDescr_NAME(descr)), PyDescr_TYPE(descr)->tp_name);
2807 #endif
2808   return -1;
2809 }
2810 
2811 SWIGINTERN int
SwigPyObjectType_setattro(PyObject * typeobject,PyObject * name,PyObject * value)2812 SwigPyObjectType_setattro(PyObject *typeobject, PyObject *name, PyObject *value) {
2813   PyObject *attribute;
2814   PyTypeObject *type;
2815   descrsetfunc local_set;
2816 
2817   assert(PyType_Check(typeobject));
2818   type = (PyTypeObject *)typeobject;
2819   attribute = _PyType_Lookup(type, name);
2820   if (attribute != NULL) {
2821     /* Implement descriptor functionality, if any */
2822     local_set = attribute->ob_type->tp_descr_set;
2823     if (local_set != NULL)
2824       return local_set(attribute, (PyObject *)type, value);
2825 #if PY_VERSION_HEX >= 0x03000000
2826     PyErr_Format(PyExc_AttributeError, "cannot modify read-only attribute '%.50s.%.400S'", type->tp_name, name);
2827 #else
2828     PyErr_Format(PyExc_AttributeError, "cannot modify read-only attribute '%.50s.%.400s'", type->tp_name, PyString_AS_STRING(name));
2829 #endif
2830   } else {
2831 #if PY_VERSION_HEX >= 0x03000000
2832     PyErr_Format(PyExc_AttributeError, "type '%.50s' has no attribute '%.400S'", type->tp_name, name);
2833 #else
2834     PyErr_Format(PyExc_AttributeError, "type '%.50s' has no attribute '%.400s'", type->tp_name, PyString_AS_STRING(name));
2835 #endif
2836   }
2837 
2838   return -1;
2839 }
2840 
2841 SWIGINTERN PyTypeObject*
SwigPyStaticVar_Type(void)2842 SwigPyStaticVar_Type(void) {
2843   static PyTypeObject staticvar_type;
2844   static int type_init = 0;
2845   if (!type_init) {
2846     const PyTypeObject tmp = {
2847 #if PY_VERSION_HEX >= 0x03000000
2848       PyVarObject_HEAD_INIT(&PyType_Type, 0)
2849 #else
2850       PyObject_HEAD_INIT(&PyType_Type)
2851       0,                                        /* ob_size */
2852 #endif
2853       "swig_static_var_getset_descriptor",      /* tp_name */
2854       sizeof(PyGetSetDescrObject),              /* tp_basicsize */
2855       0,                                        /* tp_itemsize */
2856       (destructor)SwigPyStaticVar_dealloc,      /* tp_dealloc */
2857       0,                                        /* tp_print */
2858       0,                                        /* tp_getattr */
2859       0,                                        /* tp_setattr */
2860       0,                                        /* tp_compare */
2861       (reprfunc)SwigPyStaticVar_repr,           /* tp_repr */
2862       0,                                        /* tp_as_number */
2863       0,                                        /* tp_as_sequence */
2864       0,                                        /* tp_as_mapping */
2865       0,                                        /* tp_hash */
2866       0,                                        /* tp_call */
2867       0,                                        /* tp_str */
2868       PyObject_GenericGetAttr,                  /* tp_getattro */
2869       0,                                        /* tp_setattro */
2870       0,                                        /* tp_as_buffer */
2871       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_CLASS, /* tp_flags */
2872       0,                                        /* tp_doc */
2873       SwigPyStaticVar_traverse,                 /* tp_traverse */
2874       0,                                        /* tp_clear */
2875       0,                                        /* tp_richcompare */
2876       0,                                        /* tp_weaklistoffset */
2877       0,                                        /* tp_iter */
2878       0,                                        /* tp_iternext */
2879       0,                                        /* tp_methods */
2880       0,                                        /* tp_members */
2881       0,                                        /* tp_getset */
2882       0,                                        /* tp_base */
2883       0,                                        /* tp_dict */
2884       (descrgetfunc)SwigPyStaticVar_get,        /* tp_descr_get */
2885       (descrsetfunc)SwigPyStaticVar_set,        /* tp_descr_set */
2886       0,                                        /* tp_dictoffset */
2887       0,                                        /* tp_init */
2888       0,                                        /* tp_alloc */
2889       0,                                        /* tp_new */
2890       0,                                        /* tp_free */
2891       0,                                        /* tp_is_gc */
2892       0,                                        /* tp_bases */
2893       0,                                        /* tp_mro */
2894       0,                                        /* tp_cache */
2895       0,                                        /* tp_subclasses */
2896       0,                                        /* tp_weaklist */
2897       0,                                        /* tp_del */
2898       0,                                        /* tp_version_tag */
2899 #if PY_VERSION_HEX >= 0x03040000
2900       0,                                        /* tp_finalize */
2901 #endif
2902 #if PY_VERSION_HEX >= 0x03080000
2903       0,                                        /* tp_vectorcall */
2904 #endif
2905 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
2906       0,                                        /* tp_print */
2907 #endif
2908 #ifdef COUNT_ALLOCS
2909       0,                                        /* tp_allocs */
2910       0,                                        /* tp_frees */
2911       0,                                        /* tp_maxalloc */
2912       0,                                        /* tp_prev */
2913       0                                         /* tp_next */
2914 #endif
2915     };
2916     staticvar_type = tmp;
2917     type_init = 1;
2918     if (PyType_Ready(&staticvar_type) < 0)
2919       return NULL;
2920   }
2921   return &staticvar_type;
2922 }
2923 
2924 SWIGINTERN PyTypeObject*
SwigPyObjectType(void)2925 SwigPyObjectType(void) {
2926   static char swigpyobjecttype_doc[] = "Metaclass for SWIG wrapped types";
2927   static PyTypeObject swigpyobjecttype_type;
2928   static int type_init = 0;
2929   if (!type_init) {
2930     const PyTypeObject tmp = {
2931 #if PY_VERSION_HEX >= 0x03000000
2932       PyVarObject_HEAD_INIT(&PyType_Type, 0)
2933 #else
2934       PyObject_HEAD_INIT(&PyType_Type)
2935       0,                                        /* ob_size */
2936 #endif
2937       "SwigPyObjectType",                       /* tp_name */
2938       PyType_Type.tp_basicsize,                 /* tp_basicsize */
2939       0,                                        /* tp_itemsize */
2940       0,                                        /* tp_dealloc */
2941       0,                                        /* tp_print */
2942       0,                                        /* tp_getattr */
2943       0,                                        /* tp_setattr */
2944       0,                                        /* tp_compare */
2945       0,                                        /* tp_repr */
2946       0,                                        /* tp_as_number */
2947       0,                                        /* tp_as_sequence */
2948       0,                                        /* tp_as_mapping */
2949       0,                                        /* tp_hash */
2950       0,                                        /* tp_call */
2951       0,                                        /* tp_str */
2952       0,                                        /* tp_getattro */
2953       SwigPyObjectType_setattro,                /* tp_setattro */
2954       0,                                        /* tp_as_buffer */
2955       Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_CLASS, /* tp_flags */
2956       swigpyobjecttype_doc,                     /* tp_doc */
2957       0,                                        /* tp_traverse */
2958       0,                                        /* tp_clear */
2959       0,                                        /* tp_richcompare */
2960       0,                                        /* tp_weaklistoffset */
2961       0,                                        /* tp_iter */
2962       0,                                        /* tp_iternext */
2963       0,                                        /* tp_methods */
2964       0,                                        /* tp_members */
2965       0,                                        /* tp_getset */
2966       0,                                        /* tp_base */
2967       0,                                        /* tp_dict */
2968       0,                                        /* tp_descr_get */
2969       0,                                        /* tp_descr_set */
2970       0,                                        /* tp_dictoffset */
2971       0,                                        /* tp_init */
2972       0,                                        /* tp_alloc */
2973       0,                                        /* tp_new */
2974       0,                                        /* tp_free */
2975       0,                                        /* tp_is_gc */
2976       0,                                        /* tp_bases */
2977       0,                                        /* tp_mro */
2978       0,                                        /* tp_cache */
2979       0,                                        /* tp_subclasses */
2980       0,                                        /* tp_weaklist */
2981       0,                                        /* tp_del */
2982       0,                                        /* tp_version_tag */
2983 #if PY_VERSION_HEX >= 0x03040000
2984       0,                                        /* tp_finalize */
2985 #endif
2986 #if PY_VERSION_HEX >= 0x03080000
2987       0,                                        /* tp_vectorcall */
2988 #endif
2989 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
2990       0,                                        /* tp_print */
2991 #endif
2992 #ifdef COUNT_ALLOCS
2993       0,                                        /* tp_allocs */
2994       0,                                        /* tp_frees */
2995       0,                                        /* tp_maxalloc */
2996       0,                                        /* tp_prev */
2997       0                                         /* tp_next */
2998 #endif
2999     };
3000     swigpyobjecttype_type = tmp;
3001     type_init = 1;
3002     swigpyobjecttype_type.tp_base = &PyType_Type;
3003     if (PyType_Ready(&swigpyobjecttype_type) < 0)
3004       return NULL;
3005   }
3006   return &swigpyobjecttype_type;
3007 }
3008 
3009 SWIGINTERN PyGetSetDescrObject *
SwigPyStaticVar_new_getset(PyTypeObject * type,PyGetSetDef * getset)3010 SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) {
3011 
3012   PyGetSetDescrObject *descr;
3013   descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0);
3014   assert(descr);
3015   Py_XINCREF(type);
3016   PyDescr_TYPE(descr) = type;
3017   PyDescr_NAME(descr) = PyString_InternFromString(getset->name);
3018   descr->d_getset = getset;
3019   if (PyDescr_NAME(descr) == NULL) {
3020     Py_DECREF(descr);
3021     descr = NULL;
3022   }
3023   return descr;
3024 }
3025 
3026 SWIGINTERN void
SwigPyBuiltin_InitBases(PyTypeObject * type,PyTypeObject ** bases)3027 SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) {
3028   Py_ssize_t base_count = 0;
3029   PyTypeObject **b;
3030   PyObject *tuple;
3031   Py_ssize_t i;
3032 
3033   if (!bases[0]) {
3034     bases[0] = SwigPyObject_type();
3035     bases[1] = NULL;
3036   }
3037   type->tp_base = bases[0];
3038   Py_INCREF((PyObject *)bases[0]);
3039   for (b = bases; *b != NULL; ++b)
3040     ++base_count;
3041   tuple = PyTuple_New(base_count);
3042   for (i = 0; i < base_count; ++i) {
3043     Py_INCREF((PyObject *)bases[i]);
3044     PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]);
3045   }
3046   type->tp_bases = tuple;
3047 }
3048 
3049 SWIGINTERN PyObject *
SwigPyBuiltin_ThisClosure(PyObject * self,void * SWIGUNUSEDPARM (closure))3050 SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) {
3051   PyObject *result;
3052   result = (PyObject *)SWIG_Python_GetSwigThis(self);
3053   Py_XINCREF(result);
3054   return result;
3055 }
3056 
3057 SWIGINTERN void
SwigPyBuiltin_SetMetaType(PyTypeObject * type,PyTypeObject * metatype)3058 SwigPyBuiltin_SetMetaType (PyTypeObject *type, PyTypeObject *metatype)
3059 {
3060 #if PY_VERSION_HEX >= 0x03000000
3061     type->ob_base.ob_base.ob_type = metatype;
3062 #else
3063     type->ob_type = metatype;
3064 #endif
3065 }
3066 
3067 
3068 /* Start of callback function macros for use in PyTypeObject */
3069 
3070 typedef PyObject *(*SwigPyWrapperFunction)(PyObject *, PyObject *);
3071 
3072 #define SWIGPY_UNARYFUNC_CLOSURE(wrapper)		\
3073 SWIGINTERN PyObject *					\
3074 wrapper##_unaryfunc_closure(PyObject *a) {		\
3075   return SwigPyBuiltin_unaryfunc_closure(wrapper, a);	\
3076 }
3077 SWIGINTERN PyObject *
SwigPyBuiltin_unaryfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3078 SwigPyBuiltin_unaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3079   return wrapper(a, NULL);
3080 }
3081 
3082 #define SWIGPY_DESTRUCTOR_CLOSURE(wrapper)			\
3083 SWIGINTERN void							\
3084 wrapper##_destructor_closure(PyObject *a) {			\
3085     SwigPyBuiltin_destructor_closure(wrapper, #wrapper, a);	\
3086 }
3087 SWIGINTERN void
SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper,const char * wrappername,PyObject * a)3088 SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) {
3089   SwigPyObject *sobj;
3090   sobj = (SwigPyObject *)a;
3091   Py_XDECREF(sobj->dict);
3092   if (sobj->own) {
3093     PyObject *o;
3094     PyObject *type = 0, *value = 0, *traceback = 0;
3095     PyErr_Fetch(&type, &value, &traceback);
3096     o = wrapper(a, NULL);
3097     if (!o) {
3098       PyObject *deallocname = PyString_FromString(wrappername);
3099       PyErr_WriteUnraisable(deallocname);
3100       Py_DECREF(deallocname);
3101     }
3102     PyErr_Restore(type, value, traceback);
3103     Py_XDECREF(o);
3104   }
3105   if (PyType_IS_GC(a->ob_type)) {
3106     PyObject_GC_Del(a);
3107   } else {
3108     PyObject_Del(a);
3109   }
3110 }
3111 
3112 #define SWIGPY_INQUIRY_CLOSURE(wrapper)			\
3113 SWIGINTERN int						\
3114 wrapper##_inquiry_closure(PyObject *a) {		\
3115   return SwigPyBuiltin_inquiry_closure(wrapper, a);	\
3116 }
3117 SWIGINTERN int
SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper,PyObject * a)3118 SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3119   PyObject *pyresult;
3120   int result;
3121   pyresult = wrapper(a, NULL);
3122   result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0;
3123   Py_XDECREF(pyresult);
3124   return result;
3125 }
3126 
3127 #define SWIGPY_GETITERFUNC_CLOSURE(wrapper)		\
3128 SWIGINTERN PyObject *					\
3129 wrapper##_getiterfunc_closure(PyObject *a) {		\
3130   return SwigPyBuiltin_getiterfunc_closure(wrapper, a);	\
3131 }
3132 SWIGINTERN PyObject *
SwigPyBuiltin_getiterfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3133 SwigPyBuiltin_getiterfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3134   return wrapper(a, NULL);
3135 }
3136 
3137 #define SWIGPY_BINARYFUNC_CLOSURE(wrapper)			\
3138 SWIGINTERN PyObject *						\
3139 wrapper##_binaryfunc_closure(PyObject *a, PyObject *b) {	\
3140   return SwigPyBuiltin_binaryfunc_closure(wrapper, a, b);	\
3141 }
3142 SWIGINTERN PyObject *
SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b)3143 SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b) {
3144   PyObject *tuple, *result;
3145   tuple = PyTuple_New(1);
3146   assert(tuple);
3147   Py_INCREF(b);
3148   PyTuple_SET_ITEM(tuple, 0, b);
3149   result = wrapper(a, tuple);
3150   Py_DECREF(tuple);
3151   return result;
3152 }
3153 
3154 typedef ternaryfunc ternarycallfunc;
3155 
3156 #define SWIGPY_TERNARYFUNC_CLOSURE(wrapper)				\
3157 SWIGINTERN PyObject *							\
3158 wrapper##_ternaryfunc_closure(PyObject *a, PyObject *b, PyObject *c) {	\
3159   return SwigPyBuiltin_ternaryfunc_closure(wrapper, a, b, c);		\
3160 }
3161 SWIGINTERN PyObject *
SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b,PyObject * c)3162 SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) {
3163   PyObject *tuple, *result;
3164   tuple = PyTuple_New(2);
3165   assert(tuple);
3166   Py_INCREF(b);
3167   PyTuple_SET_ITEM(tuple, 0, b);
3168   Py_INCREF(c);
3169   PyTuple_SET_ITEM(tuple, 1, c);
3170   result = wrapper(a, tuple);
3171   Py_DECREF(tuple);
3172   return result;
3173 }
3174 
3175 #define SWIGPY_TERNARYCALLFUNC_CLOSURE(wrapper)					\
3176 SWIGINTERN PyObject *								\
3177 wrapper##_ternarycallfunc_closure(PyObject *a, PyObject *b, PyObject *c) {	\
3178   return SwigPyBuiltin_ternarycallfunc_closure(wrapper, a, b, c);		\
3179 }
3180 SWIGINTERN PyObject *
SwigPyBuiltin_ternarycallfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b,PyObject * c)3181 SwigPyBuiltin_ternarycallfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) {
3182   (void) c;
3183   return wrapper(a, b);
3184 }
3185 
3186 #define SWIGPY_LENFUNC_CLOSURE(wrapper)			\
3187 SWIGINTERN Py_ssize_t					\
3188 wrapper##_lenfunc_closure(PyObject *a) {		\
3189   return SwigPyBuiltin_lenfunc_closure(wrapper, a);	\
3190 }
3191 SWIGINTERN Py_ssize_t
SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3192 SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3193   PyObject *resultobj;
3194   Py_ssize_t result;
3195   resultobj = wrapper(a, NULL);
3196   result = PyNumber_AsSsize_t(resultobj, NULL);
3197   Py_DECREF(resultobj);
3198   return result;
3199 }
3200 
3201 #define SWIGPY_SSIZESSIZEARGFUNC_CLOSURE(wrapper)				\
3202 SWIGINTERN PyObject *								\
3203 wrapper##_ssizessizeargfunc_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c) {	\
3204   return SwigPyBuiltin_ssizessizeargfunc_closure(wrapper, a, b, c);		\
3205 }
3206 SWIGINTERN PyObject *
SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b,Py_ssize_t c)3207 SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, Py_ssize_t c) {
3208   PyObject *tuple, *result;
3209   tuple = PyTuple_New(2);
3210   assert(tuple);
3211   PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3212   PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c));
3213   result = wrapper(a, tuple);
3214   Py_DECREF(tuple);
3215   return result;
3216 }
3217 
3218 #define SWIGPY_SSIZESSIZEOBJARGPROC_CLOSURE(wrapper)						\
3219 SWIGINTERN int											\
3220 wrapper##_ssizessizeobjargproc_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) {	\
3221   return SwigPyBuiltin_ssizessizeobjargproc_closure(wrapper, a, b, c, d);			\
3222 }
3223 SWIGINTERN int
SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b,Py_ssize_t c,PyObject * d)3224 SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) {
3225   PyObject *tuple, *resultobj;
3226   int result;
3227   tuple = PyTuple_New(d ? 3 : 2);
3228   assert(tuple);
3229   PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3230   PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c));
3231   if (d) {
3232     Py_INCREF(d);
3233     PyTuple_SET_ITEM(tuple, 2, d);
3234   }
3235   resultobj = wrapper(a, tuple);
3236   result = resultobj ? 0 : -1;
3237   Py_DECREF(tuple);
3238   Py_XDECREF(resultobj);
3239   return result;
3240 }
3241 
3242 #define SWIGPY_SSIZEARGFUNC_CLOSURE(wrapper)				\
3243 SWIGINTERN PyObject *							\
3244 wrapper##_ssizeargfunc_closure(PyObject *a, Py_ssize_t b) {		\
3245   return SwigPyBuiltin_funpack_ssizeargfunc_closure(wrapper, a, b);	\
3246 }
3247 SWIGINTERN PyObject *
SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b)3248 SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b) {
3249   PyObject *tuple, *result;
3250   tuple = PyTuple_New(1);
3251   assert(tuple);
3252   PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3253   result = wrapper(a, tuple);
3254   Py_DECREF(tuple);
3255   return result;
3256 }
3257 
3258 #define SWIGPY_FUNPACK_SSIZEARGFUNC_CLOSURE(wrapper)			\
3259 SWIGINTERN PyObject *							\
3260 wrapper##_ssizeargfunc_closure(PyObject *a, Py_ssize_t b) {		\
3261   return SwigPyBuiltin_ssizeargfunc_closure(wrapper, a, b);		\
3262 }
3263 SWIGINTERN PyObject *
SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b)3264 SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b) {
3265   PyObject *arg, *result;
3266   arg = _PyLong_FromSsize_t(b);
3267   result = wrapper(a, arg);
3268   Py_DECREF(arg);
3269   return result;
3270 }
3271 
3272 #define SWIGPY_SSIZEOBJARGPROC_CLOSURE(wrapper)					\
3273 SWIGINTERN int									\
3274 wrapper##_ssizeobjargproc_closure(PyObject *a, Py_ssize_t b, PyObject *c) {	\
3275   return SwigPyBuiltin_ssizeobjargproc_closure(wrapper, a, b, c);		\
3276 }
3277 SWIGINTERN int
SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b,PyObject * c)3278 SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, PyObject *c) {
3279   PyObject *tuple, *resultobj;
3280   int result;
3281   tuple = PyTuple_New(2);
3282   assert(tuple);
3283   PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3284   Py_INCREF(c);
3285   PyTuple_SET_ITEM(tuple, 1, c);
3286   resultobj = wrapper(a, tuple);
3287   result = resultobj ? 0 : -1;
3288   Py_XDECREF(resultobj);
3289   Py_DECREF(tuple);
3290   return result;
3291 }
3292 
3293 #define SWIGPY_OBJOBJPROC_CLOSURE(wrapper)			\
3294 SWIGINTERN int							\
3295 wrapper##_objobjproc_closure(PyObject *a, PyObject *b) {	\
3296   return SwigPyBuiltin_objobjproc_closure(wrapper, a, b);	\
3297 }
3298 SWIGINTERN int
SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b)3299 SwigPyBuiltin_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b) {
3300   int result;
3301   PyObject *pyresult;
3302   PyObject *tuple;
3303   tuple = PyTuple_New(1);
3304   assert(tuple);
3305   Py_INCREF(b);
3306   PyTuple_SET_ITEM(tuple, 0, b);
3307   pyresult = wrapper(a, tuple);
3308   result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1;
3309   Py_XDECREF(pyresult);
3310   Py_DECREF(tuple);
3311   return result;
3312 }
3313 
3314 #define SWIGPY_FUNPACK_OBJOBJPROC_CLOSURE(wrapper)			\
3315 SWIGINTERN int								\
3316 wrapper##_objobjproc_closure(PyObject *a, PyObject *b) {		\
3317   return SwigPyBuiltin_funpack_objobjproc_closure(wrapper, a, b);	\
3318 }
3319 SWIGINTERN int
SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b)3320 SwigPyBuiltin_funpack_objobjproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b) {
3321   int result;
3322   PyObject *pyresult;
3323   pyresult = wrapper(a, b);
3324   result = pyresult ? (PyObject_IsTrue(pyresult) ? 1 : 0) : -1;
3325   Py_XDECREF(pyresult);
3326   return result;
3327 }
3328 
3329 #define SWIGPY_OBJOBJARGPROC_CLOSURE(wrapper)					\
3330 SWIGINTERN int									\
3331 wrapper##_objobjargproc_closure(PyObject *a, PyObject *b, PyObject *c) {	\
3332   return SwigPyBuiltin_objobjargproc_closure(wrapper, a, b, c);			\
3333 }
3334 SWIGINTERN int
SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b,PyObject * c)3335 SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) {
3336   PyObject *tuple, *resultobj;
3337   int result;
3338   tuple = PyTuple_New(c ? 2 : 1);
3339   assert(tuple);
3340   Py_INCREF(b);
3341   PyTuple_SET_ITEM(tuple, 0, b);
3342   if (c) {
3343     Py_INCREF(c);
3344     PyTuple_SET_ITEM(tuple, 1, c);
3345   }
3346   resultobj = wrapper(a, tuple);
3347   result = resultobj ? 0 : -1;
3348   Py_XDECREF(resultobj);
3349   Py_DECREF(tuple);
3350   return result;
3351 }
3352 
3353 #define SWIGPY_REPRFUNC_CLOSURE(wrapper)		\
3354 SWIGINTERN PyObject *					\
3355 wrapper##_reprfunc_closure(PyObject *a) {		\
3356   return SwigPyBuiltin_reprfunc_closure(wrapper, a);	\
3357 }
3358 SWIGINTERN PyObject *
SwigPyBuiltin_reprfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3359 SwigPyBuiltin_reprfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3360   return wrapper(a, NULL);
3361 }
3362 
3363 #define SWIGPY_HASHFUNC_CLOSURE(wrapper)		\
3364 SWIGINTERN Py_hash_t					\
3365 wrapper##_hashfunc_closure(PyObject *a) {		\
3366   return SwigPyBuiltin_hashfunc_closure(wrapper, a);	\
3367 }
3368 SWIGINTERN Py_hash_t
SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3369 SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3370   PyObject *pyresult;
3371   Py_hash_t result;
3372   pyresult = wrapper(a, NULL);
3373   if (!pyresult)
3374     return -1;
3375   result = SWIG_PyNumber_AsPyHash(pyresult);
3376   Py_DECREF(pyresult);
3377   return result;
3378 }
3379 
3380 #define SWIGPY_ITERNEXTFUNC_CLOSURE(wrapper)		\
3381 SWIGINTERN PyObject *					\
3382 wrapper##_iternextfunc_closure(PyObject *a) {		\
3383   return SwigPyBuiltin_iternextfunc_closure(wrapper, a);\
3384 }
3385 SWIGINTERN PyObject *
SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3386 SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3387   return wrapper(a, NULL);
3388 }
3389 
3390 /* End of callback function macros for use in PyTypeObject */
3391 
3392 #ifdef __cplusplus
3393 }
3394 #endif
3395 
3396 
3397 
3398 
3399 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
3400 
3401 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
3402 
3403 
3404 
3405 #ifdef __cplusplus
3406 extern "C" {
3407 #endif
3408 
3409 /* Method creation and docstring support functions */
3410 
3411 SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
3412 SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
3413 SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
3414 
3415 #ifdef __cplusplus
3416 }
3417 #endif
3418 
3419 
3420 /* -------- TYPES TABLE (BEGIN) -------- */
3421 
3422 #define SWIGTYPE_p_CameraAbilities swig_types[0]
3423 #define SWIGTYPE_p_CameraCaptureType swig_types[1]
3424 #define SWIGTYPE_p_CameraDriverStatus swig_types[2]
3425 #define SWIGTYPE_p_CameraEventType swig_types[3]
3426 #define SWIGTYPE_p_CameraFileAccessType swig_types[4]
3427 #define SWIGTYPE_p_CameraFileInfoFields swig_types[5]
3428 #define SWIGTYPE_p_CameraFileOperation swig_types[6]
3429 #define SWIGTYPE_p_CameraFilePath swig_types[7]
3430 #define SWIGTYPE_p_CameraFilePermissions swig_types[8]
3431 #define SWIGTYPE_p_CameraFileStatus swig_types[9]
3432 #define SWIGTYPE_p_CameraFileType swig_types[10]
3433 #define SWIGTYPE_p_CameraFolderOperation swig_types[11]
3434 #define SWIGTYPE_p_CameraOperation swig_types[12]
3435 #define SWIGTYPE_p_CameraStorageAccessType swig_types[13]
3436 #define SWIGTYPE_p_CameraStorageFilesystemType swig_types[14]
3437 #define SWIGTYPE_p_CameraStorageInfoFields swig_types[15]
3438 #define SWIGTYPE_p_CameraStorageType swig_types[16]
3439 #define SWIGTYPE_p_CameraText swig_types[17]
3440 #define SWIGTYPE_p_CameraWidgetType swig_types[18]
3441 #define SWIGTYPE_p_GPLogLevel swig_types[19]
3442 #define SWIGTYPE_p_GPPortType swig_types[20]
3443 #define SWIGTYPE_p_GPVersionVerbosity swig_types[21]
3444 #define SWIGTYPE_p_GphotoDeviceType swig_types[22]
3445 #define SWIGTYPE_p_SwigPyObject swig_types[23]
3446 #define SWIGTYPE_p__Camera swig_types[24]
3447 #define SWIGTYPE_p__CameraAbilitiesList swig_types[25]
3448 #define SWIGTYPE_p__CameraFile swig_types[26]
3449 #define SWIGTYPE_p__CameraFileHandler swig_types[27]
3450 #define SWIGTYPE_p__CameraFileInfo swig_types[28]
3451 #define SWIGTYPE_p__CameraFileInfoAudio swig_types[29]
3452 #define SWIGTYPE_p__CameraFileInfoFile swig_types[30]
3453 #define SWIGTYPE_p__CameraFileInfoPreview swig_types[31]
3454 #define SWIGTYPE_p__CameraFilesystem swig_types[32]
3455 #define SWIGTYPE_p__CameraFilesystemFuncs swig_types[33]
3456 #define SWIGTYPE_p__CameraFunctions swig_types[34]
3457 #define SWIGTYPE_p__CameraList swig_types[35]
3458 #define SWIGTYPE_p__CameraPrivateCore swig_types[36]
3459 #define SWIGTYPE_p__CameraPrivateLibrary swig_types[37]
3460 #define SWIGTYPE_p__CameraStorageInformation swig_types[38]
3461 #define SWIGTYPE_p__CameraWidget swig_types[39]
3462 #define SWIGTYPE_p__GPContext swig_types[40]
3463 #define SWIGTYPE_p__GPContextFeedback swig_types[41]
3464 #define SWIGTYPE_p__GPPortInfoList swig_types[42]
3465 #define SWIGTYPE_p_char swig_types[43]
3466 #define SWIGTYPE_p_int swig_types[44]
3467 #define SWIGTYPE_p_long swig_types[45]
3468 #define SWIGTYPE_p_long_long swig_types[46]
3469 #define SWIGTYPE_p_p__CameraList swig_types[47]
3470 #define SWIGTYPE_p_p_char swig_types[48]
3471 #define SWIGTYPE_p_short swig_types[49]
3472 #define SWIGTYPE_p_signed_char swig_types[50]
3473 #define SWIGTYPE_p_unsigned_char swig_types[51]
3474 #define SWIGTYPE_p_unsigned_int swig_types[52]
3475 #define SWIGTYPE_p_unsigned_long_long swig_types[53]
3476 #define SWIGTYPE_p_unsigned_short swig_types[54]
3477 static swig_type_info *swig_types[56];
3478 static swig_module_info swig_module = {swig_types, 55, 0, 0, 0, 0};
3479 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3480 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3481 
3482 /* -------- TYPES TABLE (END) -------- */
3483 
3484 #ifdef SWIG_TypeQuery
3485 # undef SWIG_TypeQuery
3486 #endif
3487 #define SWIG_TypeQuery SWIG_Python_TypeQuery
3488 
3489 /*-----------------------------------------------
3490               @(target):= _list.so
3491   ------------------------------------------------*/
3492 #if PY_VERSION_HEX >= 0x03000000
3493 #  define SWIG_init    PyInit__list
3494 
3495 #else
3496 #  define SWIG_init    init_list
3497 
3498 #endif
3499 #define SWIG_name    "_list"
3500 
3501 #define SWIGVERSION 0x040002
3502 #define SWIG_VERSION SWIGVERSION
3503 
3504 
3505 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
3506 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
3507 
3508 
3509 #include <stddef.h>
3510 
3511 
3512 #include "gphoto2/gphoto2.h"
3513 
3514 
3515 PyObject *PyExc_GPhoto2Error = NULL;
3516 
_CameraList___len__(struct _CameraList * self)3517 SWIGINTERN int _CameraList___len__(struct _CameraList *self){
3518 
3519 
3520 
3521     int result = gp_list_count (self);
3522 
3523 
3524 
3525     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3526 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3527 /*@SWIG@*/
3528 
3529     return result;
3530 
3531   }
3532 
3533 SWIGINTERNINLINE PyObject*
SWIG_From_int(int value)3534   SWIG_From_int  (int value)
3535 {
3536   return PyInt_FromLong((long) value);
3537 }
3538 
3539 
3540 #include <limits.h>
3541 #if !defined(SWIG_NO_LLONG_MAX)
3542 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3543 #   define LLONG_MAX __LONG_LONG_MAX__
3544 #   define LLONG_MIN (-LLONG_MAX - 1LL)
3545 #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3546 # endif
3547 #endif
3548 
3549 
3550 SWIGINTERN int
SWIG_AsVal_double(PyObject * obj,double * val)3551 SWIG_AsVal_double (PyObject *obj, double *val)
3552 {
3553   int res = SWIG_TypeError;
3554   if (PyFloat_Check(obj)) {
3555     if (val) *val = PyFloat_AsDouble(obj);
3556     return SWIG_OK;
3557 #if PY_VERSION_HEX < 0x03000000
3558   } else if (PyInt_Check(obj)) {
3559     if (val) *val = (double) PyInt_AsLong(obj);
3560     return SWIG_OK;
3561 #endif
3562   } else if (PyLong_Check(obj)) {
3563     double v = PyLong_AsDouble(obj);
3564     if (!PyErr_Occurred()) {
3565       if (val) *val = v;
3566       return SWIG_OK;
3567     } else {
3568       PyErr_Clear();
3569     }
3570   }
3571 #ifdef SWIG_PYTHON_CAST_MODE
3572   {
3573     int dispatch = 0;
3574     double d = PyFloat_AsDouble(obj);
3575     if (!PyErr_Occurred()) {
3576       if (val) *val = d;
3577       return SWIG_AddCast(SWIG_OK);
3578     } else {
3579       PyErr_Clear();
3580     }
3581     if (!dispatch) {
3582       long v = PyLong_AsLong(obj);
3583       if (!PyErr_Occurred()) {
3584 	if (val) *val = v;
3585 	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3586       } else {
3587 	PyErr_Clear();
3588       }
3589     }
3590   }
3591 #endif
3592   return res;
3593 }
3594 
3595 
3596 #include <float.h>
3597 
3598 
3599 #include <math.h>
3600 
3601 
3602 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)3603 SWIG_CanCastAsInteger(double *d, double min, double max) {
3604   double x = *d;
3605   if ((min <= x && x <= max)) {
3606    double fx = floor(x);
3607    double cx = ceil(x);
3608    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3609    if ((errno == EDOM) || (errno == ERANGE)) {
3610      errno = 0;
3611    } else {
3612      double summ, reps, diff;
3613      if (rd < x) {
3614        diff = x - rd;
3615      } else if (rd > x) {
3616        diff = rd - x;
3617      } else {
3618        return 1;
3619      }
3620      summ = rd + x;
3621      reps = diff/summ;
3622      if (reps < 8*DBL_EPSILON) {
3623        *d = rd;
3624        return 1;
3625      }
3626    }
3627   }
3628   return 0;
3629 }
3630 
3631 
3632 SWIGINTERN int
SWIG_AsVal_long(PyObject * obj,long * val)3633 SWIG_AsVal_long (PyObject *obj, long* val)
3634 {
3635 #if PY_VERSION_HEX < 0x03000000
3636   if (PyInt_Check(obj)) {
3637     if (val) *val = PyInt_AsLong(obj);
3638     return SWIG_OK;
3639   } else
3640 #endif
3641   if (PyLong_Check(obj)) {
3642     long v = PyLong_AsLong(obj);
3643     if (!PyErr_Occurred()) {
3644       if (val) *val = v;
3645       return SWIG_OK;
3646     } else {
3647       PyErr_Clear();
3648       return SWIG_OverflowError;
3649     }
3650   }
3651 #ifdef SWIG_PYTHON_CAST_MODE
3652   {
3653     int dispatch = 0;
3654     long v = PyInt_AsLong(obj);
3655     if (!PyErr_Occurred()) {
3656       if (val) *val = v;
3657       return SWIG_AddCast(SWIG_OK);
3658     } else {
3659       PyErr_Clear();
3660     }
3661     if (!dispatch) {
3662       double d;
3663       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3664       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3665 	if (val) *val = (long)(d);
3666 	return res;
3667       }
3668     }
3669   }
3670 #endif
3671   return SWIG_TypeError;
3672 }
3673 
3674 
3675 SWIGINTERN int
SWIG_AsVal_int(PyObject * obj,int * val)3676 SWIG_AsVal_int (PyObject * obj, int *val)
3677 {
3678   long v;
3679   int res = SWIG_AsVal_long (obj, &v);
3680   if (SWIG_IsOK(res)) {
3681     if ((v < INT_MIN || v > INT_MAX)) {
3682       return SWIG_OverflowError;
3683     } else {
3684       if (val) *val = (int)(v);
3685     }
3686   }
3687   return res;
3688 }
3689 
_CameraList___getitem__(struct _CameraList * self,int idx)3690 SWIGINTERN PyObject *_CameraList___getitem__(struct _CameraList *self,int idx){
3691     int error = 0;
3692     const char *name = NULL;
3693     const char *value = NULL;
3694     PyObject* result = NULL;
3695     if (idx < 0 || idx >= gp_list_count(self)) {
3696       PyErr_SetString(PyExc_IndexError, "CameraList index out of range");
3697       return NULL;
3698     }
3699     error = gp_list_get_name(self, idx, &name);
3700     if (error < 0) {
3701       /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3702 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
3703 /*@SWIG@*/
3704       return NULL;
3705     }
3706     error = gp_list_get_value(self, idx, &value);
3707     if (error < 0) {
3708       /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3709 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
3710 /*@SWIG@*/
3711       return NULL;
3712     }
3713     result = PyList_New(2);
3714     if (name == NULL) {
3715       Py_INCREF(Py_None);
3716       PyList_SetItem(result, 0, Py_None);
3717     }
3718     else {
3719       PyList_SetItem(result, 0, PyString_FromString(name));
3720     }
3721     if (value == NULL) {
3722       Py_INCREF(Py_None);
3723       PyList_SetItem(result, 1, Py_None);
3724     }
3725     else {
3726       PyList_SetItem(result, 1, PyString_FromString(value));
3727     }
3728     return result;
3729   }
_CameraList_count(struct _CameraList * self)3730 SWIGINTERN int _CameraList_count(struct _CameraList *self){
3731 
3732 
3733 
3734     int result = gp_list_count (self);
3735 
3736 
3737 
3738     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3739 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3740 /*@SWIG@*/
3741 
3742     return result;
3743 
3744   }
3745 
3746 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)3747 SWIG_pchar_descriptor(void)
3748 {
3749   static int init = 0;
3750   static swig_type_info* info = 0;
3751   if (!init) {
3752     info = SWIG_TypeQuery("_p_char");
3753     init = 1;
3754   }
3755   return info;
3756 }
3757 
3758 
3759 SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject * obj,char ** cptr,size_t * psize,int * alloc)3760 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3761 {
3762 #if PY_VERSION_HEX>=0x03000000
3763 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3764   if (PyBytes_Check(obj))
3765 #else
3766   if (PyUnicode_Check(obj))
3767 #endif
3768 #else
3769   if (PyString_Check(obj))
3770 #endif
3771   {
3772     char *cstr; Py_ssize_t len;
3773     int ret = SWIG_OK;
3774 #if PY_VERSION_HEX>=0x03000000
3775 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3776     if (!alloc && cptr) {
3777         /* We can't allow converting without allocation, since the internal
3778            representation of string in Python 3 is UCS-2/UCS-4 but we require
3779            a UTF-8 representation.
3780            TODO(bhy) More detailed explanation */
3781         return SWIG_RuntimeError;
3782     }
3783     obj = PyUnicode_AsUTF8String(obj);
3784     if (!obj)
3785       return SWIG_TypeError;
3786     if (alloc)
3787       *alloc = SWIG_NEWOBJ;
3788 #endif
3789     if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
3790       return SWIG_TypeError;
3791 #else
3792     if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
3793       return SWIG_TypeError;
3794 #endif
3795     if (cptr) {
3796       if (alloc) {
3797 	if (*alloc == SWIG_NEWOBJ) {
3798 	  *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
3799 	  *alloc = SWIG_NEWOBJ;
3800 	} else {
3801 	  *cptr = cstr;
3802 	  *alloc = SWIG_OLDOBJ;
3803 	}
3804       } else {
3805 #if PY_VERSION_HEX>=0x03000000
3806 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3807 	*cptr = PyBytes_AsString(obj);
3808 #else
3809 	assert(0); /* Should never reach here with Unicode strings in Python 3 */
3810 #endif
3811 #else
3812 	*cptr = SWIG_Python_str_AsChar(obj);
3813         if (!*cptr)
3814           ret = SWIG_TypeError;
3815 #endif
3816       }
3817     }
3818     if (psize) *psize = len + 1;
3819 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3820     Py_XDECREF(obj);
3821 #endif
3822     return ret;
3823   } else {
3824 #if defined(SWIG_PYTHON_2_UNICODE)
3825 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3826 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3827 #endif
3828 #if PY_VERSION_HEX<0x03000000
3829     if (PyUnicode_Check(obj)) {
3830       char *cstr; Py_ssize_t len;
3831       if (!alloc && cptr) {
3832         return SWIG_RuntimeError;
3833       }
3834       obj = PyUnicode_AsUTF8String(obj);
3835       if (!obj)
3836         return SWIG_TypeError;
3837       if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3838         if (cptr) {
3839           if (alloc) *alloc = SWIG_NEWOBJ;
3840           *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
3841         }
3842         if (psize) *psize = len + 1;
3843 
3844         Py_XDECREF(obj);
3845         return SWIG_OK;
3846       } else {
3847         Py_XDECREF(obj);
3848       }
3849     }
3850 #endif
3851 #endif
3852 
3853     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3854     if (pchar_descriptor) {
3855       void* vptr = 0;
3856       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3857 	if (cptr) *cptr = (char *) vptr;
3858 	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3859 	if (alloc) *alloc = SWIG_OLDOBJ;
3860 	return SWIG_OK;
3861       }
3862     }
3863   }
3864   return SWIG_TypeError;
3865 }
3866 
3867 
3868 
3869 
_CameraList_append(struct _CameraList * self,char const * name,char const * value)3870 SWIGINTERN void _CameraList_append(struct _CameraList *self,char const *name,char const *value){
3871 
3872 
3873 
3874     int result = gp_list_append (self, name, value);
3875 
3876 
3877 
3878     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3879 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3880 /*@SWIG@*/
3881 
3882 
3883 
3884   }
_CameraList_reset(struct _CameraList * self)3885 SWIGINTERN void _CameraList_reset(struct _CameraList *self){
3886 
3887 
3888 
3889     int result = gp_list_reset (self);
3890 
3891 
3892 
3893     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3894 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3895 /*@SWIG@*/
3896 
3897 
3898 
3899   }
_CameraList_sort(struct _CameraList * self)3900 SWIGINTERN void _CameraList_sort(struct _CameraList *self){
3901 
3902 
3903 
3904     int result = gp_list_sort (self);
3905 
3906 
3907 
3908     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3909 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3910 /*@SWIG@*/
3911 
3912 
3913 
3914   }
_CameraList_find_by_name(struct _CameraList * self,int * index,char const * name)3915 SWIGINTERN void _CameraList_find_by_name(struct _CameraList *self,int *index,char const *name){
3916 
3917 
3918 
3919     int result = gp_list_find_by_name (self, index, name);
3920 
3921 
3922 
3923     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3924 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3925 /*@SWIG@*/
3926 
3927 
3928 
3929   }
_CameraList_get_name(struct _CameraList * self,int index,char const ** name)3930 SWIGINTERN void _CameraList_get_name(struct _CameraList *self,int index,char const **name){
3931 
3932 
3933 
3934     int result = gp_list_get_name (self, index, name);
3935 
3936 
3937 
3938     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3939 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3940 /*@SWIG@*/
3941 
3942 
3943 
3944   }
_CameraList_get_value(struct _CameraList * self,int index,char const ** value)3945 SWIGINTERN void _CameraList_get_value(struct _CameraList *self,int index,char const **value){
3946 
3947 
3948 
3949     int result = gp_list_get_value (self, index, value);
3950 
3951 
3952 
3953     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3954 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3955 /*@SWIG@*/
3956 
3957 
3958 
3959   }
_CameraList_set_name(struct _CameraList * self,int index,char const * name)3960 SWIGINTERN void _CameraList_set_name(struct _CameraList *self,int index,char const *name){
3961 
3962 
3963 
3964     int result = gp_list_set_name (self, index, name);
3965 
3966 
3967 
3968     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3969 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3970 /*@SWIG@*/
3971 
3972 
3973 
3974   }
_CameraList_set_value(struct _CameraList * self,int index,char const * value)3975 SWIGINTERN void _CameraList_set_value(struct _CameraList *self,int index,char const *value){
3976 
3977 
3978 
3979     int result = gp_list_set_value (self, index, value);
3980 
3981 
3982 
3983     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3984 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3985 /*@SWIG@*/
3986 
3987 
3988 
3989   }
_CameraList_populate(struct _CameraList * self,char const * format,int count)3990 SWIGINTERN void _CameraList_populate(struct _CameraList *self,char const *format,int count){
3991 
3992 
3993 
3994     int result = gp_list_populate (self, format, count);
3995 
3996 
3997 
3998     if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3999 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
4000 /*@SWIG@*/
4001 
4002 
4003 
4004   }
new__CameraList(void)4005 SWIGINTERN struct _CameraList *new__CameraList(void){
4006     struct _CameraList *result;
4007     int error = gp_list_new(&result);
4008     if (error < 0)
4009       /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4010 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
4011 /*@SWIG@*/
4012     return result;
4013   }
delete__CameraList(struct _CameraList * self)4014 SWIGINTERN void delete__CameraList(struct _CameraList *self){
4015     int error = gp_list_unref(self);
4016     if (error < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4017 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
4018 /*@SWIG@*/
4019   }
4020 #ifdef __cplusplus
4021 extern "C" {
4022 #endif
_wrap_CameraList___len__(PyObject * self,PyObject * args)4023 SWIGINTERN PyObject *_wrap_CameraList___len__(PyObject *self, PyObject *args) {
4024   PyObject *resultobj = 0;
4025   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4026   void *argp1 = 0 ;
4027   int res1 = 0 ;
4028   int result;
4029 
4030   if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraList___len__ takes no arguments");
4031   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4032   if (!SWIG_IsOK(res1)) {
4033     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList___len__" "', argument " "1"" of type '" "struct _CameraList *""'");
4034   }
4035   arg1 = (struct _CameraList *)(argp1);
4036   {
4037     result = (int)_CameraList___len__(arg1);
4038     if (PyErr_Occurred()) SWIG_fail;
4039   }
4040   resultobj = SWIG_From_int((int)(result));
4041   return resultobj;
4042 fail:
4043   return NULL;
4044 }
4045 
4046 
_wrap_CameraList___getitem__(PyObject * self,PyObject * args)4047 SWIGINTERN PyObject *_wrap_CameraList___getitem__(PyObject *self, PyObject *args) {
4048   PyObject *resultobj = 0;
4049   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4050   int arg2 ;
4051   void *argp1 = 0 ;
4052   int res1 = 0 ;
4053   int val2 ;
4054   int ecode2 = 0 ;
4055   PyObject * obj1 = 0 ;
4056   PyObject *result = 0 ;
4057 
4058   if (!PyArg_UnpackTuple(args, "CameraList___getitem__", 1, 1, &obj1)) SWIG_fail;
4059   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4060   if (!SWIG_IsOK(res1)) {
4061     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList___getitem__" "', argument " "1"" of type '" "struct _CameraList *""'");
4062   }
4063   arg1 = (struct _CameraList *)(argp1);
4064   ecode2 = SWIG_AsVal_int(obj1, &val2);
4065   if (!SWIG_IsOK(ecode2)) {
4066     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraList___getitem__" "', argument " "2"" of type '" "int""'");
4067   }
4068   arg2 = (int)(val2);
4069   result = (PyObject *)_CameraList___getitem__(arg1,arg2);
4070   resultobj = result;
4071   return resultobj;
4072 fail:
4073   return NULL;
4074 }
4075 
4076 
_wrap_CameraList_count(PyObject * self,PyObject * args)4077 SWIGINTERN PyObject *_wrap_CameraList_count(PyObject *self, PyObject *args) {
4078   PyObject *resultobj = 0;
4079   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4080   void *argp1 = 0 ;
4081   int res1 = 0 ;
4082   int result;
4083 
4084   if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraList_count takes no arguments");
4085   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4086   if (!SWIG_IsOK(res1)) {
4087     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList_count" "', argument " "1"" of type '" "struct _CameraList *""'");
4088   }
4089   arg1 = (struct _CameraList *)(argp1);
4090   {
4091     result = (int)_CameraList_count(arg1);
4092     if (PyErr_Occurred()) SWIG_fail;
4093   }
4094   resultobj = SWIG_From_int((int)(result));
4095   return resultobj;
4096 fail:
4097   return NULL;
4098 }
4099 
4100 
_wrap_CameraList_append(PyObject * self,PyObject * args)4101 SWIGINTERN PyObject *_wrap_CameraList_append(PyObject *self, PyObject *args) {
4102   PyObject *resultobj = 0;
4103   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4104   char *arg2 = (char *) 0 ;
4105   char *arg3 = (char *) 0 ;
4106   void *argp1 = 0 ;
4107   int res1 = 0 ;
4108   int res2 ;
4109   char *buf2 = 0 ;
4110   int alloc2 = 0 ;
4111   int res3 ;
4112   char *buf3 = 0 ;
4113   int alloc3 = 0 ;
4114   PyObject * obj1 = 0 ;
4115   PyObject * obj2 = 0 ;
4116 
4117   if (!PyArg_UnpackTuple(args, "CameraList_append", 2, 2, &obj1, &obj2)) SWIG_fail;
4118   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4119   if (!SWIG_IsOK(res1)) {
4120     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList_append" "', argument " "1"" of type '" "struct _CameraList *""'");
4121   }
4122   arg1 = (struct _CameraList *)(argp1);
4123   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4124   if (!SWIG_IsOK(res2)) {
4125     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraList_append" "', argument " "2"" of type '" "char const *""'");
4126   }
4127   arg2 = (char *)(buf2);
4128   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4129   if (!SWIG_IsOK(res3)) {
4130     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CameraList_append" "', argument " "3"" of type '" "char const *""'");
4131   }
4132   arg3 = (char *)(buf3);
4133   {
4134     _CameraList_append(arg1,(char const *)arg2,(char const *)arg3);
4135     if (PyErr_Occurred()) SWIG_fail;
4136   }
4137   resultobj = SWIG_Py_Void();
4138   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4139   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4140   return resultobj;
4141 fail:
4142   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4143   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4144   return NULL;
4145 }
4146 
4147 
_wrap_CameraList_reset(PyObject * self,PyObject * args)4148 SWIGINTERN PyObject *_wrap_CameraList_reset(PyObject *self, PyObject *args) {
4149   PyObject *resultobj = 0;
4150   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4151   void *argp1 = 0 ;
4152   int res1 = 0 ;
4153 
4154   if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraList_reset takes no arguments");
4155   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4156   if (!SWIG_IsOK(res1)) {
4157     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList_reset" "', argument " "1"" of type '" "struct _CameraList *""'");
4158   }
4159   arg1 = (struct _CameraList *)(argp1);
4160   {
4161     _CameraList_reset(arg1);
4162     if (PyErr_Occurred()) SWIG_fail;
4163   }
4164   resultobj = SWIG_Py_Void();
4165   return resultobj;
4166 fail:
4167   return NULL;
4168 }
4169 
4170 
_wrap_CameraList_sort(PyObject * self,PyObject * args)4171 SWIGINTERN PyObject *_wrap_CameraList_sort(PyObject *self, PyObject *args) {
4172   PyObject *resultobj = 0;
4173   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4174   void *argp1 = 0 ;
4175   int res1 = 0 ;
4176 
4177   if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraList_sort takes no arguments");
4178   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4179   if (!SWIG_IsOK(res1)) {
4180     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList_sort" "', argument " "1"" of type '" "struct _CameraList *""'");
4181   }
4182   arg1 = (struct _CameraList *)(argp1);
4183   {
4184     _CameraList_sort(arg1);
4185     if (PyErr_Occurred()) SWIG_fail;
4186   }
4187   resultobj = SWIG_Py_Void();
4188   return resultobj;
4189 fail:
4190   return NULL;
4191 }
4192 
4193 
_wrap_CameraList_find_by_name(PyObject * self,PyObject * args)4194 SWIGINTERN PyObject *_wrap_CameraList_find_by_name(PyObject *self, PyObject *args) {
4195   PyObject *resultobj = 0;
4196   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4197   int *arg2 = (int *) 0 ;
4198   char *arg3 = (char *) 0 ;
4199   void *argp1 = 0 ;
4200   int res1 = 0 ;
4201   void *argp2 = 0 ;
4202   int res2 = 0 ;
4203   int res3 ;
4204   char *buf3 = 0 ;
4205   int alloc3 = 0 ;
4206   PyObject * obj1 = 0 ;
4207   PyObject * obj2 = 0 ;
4208 
4209   if (!PyArg_UnpackTuple(args, "CameraList_find_by_name", 2, 2, &obj1, &obj2)) SWIG_fail;
4210   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4211   if (!SWIG_IsOK(res1)) {
4212     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList_find_by_name" "', argument " "1"" of type '" "struct _CameraList *""'");
4213   }
4214   arg1 = (struct _CameraList *)(argp1);
4215   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
4216   if (!SWIG_IsOK(res2)) {
4217     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraList_find_by_name" "', argument " "2"" of type '" "int *""'");
4218   }
4219   arg2 = (int *)(argp2);
4220   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4221   if (!SWIG_IsOK(res3)) {
4222     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CameraList_find_by_name" "', argument " "3"" of type '" "char const *""'");
4223   }
4224   arg3 = (char *)(buf3);
4225   {
4226     _CameraList_find_by_name(arg1,arg2,(char const *)arg3);
4227     if (PyErr_Occurred()) SWIG_fail;
4228   }
4229   resultobj = SWIG_Py_Void();
4230   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4231   return resultobj;
4232 fail:
4233   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4234   return NULL;
4235 }
4236 
4237 
_wrap_CameraList_get_name(PyObject * self,PyObject * args)4238 SWIGINTERN PyObject *_wrap_CameraList_get_name(PyObject *self, PyObject *args) {
4239   PyObject *resultobj = 0;
4240   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4241   int arg2 ;
4242   char **arg3 = (char **) 0 ;
4243   void *argp1 = 0 ;
4244   int res1 = 0 ;
4245   int val2 ;
4246   int ecode2 = 0 ;
4247   char *temp3 ;
4248   PyObject * obj1 = 0 ;
4249 
4250   {
4251     temp3 = NULL;
4252     arg3 = &temp3;
4253   }
4254   if (!PyArg_UnpackTuple(args, "CameraList_get_name", 1, 1, &obj1)) SWIG_fail;
4255   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4256   if (!SWIG_IsOK(res1)) {
4257     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList_get_name" "', argument " "1"" of type '" "struct _CameraList *""'");
4258   }
4259   arg1 = (struct _CameraList *)(argp1);
4260   ecode2 = SWIG_AsVal_int(obj1, &val2);
4261   if (!SWIG_IsOK(ecode2)) {
4262     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraList_get_name" "', argument " "2"" of type '" "int""'");
4263   }
4264   arg2 = (int)(val2);
4265   {
4266     _CameraList_get_name(arg1,arg2,(char const **)arg3);
4267     if (PyErr_Occurred()) SWIG_fail;
4268   }
4269   resultobj = SWIG_Py_Void();
4270   {
4271     if (*arg3) {
4272       resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg3));
4273     }
4274     else {
4275       Py_INCREF(Py_None);
4276       resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
4277     }
4278   }
4279   return resultobj;
4280 fail:
4281   return NULL;
4282 }
4283 
4284 
_wrap_CameraList_get_value(PyObject * self,PyObject * args)4285 SWIGINTERN PyObject *_wrap_CameraList_get_value(PyObject *self, PyObject *args) {
4286   PyObject *resultobj = 0;
4287   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4288   int arg2 ;
4289   char **arg3 = (char **) 0 ;
4290   void *argp1 = 0 ;
4291   int res1 = 0 ;
4292   int val2 ;
4293   int ecode2 = 0 ;
4294   char *temp3 ;
4295   PyObject * obj1 = 0 ;
4296 
4297   {
4298     temp3 = NULL;
4299     arg3 = &temp3;
4300   }
4301   if (!PyArg_UnpackTuple(args, "CameraList_get_value", 1, 1, &obj1)) SWIG_fail;
4302   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4303   if (!SWIG_IsOK(res1)) {
4304     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList_get_value" "', argument " "1"" of type '" "struct _CameraList *""'");
4305   }
4306   arg1 = (struct _CameraList *)(argp1);
4307   ecode2 = SWIG_AsVal_int(obj1, &val2);
4308   if (!SWIG_IsOK(ecode2)) {
4309     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraList_get_value" "', argument " "2"" of type '" "int""'");
4310   }
4311   arg2 = (int)(val2);
4312   {
4313     _CameraList_get_value(arg1,arg2,(char const **)arg3);
4314     if (PyErr_Occurred()) SWIG_fail;
4315   }
4316   resultobj = SWIG_Py_Void();
4317   {
4318     if (*arg3) {
4319       resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg3));
4320     }
4321     else {
4322       Py_INCREF(Py_None);
4323       resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
4324     }
4325   }
4326   return resultobj;
4327 fail:
4328   return NULL;
4329 }
4330 
4331 
_wrap_CameraList_set_name(PyObject * self,PyObject * args)4332 SWIGINTERN PyObject *_wrap_CameraList_set_name(PyObject *self, PyObject *args) {
4333   PyObject *resultobj = 0;
4334   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4335   int arg2 ;
4336   char *arg3 = (char *) 0 ;
4337   void *argp1 = 0 ;
4338   int res1 = 0 ;
4339   int val2 ;
4340   int ecode2 = 0 ;
4341   int res3 ;
4342   char *buf3 = 0 ;
4343   int alloc3 = 0 ;
4344   PyObject * obj1 = 0 ;
4345   PyObject * obj2 = 0 ;
4346 
4347   if (!PyArg_UnpackTuple(args, "CameraList_set_name", 2, 2, &obj1, &obj2)) SWIG_fail;
4348   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4349   if (!SWIG_IsOK(res1)) {
4350     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList_set_name" "', argument " "1"" of type '" "struct _CameraList *""'");
4351   }
4352   arg1 = (struct _CameraList *)(argp1);
4353   ecode2 = SWIG_AsVal_int(obj1, &val2);
4354   if (!SWIG_IsOK(ecode2)) {
4355     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraList_set_name" "', argument " "2"" of type '" "int""'");
4356   }
4357   arg2 = (int)(val2);
4358   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4359   if (!SWIG_IsOK(res3)) {
4360     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CameraList_set_name" "', argument " "3"" of type '" "char const *""'");
4361   }
4362   arg3 = (char *)(buf3);
4363   {
4364     _CameraList_set_name(arg1,arg2,(char const *)arg3);
4365     if (PyErr_Occurred()) SWIG_fail;
4366   }
4367   resultobj = SWIG_Py_Void();
4368   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4369   return resultobj;
4370 fail:
4371   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4372   return NULL;
4373 }
4374 
4375 
_wrap_CameraList_set_value(PyObject * self,PyObject * args)4376 SWIGINTERN PyObject *_wrap_CameraList_set_value(PyObject *self, PyObject *args) {
4377   PyObject *resultobj = 0;
4378   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4379   int arg2 ;
4380   char *arg3 = (char *) 0 ;
4381   void *argp1 = 0 ;
4382   int res1 = 0 ;
4383   int val2 ;
4384   int ecode2 = 0 ;
4385   int res3 ;
4386   char *buf3 = 0 ;
4387   int alloc3 = 0 ;
4388   PyObject * obj1 = 0 ;
4389   PyObject * obj2 = 0 ;
4390 
4391   if (!PyArg_UnpackTuple(args, "CameraList_set_value", 2, 2, &obj1, &obj2)) SWIG_fail;
4392   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4393   if (!SWIG_IsOK(res1)) {
4394     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList_set_value" "', argument " "1"" of type '" "struct _CameraList *""'");
4395   }
4396   arg1 = (struct _CameraList *)(argp1);
4397   ecode2 = SWIG_AsVal_int(obj1, &val2);
4398   if (!SWIG_IsOK(ecode2)) {
4399     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraList_set_value" "', argument " "2"" of type '" "int""'");
4400   }
4401   arg2 = (int)(val2);
4402   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4403   if (!SWIG_IsOK(res3)) {
4404     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CameraList_set_value" "', argument " "3"" of type '" "char const *""'");
4405   }
4406   arg3 = (char *)(buf3);
4407   {
4408     _CameraList_set_value(arg1,arg2,(char const *)arg3);
4409     if (PyErr_Occurred()) SWIG_fail;
4410   }
4411   resultobj = SWIG_Py_Void();
4412   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4413   return resultobj;
4414 fail:
4415   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4416   return NULL;
4417 }
4418 
4419 
_wrap_CameraList_populate(PyObject * self,PyObject * args)4420 SWIGINTERN PyObject *_wrap_CameraList_populate(PyObject *self, PyObject *args) {
4421   PyObject *resultobj = 0;
4422   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4423   char *arg2 = (char *) 0 ;
4424   int arg3 ;
4425   void *argp1 = 0 ;
4426   int res1 = 0 ;
4427   int res2 ;
4428   char *buf2 = 0 ;
4429   int alloc2 = 0 ;
4430   int val3 ;
4431   int ecode3 = 0 ;
4432   PyObject * obj1 = 0 ;
4433   PyObject * obj2 = 0 ;
4434 
4435   if (!PyArg_UnpackTuple(args, "CameraList_populate", 2, 2, &obj1, &obj2)) SWIG_fail;
4436   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4437   if (!SWIG_IsOK(res1)) {
4438     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraList_populate" "', argument " "1"" of type '" "struct _CameraList *""'");
4439   }
4440   arg1 = (struct _CameraList *)(argp1);
4441   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4442   if (!SWIG_IsOK(res2)) {
4443     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraList_populate" "', argument " "2"" of type '" "char const *""'");
4444   }
4445   arg2 = (char *)(buf2);
4446   ecode3 = SWIG_AsVal_int(obj2, &val3);
4447   if (!SWIG_IsOK(ecode3)) {
4448     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CameraList_populate" "', argument " "3"" of type '" "int""'");
4449   }
4450   arg3 = (int)(val3);
4451   {
4452     _CameraList_populate(arg1,(char const *)arg2,arg3);
4453     if (PyErr_Occurred()) SWIG_fail;
4454   }
4455   resultobj = SWIG_Py_Void();
4456   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4457   return resultobj;
4458 fail:
4459   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4460   return NULL;
4461 }
4462 
4463 
_wrap_new_CameraList(PyObject * self,PyObject * args,PyObject * kwargs)4464 SWIGINTERN int _wrap_new_CameraList(PyObject *self, PyObject *args, PyObject *kwargs) {
4465   PyObject *resultobj = 0;
4466   struct _CameraList *result = 0 ;
4467 
4468   if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CameraList")) SWIG_fail;
4469   if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "new_CameraList takes no arguments");
4470   {
4471     result = (struct _CameraList *)new__CameraList();
4472     if (PyErr_Occurred() != NULL) SWIG_fail;
4473   }
4474   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__CameraList, SWIG_BUILTIN_INIT |  0 );
4475   return resultobj == Py_None ? -1 : 0;
4476 fail:
4477   return -1;
4478 }
4479 
4480 
_wrap_delete_CameraList(PyObject * self,PyObject * args)4481 SWIGINTERN PyObject *_wrap_delete_CameraList(PyObject *self, PyObject *args) {
4482   PyObject *resultobj = 0;
4483   struct _CameraList *arg1 = (struct _CameraList *) 0 ;
4484   void *argp1 = 0 ;
4485   int res1 = 0 ;
4486 
4487   if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CameraList takes no arguments");
4488   res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraList, SWIG_POINTER_DISOWN |  0 );
4489   if (!SWIG_IsOK(res1)) {
4490     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CameraList" "', argument " "1"" of type '" "struct _CameraList *""'");
4491   }
4492   arg1 = (struct _CameraList *)(argp1);
4493   {
4494     delete__CameraList(arg1);
4495     if (PyErr_Occurred() != NULL) SWIG_fail;
4496   }
4497   resultobj = SWIG_Py_Void();
4498   return resultobj;
4499 fail:
4500   return NULL;
4501 }
4502 
4503 
4504 SWIGPY_LENFUNC_CLOSURE(_wrap_CameraList___len__) /* defines _wrap_CameraList___len___lenfunc_closure */
4505 
SWIGPY_SSIZEARGFUNC_CLOSURE(_wrap_CameraList___getitem__)4506 SWIGPY_SSIZEARGFUNC_CLOSURE(_wrap_CameraList___getitem__) /* defines _wrap_CameraList___getitem___ssizeargfunc_closure */
4507 
4508 SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CameraList) /* defines _wrap_delete_CameraList_destructor_closure */
4509 
4510 SWIGINTERN PyObject *_wrap_gp_list_new(PyObject *self, PyObject *args) {
4511   PyObject *resultobj = 0;
4512   CameraList **arg1 = (CameraList **) 0 ;
4513   CameraList *temp1 ;
4514   int result;
4515 
4516   {
4517     temp1 = NULL;
4518     arg1 = &temp1;
4519   }
4520   if (!PyArg_UnpackTuple(args, "gp_list_new", 0, 0)) SWIG_fail;
4521   result = (int)gp_list_new(arg1);
4522   resultobj = SWIG_From_int((int)(result));
4523   {
4524     resultobj = SWIG_Python_AppendOutput(
4525       resultobj, SWIG_NewPointerObj(*arg1, SWIGTYPE_p__CameraList, SWIG_POINTER_OWN));
4526   }
4527   return resultobj;
4528 fail:
4529   return NULL;
4530 }
4531 
4532 
_wrap_gp_list_count(PyObject * self,PyObject * args)4533 SWIGINTERN PyObject *_wrap_gp_list_count(PyObject *self, PyObject *args) {
4534   PyObject *resultobj = 0;
4535   CameraList *arg1 = (CameraList *) 0 ;
4536   void *argp1 = 0 ;
4537   int res1 = 0 ;
4538   PyObject * obj0 = 0 ;
4539   int result;
4540 
4541   if (!PyArg_UnpackTuple(args, "gp_list_count", 1, 1, &obj0)) SWIG_fail;
4542   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4543   if (!SWIG_IsOK(res1)) {
4544     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_list_count" "', argument " "1"" of type '" "CameraList *""'");
4545   }
4546   arg1 = (CameraList *)(argp1);
4547   result = (int)gp_list_count(arg1);
4548   resultobj = SWIG_From_int((int)(result));
4549   return resultobj;
4550 fail:
4551   return NULL;
4552 }
4553 
4554 
_wrap_gp_list_append(PyObject * self,PyObject * args)4555 SWIGINTERN PyObject *_wrap_gp_list_append(PyObject *self, PyObject *args) {
4556   PyObject *resultobj = 0;
4557   CameraList *arg1 = (CameraList *) 0 ;
4558   char *arg2 = (char *) 0 ;
4559   char *arg3 = (char *) 0 ;
4560   void *argp1 = 0 ;
4561   int res1 = 0 ;
4562   int res2 ;
4563   char *buf2 = 0 ;
4564   int alloc2 = 0 ;
4565   int res3 ;
4566   char *buf3 = 0 ;
4567   int alloc3 = 0 ;
4568   PyObject * obj0 = 0 ;
4569   PyObject * obj1 = 0 ;
4570   PyObject * obj2 = 0 ;
4571   int result;
4572 
4573   if (!PyArg_UnpackTuple(args, "gp_list_append", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
4574   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4575   if (!SWIG_IsOK(res1)) {
4576     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_list_append" "', argument " "1"" of type '" "CameraList *""'");
4577   }
4578   arg1 = (CameraList *)(argp1);
4579   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4580   if (!SWIG_IsOK(res2)) {
4581     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_list_append" "', argument " "2"" of type '" "char const *""'");
4582   }
4583   arg2 = (char *)(buf2);
4584   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4585   if (!SWIG_IsOK(res3)) {
4586     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gp_list_append" "', argument " "3"" of type '" "char const *""'");
4587   }
4588   arg3 = (char *)(buf3);
4589   result = (int)gp_list_append(arg1,(char const *)arg2,(char const *)arg3);
4590   resultobj = SWIG_From_int((int)(result));
4591   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4592   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4593   return resultobj;
4594 fail:
4595   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4596   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4597   return NULL;
4598 }
4599 
4600 
_wrap_gp_list_reset(PyObject * self,PyObject * args)4601 SWIGINTERN PyObject *_wrap_gp_list_reset(PyObject *self, PyObject *args) {
4602   PyObject *resultobj = 0;
4603   CameraList *arg1 = (CameraList *) 0 ;
4604   void *argp1 = 0 ;
4605   int res1 = 0 ;
4606   PyObject * obj0 = 0 ;
4607   int result;
4608 
4609   if (!PyArg_UnpackTuple(args, "gp_list_reset", 1, 1, &obj0)) SWIG_fail;
4610   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4611   if (!SWIG_IsOK(res1)) {
4612     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_list_reset" "', argument " "1"" of type '" "CameraList *""'");
4613   }
4614   arg1 = (CameraList *)(argp1);
4615   result = (int)gp_list_reset(arg1);
4616   resultobj = SWIG_From_int((int)(result));
4617   return resultobj;
4618 fail:
4619   return NULL;
4620 }
4621 
4622 
_wrap_gp_list_sort(PyObject * self,PyObject * args)4623 SWIGINTERN PyObject *_wrap_gp_list_sort(PyObject *self, PyObject *args) {
4624   PyObject *resultobj = 0;
4625   CameraList *arg1 = (CameraList *) 0 ;
4626   void *argp1 = 0 ;
4627   int res1 = 0 ;
4628   PyObject * obj0 = 0 ;
4629   int result;
4630 
4631   if (!PyArg_UnpackTuple(args, "gp_list_sort", 1, 1, &obj0)) SWIG_fail;
4632   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4633   if (!SWIG_IsOK(res1)) {
4634     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_list_sort" "', argument " "1"" of type '" "CameraList *""'");
4635   }
4636   arg1 = (CameraList *)(argp1);
4637   result = (int)gp_list_sort(arg1);
4638   resultobj = SWIG_From_int((int)(result));
4639   return resultobj;
4640 fail:
4641   return NULL;
4642 }
4643 
4644 
_wrap_gp_list_find_by_name(PyObject * self,PyObject * args)4645 SWIGINTERN PyObject *_wrap_gp_list_find_by_name(PyObject *self, PyObject *args) {
4646   PyObject *resultobj = 0;
4647   CameraList *arg1 = (CameraList *) 0 ;
4648   int *arg2 = (int *) 0 ;
4649   char *arg3 = (char *) 0 ;
4650   void *argp1 = 0 ;
4651   int res1 = 0 ;
4652   void *argp2 = 0 ;
4653   int res2 = 0 ;
4654   int res3 ;
4655   char *buf3 = 0 ;
4656   int alloc3 = 0 ;
4657   PyObject * obj0 = 0 ;
4658   PyObject * obj1 = 0 ;
4659   PyObject * obj2 = 0 ;
4660   int result;
4661 
4662   if (!PyArg_UnpackTuple(args, "gp_list_find_by_name", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
4663   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4664   if (!SWIG_IsOK(res1)) {
4665     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_list_find_by_name" "', argument " "1"" of type '" "CameraList *""'");
4666   }
4667   arg1 = (CameraList *)(argp1);
4668   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
4669   if (!SWIG_IsOK(res2)) {
4670     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_list_find_by_name" "', argument " "2"" of type '" "int *""'");
4671   }
4672   arg2 = (int *)(argp2);
4673   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4674   if (!SWIG_IsOK(res3)) {
4675     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gp_list_find_by_name" "', argument " "3"" of type '" "char const *""'");
4676   }
4677   arg3 = (char *)(buf3);
4678   result = (int)gp_list_find_by_name(arg1,arg2,(char const *)arg3);
4679   resultobj = SWIG_From_int((int)(result));
4680   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4681   return resultobj;
4682 fail:
4683   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4684   return NULL;
4685 }
4686 
4687 
_wrap_gp_list_get_name(PyObject * self,PyObject * args)4688 SWIGINTERN PyObject *_wrap_gp_list_get_name(PyObject *self, PyObject *args) {
4689   PyObject *resultobj = 0;
4690   CameraList *arg1 = (CameraList *) 0 ;
4691   int arg2 ;
4692   char **arg3 = (char **) 0 ;
4693   void *argp1 = 0 ;
4694   int res1 = 0 ;
4695   int val2 ;
4696   int ecode2 = 0 ;
4697   char *temp3 ;
4698   PyObject * obj0 = 0 ;
4699   PyObject * obj1 = 0 ;
4700   int result;
4701 
4702   {
4703     temp3 = NULL;
4704     arg3 = &temp3;
4705   }
4706   if (!PyArg_UnpackTuple(args, "gp_list_get_name", 2, 2, &obj0, &obj1)) SWIG_fail;
4707   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4708   if (!SWIG_IsOK(res1)) {
4709     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_list_get_name" "', argument " "1"" of type '" "CameraList *""'");
4710   }
4711   arg1 = (CameraList *)(argp1);
4712   ecode2 = SWIG_AsVal_int(obj1, &val2);
4713   if (!SWIG_IsOK(ecode2)) {
4714     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_list_get_name" "', argument " "2"" of type '" "int""'");
4715   }
4716   arg2 = (int)(val2);
4717   result = (int)gp_list_get_name(arg1,arg2,(char const **)arg3);
4718   resultobj = SWIG_From_int((int)(result));
4719   {
4720     if (*arg3) {
4721       resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg3));
4722     }
4723     else {
4724       Py_INCREF(Py_None);
4725       resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
4726     }
4727   }
4728   return resultobj;
4729 fail:
4730   return NULL;
4731 }
4732 
4733 
_wrap_gp_list_get_value(PyObject * self,PyObject * args)4734 SWIGINTERN PyObject *_wrap_gp_list_get_value(PyObject *self, PyObject *args) {
4735   PyObject *resultobj = 0;
4736   CameraList *arg1 = (CameraList *) 0 ;
4737   int arg2 ;
4738   char **arg3 = (char **) 0 ;
4739   void *argp1 = 0 ;
4740   int res1 = 0 ;
4741   int val2 ;
4742   int ecode2 = 0 ;
4743   char *temp3 ;
4744   PyObject * obj0 = 0 ;
4745   PyObject * obj1 = 0 ;
4746   int result;
4747 
4748   {
4749     temp3 = NULL;
4750     arg3 = &temp3;
4751   }
4752   if (!PyArg_UnpackTuple(args, "gp_list_get_value", 2, 2, &obj0, &obj1)) SWIG_fail;
4753   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4754   if (!SWIG_IsOK(res1)) {
4755     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_list_get_value" "', argument " "1"" of type '" "CameraList *""'");
4756   }
4757   arg1 = (CameraList *)(argp1);
4758   ecode2 = SWIG_AsVal_int(obj1, &val2);
4759   if (!SWIG_IsOK(ecode2)) {
4760     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_list_get_value" "', argument " "2"" of type '" "int""'");
4761   }
4762   arg2 = (int)(val2);
4763   result = (int)gp_list_get_value(arg1,arg2,(char const **)arg3);
4764   resultobj = SWIG_From_int((int)(result));
4765   {
4766     if (*arg3) {
4767       resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(*arg3));
4768     }
4769     else {
4770       Py_INCREF(Py_None);
4771       resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
4772     }
4773   }
4774   return resultobj;
4775 fail:
4776   return NULL;
4777 }
4778 
4779 
_wrap_gp_list_set_name(PyObject * self,PyObject * args)4780 SWIGINTERN PyObject *_wrap_gp_list_set_name(PyObject *self, PyObject *args) {
4781   PyObject *resultobj = 0;
4782   CameraList *arg1 = (CameraList *) 0 ;
4783   int arg2 ;
4784   char *arg3 = (char *) 0 ;
4785   void *argp1 = 0 ;
4786   int res1 = 0 ;
4787   int val2 ;
4788   int ecode2 = 0 ;
4789   int res3 ;
4790   char *buf3 = 0 ;
4791   int alloc3 = 0 ;
4792   PyObject * obj0 = 0 ;
4793   PyObject * obj1 = 0 ;
4794   PyObject * obj2 = 0 ;
4795   int result;
4796 
4797   if (!PyArg_UnpackTuple(args, "gp_list_set_name", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
4798   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4799   if (!SWIG_IsOK(res1)) {
4800     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_list_set_name" "', argument " "1"" of type '" "CameraList *""'");
4801   }
4802   arg1 = (CameraList *)(argp1);
4803   ecode2 = SWIG_AsVal_int(obj1, &val2);
4804   if (!SWIG_IsOK(ecode2)) {
4805     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_list_set_name" "', argument " "2"" of type '" "int""'");
4806   }
4807   arg2 = (int)(val2);
4808   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4809   if (!SWIG_IsOK(res3)) {
4810     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gp_list_set_name" "', argument " "3"" of type '" "char const *""'");
4811   }
4812   arg3 = (char *)(buf3);
4813   result = (int)gp_list_set_name(arg1,arg2,(char const *)arg3);
4814   resultobj = SWIG_From_int((int)(result));
4815   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4816   return resultobj;
4817 fail:
4818   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4819   return NULL;
4820 }
4821 
4822 
_wrap_gp_list_set_value(PyObject * self,PyObject * args)4823 SWIGINTERN PyObject *_wrap_gp_list_set_value(PyObject *self, PyObject *args) {
4824   PyObject *resultobj = 0;
4825   CameraList *arg1 = (CameraList *) 0 ;
4826   int arg2 ;
4827   char *arg3 = (char *) 0 ;
4828   void *argp1 = 0 ;
4829   int res1 = 0 ;
4830   int val2 ;
4831   int ecode2 = 0 ;
4832   int res3 ;
4833   char *buf3 = 0 ;
4834   int alloc3 = 0 ;
4835   PyObject * obj0 = 0 ;
4836   PyObject * obj1 = 0 ;
4837   PyObject * obj2 = 0 ;
4838   int result;
4839 
4840   if (!PyArg_UnpackTuple(args, "gp_list_set_value", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
4841   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4842   if (!SWIG_IsOK(res1)) {
4843     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_list_set_value" "', argument " "1"" of type '" "CameraList *""'");
4844   }
4845   arg1 = (CameraList *)(argp1);
4846   ecode2 = SWIG_AsVal_int(obj1, &val2);
4847   if (!SWIG_IsOK(ecode2)) {
4848     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_list_set_value" "', argument " "2"" of type '" "int""'");
4849   }
4850   arg2 = (int)(val2);
4851   res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4852   if (!SWIG_IsOK(res3)) {
4853     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gp_list_set_value" "', argument " "3"" of type '" "char const *""'");
4854   }
4855   arg3 = (char *)(buf3);
4856   result = (int)gp_list_set_value(arg1,arg2,(char const *)arg3);
4857   resultobj = SWIG_From_int((int)(result));
4858   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4859   return resultobj;
4860 fail:
4861   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4862   return NULL;
4863 }
4864 
4865 
_wrap_gp_list_populate(PyObject * self,PyObject * args)4866 SWIGINTERN PyObject *_wrap_gp_list_populate(PyObject *self, PyObject *args) {
4867   PyObject *resultobj = 0;
4868   CameraList *arg1 = (CameraList *) 0 ;
4869   char *arg2 = (char *) 0 ;
4870   int arg3 ;
4871   void *argp1 = 0 ;
4872   int res1 = 0 ;
4873   int res2 ;
4874   char *buf2 = 0 ;
4875   int alloc2 = 0 ;
4876   int val3 ;
4877   int ecode3 = 0 ;
4878   PyObject * obj0 = 0 ;
4879   PyObject * obj1 = 0 ;
4880   PyObject * obj2 = 0 ;
4881   int result;
4882 
4883   if (!PyArg_UnpackTuple(args, "gp_list_populate", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
4884   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraList, 0 |  0 );
4885   if (!SWIG_IsOK(res1)) {
4886     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_list_populate" "', argument " "1"" of type '" "CameraList *""'");
4887   }
4888   arg1 = (CameraList *)(argp1);
4889   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4890   if (!SWIG_IsOK(res2)) {
4891     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_list_populate" "', argument " "2"" of type '" "char const *""'");
4892   }
4893   arg2 = (char *)(buf2);
4894   ecode3 = SWIG_AsVal_int(obj2, &val3);
4895   if (!SWIG_IsOK(ecode3)) {
4896     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gp_list_populate" "', argument " "3"" of type '" "int""'");
4897   }
4898   arg3 = (int)(val3);
4899   result = (int)gp_list_populate(arg1,(char const *)arg2,arg3);
4900   resultobj = SWIG_From_int((int)(result));
4901   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4902   return resultobj;
4903 fail:
4904   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4905   return NULL;
4906 }
4907 
4908 
4909 static PyMethodDef SwigMethods[] = {
4910 	 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
4911 	 { "SWIG_PyStaticMethod_New", SWIG_PyStaticMethod_New, METH_O, NULL},
4912 	 { "gp_list_new", _wrap_gp_list_new, METH_VARARGS, "\n"
4913 		"gp_list_new() -> int\n"
4914 		"Creates a new CameraList.  \n"
4915 		"\n"
4916 		"Parameters\n"
4917 		"----------\n"
4918 		"* `list` :  \n"
4919 		"\n"
4920 		"Returns\n"
4921 		"-------\n"
4922 		"a gphoto2 error code\n"
4923 		"\n"
4924 		"See also gphoto2.CameraList\n"
4925 		""},
4926 	 { "gp_list_count", _wrap_gp_list_count, METH_VARARGS, "\n"
4927 		"gp_list_count(list) -> int\n"
4928 		"\n"
4929 		"Parameters\n"
4930 		"----------\n"
4931 		"list: gphoto2.CameraList\n"
4932 		"\n"
4933 		"Counts the entries in the `list`.  \n"
4934 		"\n"
4935 		"Parameters\n"
4936 		"----------\n"
4937 		"* `list` :  \n"
4938 		"    a CameraList  \n"
4939 		"\n"
4940 		"Returns\n"
4941 		"-------\n"
4942 		"a gphoto2 error code\n"
4943 		"\n"
4944 		"See also gphoto2.CameraList.count\n"
4945 		""},
4946 	 { "gp_list_append", _wrap_gp_list_append, METH_VARARGS, "\n"
4947 		"gp_list_append(list, name, value) -> int\n"
4948 		"\n"
4949 		"Parameters\n"
4950 		"----------\n"
4951 		"list: gphoto2.CameraList\n"
4952 		"name: str\n"
4953 		"value: str\n"
4954 		"\n"
4955 		"Appends `name` and `value` to the `list`.  \n"
4956 		"\n"
4957 		"Parameters\n"
4958 		"----------\n"
4959 		"* `list` :  \n"
4960 		"    a CameraList  \n"
4961 		"* `name` :  \n"
4962 		"    the name of the entry to append  \n"
4963 		"* `value` :  \n"
4964 		"    the value of the entry to append  \n"
4965 		"\n"
4966 		"Returns\n"
4967 		"-------\n"
4968 		"a gphoto2 error code\n"
4969 		"\n"
4970 		"See also gphoto2.CameraList.append\n"
4971 		""},
4972 	 { "gp_list_reset", _wrap_gp_list_reset, METH_VARARGS, "\n"
4973 		"gp_list_reset(list) -> int\n"
4974 		"\n"
4975 		"Parameters\n"
4976 		"----------\n"
4977 		"list: gphoto2.CameraList\n"
4978 		"\n"
4979 		"Resets the `list` and removes all entries.  \n"
4980 		"\n"
4981 		"Parameters\n"
4982 		"----------\n"
4983 		"* `list` :  \n"
4984 		"    a CameraList  \n"
4985 		"\n"
4986 		"Returns\n"
4987 		"-------\n"
4988 		"a gphoto2 error code\n"
4989 		"\n"
4990 		"See also gphoto2.CameraList.reset\n"
4991 		""},
4992 	 { "gp_list_sort", _wrap_gp_list_sort, METH_VARARGS, "\n"
4993 		"gp_list_sort(list) -> int\n"
4994 		"\n"
4995 		"Parameters\n"
4996 		"----------\n"
4997 		"list: gphoto2.CameraList\n"
4998 		"\n"
4999 		"Sorts the `list` entries with respect to the names.  \n"
5000 		"\n"
5001 		"Parameters\n"
5002 		"----------\n"
5003 		"* `list` :  \n"
5004 		"    a CameraList  \n"
5005 		"\n"
5006 		"Returns\n"
5007 		"-------\n"
5008 		"a gphoto2 error code\n"
5009 		"\n"
5010 		"See also gphoto2.CameraList.sort\n"
5011 		""},
5012 	 { "gp_list_find_by_name", _wrap_gp_list_find_by_name, METH_VARARGS, "\n"
5013 		"gp_list_find_by_name(list, index, name) -> int\n"
5014 		"\n"
5015 		"Parameters\n"
5016 		"----------\n"
5017 		"list: gphoto2.CameraList\n"
5018 		"index: int *\n"
5019 		"name: str\n"
5020 		"\n"
5021 		"Retrieves the `index` of an arbitrary entry with `name`.  \n"
5022 		"\n"
5023 		"Parameters\n"
5024 		"----------\n"
5025 		"* `list` :  \n"
5026 		"    a CameraList  \n"
5027 		"* `index` :  \n"
5028 		"    pointer to the result index (may be NULL, only set if found)  \n"
5029 		"* `name` :  \n"
5030 		"    name of the entry  \n"
5031 		"\n"
5032 		"Returns\n"
5033 		"-------\n"
5034 		"a gphoto2 error code: GP_OK if found.  \n"
5035 		"\n"
5036 		"No guarantees as to the speed of the search, or in what sequence the\n"
5037 		"list is searched.\n"
5038 		"\n"
5039 		"See also gphoto2.CameraList.find_by_name\n"
5040 		""},
5041 	 { "gp_list_get_name", _wrap_gp_list_get_name, METH_VARARGS, "\n"
5042 		"gp_list_get_name(list, index) -> int\n"
5043 		"\n"
5044 		"Parameters\n"
5045 		"----------\n"
5046 		"list: gphoto2.CameraList\n"
5047 		"index: int\n"
5048 		"\n"
5049 		"Retrieves the `name` of entry with `index`.  \n"
5050 		"\n"
5051 		"Parameters\n"
5052 		"----------\n"
5053 		"* `list` :  \n"
5054 		"    a CameraList  \n"
5055 		"* `index` :  \n"
5056 		"    index of the entry  \n"
5057 		"* `name` :  \n"
5058 		"\n"
5059 		"Returns\n"
5060 		"-------\n"
5061 		"a gphoto2 error code.\n"
5062 		"\n"
5063 		"See also gphoto2.CameraList.get_name\n"
5064 		""},
5065 	 { "gp_list_get_value", _wrap_gp_list_get_value, METH_VARARGS, "\n"
5066 		"gp_list_get_value(list, index) -> int\n"
5067 		"\n"
5068 		"Parameters\n"
5069 		"----------\n"
5070 		"list: gphoto2.CameraList\n"
5071 		"index: int\n"
5072 		"\n"
5073 		"Retrieves the value of entry with `index`.  \n"
5074 		"\n"
5075 		"Parameters\n"
5076 		"----------\n"
5077 		"* `list` :  \n"
5078 		"    a CameraList  \n"
5079 		"* `index` :  \n"
5080 		"    index of the entry  \n"
5081 		"* `value` :  \n"
5082 		"\n"
5083 		"Returns\n"
5084 		"-------\n"
5085 		"a gphoto2 error code\n"
5086 		"\n"
5087 		"See also gphoto2.CameraList.get_value\n"
5088 		""},
5089 	 { "gp_list_set_name", _wrap_gp_list_set_name, METH_VARARGS, "\n"
5090 		"gp_list_set_name(list, index, name) -> int\n"
5091 		"\n"
5092 		"Parameters\n"
5093 		"----------\n"
5094 		"list: gphoto2.CameraList\n"
5095 		"index: int\n"
5096 		"name: str\n"
5097 		"\n"
5098 		"Sets the name of an entry.  \n"
5099 		"\n"
5100 		"Parameters\n"
5101 		"----------\n"
5102 		"* `list` :  \n"
5103 		"    a CameraList  \n"
5104 		"* `index` :  \n"
5105 		"    index of entry  \n"
5106 		"* `name` :  \n"
5107 		"    name to be set  \n"
5108 		"\n"
5109 		"Returns\n"
5110 		"-------\n"
5111 		"a gphoto2 error code\n"
5112 		"\n"
5113 		"See also gphoto2.CameraList.set_name\n"
5114 		""},
5115 	 { "gp_list_set_value", _wrap_gp_list_set_value, METH_VARARGS, "\n"
5116 		"gp_list_set_value(list, index, value) -> int\n"
5117 		"\n"
5118 		"Parameters\n"
5119 		"----------\n"
5120 		"list: gphoto2.CameraList\n"
5121 		"index: int\n"
5122 		"value: str\n"
5123 		"\n"
5124 		"Sets the `value` of an entry.  \n"
5125 		"\n"
5126 		"Parameters\n"
5127 		"----------\n"
5128 		"* `list` :  \n"
5129 		"    a CameraList  \n"
5130 		"* `index` :  \n"
5131 		"    index of the entry  \n"
5132 		"* `value` :  \n"
5133 		"    the value to be set  \n"
5134 		"\n"
5135 		"Returns\n"
5136 		"-------\n"
5137 		"a gphoto2 error code\n"
5138 		"\n"
5139 		"See also gphoto2.CameraList.set_value\n"
5140 		""},
5141 	 { "gp_list_populate", _wrap_gp_list_populate, METH_VARARGS, "\n"
5142 		"gp_list_populate(list, format, count) -> int\n"
5143 		"\n"
5144 		"Parameters\n"
5145 		"----------\n"
5146 		"list: gphoto2.CameraList\n"
5147 		"format: str\n"
5148 		"count: int\n"
5149 		"\n"
5150 		"Adds `count` entries to the list.  \n"
5151 		"\n"
5152 		"Parameters\n"
5153 		"----------\n"
5154 		"* `list` :  \n"
5155 		"    a CameraList  \n"
5156 		"* `format` :  \n"
5157 		"    the format  \n"
5158 		"* `count` :  \n"
5159 		"    number of entries to be added to the list return a gphoto2 error\n"
5160 		"    code  \n"
5161 		"\n"
5162 		"Typically, this function is called by a camera driver when there is no\n"
5163 		"way of retrieving the real name of a picture. In this case, when asked\n"
5164 		"for a file list (see #CameraFilesystemListFunc), the list is populated\n"
5165 		"with dummy names generated by this function.\n"
5166 		"\n"
5167 		"See also gphoto2.CameraList.populate\n"
5168 		""},
5169 	 { NULL, NULL, 0, NULL }
5170 };
5171 
5172 static PyMethodDef SwigMethods_proxydocs[] = {
5173 	 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
5174 	 { "SWIG_PyStaticMethod_New", SWIG_PyStaticMethod_New, METH_O, NULL},
5175 	 { "gp_list_new", _wrap_gp_list_new, METH_VARARGS, "\n"
5176 		"gp_list_new() -> int\n"
5177 		"Creates a new CameraList.  \n"
5178 		"\n"
5179 		"Parameters\n"
5180 		"----------\n"
5181 		"* `list` :  \n"
5182 		"\n"
5183 		"Returns\n"
5184 		"-------\n"
5185 		"a gphoto2 error code\n"
5186 		"\n"
5187 		"See also gphoto2.CameraList\n"
5188 		""},
5189 	 { "gp_list_count", _wrap_gp_list_count, METH_VARARGS, "\n"
5190 		"gp_list_count(list) -> int\n"
5191 		"\n"
5192 		"Parameters\n"
5193 		"----------\n"
5194 		"list: gphoto2.CameraList\n"
5195 		"\n"
5196 		"Counts the entries in the `list`.  \n"
5197 		"\n"
5198 		"Parameters\n"
5199 		"----------\n"
5200 		"* `list` :  \n"
5201 		"    a CameraList  \n"
5202 		"\n"
5203 		"Returns\n"
5204 		"-------\n"
5205 		"a gphoto2 error code\n"
5206 		"\n"
5207 		"See also gphoto2.CameraList.count\n"
5208 		""},
5209 	 { "gp_list_append", _wrap_gp_list_append, METH_VARARGS, "\n"
5210 		"gp_list_append(list, name, value) -> int\n"
5211 		"\n"
5212 		"Parameters\n"
5213 		"----------\n"
5214 		"list: gphoto2.CameraList\n"
5215 		"name: str\n"
5216 		"value: str\n"
5217 		"\n"
5218 		"Appends `name` and `value` to the `list`.  \n"
5219 		"\n"
5220 		"Parameters\n"
5221 		"----------\n"
5222 		"* `list` :  \n"
5223 		"    a CameraList  \n"
5224 		"* `name` :  \n"
5225 		"    the name of the entry to append  \n"
5226 		"* `value` :  \n"
5227 		"    the value of the entry to append  \n"
5228 		"\n"
5229 		"Returns\n"
5230 		"-------\n"
5231 		"a gphoto2 error code\n"
5232 		"\n"
5233 		"See also gphoto2.CameraList.append\n"
5234 		""},
5235 	 { "gp_list_reset", _wrap_gp_list_reset, METH_VARARGS, "\n"
5236 		"gp_list_reset(list) -> int\n"
5237 		"\n"
5238 		"Parameters\n"
5239 		"----------\n"
5240 		"list: gphoto2.CameraList\n"
5241 		"\n"
5242 		"Resets the `list` and removes all entries.  \n"
5243 		"\n"
5244 		"Parameters\n"
5245 		"----------\n"
5246 		"* `list` :  \n"
5247 		"    a CameraList  \n"
5248 		"\n"
5249 		"Returns\n"
5250 		"-------\n"
5251 		"a gphoto2 error code\n"
5252 		"\n"
5253 		"See also gphoto2.CameraList.reset\n"
5254 		""},
5255 	 { "gp_list_sort", _wrap_gp_list_sort, METH_VARARGS, "\n"
5256 		"gp_list_sort(list) -> int\n"
5257 		"\n"
5258 		"Parameters\n"
5259 		"----------\n"
5260 		"list: gphoto2.CameraList\n"
5261 		"\n"
5262 		"Sorts the `list` entries with respect to the names.  \n"
5263 		"\n"
5264 		"Parameters\n"
5265 		"----------\n"
5266 		"* `list` :  \n"
5267 		"    a CameraList  \n"
5268 		"\n"
5269 		"Returns\n"
5270 		"-------\n"
5271 		"a gphoto2 error code\n"
5272 		"\n"
5273 		"See also gphoto2.CameraList.sort\n"
5274 		""},
5275 	 { "gp_list_find_by_name", _wrap_gp_list_find_by_name, METH_VARARGS, "\n"
5276 		"gp_list_find_by_name(list, index, name) -> int\n"
5277 		"\n"
5278 		"Parameters\n"
5279 		"----------\n"
5280 		"list: gphoto2.CameraList\n"
5281 		"index: int *\n"
5282 		"name: str\n"
5283 		"\n"
5284 		"Retrieves the `index` of an arbitrary entry with `name`.  \n"
5285 		"\n"
5286 		"Parameters\n"
5287 		"----------\n"
5288 		"* `list` :  \n"
5289 		"    a CameraList  \n"
5290 		"* `index` :  \n"
5291 		"    pointer to the result index (may be NULL, only set if found)  \n"
5292 		"* `name` :  \n"
5293 		"    name of the entry  \n"
5294 		"\n"
5295 		"Returns\n"
5296 		"-------\n"
5297 		"a gphoto2 error code: GP_OK if found.  \n"
5298 		"\n"
5299 		"No guarantees as to the speed of the search, or in what sequence the\n"
5300 		"list is searched.\n"
5301 		"\n"
5302 		"See also gphoto2.CameraList.find_by_name\n"
5303 		""},
5304 	 { "gp_list_get_name", _wrap_gp_list_get_name, METH_VARARGS, "\n"
5305 		"gp_list_get_name(list, index) -> int\n"
5306 		"\n"
5307 		"Parameters\n"
5308 		"----------\n"
5309 		"list: gphoto2.CameraList\n"
5310 		"index: int\n"
5311 		"\n"
5312 		"Retrieves the `name` of entry with `index`.  \n"
5313 		"\n"
5314 		"Parameters\n"
5315 		"----------\n"
5316 		"* `list` :  \n"
5317 		"    a CameraList  \n"
5318 		"* `index` :  \n"
5319 		"    index of the entry  \n"
5320 		"* `name` :  \n"
5321 		"\n"
5322 		"Returns\n"
5323 		"-------\n"
5324 		"a gphoto2 error code.\n"
5325 		"\n"
5326 		"See also gphoto2.CameraList.get_name\n"
5327 		""},
5328 	 { "gp_list_get_value", _wrap_gp_list_get_value, METH_VARARGS, "\n"
5329 		"gp_list_get_value(list, index) -> int\n"
5330 		"\n"
5331 		"Parameters\n"
5332 		"----------\n"
5333 		"list: gphoto2.CameraList\n"
5334 		"index: int\n"
5335 		"\n"
5336 		"Retrieves the value of entry with `index`.  \n"
5337 		"\n"
5338 		"Parameters\n"
5339 		"----------\n"
5340 		"* `list` :  \n"
5341 		"    a CameraList  \n"
5342 		"* `index` :  \n"
5343 		"    index of the entry  \n"
5344 		"* `value` :  \n"
5345 		"\n"
5346 		"Returns\n"
5347 		"-------\n"
5348 		"a gphoto2 error code\n"
5349 		"\n"
5350 		"See also gphoto2.CameraList.get_value\n"
5351 		""},
5352 	 { "gp_list_set_name", _wrap_gp_list_set_name, METH_VARARGS, "\n"
5353 		"gp_list_set_name(list, index, name) -> int\n"
5354 		"\n"
5355 		"Parameters\n"
5356 		"----------\n"
5357 		"list: gphoto2.CameraList\n"
5358 		"index: int\n"
5359 		"name: str\n"
5360 		"\n"
5361 		"Sets the name of an entry.  \n"
5362 		"\n"
5363 		"Parameters\n"
5364 		"----------\n"
5365 		"* `list` :  \n"
5366 		"    a CameraList  \n"
5367 		"* `index` :  \n"
5368 		"    index of entry  \n"
5369 		"* `name` :  \n"
5370 		"    name to be set  \n"
5371 		"\n"
5372 		"Returns\n"
5373 		"-------\n"
5374 		"a gphoto2 error code\n"
5375 		"\n"
5376 		"See also gphoto2.CameraList.set_name\n"
5377 		""},
5378 	 { "gp_list_set_value", _wrap_gp_list_set_value, METH_VARARGS, "\n"
5379 		"gp_list_set_value(list, index, value) -> int\n"
5380 		"\n"
5381 		"Parameters\n"
5382 		"----------\n"
5383 		"list: gphoto2.CameraList\n"
5384 		"index: int\n"
5385 		"value: str\n"
5386 		"\n"
5387 		"Sets the `value` of an entry.  \n"
5388 		"\n"
5389 		"Parameters\n"
5390 		"----------\n"
5391 		"* `list` :  \n"
5392 		"    a CameraList  \n"
5393 		"* `index` :  \n"
5394 		"    index of the entry  \n"
5395 		"* `value` :  \n"
5396 		"    the value to be set  \n"
5397 		"\n"
5398 		"Returns\n"
5399 		"-------\n"
5400 		"a gphoto2 error code\n"
5401 		"\n"
5402 		"See also gphoto2.CameraList.set_value\n"
5403 		""},
5404 	 { "gp_list_populate", _wrap_gp_list_populate, METH_VARARGS, "\n"
5405 		"gp_list_populate(list, format, count) -> int\n"
5406 		"\n"
5407 		"Parameters\n"
5408 		"----------\n"
5409 		"list: gphoto2.CameraList\n"
5410 		"format: str\n"
5411 		"count: int\n"
5412 		"\n"
5413 		"Adds `count` entries to the list.  \n"
5414 		"\n"
5415 		"Parameters\n"
5416 		"----------\n"
5417 		"* `list` :  \n"
5418 		"    a CameraList  \n"
5419 		"* `format` :  \n"
5420 		"    the format  \n"
5421 		"* `count` :  \n"
5422 		"    number of entries to be added to the list return a gphoto2 error\n"
5423 		"    code  \n"
5424 		"\n"
5425 		"Typically, this function is called by a camera driver when there is no\n"
5426 		"way of retrieving the real name of a picture. In this case, when asked\n"
5427 		"for a file list (see #CameraFilesystemListFunc), the list is populated\n"
5428 		"with dummy names generated by this function.\n"
5429 		"\n"
5430 		"See also gphoto2.CameraList.populate\n"
5431 		""},
5432 	 { NULL, NULL, 0, NULL }
5433 };
5434 
5435 static SwigPyGetSet CameraList___dict___getset = { SwigPyObject_get___dict__, 0 };
5436 SWIGINTERN PyGetSetDef SwigPyBuiltin___CameraList_getset[] = {
5437     { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"__len__", &CameraList___dict___getset },
5438     { NULL, NULL, NULL, NULL, NULL } /* Sentinel */
5439 };
5440 
5441 SWIGINTERN PyObject *
SwigPyBuiltin___CameraList_richcompare(PyObject * self,PyObject * other,int op)5442 SwigPyBuiltin___CameraList_richcompare(PyObject *self, PyObject *other, int op) {
5443   PyObject *result = NULL;
5444   PyObject *tuple = PyTuple_New(1);
5445   assert(tuple);
5446   PyTuple_SET_ITEM(tuple, 0, other);
5447   Py_XINCREF(other);
5448   if (!result) {
5449     if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) {
5450       result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op);
5451     } else {
5452       result = Py_NotImplemented;
5453       Py_INCREF(result);
5454     }
5455   }
5456   Py_DECREF(tuple);
5457   return result;
5458 }
5459 
5460 SWIGINTERN PyMethodDef SwigPyBuiltin___CameraList_methods[] = {
5461   { "__len__", _wrap_CameraList___len__, METH_VARARGS, "__len__(self) -> int" },
5462   { "__getitem__", _wrap_CameraList___getitem__, METH_VARARGS, "\n"
5463 		"__getitem__(self, idx) -> PyObject *\n"
5464 		"\n"
5465 		"Parameters\n"
5466 		"----------\n"
5467 		"idx: int\n"
5468 		"\n"
5469 		"" },
5470   { "count", _wrap_CameraList_count, METH_VARARGS, "\n"
5471 		"count(self) -> int\n"
5472 		"Counts the entries in the `list`.  \n"
5473 		"\n"
5474 		"Parameters\n"
5475 		"----------\n"
5476 		"* `list` :  \n"
5477 		"    a CameraList  \n"
5478 		"\n"
5479 		"Returns\n"
5480 		"-------\n"
5481 		"a gphoto2 error code\n"
5482 		"\n"
5483 		"See also gphoto2.gp_list_count\n"
5484 		"" },
5485   { "append", _wrap_CameraList_append, METH_VARARGS, "\n"
5486 		"append(self, name, value)\n"
5487 		"\n"
5488 		"Parameters\n"
5489 		"----------\n"
5490 		"name: str\n"
5491 		"value: str\n"
5492 		"\n"
5493 		"Appends `name` and `value` to the `list`.  \n"
5494 		"\n"
5495 		"Parameters\n"
5496 		"----------\n"
5497 		"* `list` :  \n"
5498 		"    a CameraList  \n"
5499 		"* `name` :  \n"
5500 		"    the name of the entry to append  \n"
5501 		"* `value` :  \n"
5502 		"    the value of the entry to append  \n"
5503 		"\n"
5504 		"Returns\n"
5505 		"-------\n"
5506 		"a gphoto2 error code\n"
5507 		"\n"
5508 		"See also gphoto2.gp_list_append\n"
5509 		"" },
5510   { "reset", _wrap_CameraList_reset, METH_VARARGS, "\n"
5511 		"reset(self)\n"
5512 		"Resets the `list` and removes all entries.  \n"
5513 		"\n"
5514 		"Parameters\n"
5515 		"----------\n"
5516 		"* `list` :  \n"
5517 		"    a CameraList  \n"
5518 		"\n"
5519 		"Returns\n"
5520 		"-------\n"
5521 		"a gphoto2 error code\n"
5522 		"\n"
5523 		"See also gphoto2.gp_list_reset\n"
5524 		"" },
5525   { "sort", _wrap_CameraList_sort, METH_VARARGS, "\n"
5526 		"sort(self)\n"
5527 		"Sorts the `list` entries with respect to the names.  \n"
5528 		"\n"
5529 		"Parameters\n"
5530 		"----------\n"
5531 		"* `list` :  \n"
5532 		"    a CameraList  \n"
5533 		"\n"
5534 		"Returns\n"
5535 		"-------\n"
5536 		"a gphoto2 error code\n"
5537 		"\n"
5538 		"See also gphoto2.gp_list_sort\n"
5539 		"" },
5540   { "find_by_name", _wrap_CameraList_find_by_name, METH_VARARGS, "\n"
5541 		"find_by_name(self, index, name)\n"
5542 		"\n"
5543 		"Parameters\n"
5544 		"----------\n"
5545 		"index: int *\n"
5546 		"name: str\n"
5547 		"\n"
5548 		"Retrieves the `index` of an arbitrary entry with `name`.  \n"
5549 		"\n"
5550 		"Parameters\n"
5551 		"----------\n"
5552 		"* `list` :  \n"
5553 		"    a CameraList  \n"
5554 		"* `index` :  \n"
5555 		"    pointer to the result index (may be NULL, only set if found)  \n"
5556 		"* `name` :  \n"
5557 		"    name of the entry  \n"
5558 		"\n"
5559 		"Returns\n"
5560 		"-------\n"
5561 		"a gphoto2 error code: GP_OK if found.  \n"
5562 		"\n"
5563 		"No guarantees as to the speed of the search, or in what sequence the\n"
5564 		"list is searched.\n"
5565 		"\n"
5566 		"See also gphoto2.gp_list_find_by_name\n"
5567 		"" },
5568   { "get_name", _wrap_CameraList_get_name, METH_VARARGS, "\n"
5569 		"get_name(self, index)\n"
5570 		"\n"
5571 		"Parameters\n"
5572 		"----------\n"
5573 		"index: int\n"
5574 		"\n"
5575 		"Retrieves the `name` of entry with `index`.  \n"
5576 		"\n"
5577 		"Parameters\n"
5578 		"----------\n"
5579 		"* `list` :  \n"
5580 		"    a CameraList  \n"
5581 		"* `index` :  \n"
5582 		"    index of the entry  \n"
5583 		"* `name` :  \n"
5584 		"\n"
5585 		"Returns\n"
5586 		"-------\n"
5587 		"a gphoto2 error code.\n"
5588 		"\n"
5589 		"See also gphoto2.gp_list_get_name\n"
5590 		"" },
5591   { "get_value", _wrap_CameraList_get_value, METH_VARARGS, "\n"
5592 		"get_value(self, index)\n"
5593 		"\n"
5594 		"Parameters\n"
5595 		"----------\n"
5596 		"index: int\n"
5597 		"\n"
5598 		"Retrieves the value of entry with `index`.  \n"
5599 		"\n"
5600 		"Parameters\n"
5601 		"----------\n"
5602 		"* `list` :  \n"
5603 		"    a CameraList  \n"
5604 		"* `index` :  \n"
5605 		"    index of the entry  \n"
5606 		"* `value` :  \n"
5607 		"\n"
5608 		"Returns\n"
5609 		"-------\n"
5610 		"a gphoto2 error code\n"
5611 		"\n"
5612 		"See also gphoto2.gp_list_get_value\n"
5613 		"" },
5614   { "set_name", _wrap_CameraList_set_name, METH_VARARGS, "\n"
5615 		"set_name(self, index, name)\n"
5616 		"\n"
5617 		"Parameters\n"
5618 		"----------\n"
5619 		"index: int\n"
5620 		"name: str\n"
5621 		"\n"
5622 		"Sets the name of an entry.  \n"
5623 		"\n"
5624 		"Parameters\n"
5625 		"----------\n"
5626 		"* `list` :  \n"
5627 		"    a CameraList  \n"
5628 		"* `index` :  \n"
5629 		"    index of entry  \n"
5630 		"* `name` :  \n"
5631 		"    name to be set  \n"
5632 		"\n"
5633 		"Returns\n"
5634 		"-------\n"
5635 		"a gphoto2 error code\n"
5636 		"\n"
5637 		"See also gphoto2.gp_list_set_name\n"
5638 		"" },
5639   { "set_value", _wrap_CameraList_set_value, METH_VARARGS, "\n"
5640 		"set_value(self, index, value)\n"
5641 		"\n"
5642 		"Parameters\n"
5643 		"----------\n"
5644 		"index: int\n"
5645 		"value: str\n"
5646 		"\n"
5647 		"Sets the `value` of an entry.  \n"
5648 		"\n"
5649 		"Parameters\n"
5650 		"----------\n"
5651 		"* `list` :  \n"
5652 		"    a CameraList  \n"
5653 		"* `index` :  \n"
5654 		"    index of the entry  \n"
5655 		"* `value` :  \n"
5656 		"    the value to be set  \n"
5657 		"\n"
5658 		"Returns\n"
5659 		"-------\n"
5660 		"a gphoto2 error code\n"
5661 		"\n"
5662 		"See also gphoto2.gp_list_set_value\n"
5663 		"" },
5664   { "populate", _wrap_CameraList_populate, METH_VARARGS, "\n"
5665 		"populate(self, format, count)\n"
5666 		"\n"
5667 		"Parameters\n"
5668 		"----------\n"
5669 		"format: str\n"
5670 		"count: int\n"
5671 		"\n"
5672 		"Adds `count` entries to the list.  \n"
5673 		"\n"
5674 		"Parameters\n"
5675 		"----------\n"
5676 		"* `list` :  \n"
5677 		"    a CameraList  \n"
5678 		"* `format` :  \n"
5679 		"    the format  \n"
5680 		"* `count` :  \n"
5681 		"    number of entries to be added to the list return a gphoto2 error\n"
5682 		"    code  \n"
5683 		"\n"
5684 		"Typically, this function is called by a camera driver when there is no\n"
5685 		"way of retrieving the real name of a picture. In this case, when asked\n"
5686 		"for a file list (see #CameraFilesystemListFunc), the list is populated\n"
5687 		"with dummy names generated by this function.\n"
5688 		"\n"
5689 		"See also gphoto2.gp_list_populate\n"
5690 		"" },
5691   { NULL, NULL, 0, NULL } /* Sentinel */
5692 };
5693 
5694 static PyHeapTypeObject SwigPyBuiltin___CameraList_type = {
5695   {
5696 #if PY_VERSION_HEX >= 0x03000000
5697     PyVarObject_HEAD_INIT(NULL, 0)
5698 #else
5699     PyObject_HEAD_INIT(NULL)
5700     0,                                        /* ob_size */
5701 #endif
5702     "gphoto2.list.CameraList",                /* tp_name */
5703     sizeof(SwigPyObject),                     /* tp_basicsize */
5704     0,                                        /* tp_itemsize */
5705     _wrap_delete_CameraList_destructor_closure,                   /* tp_dealloc */
5706     (printfunc) 0,                            /* tp_print */
5707     (getattrfunc) 0,                          /* tp_getattr */
5708     (setattrfunc) 0,                          /* tp_setattr */
5709 #if PY_VERSION_HEX >= 0x03000000
5710     0,                                        /* tp_compare */
5711 #else
5712     (cmpfunc) 0,                              /* tp_compare */
5713 #endif
5714     (reprfunc) 0,                             /* tp_repr */
5715     &SwigPyBuiltin___CameraList_type.as_number,                   /* tp_as_number */
5716     &SwigPyBuiltin___CameraList_type.as_sequence,                 /* tp_as_sequence */
5717     &SwigPyBuiltin___CameraList_type.as_mapping,                  /* tp_as_mapping */
5718     SwigPyObject_hash,                        /* tp_hash */
5719     (ternaryfunc) 0,                          /* tp_call */
5720     (reprfunc) 0,                             /* tp_str */
5721     (getattrofunc) 0,                         /* tp_getattro */
5722     (setattrofunc) 0,                         /* tp_setattro */
5723     &SwigPyBuiltin___CameraList_type.as_buffer,                   /* tp_as_buffer */
5724 #if PY_VERSION_HEX >= 0x03000000
5725     Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE,   /* tp_flags */
5726 #else
5727     Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */
5728 #endif
5729     "::_CameraList",                          /* tp_doc */
5730     (traverseproc) 0,                         /* tp_traverse */
5731     (inquiry) 0,                              /* tp_clear */
5732     SwigPyBuiltin___CameraList_richcompare,   /* tp_richcompare */
5733     0,                                        /* tp_weaklistoffset */
5734     (getiterfunc) 0,                          /* tp_iter */
5735     (iternextfunc) 0,                         /* tp_iternext */
5736     SwigPyBuiltin___CameraList_methods,       /* tp_methods */
5737     0,                                        /* tp_members */
5738     SwigPyBuiltin___CameraList_getset,        /* tp_getset */
5739     0,                                        /* tp_base */
5740     0,                                        /* tp_dict */
5741     (descrgetfunc) 0,                         /* tp_descr_get */
5742     (descrsetfunc) 0,                         /* tp_descr_set */
5743     offsetof(SwigPyObject, dict),             /* tp_dictoffset */
5744     _wrap_new_CameraList,                     /* tp_init */
5745     (allocfunc) 0,                            /* tp_alloc */
5746     (newfunc) 0,                              /* tp_new */
5747     (freefunc) 0,                             /* tp_free */
5748     (inquiry) 0,                              /* tp_is_gc */
5749     (PyObject *) 0,                           /* tp_bases */
5750     (PyObject *) 0,                           /* tp_mro */
5751     (PyObject *) 0,                           /* tp_cache */
5752     (PyObject *) 0,                           /* tp_subclasses */
5753     (PyObject *) 0,                           /* tp_weaklist */
5754     (destructor) 0,                           /* tp_del */
5755     (int) 0,                                  /* tp_version_tag */
5756 #if PY_VERSION_HEX >= 0x03040000
5757     (destructor) 0,                           /* tp_finalize */
5758 #endif
5759 #if PY_VERSION_HEX >= 0x03080000
5760     (vectorcallfunc) 0,                       /* tp_vectorcall */
5761 #endif
5762 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
5763     0,                                        /* tp_print */
5764 #endif
5765 #ifdef COUNT_ALLOCS
5766     (Py_ssize_t) 0,                           /* tp_allocs */
5767     (Py_ssize_t) 0,                           /* tp_frees */
5768     (Py_ssize_t) 0,                           /* tp_maxalloc */
5769     0,                                        /* tp_prev */
5770     0,                                        /* tp_next */
5771 #endif
5772   },
5773 #if PY_VERSION_HEX >= 0x03050000
5774   {
5775     (unaryfunc) 0,                            /* am_await */
5776     (unaryfunc) 0,                            /* am_aiter */
5777     (unaryfunc) 0,                            /* am_anext */
5778   },
5779 #endif
5780   {
5781     (binaryfunc) 0,                           /* nb_add */
5782     (binaryfunc) 0,                           /* nb_subtract */
5783     (binaryfunc) 0,                           /* nb_multiply */
5784 #if PY_VERSION_HEX < 0x03000000
5785     (binaryfunc) 0,                           /* nb_divide */
5786 #endif
5787     (binaryfunc) 0,                           /* nb_remainder */
5788     (binaryfunc) 0,                           /* nb_divmod */
5789     (ternaryfunc) 0,                          /* nb_power */
5790     (unaryfunc) 0,                            /* nb_negative */
5791     (unaryfunc) 0,                            /* nb_positive */
5792     (unaryfunc) 0,                            /* nb_absolute */
5793     (inquiry) 0,                              /* nb_nonzero */
5794     (unaryfunc) 0,                            /* nb_invert */
5795     (binaryfunc) 0,                           /* nb_lshift */
5796     (binaryfunc) 0,                           /* nb_rshift */
5797     (binaryfunc) 0,                           /* nb_and */
5798     (binaryfunc) 0,                           /* nb_xor */
5799     (binaryfunc) 0,                           /* nb_or */
5800 #if PY_VERSION_HEX < 0x03000000
5801     (coercion) 0,                             /* nb_coerce */
5802 #endif
5803     (unaryfunc) 0,                            /* nb_int */
5804 #if PY_VERSION_HEX >= 0x03000000
5805     (void *) 0,                               /* nb_reserved */
5806 #else
5807     (unaryfunc) 0,                            /* nb_long */
5808 #endif
5809     (unaryfunc) 0,                            /* nb_float */
5810 #if PY_VERSION_HEX < 0x03000000
5811     (unaryfunc) 0,                            /* nb_oct */
5812     (unaryfunc) 0,                            /* nb_hex */
5813 #endif
5814     (binaryfunc) 0,                           /* nb_inplace_add */
5815     (binaryfunc) 0,                           /* nb_inplace_subtract */
5816     (binaryfunc) 0,                           /* nb_inplace_multiply */
5817 #if PY_VERSION_HEX < 0x03000000
5818     (binaryfunc) 0,                           /* nb_inplace_divide */
5819 #endif
5820     (binaryfunc) 0,                           /* nb_inplace_remainder */
5821     (ternaryfunc) 0,                          /* nb_inplace_power */
5822     (binaryfunc) 0,                           /* nb_inplace_lshift */
5823     (binaryfunc) 0,                           /* nb_inplace_rshift */
5824     (binaryfunc) 0,                           /* nb_inplace_and */
5825     (binaryfunc) 0,                           /* nb_inplace_xor */
5826     (binaryfunc) 0,                           /* nb_inplace_or */
5827     (binaryfunc) 0,                           /* nb_floor_divide */
5828     (binaryfunc) 0,                           /* nb_true_divide */
5829     (binaryfunc) 0,                           /* nb_inplace_floor_divide */
5830     (binaryfunc) 0,                           /* nb_inplace_true_divide */
5831     (unaryfunc) 0,                            /* nb_index */
5832 #if PY_VERSION_HEX >= 0x03050000
5833     (binaryfunc) 0,                           /* nb_matrix_multiply */
5834     (binaryfunc) 0,                           /* nb_inplace_matrix_multiply */
5835 #endif
5836   },
5837   {
5838     (lenfunc) 0,                              /* mp_length */
5839     (binaryfunc) 0,                           /* mp_subscript */
5840     (objobjargproc) 0,                        /* mp_ass_subscript */
5841   },
5842   {
5843     _wrap_CameraList___len___lenfunc_closure, /* sq_length */
5844     (binaryfunc) 0,                           /* sq_concat */
5845     (ssizeargfunc) 0,                         /* sq_repeat */
5846     _wrap_CameraList___getitem___ssizeargfunc_closure,            /* sq_item */
5847 #if PY_VERSION_HEX >= 0x03000000
5848     (void *) 0,                               /* was_sq_slice */
5849 #else
5850     (ssizessizeargfunc) 0,                    /* sq_slice */
5851 #endif
5852     (ssizeobjargproc) 0,                      /* sq_ass_item */
5853 #if PY_VERSION_HEX >= 0x03000000
5854     (void *) 0,                               /* was_sq_ass_slice */
5855 #else
5856     (ssizessizeobjargproc) 0,                 /* sq_ass_slice */
5857 #endif
5858     (objobjproc) 0,                           /* sq_contains */
5859     (binaryfunc) 0,                           /* sq_inplace_concat */
5860     (ssizeargfunc) 0,                         /* sq_inplace_repeat */
5861   },
5862   {
5863 #if PY_VERSION_HEX < 0x03000000
5864     (readbufferproc) 0,                       /* bf_getreadbuffer */
5865     (writebufferproc) 0,                      /* bf_getwritebuffer */
5866     (segcountproc) 0,                         /* bf_getsegcount */
5867     (charbufferproc) 0,                       /* bf_getcharbuffer */
5868 #endif
5869     (getbufferproc) 0,                        /* bf_getbuffer */
5870     (releasebufferproc) 0,                    /* bf_releasebuffer */
5871   },
5872     (PyObject *) 0,                           /* ht_name */
5873     (PyObject *) 0,                           /* ht_slots */
5874 #if PY_VERSION_HEX >= 0x03030000
5875     (PyObject *) 0,                           /* ht_qualname */
5876     0,                                        /* ht_cached_keys */
5877 #endif
5878 };
5879 
5880 SWIGINTERN SwigPyClientData SwigPyBuiltin___CameraList_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin___CameraList_type};
5881 
5882 
5883 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
5884 
5885 static swig_type_info _swigt__p_CameraAbilities = {"_p_CameraAbilities", "CameraAbilities *", 0, 0, (void*)0, 0};
5886 static swig_type_info _swigt__p_CameraCaptureType = {"_p_CameraCaptureType", "enum CameraCaptureType *|CameraCaptureType *", 0, 0, (void*)0, 0};
5887 static swig_type_info _swigt__p_CameraDriverStatus = {"_p_CameraDriverStatus", "enum CameraDriverStatus *|CameraDriverStatus *", 0, 0, (void*)0, 0};
5888 static swig_type_info _swigt__p_CameraEventType = {"_p_CameraEventType", "enum CameraEventType *|CameraEventType *", 0, 0, (void*)0, 0};
5889 static swig_type_info _swigt__p_CameraFileAccessType = {"_p_CameraFileAccessType", "enum CameraFileAccessType *|CameraFileAccessType *", 0, 0, (void*)0, 0};
5890 static swig_type_info _swigt__p_CameraFileInfoFields = {"_p_CameraFileInfoFields", "enum CameraFileInfoFields *|CameraFileInfoFields *", 0, 0, (void*)0, 0};
5891 static swig_type_info _swigt__p_CameraFileOperation = {"_p_CameraFileOperation", "enum CameraFileOperation *|CameraFileOperation *", 0, 0, (void*)0, 0};
5892 static swig_type_info _swigt__p_CameraFilePath = {"_p_CameraFilePath", "CameraFilePath *", 0, 0, (void*)0, 0};
5893 static swig_type_info _swigt__p_CameraFilePermissions = {"_p_CameraFilePermissions", "enum CameraFilePermissions *|CameraFilePermissions *", 0, 0, (void*)0, 0};
5894 static swig_type_info _swigt__p_CameraFileStatus = {"_p_CameraFileStatus", "enum CameraFileStatus *|CameraFileStatus *", 0, 0, (void*)0, 0};
5895 static swig_type_info _swigt__p_CameraFileType = {"_p_CameraFileType", "enum CameraFileType *|CameraFileType *", 0, 0, (void*)0, 0};
5896 static swig_type_info _swigt__p_CameraFolderOperation = {"_p_CameraFolderOperation", "enum CameraFolderOperation *|CameraFolderOperation *", 0, 0, (void*)0, 0};
5897 static swig_type_info _swigt__p_CameraOperation = {"_p_CameraOperation", "enum CameraOperation *|CameraOperation *", 0, 0, (void*)0, 0};
5898 static swig_type_info _swigt__p_CameraStorageAccessType = {"_p_CameraStorageAccessType", "enum CameraStorageAccessType *|CameraStorageAccessType *", 0, 0, (void*)0, 0};
5899 static swig_type_info _swigt__p_CameraStorageFilesystemType = {"_p_CameraStorageFilesystemType", "enum CameraStorageFilesystemType *|CameraStorageFilesystemType *", 0, 0, (void*)0, 0};
5900 static swig_type_info _swigt__p_CameraStorageInfoFields = {"_p_CameraStorageInfoFields", "enum CameraStorageInfoFields *|CameraStorageInfoFields *", 0, 0, (void*)0, 0};
5901 static swig_type_info _swigt__p_CameraStorageType = {"_p_CameraStorageType", "enum CameraStorageType *|CameraStorageType *", 0, 0, (void*)0, 0};
5902 static swig_type_info _swigt__p_CameraText = {"_p_CameraText", "CameraText *", 0, 0, (void*)0, 0};
5903 static swig_type_info _swigt__p_CameraWidgetType = {"_p_CameraWidgetType", "enum CameraWidgetType *|CameraWidgetType *", 0, 0, (void*)0, 0};
5904 static swig_type_info _swigt__p_GPLogLevel = {"_p_GPLogLevel", "enum GPLogLevel *|GPLogLevel *", 0, 0, (void*)0, 0};
5905 static swig_type_info _swigt__p_GPPortType = {"_p_GPPortType", "enum GPPortType *|GPPortType *", 0, 0, (void*)0, 0};
5906 static swig_type_info _swigt__p_GPVersionVerbosity = {"_p_GPVersionVerbosity", "enum GPVersionVerbosity *|GPVersionVerbosity *", 0, 0, (void*)0, 0};
5907 static swig_type_info _swigt__p_GphotoDeviceType = {"_p_GphotoDeviceType", "enum GphotoDeviceType *|GphotoDeviceType *", 0, 0, (void*)0, 0};
5908 static swig_type_info _swigt__p_SwigPyObject = {"_p_SwigPyObject", "SwigPyObject *", 0, 0, (void*)0, 0};
5909 static swig_type_info _swigt__p__Camera = {"_p__Camera", "struct _Camera *|Camera *", 0, 0, (void*)0, 0};
5910 static swig_type_info _swigt__p__CameraAbilitiesList = {"_p__CameraAbilitiesList", "struct _CameraAbilitiesList *|CameraAbilitiesList *", 0, 0, (void*)0, 0};
5911 static swig_type_info _swigt__p__CameraFile = {"_p__CameraFile", "struct _CameraFile *|CameraFile *", 0, 0, (void*)0, 0};
5912 static swig_type_info _swigt__p__CameraFileHandler = {"_p__CameraFileHandler", "struct _CameraFileHandler *|CameraFileHandler *", 0, 0, (void*)0, 0};
5913 static swig_type_info _swigt__p__CameraFileInfo = {"_p__CameraFileInfo", "struct _CameraFileInfo *|CameraFileInfo *", 0, 0, (void*)0, 0};
5914 static swig_type_info _swigt__p__CameraFileInfoAudio = {"_p__CameraFileInfoAudio", "struct _CameraFileInfoAudio *|CameraFileInfoAudio *", 0, 0, (void*)0, 0};
5915 static swig_type_info _swigt__p__CameraFileInfoFile = {"_p__CameraFileInfoFile", "struct _CameraFileInfoFile *|CameraFileInfoFile *", 0, 0, (void*)0, 0};
5916 static swig_type_info _swigt__p__CameraFileInfoPreview = {"_p__CameraFileInfoPreview", "struct _CameraFileInfoPreview *|CameraFileInfoPreview *", 0, 0, (void*)0, 0};
5917 static swig_type_info _swigt__p__CameraFilesystem = {"_p__CameraFilesystem", "struct _CameraFilesystem *|CameraFilesystem *", 0, 0, (void*)0, 0};
5918 static swig_type_info _swigt__p__CameraFilesystemFuncs = {"_p__CameraFilesystemFuncs", "struct _CameraFilesystemFuncs *|CameraFilesystemFuncs *", 0, 0, (void*)0, 0};
5919 static swig_type_info _swigt__p__CameraFunctions = {"_p__CameraFunctions", "struct _CameraFunctions *|CameraFunctions *", 0, 0, (void*)0, 0};
5920 static swig_type_info _swigt__p__CameraList = {"_p__CameraList", "struct _CameraList *|_CameraList *|CameraList *", 0, 0, (void*)&SwigPyBuiltin___CameraList_clientdata, 0};
5921 static swig_type_info _swigt__p__CameraPrivateCore = {"_p__CameraPrivateCore", "struct _CameraPrivateCore *|CameraPrivateCore *", 0, 0, (void*)0, 0};
5922 static swig_type_info _swigt__p__CameraPrivateLibrary = {"_p__CameraPrivateLibrary", "struct _CameraPrivateLibrary *|CameraPrivateLibrary *", 0, 0, (void*)0, 0};
5923 static swig_type_info _swigt__p__CameraStorageInformation = {"_p__CameraStorageInformation", "struct _CameraStorageInformation *|CameraStorageInformation *", 0, 0, (void*)0, 0};
5924 static swig_type_info _swigt__p__CameraWidget = {"_p__CameraWidget", "struct _CameraWidget *|CameraWidget *", 0, 0, (void*)0, 0};
5925 static swig_type_info _swigt__p__GPContext = {"_p__GPContext", "struct _GPContext *|GPContext *", 0, 0, (void*)0, 0};
5926 static swig_type_info _swigt__p__GPContextFeedback = {"_p__GPContextFeedback", "enum _GPContextFeedback *|GPContextFeedback *", 0, 0, (void*)0, 0};
5927 static swig_type_info _swigt__p__GPPortInfoList = {"_p__GPPortInfoList", "struct _GPPortInfoList *|GPPortInfoList *", 0, 0, (void*)0, 0};
5928 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
5929 static swig_type_info _swigt__p_int = {"_p_int", "intptr_t *|int *|int_least32_t *|int_fast32_t *|int32_t *|int_fast16_t *", 0, 0, (void*)0, 0};
5930 static swig_type_info _swigt__p_long = {"_p_long", "long *|time_t *", 0, 0, (void*)0, 0};
5931 static swig_type_info _swigt__p_long_long = {"_p_long_long", "int_least64_t *|int_fast64_t *|int64_t *|long long *|intmax_t *", 0, 0, (void*)0, 0};
5932 static swig_type_info _swigt__p_p__CameraList = {"_p_p__CameraList", "struct _CameraList **|CameraList **", 0, 0, (void*)0, 0};
5933 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
5934 static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
5935 static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0};
5936 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0};
5937 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uintptr_t *|uint_least32_t *|uint_fast32_t *|uint32_t *|unsigned int *|uint_fast16_t *", 0, 0, (void*)0, 0};
5938 static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint_least64_t *|uint_fast64_t *|uint64_t *|unsigned long long *|uintmax_t *", 0, 0, (void*)0, 0};
5939 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
5940 
5941 static swig_type_info *swig_type_initial[] = {
5942   &_swigt__p_CameraAbilities,
5943   &_swigt__p_CameraCaptureType,
5944   &_swigt__p_CameraDriverStatus,
5945   &_swigt__p_CameraEventType,
5946   &_swigt__p_CameraFileAccessType,
5947   &_swigt__p_CameraFileInfoFields,
5948   &_swigt__p_CameraFileOperation,
5949   &_swigt__p_CameraFilePath,
5950   &_swigt__p_CameraFilePermissions,
5951   &_swigt__p_CameraFileStatus,
5952   &_swigt__p_CameraFileType,
5953   &_swigt__p_CameraFolderOperation,
5954   &_swigt__p_CameraOperation,
5955   &_swigt__p_CameraStorageAccessType,
5956   &_swigt__p_CameraStorageFilesystemType,
5957   &_swigt__p_CameraStorageInfoFields,
5958   &_swigt__p_CameraStorageType,
5959   &_swigt__p_CameraText,
5960   &_swigt__p_CameraWidgetType,
5961   &_swigt__p_GPLogLevel,
5962   &_swigt__p_GPPortType,
5963   &_swigt__p_GPVersionVerbosity,
5964   &_swigt__p_GphotoDeviceType,
5965   &_swigt__p_SwigPyObject,
5966   &_swigt__p__Camera,
5967   &_swigt__p__CameraAbilitiesList,
5968   &_swigt__p__CameraFile,
5969   &_swigt__p__CameraFileHandler,
5970   &_swigt__p__CameraFileInfo,
5971   &_swigt__p__CameraFileInfoAudio,
5972   &_swigt__p__CameraFileInfoFile,
5973   &_swigt__p__CameraFileInfoPreview,
5974   &_swigt__p__CameraFilesystem,
5975   &_swigt__p__CameraFilesystemFuncs,
5976   &_swigt__p__CameraFunctions,
5977   &_swigt__p__CameraList,
5978   &_swigt__p__CameraPrivateCore,
5979   &_swigt__p__CameraPrivateLibrary,
5980   &_swigt__p__CameraStorageInformation,
5981   &_swigt__p__CameraWidget,
5982   &_swigt__p__GPContext,
5983   &_swigt__p__GPContextFeedback,
5984   &_swigt__p__GPPortInfoList,
5985   &_swigt__p_char,
5986   &_swigt__p_int,
5987   &_swigt__p_long,
5988   &_swigt__p_long_long,
5989   &_swigt__p_p__CameraList,
5990   &_swigt__p_p_char,
5991   &_swigt__p_short,
5992   &_swigt__p_signed_char,
5993   &_swigt__p_unsigned_char,
5994   &_swigt__p_unsigned_int,
5995   &_swigt__p_unsigned_long_long,
5996   &_swigt__p_unsigned_short,
5997 };
5998 
5999 static swig_cast_info _swigc__p_CameraAbilities[] = {  {&_swigt__p_CameraAbilities, 0, 0, 0},{0, 0, 0, 0}};
6000 static swig_cast_info _swigc__p_CameraCaptureType[] = {  {&_swigt__p_CameraCaptureType, 0, 0, 0},{0, 0, 0, 0}};
6001 static swig_cast_info _swigc__p_CameraDriverStatus[] = {  {&_swigt__p_CameraDriverStatus, 0, 0, 0},{0, 0, 0, 0}};
6002 static swig_cast_info _swigc__p_CameraEventType[] = {  {&_swigt__p_CameraEventType, 0, 0, 0},{0, 0, 0, 0}};
6003 static swig_cast_info _swigc__p_CameraFileAccessType[] = {  {&_swigt__p_CameraFileAccessType, 0, 0, 0},{0, 0, 0, 0}};
6004 static swig_cast_info _swigc__p_CameraFileInfoFields[] = {  {&_swigt__p_CameraFileInfoFields, 0, 0, 0},{0, 0, 0, 0}};
6005 static swig_cast_info _swigc__p_CameraFileOperation[] = {  {&_swigt__p_CameraFileOperation, 0, 0, 0},{0, 0, 0, 0}};
6006 static swig_cast_info _swigc__p_CameraFilePath[] = {  {&_swigt__p_CameraFilePath, 0, 0, 0},{0, 0, 0, 0}};
6007 static swig_cast_info _swigc__p_CameraFilePermissions[] = {  {&_swigt__p_CameraFilePermissions, 0, 0, 0},{0, 0, 0, 0}};
6008 static swig_cast_info _swigc__p_CameraFileStatus[] = {  {&_swigt__p_CameraFileStatus, 0, 0, 0},{0, 0, 0, 0}};
6009 static swig_cast_info _swigc__p_CameraFileType[] = {  {&_swigt__p_CameraFileType, 0, 0, 0},{0, 0, 0, 0}};
6010 static swig_cast_info _swigc__p_CameraFolderOperation[] = {  {&_swigt__p_CameraFolderOperation, 0, 0, 0},{0, 0, 0, 0}};
6011 static swig_cast_info _swigc__p_CameraOperation[] = {  {&_swigt__p_CameraOperation, 0, 0, 0},{0, 0, 0, 0}};
6012 static swig_cast_info _swigc__p_CameraStorageAccessType[] = {  {&_swigt__p_CameraStorageAccessType, 0, 0, 0},{0, 0, 0, 0}};
6013 static swig_cast_info _swigc__p_CameraStorageFilesystemType[] = {  {&_swigt__p_CameraStorageFilesystemType, 0, 0, 0},{0, 0, 0, 0}};
6014 static swig_cast_info _swigc__p_CameraStorageInfoFields[] = {  {&_swigt__p_CameraStorageInfoFields, 0, 0, 0},{0, 0, 0, 0}};
6015 static swig_cast_info _swigc__p_CameraStorageType[] = {  {&_swigt__p_CameraStorageType, 0, 0, 0},{0, 0, 0, 0}};
6016 static swig_cast_info _swigc__p_CameraText[] = {  {&_swigt__p_CameraText, 0, 0, 0},{0, 0, 0, 0}};
6017 static swig_cast_info _swigc__p_CameraWidgetType[] = {  {&_swigt__p_CameraWidgetType, 0, 0, 0},{0, 0, 0, 0}};
6018 static swig_cast_info _swigc__p_GPLogLevel[] = {  {&_swigt__p_GPLogLevel, 0, 0, 0},{0, 0, 0, 0}};
6019 static swig_cast_info _swigc__p_GPPortType[] = {  {&_swigt__p_GPPortType, 0, 0, 0},{0, 0, 0, 0}};
6020 static swig_cast_info _swigc__p_GPVersionVerbosity[] = {  {&_swigt__p_GPVersionVerbosity, 0, 0, 0},{0, 0, 0, 0}};
6021 static swig_cast_info _swigc__p_GphotoDeviceType[] = {  {&_swigt__p_GphotoDeviceType, 0, 0, 0},{0, 0, 0, 0}};
6022 static swig_cast_info _swigc__p_SwigPyObject[] = {  {&_swigt__p_SwigPyObject, 0, 0, 0},{0, 0, 0, 0}};
6023 static swig_cast_info _swigc__p__Camera[] = {  {&_swigt__p__Camera, 0, 0, 0},{0, 0, 0, 0}};
6024 static swig_cast_info _swigc__p__CameraAbilitiesList[] = {  {&_swigt__p__CameraAbilitiesList, 0, 0, 0},{0, 0, 0, 0}};
6025 static swig_cast_info _swigc__p__CameraFile[] = {  {&_swigt__p__CameraFile, 0, 0, 0},{0, 0, 0, 0}};
6026 static swig_cast_info _swigc__p__CameraFileHandler[] = {  {&_swigt__p__CameraFileHandler, 0, 0, 0},{0, 0, 0, 0}};
6027 static swig_cast_info _swigc__p__CameraFileInfo[] = {  {&_swigt__p__CameraFileInfo, 0, 0, 0},{0, 0, 0, 0}};
6028 static swig_cast_info _swigc__p__CameraFileInfoAudio[] = {  {&_swigt__p__CameraFileInfoAudio, 0, 0, 0},{0, 0, 0, 0}};
6029 static swig_cast_info _swigc__p__CameraFileInfoFile[] = {  {&_swigt__p__CameraFileInfoFile, 0, 0, 0},{0, 0, 0, 0}};
6030 static swig_cast_info _swigc__p__CameraFileInfoPreview[] = {  {&_swigt__p__CameraFileInfoPreview, 0, 0, 0},{0, 0, 0, 0}};
6031 static swig_cast_info _swigc__p__CameraFilesystem[] = {  {&_swigt__p__CameraFilesystem, 0, 0, 0},{0, 0, 0, 0}};
6032 static swig_cast_info _swigc__p__CameraFilesystemFuncs[] = {  {&_swigt__p__CameraFilesystemFuncs, 0, 0, 0},{0, 0, 0, 0}};
6033 static swig_cast_info _swigc__p__CameraFunctions[] = {  {&_swigt__p__CameraFunctions, 0, 0, 0},{0, 0, 0, 0}};
6034 static swig_cast_info _swigc__p__CameraList[] = {  {&_swigt__p__CameraList, 0, 0, 0},{0, 0, 0, 0}};
6035 static swig_cast_info _swigc__p__CameraPrivateCore[] = {  {&_swigt__p__CameraPrivateCore, 0, 0, 0},{0, 0, 0, 0}};
6036 static swig_cast_info _swigc__p__CameraPrivateLibrary[] = {  {&_swigt__p__CameraPrivateLibrary, 0, 0, 0},{0, 0, 0, 0}};
6037 static swig_cast_info _swigc__p__CameraStorageInformation[] = {  {&_swigt__p__CameraStorageInformation, 0, 0, 0},{0, 0, 0, 0}};
6038 static swig_cast_info _swigc__p__CameraWidget[] = {  {&_swigt__p__CameraWidget, 0, 0, 0},{0, 0, 0, 0}};
6039 static swig_cast_info _swigc__p__GPContext[] = {  {&_swigt__p__GPContext, 0, 0, 0},{0, 0, 0, 0}};
6040 static swig_cast_info _swigc__p__GPContextFeedback[] = {  {&_swigt__p__GPContextFeedback, 0, 0, 0},{0, 0, 0, 0}};
6041 static swig_cast_info _swigc__p__GPPortInfoList[] = {  {&_swigt__p__GPPortInfoList, 0, 0, 0},{0, 0, 0, 0}};
6042 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
6043 static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
6044 static swig_cast_info _swigc__p_long[] = {  {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
6045 static swig_cast_info _swigc__p_long_long[] = {  {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
6046 static swig_cast_info _swigc__p_p__CameraList[] = {  {&_swigt__p_p__CameraList, 0, 0, 0},{0, 0, 0, 0}};
6047 static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
6048 static swig_cast_info _swigc__p_short[] = {  {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
6049 static swig_cast_info _swigc__p_signed_char[] = {  {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
6050 static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
6051 static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
6052 static swig_cast_info _swigc__p_unsigned_long_long[] = {  {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
6053 static swig_cast_info _swigc__p_unsigned_short[] = {  {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
6054 
6055 static swig_cast_info *swig_cast_initial[] = {
6056   _swigc__p_CameraAbilities,
6057   _swigc__p_CameraCaptureType,
6058   _swigc__p_CameraDriverStatus,
6059   _swigc__p_CameraEventType,
6060   _swigc__p_CameraFileAccessType,
6061   _swigc__p_CameraFileInfoFields,
6062   _swigc__p_CameraFileOperation,
6063   _swigc__p_CameraFilePath,
6064   _swigc__p_CameraFilePermissions,
6065   _swigc__p_CameraFileStatus,
6066   _swigc__p_CameraFileType,
6067   _swigc__p_CameraFolderOperation,
6068   _swigc__p_CameraOperation,
6069   _swigc__p_CameraStorageAccessType,
6070   _swigc__p_CameraStorageFilesystemType,
6071   _swigc__p_CameraStorageInfoFields,
6072   _swigc__p_CameraStorageType,
6073   _swigc__p_CameraText,
6074   _swigc__p_CameraWidgetType,
6075   _swigc__p_GPLogLevel,
6076   _swigc__p_GPPortType,
6077   _swigc__p_GPVersionVerbosity,
6078   _swigc__p_GphotoDeviceType,
6079   _swigc__p_SwigPyObject,
6080   _swigc__p__Camera,
6081   _swigc__p__CameraAbilitiesList,
6082   _swigc__p__CameraFile,
6083   _swigc__p__CameraFileHandler,
6084   _swigc__p__CameraFileInfo,
6085   _swigc__p__CameraFileInfoAudio,
6086   _swigc__p__CameraFileInfoFile,
6087   _swigc__p__CameraFileInfoPreview,
6088   _swigc__p__CameraFilesystem,
6089   _swigc__p__CameraFilesystemFuncs,
6090   _swigc__p__CameraFunctions,
6091   _swigc__p__CameraList,
6092   _swigc__p__CameraPrivateCore,
6093   _swigc__p__CameraPrivateLibrary,
6094   _swigc__p__CameraStorageInformation,
6095   _swigc__p__CameraWidget,
6096   _swigc__p__GPContext,
6097   _swigc__p__GPContextFeedback,
6098   _swigc__p__GPPortInfoList,
6099   _swigc__p_char,
6100   _swigc__p_int,
6101   _swigc__p_long,
6102   _swigc__p_long_long,
6103   _swigc__p_p__CameraList,
6104   _swigc__p_p_char,
6105   _swigc__p_short,
6106   _swigc__p_signed_char,
6107   _swigc__p_unsigned_char,
6108   _swigc__p_unsigned_int,
6109   _swigc__p_unsigned_long_long,
6110   _swigc__p_unsigned_short,
6111 };
6112 
6113 
6114 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
6115 
6116 static swig_const_info swig_const_table[] = {
6117 {0, 0, 0, 0.0, 0, 0}};
6118 
6119 #ifdef __cplusplus
6120 }
6121 #endif
6122 static PyTypeObject *builtin_bases[2];
6123 
6124 /* -----------------------------------------------------------------------------
6125  * Type initialization:
6126  * This problem is tough by the requirement that no dynamic
6127  * memory is used. Also, since swig_type_info structures store pointers to
6128  * swig_cast_info structures and swig_cast_info structures store pointers back
6129  * to swig_type_info structures, we need some lookup code at initialization.
6130  * The idea is that swig generates all the structures that are needed.
6131  * The runtime then collects these partially filled structures.
6132  * The SWIG_InitializeModule function takes these initial arrays out of
6133  * swig_module, and does all the lookup, filling in the swig_module.types
6134  * array with the correct data and linking the correct swig_cast_info
6135  * structures together.
6136  *
6137  * The generated swig_type_info structures are assigned statically to an initial
6138  * array. We just loop through that array, and handle each type individually.
6139  * First we lookup if this type has been already loaded, and if so, use the
6140  * loaded structure instead of the generated one. Then we have to fill in the
6141  * cast linked list. The cast data is initially stored in something like a
6142  * two-dimensional array. Each row corresponds to a type (there are the same
6143  * number of rows as there are in the swig_type_initial array). Each entry in
6144  * a column is one of the swig_cast_info structures for that type.
6145  * The cast_initial array is actually an array of arrays, because each row has
6146  * a variable number of columns. So to actually build the cast linked list,
6147  * we find the array of casts associated with the type, and loop through it
6148  * adding the casts to the list. The one last trick we need to do is making
6149  * sure the type pointer in the swig_cast_info struct is correct.
6150  *
6151  * First off, we lookup the cast->type name to see if it is already loaded.
6152  * There are three cases to handle:
6153  *  1) If the cast->type has already been loaded AND the type we are adding
6154  *     casting info to has not been loaded (it is in this module), THEN we
6155  *     replace the cast->type pointer with the type pointer that has already
6156  *     been loaded.
6157  *  2) If BOTH types (the one we are adding casting info to, and the
6158  *     cast->type) are loaded, THEN the cast info has already been loaded by
6159  *     the previous module so we just ignore it.
6160  *  3) Finally, if cast->type has not already been loaded, then we add that
6161  *     swig_cast_info to the linked list (because the cast->type) pointer will
6162  *     be correct.
6163  * ----------------------------------------------------------------------------- */
6164 
6165 #ifdef __cplusplus
6166 extern "C" {
6167 #if 0
6168 } /* c-mode */
6169 #endif
6170 #endif
6171 
6172 #if 0
6173 #define SWIGRUNTIME_DEBUG
6174 #endif
6175 
6176 
6177 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)6178 SWIG_InitializeModule(void *clientdata) {
6179   size_t i;
6180   swig_module_info *module_head, *iter;
6181   int init;
6182 
6183   /* check to see if the circular list has been setup, if not, set it up */
6184   if (swig_module.next==0) {
6185     /* Initialize the swig_module */
6186     swig_module.type_initial = swig_type_initial;
6187     swig_module.cast_initial = swig_cast_initial;
6188     swig_module.next = &swig_module;
6189     init = 1;
6190   } else {
6191     init = 0;
6192   }
6193 
6194   /* Try and load any already created modules */
6195   module_head = SWIG_GetModule(clientdata);
6196   if (!module_head) {
6197     /* This is the first module loaded for this interpreter */
6198     /* so set the swig module into the interpreter */
6199     SWIG_SetModule(clientdata, &swig_module);
6200   } else {
6201     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
6202     iter=module_head;
6203     do {
6204       if (iter==&swig_module) {
6205         /* Our module is already in the list, so there's nothing more to do. */
6206         return;
6207       }
6208       iter=iter->next;
6209     } while (iter!= module_head);
6210 
6211     /* otherwise we must add our module into the list */
6212     swig_module.next = module_head->next;
6213     module_head->next = &swig_module;
6214   }
6215 
6216   /* When multiple interpreters are used, a module could have already been initialized in
6217        a different interpreter, but not yet have a pointer in this interpreter.
6218        In this case, we do not want to continue adding types... everything should be
6219        set up already */
6220   if (init == 0) return;
6221 
6222   /* Now work on filling in swig_module.types */
6223 #ifdef SWIGRUNTIME_DEBUG
6224   printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
6225 #endif
6226   for (i = 0; i < swig_module.size; ++i) {
6227     swig_type_info *type = 0;
6228     swig_type_info *ret;
6229     swig_cast_info *cast;
6230 
6231 #ifdef SWIGRUNTIME_DEBUG
6232     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
6233 #endif
6234 
6235     /* if there is another module already loaded */
6236     if (swig_module.next != &swig_module) {
6237       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
6238     }
6239     if (type) {
6240       /* Overwrite clientdata field */
6241 #ifdef SWIGRUNTIME_DEBUG
6242       printf("SWIG_InitializeModule: found type %s\n", type->name);
6243 #endif
6244       if (swig_module.type_initial[i]->clientdata) {
6245         type->clientdata = swig_module.type_initial[i]->clientdata;
6246 #ifdef SWIGRUNTIME_DEBUG
6247         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
6248 #endif
6249       }
6250     } else {
6251       type = swig_module.type_initial[i];
6252     }
6253 
6254     /* Insert casting types */
6255     cast = swig_module.cast_initial[i];
6256     while (cast->type) {
6257       /* Don't need to add information already in the list */
6258       ret = 0;
6259 #ifdef SWIGRUNTIME_DEBUG
6260       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
6261 #endif
6262       if (swig_module.next != &swig_module) {
6263         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
6264 #ifdef SWIGRUNTIME_DEBUG
6265         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
6266 #endif
6267       }
6268       if (ret) {
6269         if (type == swig_module.type_initial[i]) {
6270 #ifdef SWIGRUNTIME_DEBUG
6271           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
6272 #endif
6273           cast->type = ret;
6274           ret = 0;
6275         } else {
6276           /* Check for casting already in the list */
6277           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
6278 #ifdef SWIGRUNTIME_DEBUG
6279           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
6280 #endif
6281           if (!ocast) ret = 0;
6282         }
6283       }
6284 
6285       if (!ret) {
6286 #ifdef SWIGRUNTIME_DEBUG
6287         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
6288 #endif
6289         if (type->cast) {
6290           type->cast->prev = cast;
6291           cast->next = type->cast;
6292         }
6293         type->cast = cast;
6294       }
6295       cast++;
6296     }
6297     /* Set entry in modules->types array equal to the type */
6298     swig_module.types[i] = type;
6299   }
6300   swig_module.types[i] = 0;
6301 
6302 #ifdef SWIGRUNTIME_DEBUG
6303   printf("**** SWIG_InitializeModule: Cast List ******\n");
6304   for (i = 0; i < swig_module.size; ++i) {
6305     int j = 0;
6306     swig_cast_info *cast = swig_module.cast_initial[i];
6307     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
6308     while (cast->type) {
6309       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
6310       cast++;
6311       ++j;
6312     }
6313     printf("---- Total casts: %d\n",j);
6314   }
6315   printf("**** SWIG_InitializeModule: Cast List ******\n");
6316 #endif
6317 }
6318 
6319 /* This function will propagate the clientdata field of type to
6320 * any new swig_type_info structures that have been added into the list
6321 * of equivalent types.  It is like calling
6322 * SWIG_TypeClientData(type, clientdata) a second time.
6323 */
6324 SWIGRUNTIME void
SWIG_PropagateClientData(void)6325 SWIG_PropagateClientData(void) {
6326   size_t i;
6327   swig_cast_info *equiv;
6328   static int init_run = 0;
6329 
6330   if (init_run) return;
6331   init_run = 1;
6332 
6333   for (i = 0; i < swig_module.size; i++) {
6334     if (swig_module.types[i]->clientdata) {
6335       equiv = swig_module.types[i]->cast;
6336       while (equiv) {
6337         if (!equiv->converter) {
6338           if (equiv->type && !equiv->type->clientdata)
6339           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
6340         }
6341         equiv = equiv->next;
6342       }
6343     }
6344   }
6345 }
6346 
6347 #ifdef __cplusplus
6348 #if 0
6349 {
6350   /* c-mode */
6351 #endif
6352 }
6353 #endif
6354 
6355 
6356 
6357 #ifdef __cplusplus
6358 extern "C" {
6359 #endif
6360 
6361   /* Python-specific SWIG API */
6362 #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
6363 #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
6364 #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
6365 
6366   /* -----------------------------------------------------------------------------
6367    * global variable support code.
6368    * ----------------------------------------------------------------------------- */
6369 
6370   typedef struct swig_globalvar {
6371     char       *name;                  /* Name of global variable */
6372     PyObject *(*get_attr)(void);       /* Return the current value */
6373     int       (*set_attr)(PyObject *); /* Set the value */
6374     struct swig_globalvar *next;
6375   } swig_globalvar;
6376 
6377   typedef struct swig_varlinkobject {
6378     PyObject_HEAD
6379     swig_globalvar *vars;
6380   } swig_varlinkobject;
6381 
6382   SWIGINTERN PyObject *
swig_varlink_repr(swig_varlinkobject * SWIGUNUSEDPARM (v))6383   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
6384 #if PY_VERSION_HEX >= 0x03000000
6385     return PyUnicode_InternFromString("<Swig global variables>");
6386 #else
6387     return PyString_FromString("<Swig global variables>");
6388 #endif
6389   }
6390 
6391   SWIGINTERN PyObject *
swig_varlink_str(swig_varlinkobject * v)6392   swig_varlink_str(swig_varlinkobject *v) {
6393 #if PY_VERSION_HEX >= 0x03000000
6394     PyObject *str = PyUnicode_InternFromString("(");
6395     PyObject *tail;
6396     PyObject *joined;
6397     swig_globalvar *var;
6398     for (var = v->vars; var; var=var->next) {
6399       tail = PyUnicode_FromString(var->name);
6400       joined = PyUnicode_Concat(str, tail);
6401       Py_DecRef(str);
6402       Py_DecRef(tail);
6403       str = joined;
6404       if (var->next) {
6405         tail = PyUnicode_InternFromString(", ");
6406         joined = PyUnicode_Concat(str, tail);
6407         Py_DecRef(str);
6408         Py_DecRef(tail);
6409         str = joined;
6410       }
6411     }
6412     tail = PyUnicode_InternFromString(")");
6413     joined = PyUnicode_Concat(str, tail);
6414     Py_DecRef(str);
6415     Py_DecRef(tail);
6416     str = joined;
6417 #else
6418     PyObject *str = PyString_FromString("(");
6419     swig_globalvar *var;
6420     for (var = v->vars; var; var=var->next) {
6421       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
6422       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
6423     }
6424     PyString_ConcatAndDel(&str,PyString_FromString(")"));
6425 #endif
6426     return str;
6427   }
6428 
6429   SWIGINTERN void
swig_varlink_dealloc(swig_varlinkobject * v)6430   swig_varlink_dealloc(swig_varlinkobject *v) {
6431     swig_globalvar *var = v->vars;
6432     while (var) {
6433       swig_globalvar *n = var->next;
6434       free(var->name);
6435       free(var);
6436       var = n;
6437     }
6438   }
6439 
6440   SWIGINTERN PyObject *
swig_varlink_getattr(swig_varlinkobject * v,char * n)6441   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
6442     PyObject *res = NULL;
6443     swig_globalvar *var = v->vars;
6444     while (var) {
6445       if (strcmp(var->name,n) == 0) {
6446         res = (*var->get_attr)();
6447         break;
6448       }
6449       var = var->next;
6450     }
6451     if (res == NULL && !PyErr_Occurred()) {
6452       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
6453     }
6454     return res;
6455   }
6456 
6457   SWIGINTERN int
swig_varlink_setattr(swig_varlinkobject * v,char * n,PyObject * p)6458   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
6459     int res = 1;
6460     swig_globalvar *var = v->vars;
6461     while (var) {
6462       if (strcmp(var->name,n) == 0) {
6463         res = (*var->set_attr)(p);
6464         break;
6465       }
6466       var = var->next;
6467     }
6468     if (res == 1 && !PyErr_Occurred()) {
6469       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
6470     }
6471     return res;
6472   }
6473 
6474   SWIGINTERN PyTypeObject*
swig_varlink_type(void)6475   swig_varlink_type(void) {
6476     static char varlink__doc__[] = "Swig var link object";
6477     static PyTypeObject varlink_type;
6478     static int type_init = 0;
6479     if (!type_init) {
6480       const PyTypeObject tmp = {
6481 #if PY_VERSION_HEX >= 0x03000000
6482         PyVarObject_HEAD_INIT(NULL, 0)
6483 #else
6484         PyObject_HEAD_INIT(NULL)
6485         0,                                  /* ob_size */
6486 #endif
6487         "swigvarlink",                      /* tp_name */
6488         sizeof(swig_varlinkobject),         /* tp_basicsize */
6489         0,                                  /* tp_itemsize */
6490         (destructor) swig_varlink_dealloc,  /* tp_dealloc */
6491         0,                                  /* tp_print */
6492         (getattrfunc) swig_varlink_getattr, /* tp_getattr */
6493         (setattrfunc) swig_varlink_setattr, /* tp_setattr */
6494         0,                                  /* tp_compare */
6495         (reprfunc) swig_varlink_repr,       /* tp_repr */
6496         0,                                  /* tp_as_number */
6497         0,                                  /* tp_as_sequence */
6498         0,                                  /* tp_as_mapping */
6499         0,                                  /* tp_hash */
6500         0,                                  /* tp_call */
6501         (reprfunc) swig_varlink_str,        /* tp_str */
6502         0,                                  /* tp_getattro */
6503         0,                                  /* tp_setattro */
6504         0,                                  /* tp_as_buffer */
6505         0,                                  /* tp_flags */
6506         varlink__doc__,                     /* tp_doc */
6507         0,                                  /* tp_traverse */
6508         0,                                  /* tp_clear */
6509         0,                                  /* tp_richcompare */
6510         0,                                  /* tp_weaklistoffset */
6511         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
6512         0,                                  /* tp_del */
6513         0,                                  /* tp_version_tag */
6514 #if PY_VERSION_HEX >= 0x03040000
6515         0,                                  /* tp_finalize */
6516 #endif
6517 #if PY_VERSION_HEX >= 0x03080000
6518         0,                                  /* tp_vectorcall */
6519 #endif
6520 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
6521         0,                                  /* tp_print */
6522 #endif
6523 #ifdef COUNT_ALLOCS
6524         0,                                  /* tp_allocs */
6525         0,                                  /* tp_frees */
6526         0,                                  /* tp_maxalloc */
6527         0,                                  /* tp_prev */
6528         0                                   /* tp_next */
6529 #endif
6530       };
6531       varlink_type = tmp;
6532       type_init = 1;
6533       if (PyType_Ready(&varlink_type) < 0)
6534       return NULL;
6535     }
6536     return &varlink_type;
6537   }
6538 
6539   /* Create a variable linking object for use later */
6540   SWIGINTERN PyObject *
SWIG_Python_newvarlink(void)6541   SWIG_Python_newvarlink(void) {
6542     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
6543     if (result) {
6544       result->vars = 0;
6545     }
6546     return ((PyObject*) result);
6547   }
6548 
6549   SWIGINTERN void
SWIG_Python_addvarlink(PyObject * p,const char * name,PyObject * (* get_attr)(void),int (* set_attr)(PyObject * p))6550   SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
6551     swig_varlinkobject *v = (swig_varlinkobject *) p;
6552     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
6553     if (gv) {
6554       size_t size = strlen(name)+1;
6555       gv->name = (char *)malloc(size);
6556       if (gv->name) {
6557         memcpy(gv->name, name, size);
6558         gv->get_attr = get_attr;
6559         gv->set_attr = set_attr;
6560         gv->next = v->vars;
6561       }
6562     }
6563     v->vars = gv;
6564   }
6565 
6566   SWIGINTERN PyObject *
SWIG_globals(void)6567   SWIG_globals(void) {
6568     static PyObject *globals = 0;
6569     if (!globals) {
6570       globals = SWIG_newvarlink();
6571     }
6572     return globals;
6573   }
6574 
6575   /* -----------------------------------------------------------------------------
6576    * constants/methods manipulation
6577    * ----------------------------------------------------------------------------- */
6578 
6579   /* Install Constants */
6580   SWIGINTERN void
SWIG_Python_InstallConstants(PyObject * d,swig_const_info constants[])6581   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
6582     PyObject *obj = 0;
6583     size_t i;
6584     for (i = 0; constants[i].type; ++i) {
6585       switch(constants[i].type) {
6586       case SWIG_PY_POINTER:
6587         obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
6588         break;
6589       case SWIG_PY_BINARY:
6590         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
6591         break;
6592       default:
6593         obj = 0;
6594         break;
6595       }
6596       if (obj) {
6597         PyDict_SetItemString(d, constants[i].name, obj);
6598         Py_DECREF(obj);
6599       }
6600     }
6601   }
6602 
6603   /* -----------------------------------------------------------------------------*/
6604   /* Fix SwigMethods to carry the callback ptrs when needed */
6605   /* -----------------------------------------------------------------------------*/
6606 
6607   SWIGINTERN void
SWIG_Python_FixMethods(PyMethodDef * methods,swig_const_info * const_table,swig_type_info ** types,swig_type_info ** types_initial)6608   SWIG_Python_FixMethods(PyMethodDef *methods,
6609     swig_const_info *const_table,
6610     swig_type_info **types,
6611     swig_type_info **types_initial) {
6612     size_t i;
6613     for (i = 0; methods[i].ml_name; ++i) {
6614       const char *c = methods[i].ml_doc;
6615       if (!c) continue;
6616       c = strstr(c, "swig_ptr: ");
6617       if (c) {
6618         int j;
6619         swig_const_info *ci = 0;
6620         const char *name = c + 10;
6621         for (j = 0; const_table[j].type; ++j) {
6622           if (strncmp(const_table[j].name, name,
6623               strlen(const_table[j].name)) == 0) {
6624             ci = &(const_table[j]);
6625             break;
6626           }
6627         }
6628         if (ci) {
6629           void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
6630           if (ptr) {
6631             size_t shift = (ci->ptype) - types;
6632             swig_type_info *ty = types_initial[shift];
6633             size_t ldoc = (c - methods[i].ml_doc);
6634             size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
6635             char *ndoc = (char*)malloc(ldoc + lptr + 10);
6636             if (ndoc) {
6637               char *buff = ndoc;
6638               memcpy(buff, methods[i].ml_doc, ldoc);
6639               buff += ldoc;
6640               memcpy(buff, "swig_ptr: ", 10);
6641               buff += 10;
6642               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
6643               methods[i].ml_doc = ndoc;
6644             }
6645           }
6646         }
6647       }
6648     }
6649   }
6650 
6651   /* -----------------------------------------------------------------------------
6652    * Method creation and docstring support functions
6653    * ----------------------------------------------------------------------------- */
6654 
6655   /* -----------------------------------------------------------------------------
6656    * Function to find the method definition with the correct docstring for the
6657    * proxy module as opposed to the low-level API
6658    * ----------------------------------------------------------------------------- */
6659 
SWIG_PythonGetProxyDoc(const char * name)6660   SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
6661     /* Find the function in the modified method table */
6662     size_t offset = 0;
6663     int found = 0;
6664     while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
6665       if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
6666         found = 1;
6667         break;
6668       }
6669       offset++;
6670     }
6671     /* Use the copy with the modified docstring if available */
6672     return found ? &SwigMethods_proxydocs[offset] : NULL;
6673   }
6674 
6675   /* -----------------------------------------------------------------------------
6676    * Wrapper of PyInstanceMethod_New() used in Python 3
6677    * It is exported to the generated module, used for -fastproxy
6678    * ----------------------------------------------------------------------------- */
6679 
SWIG_PyInstanceMethod_New(PyObject * SWIGUNUSEDPARM (self),PyObject * func)6680   SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
6681     if (PyCFunction_Check(func)) {
6682       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
6683       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
6684       if (ml)
6685       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
6686     }
6687 #if PY_VERSION_HEX >= 0x03000000
6688     return PyInstanceMethod_New(func);
6689 #else
6690     return PyMethod_New(func, NULL, NULL);
6691 #endif
6692   }
6693 
6694   /* -----------------------------------------------------------------------------
6695    * Wrapper of PyStaticMethod_New()
6696    * It is exported to the generated module, used for -fastproxy
6697    * ----------------------------------------------------------------------------- */
6698 
SWIG_PyStaticMethod_New(PyObject * SWIGUNUSEDPARM (self),PyObject * func)6699   SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
6700     if (PyCFunction_Check(func)) {
6701       PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
6702       PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
6703       if (ml)
6704       func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
6705     }
6706     return PyStaticMethod_New(func);
6707   }
6708 
6709 #ifdef __cplusplus
6710 }
6711 #endif
6712 
6713 /* -----------------------------------------------------------------------------*
6714  *  Partial Init method
6715  * -----------------------------------------------------------------------------*/
6716 
6717 #ifdef __cplusplus
6718 extern "C"
6719 #endif
6720 
6721 SWIGEXPORT
6722 #if PY_VERSION_HEX >= 0x03000000
6723 PyObject*
6724 #else
6725 void
6726 #endif
SWIG_init(void)6727 SWIG_init(void) {
6728   PyObject *m, *d, *md, *globals;
6729 
6730 #if PY_VERSION_HEX >= 0x03000000
6731   static struct PyModuleDef SWIG_module = {
6732     PyModuleDef_HEAD_INIT,
6733     SWIG_name,
6734     NULL,
6735     -1,
6736     SwigMethods,
6737     NULL,
6738     NULL,
6739     NULL,
6740     NULL
6741   };
6742 #endif
6743 
6744 #if defined(SWIGPYTHON_BUILTIN)
6745   static SwigPyClientData SwigPyObject_clientdata = {
6746     0, 0, 0, 0, 0, 0, 0
6747   };
6748   static PyGetSetDef this_getset_def = {
6749     (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
6750   };
6751   static SwigPyGetSet thisown_getset_closure = {
6752     SwigPyObject_own,
6753     SwigPyObject_own
6754   };
6755   static PyGetSetDef thisown_getset_def = {
6756     (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
6757   };
6758   PyTypeObject *builtin_pytype;
6759   int builtin_base_count;
6760   swig_type_info *builtin_basetype;
6761   PyObject *tuple;
6762   PyGetSetDescrObject *static_getset;
6763   PyTypeObject *metatype;
6764   PyTypeObject *swigpyobject;
6765   SwigPyClientData *cd;
6766   PyObject *public_interface, *public_symbol;
6767   PyObject *this_descr;
6768   PyObject *thisown_descr;
6769   PyObject *self = 0;
6770   int i;
6771 
6772   (void)builtin_pytype;
6773   (void)builtin_base_count;
6774   (void)builtin_basetype;
6775   (void)tuple;
6776   (void)static_getset;
6777   (void)self;
6778 
6779   /* Metaclass is used to implement static member variables */
6780   metatype = SwigPyObjectType();
6781   assert(metatype);
6782 #endif
6783 
6784   (void)globals;
6785 
6786   /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
6787   SWIG_This();
6788   SWIG_Python_TypeCache();
6789   SwigPyPacked_type();
6790 #ifndef SWIGPYTHON_BUILTIN
6791   SwigPyObject_type();
6792 #endif
6793 
6794   /* Fix SwigMethods to carry the callback ptrs when needed */
6795   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
6796 
6797 #if PY_VERSION_HEX >= 0x03000000
6798   m = PyModule_Create(&SWIG_module);
6799 #else
6800   m = Py_InitModule(SWIG_name, SwigMethods);
6801 #endif
6802 
6803   md = d = PyModule_GetDict(m);
6804   (void)md;
6805 
6806   SWIG_InitializeModule(0);
6807 
6808 #ifdef SWIGPYTHON_BUILTIN
6809   swigpyobject = SwigPyObject_TypeOnce();
6810 
6811   SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
6812   assert(SwigPyObject_stype);
6813   cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
6814   if (!cd) {
6815     SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
6816     SwigPyObject_clientdata.pytype = swigpyobject;
6817   } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
6818     PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
6819 # if PY_VERSION_HEX >= 0x03000000
6820     return NULL;
6821 # else
6822     return;
6823 # endif
6824   }
6825 
6826   /* All objects have a 'this' attribute */
6827   this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
6828   (void)this_descr;
6829 
6830   /* All objects have a 'thisown' attribute */
6831   thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
6832   (void)thisown_descr;
6833 
6834   public_interface = PyList_New(0);
6835   public_symbol = 0;
6836   (void)public_symbol;
6837 
6838   PyDict_SetItemString(md, "__all__", public_interface);
6839   Py_DECREF(public_interface);
6840   for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
6841   SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
6842   for (i = 0; swig_const_table[i].name != 0; ++i)
6843   SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
6844 #endif
6845 
6846   SWIG_InstallConstants(d,swig_const_table);
6847 
6848 
6849   {
6850     PyObject *module = PyImport_ImportModule("gphoto2");
6851     if (module != NULL) {
6852       PyExc_GPhoto2Error = PyObject_GetAttrString(module, "GPhoto2Error");
6853       Py_DECREF(module);
6854     }
6855     if (PyExc_GPhoto2Error == NULL)
6856 #if PY_VERSION_HEX >= 0x03000000
6857     return NULL;
6858 #else
6859     return;
6860 #endif
6861   }
6862 
6863 
6864   /* type '::_CameraList' */
6865   builtin_pytype = (PyTypeObject *)&SwigPyBuiltin___CameraList_type;
6866   builtin_pytype->tp_dict = d = PyDict_New();
6867   SwigPyBuiltin_SetMetaType(builtin_pytype, metatype);
6868   builtin_pytype->tp_new = PyType_GenericNew;
6869   builtin_base_count = 0;
6870   builtin_bases[builtin_base_count] = NULL;
6871   SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases);
6872   PyDict_SetItemString(d, "this", this_descr);
6873   PyDict_SetItemString(d, "thisown", thisown_descr);
6874   if (PyType_Ready(builtin_pytype) < 0) {
6875     PyErr_SetString(PyExc_TypeError, "Could not create type 'CameraList'.");
6876 #if PY_VERSION_HEX >= 0x03000000
6877     return NULL;
6878 #else
6879     return;
6880 #endif
6881   }
6882   Py_INCREF(builtin_pytype);
6883   PyModule_AddObject(m, "CameraList", (PyObject *)builtin_pytype);
6884   SwigPyBuiltin_AddPublicSymbol(public_interface, "CameraList");
6885   d = md;
6886 #if PY_VERSION_HEX >= 0x03000000
6887   return m;
6888 #else
6889   return;
6890 #endif
6891 }
6892 
6893