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__CameraAbilitiesList swig_types[47]
3470 #define SWIGTYPE_p_short swig_types[48]
3471 #define SWIGTYPE_p_signed_char swig_types[49]
3472 #define SWIGTYPE_p_unsigned_char swig_types[50]
3473 #define SWIGTYPE_p_unsigned_int swig_types[51]
3474 #define SWIGTYPE_p_unsigned_long_long swig_types[52]
3475 #define SWIGTYPE_p_unsigned_short swig_types[53]
3476 static swig_type_info *swig_types[55];
3477 static swig_module_info swig_module = {swig_types, 54, 0, 0, 0, 0};
3478 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3479 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3480
3481 /* -------- TYPES TABLE (END) -------- */
3482
3483 #ifdef SWIG_TypeQuery
3484 # undef SWIG_TypeQuery
3485 #endif
3486 #define SWIG_TypeQuery SWIG_Python_TypeQuery
3487
3488 /*-----------------------------------------------
3489 @(target):= _abilities_list.so
3490 ------------------------------------------------*/
3491 #if PY_VERSION_HEX >= 0x03000000
3492 # define SWIG_init PyInit__abilities_list
3493
3494 #else
3495 # define SWIG_init init_abilities_list
3496
3497 #endif
3498 #define SWIG_name "_abilities_list"
3499
3500 #define SWIGVERSION 0x040002
3501 #define SWIG_VERSION SWIGVERSION
3502
3503
3504 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
3505 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
3506
3507
3508 #include <stddef.h>
3509
3510
3511 #include "gphoto2/gphoto2.h"
3512
3513
3514 PyObject *PyExc_GPhoto2Error = NULL;
3515
new__CameraAbilitiesList(void)3516 SWIGINTERN struct _CameraAbilitiesList *new__CameraAbilitiesList(void){
3517 struct _CameraAbilitiesList *result;
3518 int error = gp_abilities_list_new(&result);
3519 if (error < 0)
3520 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3521 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
3522 /*@SWIG@*/
3523 return result;
3524 }
delete__CameraAbilitiesList(struct _CameraAbilitiesList * self)3525 SWIGINTERN void delete__CameraAbilitiesList(struct _CameraAbilitiesList *self){
3526 int error = gp_abilities_list_free(self);
3527 if (error < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3528 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
3529 /*@SWIG@*/
3530 }
_CameraAbilitiesList___len__(struct _CameraAbilitiesList * self)3531 SWIGINTERN int _CameraAbilitiesList___len__(struct _CameraAbilitiesList *self){
3532
3533
3534
3535 int result = gp_abilities_list_count (self);
3536
3537
3538
3539 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3540 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3541 /*@SWIG@*/
3542
3543 return result;
3544
3545 }
3546
3547 SWIGINTERNINLINE PyObject*
SWIG_From_int(int value)3548 SWIG_From_int (int value)
3549 {
3550 return PyInt_FromLong((long) value);
3551 }
3552
3553
3554 #include <limits.h>
3555 #if !defined(SWIG_NO_LLONG_MAX)
3556 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3557 # define LLONG_MAX __LONG_LONG_MAX__
3558 # define LLONG_MIN (-LLONG_MAX - 1LL)
3559 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3560 # endif
3561 #endif
3562
3563
3564 SWIGINTERN int
SWIG_AsVal_double(PyObject * obj,double * val)3565 SWIG_AsVal_double (PyObject *obj, double *val)
3566 {
3567 int res = SWIG_TypeError;
3568 if (PyFloat_Check(obj)) {
3569 if (val) *val = PyFloat_AsDouble(obj);
3570 return SWIG_OK;
3571 #if PY_VERSION_HEX < 0x03000000
3572 } else if (PyInt_Check(obj)) {
3573 if (val) *val = (double) PyInt_AsLong(obj);
3574 return SWIG_OK;
3575 #endif
3576 } else if (PyLong_Check(obj)) {
3577 double v = PyLong_AsDouble(obj);
3578 if (!PyErr_Occurred()) {
3579 if (val) *val = v;
3580 return SWIG_OK;
3581 } else {
3582 PyErr_Clear();
3583 }
3584 }
3585 #ifdef SWIG_PYTHON_CAST_MODE
3586 {
3587 int dispatch = 0;
3588 double d = PyFloat_AsDouble(obj);
3589 if (!PyErr_Occurred()) {
3590 if (val) *val = d;
3591 return SWIG_AddCast(SWIG_OK);
3592 } else {
3593 PyErr_Clear();
3594 }
3595 if (!dispatch) {
3596 long v = PyLong_AsLong(obj);
3597 if (!PyErr_Occurred()) {
3598 if (val) *val = v;
3599 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3600 } else {
3601 PyErr_Clear();
3602 }
3603 }
3604 }
3605 #endif
3606 return res;
3607 }
3608
3609
3610 #include <float.h>
3611
3612
3613 #include <math.h>
3614
3615
3616 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)3617 SWIG_CanCastAsInteger(double *d, double min, double max) {
3618 double x = *d;
3619 if ((min <= x && x <= max)) {
3620 double fx = floor(x);
3621 double cx = ceil(x);
3622 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3623 if ((errno == EDOM) || (errno == ERANGE)) {
3624 errno = 0;
3625 } else {
3626 double summ, reps, diff;
3627 if (rd < x) {
3628 diff = x - rd;
3629 } else if (rd > x) {
3630 diff = rd - x;
3631 } else {
3632 return 1;
3633 }
3634 summ = rd + x;
3635 reps = diff/summ;
3636 if (reps < 8*DBL_EPSILON) {
3637 *d = rd;
3638 return 1;
3639 }
3640 }
3641 }
3642 return 0;
3643 }
3644
3645
3646 SWIGINTERN int
SWIG_AsVal_long(PyObject * obj,long * val)3647 SWIG_AsVal_long (PyObject *obj, long* val)
3648 {
3649 #if PY_VERSION_HEX < 0x03000000
3650 if (PyInt_Check(obj)) {
3651 if (val) *val = PyInt_AsLong(obj);
3652 return SWIG_OK;
3653 } else
3654 #endif
3655 if (PyLong_Check(obj)) {
3656 long v = PyLong_AsLong(obj);
3657 if (!PyErr_Occurred()) {
3658 if (val) *val = v;
3659 return SWIG_OK;
3660 } else {
3661 PyErr_Clear();
3662 return SWIG_OverflowError;
3663 }
3664 }
3665 #ifdef SWIG_PYTHON_CAST_MODE
3666 {
3667 int dispatch = 0;
3668 long v = PyInt_AsLong(obj);
3669 if (!PyErr_Occurred()) {
3670 if (val) *val = v;
3671 return SWIG_AddCast(SWIG_OK);
3672 } else {
3673 PyErr_Clear();
3674 }
3675 if (!dispatch) {
3676 double d;
3677 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3678 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3679 if (val) *val = (long)(d);
3680 return res;
3681 }
3682 }
3683 }
3684 #endif
3685 return SWIG_TypeError;
3686 }
3687
3688
3689 SWIGINTERN int
SWIG_AsVal_int(PyObject * obj,int * val)3690 SWIG_AsVal_int (PyObject * obj, int *val)
3691 {
3692 long v;
3693 int res = SWIG_AsVal_long (obj, &v);
3694 if (SWIG_IsOK(res)) {
3695 if ((v < INT_MIN || v > INT_MAX)) {
3696 return SWIG_OverflowError;
3697 } else {
3698 if (val) *val = (int)(v);
3699 }
3700 }
3701 return res;
3702 }
3703
_CameraAbilitiesList___getitem__(struct _CameraAbilitiesList * self,int idx,CameraAbilities * abilities)3704 SWIGINTERN void _CameraAbilitiesList___getitem__(struct _CameraAbilitiesList *self,int idx,CameraAbilities *abilities){
3705 if (idx < 0 || idx >= gp_abilities_list_count(self)) {
3706 PyErr_SetString(PyExc_IndexError, "CameraAbilitiesList index out of range");
3707 return;
3708 }
3709 {
3710 int error = gp_abilities_list_get_abilities(self, idx, abilities);
3711 if (error < 0) {
3712 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3713 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
3714 /*@SWIG@*/
3715 return;
3716 }
3717 }
3718 }
_CameraAbilitiesList_load(struct _CameraAbilitiesList * self,GPContext * context)3719 SWIGINTERN void _CameraAbilitiesList_load(struct _CameraAbilitiesList *self,GPContext *context){
3720
3721
3722
3723 int result = gp_abilities_list_load (self, context);
3724
3725
3726
3727 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3728 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3729 /*@SWIG@*/
3730
3731
3732
3733 }
3734
3735 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)3736 SWIG_pchar_descriptor(void)
3737 {
3738 static int init = 0;
3739 static swig_type_info* info = 0;
3740 if (!init) {
3741 info = SWIG_TypeQuery("_p_char");
3742 init = 1;
3743 }
3744 return info;
3745 }
3746
3747
3748 SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject * obj,char ** cptr,size_t * psize,int * alloc)3749 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3750 {
3751 #if PY_VERSION_HEX>=0x03000000
3752 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3753 if (PyBytes_Check(obj))
3754 #else
3755 if (PyUnicode_Check(obj))
3756 #endif
3757 #else
3758 if (PyString_Check(obj))
3759 #endif
3760 {
3761 char *cstr; Py_ssize_t len;
3762 int ret = SWIG_OK;
3763 #if PY_VERSION_HEX>=0x03000000
3764 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3765 if (!alloc && cptr) {
3766 /* We can't allow converting without allocation, since the internal
3767 representation of string in Python 3 is UCS-2/UCS-4 but we require
3768 a UTF-8 representation.
3769 TODO(bhy) More detailed explanation */
3770 return SWIG_RuntimeError;
3771 }
3772 obj = PyUnicode_AsUTF8String(obj);
3773 if (!obj)
3774 return SWIG_TypeError;
3775 if (alloc)
3776 *alloc = SWIG_NEWOBJ;
3777 #endif
3778 if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
3779 return SWIG_TypeError;
3780 #else
3781 if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
3782 return SWIG_TypeError;
3783 #endif
3784 if (cptr) {
3785 if (alloc) {
3786 if (*alloc == SWIG_NEWOBJ) {
3787 *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
3788 *alloc = SWIG_NEWOBJ;
3789 } else {
3790 *cptr = cstr;
3791 *alloc = SWIG_OLDOBJ;
3792 }
3793 } else {
3794 #if PY_VERSION_HEX>=0x03000000
3795 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3796 *cptr = PyBytes_AsString(obj);
3797 #else
3798 assert(0); /* Should never reach here with Unicode strings in Python 3 */
3799 #endif
3800 #else
3801 *cptr = SWIG_Python_str_AsChar(obj);
3802 if (!*cptr)
3803 ret = SWIG_TypeError;
3804 #endif
3805 }
3806 }
3807 if (psize) *psize = len + 1;
3808 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3809 Py_XDECREF(obj);
3810 #endif
3811 return ret;
3812 } else {
3813 #if defined(SWIG_PYTHON_2_UNICODE)
3814 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3815 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3816 #endif
3817 #if PY_VERSION_HEX<0x03000000
3818 if (PyUnicode_Check(obj)) {
3819 char *cstr; Py_ssize_t len;
3820 if (!alloc && cptr) {
3821 return SWIG_RuntimeError;
3822 }
3823 obj = PyUnicode_AsUTF8String(obj);
3824 if (!obj)
3825 return SWIG_TypeError;
3826 if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3827 if (cptr) {
3828 if (alloc) *alloc = SWIG_NEWOBJ;
3829 *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
3830 }
3831 if (psize) *psize = len + 1;
3832
3833 Py_XDECREF(obj);
3834 return SWIG_OK;
3835 } else {
3836 Py_XDECREF(obj);
3837 }
3838 }
3839 #endif
3840 #endif
3841
3842 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3843 if (pchar_descriptor) {
3844 void* vptr = 0;
3845 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3846 if (cptr) *cptr = (char *) vptr;
3847 if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3848 if (alloc) *alloc = SWIG_OLDOBJ;
3849 return SWIG_OK;
3850 }
3851 }
3852 }
3853 return SWIG_TypeError;
3854 }
3855
3856
3857
3858
_CameraAbilitiesList_load_dir(struct _CameraAbilitiesList * self,char const * dir,GPContext * context)3859 SWIGINTERN void _CameraAbilitiesList_load_dir(struct _CameraAbilitiesList *self,char const *dir,GPContext *context){
3860
3861
3862
3863 int result = gp_abilities_list_load_dir (self, dir, context);
3864
3865
3866
3867 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3868 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3869 /*@SWIG@*/
3870
3871
3872
3873 }
_CameraAbilitiesList_reset(struct _CameraAbilitiesList * self)3874 SWIGINTERN void _CameraAbilitiesList_reset(struct _CameraAbilitiesList *self){
3875
3876
3877
3878 int result = gp_abilities_list_reset (self);
3879
3880
3881
3882 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3883 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3884 /*@SWIG@*/
3885
3886
3887
3888 }
_CameraAbilitiesList_detect(struct _CameraAbilitiesList * self,GPPortInfoList * info_list,CameraList * l,GPContext * context)3889 SWIGINTERN void _CameraAbilitiesList_detect(struct _CameraAbilitiesList *self,GPPortInfoList *info_list,CameraList *l,GPContext *context){
3890
3891
3892
3893 int result = gp_abilities_list_detect (self, info_list, l, context);
3894
3895
3896
3897 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3898 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3899 /*@SWIG@*/
3900
3901
3902
3903 }
_CameraAbilitiesList_append(struct _CameraAbilitiesList * self,CameraAbilities abilities)3904 SWIGINTERN void _CameraAbilitiesList_append(struct _CameraAbilitiesList *self,CameraAbilities abilities){
3905
3906
3907
3908 int result = gp_abilities_list_append (self, abilities);
3909
3910
3911
3912 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3913 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3914 /*@SWIG@*/
3915
3916
3917
3918 }
_CameraAbilitiesList_count(struct _CameraAbilitiesList * self)3919 SWIGINTERN int _CameraAbilitiesList_count(struct _CameraAbilitiesList *self){
3920
3921
3922
3923 int result = gp_abilities_list_count (self);
3924
3925
3926
3927 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3928 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3929 /*@SWIG@*/
3930
3931 return result;
3932
3933 }
_CameraAbilitiesList_lookup_model(struct _CameraAbilitiesList * self,char const * model)3934 SWIGINTERN int _CameraAbilitiesList_lookup_model(struct _CameraAbilitiesList *self,char const *model){
3935
3936
3937
3938 int result = gp_abilities_list_lookup_model (self, model);
3939
3940
3941
3942 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3943 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3944 /*@SWIG@*/
3945
3946 return result;
3947
3948 }
_CameraAbilitiesList_get_abilities(struct _CameraAbilitiesList * self,int index,CameraAbilities * abilities)3949 SWIGINTERN void _CameraAbilitiesList_get_abilities(struct _CameraAbilitiesList *self,int index,CameraAbilities *abilities){
3950
3951
3952
3953 int result = gp_abilities_list_get_abilities (self, index, abilities);
3954
3955
3956
3957 if (result < 0) /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
3958 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(result));
3959 /*@SWIG@*/
3960
3961
3962
3963 }
3964
3965 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)3966 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3967 {
3968 if (carray) {
3969 if (size > INT_MAX) {
3970 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3971 return pchar_descriptor ?
3972 SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3973 } else {
3974 #if PY_VERSION_HEX >= 0x03000000
3975 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3976 return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size));
3977 #else
3978 return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape");
3979 #endif
3980 #else
3981 return PyString_FromStringAndSize(carray, (Py_ssize_t)(size));
3982 #endif
3983 }
3984 } else {
3985 return SWIG_Py_Void();
3986 }
3987 }
3988
3989
3990 SWIGINTERN size_t
SWIG_strnlen(const char * s,size_t maxlen)3991 SWIG_strnlen(const char* s, size_t maxlen)
3992 {
3993 const char *p;
3994 for (p = s; maxlen-- && *p; p++)
3995 ;
3996 return p - s;
3997 }
3998
3999
4000 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtr(const char * cptr)4001 SWIG_FromCharPtr(const char *cptr)
4002 {
4003 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
4004 }
4005
4006 #ifdef __cplusplus
4007 extern "C" {
4008 #endif
_wrap_new_CameraAbilitiesList(PyObject * self,PyObject * args,PyObject * kwargs)4009 SWIGINTERN int _wrap_new_CameraAbilitiesList(PyObject *self, PyObject *args, PyObject *kwargs) {
4010 PyObject *resultobj = 0;
4011 struct _CameraAbilitiesList *result = 0 ;
4012
4013 if (!SWIG_Python_CheckNoKeywords(kwargs, "new_CameraAbilitiesList")) SWIG_fail;
4014 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "new_CameraAbilitiesList takes no arguments");
4015 {
4016 result = (struct _CameraAbilitiesList *)new__CameraAbilitiesList();
4017 if (PyErr_Occurred() != NULL) SWIG_fail;
4018 }
4019 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p__CameraAbilitiesList, SWIG_BUILTIN_INIT | 0 );
4020 return resultobj == Py_None ? -1 : 0;
4021 fail:
4022 return -1;
4023 }
4024
4025
_wrap_delete_CameraAbilitiesList(PyObject * self,PyObject * args)4026 SWIGINTERN PyObject *_wrap_delete_CameraAbilitiesList(PyObject *self, PyObject *args) {
4027 PyObject *resultobj = 0;
4028 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4029 void *argp1 = 0 ;
4030 int res1 = 0 ;
4031
4032 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CameraAbilitiesList takes no arguments");
4033 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, SWIG_POINTER_DISOWN | 0 );
4034 if (!SWIG_IsOK(res1)) {
4035 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CameraAbilitiesList" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4036 }
4037 arg1 = (struct _CameraAbilitiesList *)(argp1);
4038 {
4039 delete__CameraAbilitiesList(arg1);
4040 if (PyErr_Occurred() != NULL) SWIG_fail;
4041 }
4042 resultobj = SWIG_Py_Void();
4043 return resultobj;
4044 fail:
4045 return NULL;
4046 }
4047
4048
_wrap_CameraAbilitiesList___len__(PyObject * self,PyObject * args)4049 SWIGINTERN PyObject *_wrap_CameraAbilitiesList___len__(PyObject *self, PyObject *args) {
4050 PyObject *resultobj = 0;
4051 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4052 void *argp1 = 0 ;
4053 int res1 = 0 ;
4054 int result;
4055
4056 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilitiesList___len__ takes no arguments");
4057 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
4058 if (!SWIG_IsOK(res1)) {
4059 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilitiesList___len__" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4060 }
4061 arg1 = (struct _CameraAbilitiesList *)(argp1);
4062 {
4063 result = (int)_CameraAbilitiesList___len__(arg1);
4064 if (PyErr_Occurred()) SWIG_fail;
4065 }
4066 resultobj = SWIG_From_int((int)(result));
4067 return resultobj;
4068 fail:
4069 return NULL;
4070 }
4071
4072
_wrap_CameraAbilitiesList___getitem__(PyObject * self,PyObject * args)4073 SWIGINTERN PyObject *_wrap_CameraAbilitiesList___getitem__(PyObject *self, PyObject *args) {
4074 PyObject *resultobj = 0;
4075 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4076 int arg2 ;
4077 CameraAbilities *arg3 = (CameraAbilities *) 0 ;
4078 void *argp1 = 0 ;
4079 int res1 = 0 ;
4080 int val2 ;
4081 int ecode2 = 0 ;
4082 PyObject * obj1 = 0 ;
4083
4084 {
4085 arg3 = (CameraAbilities *)calloc(1, sizeof(CameraAbilities));
4086 if (arg3 == NULL) {
4087 PyErr_SetString(PyExc_MemoryError, "Cannot allocate " "CameraAbilities");
4088 SWIG_fail;
4089 }
4090 }
4091 if (!PyArg_UnpackTuple(args, "CameraAbilitiesList___getitem__", 1, 1, &obj1)) SWIG_fail;
4092 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
4093 if (!SWIG_IsOK(res1)) {
4094 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilitiesList___getitem__" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4095 }
4096 arg1 = (struct _CameraAbilitiesList *)(argp1);
4097 ecode2 = SWIG_AsVal_int(obj1, &val2);
4098 if (!SWIG_IsOK(ecode2)) {
4099 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraAbilitiesList___getitem__" "', argument " "2"" of type '" "int""'");
4100 }
4101 arg2 = (int)(val2);
4102 {
4103 _CameraAbilitiesList___getitem__(arg1,arg2,arg3);
4104 if (PyErr_Occurred() != NULL) goto fail;
4105 }
4106 resultobj = SWIG_Py_Void();
4107 {
4108 resultobj = SWIG_Python_AppendOutput(
4109 resultobj, SWIG_NewPointerObj(arg3, SWIGTYPE_p_CameraAbilities, SWIG_POINTER_OWN));
4110 arg3 = NULL;
4111 }
4112 {
4113 free(arg3);
4114 }
4115 return resultobj;
4116 fail:
4117 {
4118 free(arg3);
4119 }
4120 return NULL;
4121 }
4122
4123
_wrap_CameraAbilitiesList_load(PyObject * self,PyObject * args)4124 SWIGINTERN PyObject *_wrap_CameraAbilitiesList_load(PyObject *self, PyObject *args) {
4125 PyObject *resultobj = 0;
4126 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4127 GPContext *arg2 = (GPContext *) 0 ;
4128 void *argp1 = 0 ;
4129 int res1 = 0 ;
4130 void *argp2 = 0 ;
4131 int res2 = 0 ;
4132 PyObject * obj1 = 0 ;
4133
4134 {
4135 arg2 = NULL;
4136 }
4137 if (!PyArg_UnpackTuple(args, "CameraAbilitiesList_load", 0, 1, &obj1)) SWIG_fail;
4138 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
4139 if (!SWIG_IsOK(res1)) {
4140 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilitiesList_load" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4141 }
4142 arg1 = (struct _CameraAbilitiesList *)(argp1);
4143 if (obj1) {
4144 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p__GPContext, 0 | 0 );
4145 if (!SWIG_IsOK(res2)) {
4146 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraAbilitiesList_load" "', argument " "2"" of type '" "GPContext *""'");
4147 }
4148 arg2 = (GPContext *)(argp2);
4149 }
4150 {
4151 _CameraAbilitiesList_load(arg1,arg2);
4152 if (PyErr_Occurred()) SWIG_fail;
4153 }
4154 resultobj = SWIG_Py_Void();
4155 return resultobj;
4156 fail:
4157 return NULL;
4158 }
4159
4160
_wrap_CameraAbilitiesList_load_dir(PyObject * self,PyObject * args)4161 SWIGINTERN PyObject *_wrap_CameraAbilitiesList_load_dir(PyObject *self, PyObject *args) {
4162 PyObject *resultobj = 0;
4163 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4164 char *arg2 = (char *) 0 ;
4165 GPContext *arg3 = (GPContext *) 0 ;
4166 void *argp1 = 0 ;
4167 int res1 = 0 ;
4168 int res2 ;
4169 char *buf2 = 0 ;
4170 int alloc2 = 0 ;
4171 void *argp3 = 0 ;
4172 int res3 = 0 ;
4173 PyObject * obj1 = 0 ;
4174 PyObject * obj2 = 0 ;
4175
4176 {
4177 arg3 = NULL;
4178 }
4179 if (!PyArg_UnpackTuple(args, "CameraAbilitiesList_load_dir", 1, 2, &obj1, &obj2)) SWIG_fail;
4180 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
4181 if (!SWIG_IsOK(res1)) {
4182 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilitiesList_load_dir" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4183 }
4184 arg1 = (struct _CameraAbilitiesList *)(argp1);
4185 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4186 if (!SWIG_IsOK(res2)) {
4187 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraAbilitiesList_load_dir" "', argument " "2"" of type '" "char const *""'");
4188 }
4189 arg2 = (char *)(buf2);
4190 if (obj2) {
4191 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p__GPContext, 0 | 0 );
4192 if (!SWIG_IsOK(res3)) {
4193 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CameraAbilitiesList_load_dir" "', argument " "3"" of type '" "GPContext *""'");
4194 }
4195 arg3 = (GPContext *)(argp3);
4196 }
4197 {
4198 _CameraAbilitiesList_load_dir(arg1,(char const *)arg2,arg3);
4199 if (PyErr_Occurred()) SWIG_fail;
4200 }
4201 resultobj = SWIG_Py_Void();
4202 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4203 return resultobj;
4204 fail:
4205 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4206 return NULL;
4207 }
4208
4209
_wrap_CameraAbilitiesList_reset(PyObject * self,PyObject * args)4210 SWIGINTERN PyObject *_wrap_CameraAbilitiesList_reset(PyObject *self, PyObject *args) {
4211 PyObject *resultobj = 0;
4212 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4213 void *argp1 = 0 ;
4214 int res1 = 0 ;
4215
4216 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilitiesList_reset takes no arguments");
4217 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
4218 if (!SWIG_IsOK(res1)) {
4219 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilitiesList_reset" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4220 }
4221 arg1 = (struct _CameraAbilitiesList *)(argp1);
4222 {
4223 _CameraAbilitiesList_reset(arg1);
4224 if (PyErr_Occurred()) SWIG_fail;
4225 }
4226 resultobj = SWIG_Py_Void();
4227 return resultobj;
4228 fail:
4229 return NULL;
4230 }
4231
4232
_wrap_CameraAbilitiesList_detect(PyObject * self,PyObject * args)4233 SWIGINTERN PyObject *_wrap_CameraAbilitiesList_detect(PyObject *self, PyObject *args) {
4234 PyObject *resultobj = 0;
4235 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4236 GPPortInfoList *arg2 = (GPPortInfoList *) 0 ;
4237 CameraList *arg3 = (CameraList *) 0 ;
4238 GPContext *arg4 = (GPContext *) 0 ;
4239 void *argp1 = 0 ;
4240 int res1 = 0 ;
4241 void *argp2 = 0 ;
4242 int res2 = 0 ;
4243 void *argp4 = 0 ;
4244 int res4 = 0 ;
4245 PyObject * obj1 = 0 ;
4246 PyObject * obj2 = 0 ;
4247
4248 {
4249 arg4 = NULL;
4250 }
4251 {
4252 int error = gp_list_new(&arg3);
4253 if (error < 0) {
4254 arg3 = NULL;
4255 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
4256 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
4257 /*@SWIG@*/
4258 SWIG_fail;
4259 }
4260 }
4261 if (!PyArg_UnpackTuple(args, "CameraAbilitiesList_detect", 1, 2, &obj1, &obj2)) SWIG_fail;
4262 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
4263 if (!SWIG_IsOK(res1)) {
4264 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilitiesList_detect" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4265 }
4266 arg1 = (struct _CameraAbilitiesList *)(argp1);
4267 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p__GPPortInfoList, 0 | 0 );
4268 if (!SWIG_IsOK(res2)) {
4269 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraAbilitiesList_detect" "', argument " "2"" of type '" "GPPortInfoList *""'");
4270 }
4271 arg2 = (GPPortInfoList *)(argp2);
4272 if (obj2) {
4273 res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p__GPContext, 0 | 0 );
4274 if (!SWIG_IsOK(res4)) {
4275 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CameraAbilitiesList_detect" "', argument " "4"" of type '" "GPContext *""'");
4276 }
4277 arg4 = (GPContext *)(argp4);
4278 }
4279 {
4280 _CameraAbilitiesList_detect(arg1,arg2,arg3,arg4);
4281 if (PyErr_Occurred()) SWIG_fail;
4282 }
4283 resultobj = SWIG_Py_Void();
4284 {
4285 resultobj = SWIG_Python_AppendOutput(
4286 resultobj, SWIG_NewPointerObj(arg3, SWIGTYPE_p__CameraList, SWIG_POINTER_OWN));
4287 arg3 = NULL;
4288 }
4289 {
4290 if (arg3 != NULL) {
4291 gp_list_unref(arg3);
4292 }
4293 }
4294 return resultobj;
4295 fail:
4296 {
4297 if (arg3 != NULL) {
4298 gp_list_unref(arg3);
4299 }
4300 }
4301 return NULL;
4302 }
4303
4304
_wrap_CameraAbilitiesList_append(PyObject * self,PyObject * args)4305 SWIGINTERN PyObject *_wrap_CameraAbilitiesList_append(PyObject *self, PyObject *args) {
4306 PyObject *resultobj = 0;
4307 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4308 CameraAbilities arg2 ;
4309 void *argp1 = 0 ;
4310 int res1 = 0 ;
4311 void *argp2 ;
4312 int res2 = 0 ;
4313 PyObject * obj1 = 0 ;
4314
4315 if (!PyArg_UnpackTuple(args, "CameraAbilitiesList_append", 1, 1, &obj1)) SWIG_fail;
4316 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
4317 if (!SWIG_IsOK(res1)) {
4318 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilitiesList_append" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4319 }
4320 arg1 = (struct _CameraAbilitiesList *)(argp1);
4321 {
4322 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CameraAbilities, 0 );
4323 if (!SWIG_IsOK(res2)) {
4324 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraAbilitiesList_append" "', argument " "2"" of type '" "CameraAbilities""'");
4325 }
4326 if (!argp2) {
4327 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CameraAbilitiesList_append" "', argument " "2"" of type '" "CameraAbilities""'");
4328 } else {
4329 arg2 = *((CameraAbilities *)(argp2));
4330 }
4331 }
4332 {
4333 _CameraAbilitiesList_append(arg1,arg2);
4334 if (PyErr_Occurred()) SWIG_fail;
4335 }
4336 resultobj = SWIG_Py_Void();
4337 return resultobj;
4338 fail:
4339 return NULL;
4340 }
4341
4342
_wrap_CameraAbilitiesList_count(PyObject * self,PyObject * args)4343 SWIGINTERN PyObject *_wrap_CameraAbilitiesList_count(PyObject *self, PyObject *args) {
4344 PyObject *resultobj = 0;
4345 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4346 void *argp1 = 0 ;
4347 int res1 = 0 ;
4348 int result;
4349
4350 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilitiesList_count takes no arguments");
4351 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
4352 if (!SWIG_IsOK(res1)) {
4353 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilitiesList_count" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4354 }
4355 arg1 = (struct _CameraAbilitiesList *)(argp1);
4356 {
4357 result = (int)_CameraAbilitiesList_count(arg1);
4358 if (PyErr_Occurred()) SWIG_fail;
4359 }
4360 resultobj = SWIG_From_int((int)(result));
4361 return resultobj;
4362 fail:
4363 return NULL;
4364 }
4365
4366
_wrap_CameraAbilitiesList_lookup_model(PyObject * self,PyObject * args)4367 SWIGINTERN PyObject *_wrap_CameraAbilitiesList_lookup_model(PyObject *self, PyObject *args) {
4368 PyObject *resultobj = 0;
4369 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4370 char *arg2 = (char *) 0 ;
4371 void *argp1 = 0 ;
4372 int res1 = 0 ;
4373 int res2 ;
4374 char *buf2 = 0 ;
4375 int alloc2 = 0 ;
4376 PyObject * obj1 = 0 ;
4377 int result;
4378
4379 if (!PyArg_UnpackTuple(args, "CameraAbilitiesList_lookup_model", 1, 1, &obj1)) SWIG_fail;
4380 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
4381 if (!SWIG_IsOK(res1)) {
4382 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilitiesList_lookup_model" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4383 }
4384 arg1 = (struct _CameraAbilitiesList *)(argp1);
4385 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4386 if (!SWIG_IsOK(res2)) {
4387 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CameraAbilitiesList_lookup_model" "', argument " "2"" of type '" "char const *""'");
4388 }
4389 arg2 = (char *)(buf2);
4390 {
4391 result = (int)_CameraAbilitiesList_lookup_model(arg1,(char const *)arg2);
4392 if (PyErr_Occurred()) SWIG_fail;
4393 }
4394 resultobj = SWIG_From_int((int)(result));
4395 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4396 return resultobj;
4397 fail:
4398 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4399 return NULL;
4400 }
4401
4402
_wrap_CameraAbilitiesList_get_abilities(PyObject * self,PyObject * args)4403 SWIGINTERN PyObject *_wrap_CameraAbilitiesList_get_abilities(PyObject *self, PyObject *args) {
4404 PyObject *resultobj = 0;
4405 struct _CameraAbilitiesList *arg1 = (struct _CameraAbilitiesList *) 0 ;
4406 int arg2 ;
4407 CameraAbilities *arg3 = (CameraAbilities *) 0 ;
4408 void *argp1 = 0 ;
4409 int res1 = 0 ;
4410 int val2 ;
4411 int ecode2 = 0 ;
4412 PyObject * obj1 = 0 ;
4413
4414 {
4415 arg3 = (CameraAbilities *)calloc(1, sizeof(CameraAbilities));
4416 if (arg3 == NULL) {
4417 PyErr_SetString(PyExc_MemoryError, "Cannot allocate " "CameraAbilities");
4418 SWIG_fail;
4419 }
4420 }
4421 if (!PyArg_UnpackTuple(args, "CameraAbilitiesList_get_abilities", 1, 1, &obj1)) SWIG_fail;
4422 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
4423 if (!SWIG_IsOK(res1)) {
4424 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilitiesList_get_abilities" "', argument " "1"" of type '" "struct _CameraAbilitiesList *""'");
4425 }
4426 arg1 = (struct _CameraAbilitiesList *)(argp1);
4427 ecode2 = SWIG_AsVal_int(obj1, &val2);
4428 if (!SWIG_IsOK(ecode2)) {
4429 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CameraAbilitiesList_get_abilities" "', argument " "2"" of type '" "int""'");
4430 }
4431 arg2 = (int)(val2);
4432 {
4433 _CameraAbilitiesList_get_abilities(arg1,arg2,arg3);
4434 if (PyErr_Occurred()) SWIG_fail;
4435 }
4436 resultobj = SWIG_Py_Void();
4437 {
4438 resultobj = SWIG_Python_AppendOutput(
4439 resultobj, SWIG_NewPointerObj(arg3, SWIGTYPE_p_CameraAbilities, SWIG_POINTER_OWN));
4440 arg3 = NULL;
4441 }
4442 {
4443 free(arg3);
4444 }
4445 return resultobj;
4446 fail:
4447 {
4448 free(arg3);
4449 }
4450 return NULL;
4451 }
4452
4453
4454 SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CameraAbilitiesList) /* defines _wrap_delete_CameraAbilitiesList_destructor_closure */
4455
SWIGPY_LENFUNC_CLOSURE(_wrap_CameraAbilitiesList___len__)4456 SWIGPY_LENFUNC_CLOSURE(_wrap_CameraAbilitiesList___len__) /* defines _wrap_CameraAbilitiesList___len___lenfunc_closure */
4457
4458 SWIGPY_SSIZEARGFUNC_CLOSURE(_wrap_CameraAbilitiesList___getitem__) /* defines _wrap_CameraAbilitiesList___getitem___ssizeargfunc_closure */
4459
4460 SWIGINTERN PyObject *_wrap_CameraAbilities_model_get(PyObject *self, PyObject *args) {
4461 PyObject *resultobj = 0;
4462 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4463 void *argp1 = 0 ;
4464 int res1 = 0 ;
4465 char *result = 0 ;
4466
4467 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_model_get takes no arguments");
4468 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4469 if (!SWIG_IsOK(res1)) {
4470 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_model_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4471 }
4472 arg1 = (CameraAbilities *)(argp1);
4473 result = (char *)(char *) ((arg1)->model);
4474 {
4475 size_t size = SWIG_strnlen(result, 128);
4476
4477
4478
4479 resultobj = SWIG_FromCharPtrAndSize(result, size);
4480 }
4481 return resultobj;
4482 fail:
4483 return NULL;
4484 }
4485
4486
_wrap_CameraAbilities_status_get(PyObject * self,PyObject * args)4487 SWIGINTERN PyObject *_wrap_CameraAbilities_status_get(PyObject *self, PyObject *args) {
4488 PyObject *resultobj = 0;
4489 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4490 void *argp1 = 0 ;
4491 int res1 = 0 ;
4492 CameraDriverStatus result;
4493
4494 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_status_get takes no arguments");
4495 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4496 if (!SWIG_IsOK(res1)) {
4497 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_status_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4498 }
4499 arg1 = (CameraAbilities *)(argp1);
4500 result = (CameraDriverStatus) ((arg1)->status);
4501 resultobj = SWIG_From_int((int)(result));
4502 return resultobj;
4503 fail:
4504 return NULL;
4505 }
4506
4507
_wrap_CameraAbilities_port_get(PyObject * self,PyObject * args)4508 SWIGINTERN PyObject *_wrap_CameraAbilities_port_get(PyObject *self, PyObject *args) {
4509 PyObject *resultobj = 0;
4510 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4511 void *argp1 = 0 ;
4512 int res1 = 0 ;
4513 GPPortType result;
4514
4515 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_port_get takes no arguments");
4516 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4517 if (!SWIG_IsOK(res1)) {
4518 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_port_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4519 }
4520 arg1 = (CameraAbilities *)(argp1);
4521 result = (GPPortType) ((arg1)->port);
4522 resultobj = SWIG_From_int((int)(result));
4523 return resultobj;
4524 fail:
4525 return NULL;
4526 }
4527
4528
_wrap_CameraAbilities_speed_get(PyObject * self,PyObject * args)4529 SWIGINTERN PyObject *_wrap_CameraAbilities_speed_get(PyObject *self, PyObject *args) {
4530 PyObject *resultobj = 0;
4531 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4532 void *argp1 = 0 ;
4533 int res1 = 0 ;
4534 int *result = 0 ;
4535
4536 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_speed_get takes no arguments");
4537 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4538 if (!SWIG_IsOK(res1)) {
4539 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_speed_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4540 }
4541 arg1 = (CameraAbilities *)(argp1);
4542 result = (int *)(int *) ((arg1)->speed);
4543 {
4544 int *value = result;
4545 resultobj = PyList_New(0);
4546 while (*value) {
4547 PyObject* temp = PyInt_FromLong(*value);
4548 PyList_Append(resultobj, temp);
4549 Py_DECREF(temp);
4550 value++;
4551 }
4552 }
4553 return resultobj;
4554 fail:
4555 return NULL;
4556 }
4557
4558
_wrap_CameraAbilities_operations_get(PyObject * self,PyObject * args)4559 SWIGINTERN PyObject *_wrap_CameraAbilities_operations_get(PyObject *self, PyObject *args) {
4560 PyObject *resultobj = 0;
4561 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4562 void *argp1 = 0 ;
4563 int res1 = 0 ;
4564 CameraOperation result;
4565
4566 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_operations_get takes no arguments");
4567 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4568 if (!SWIG_IsOK(res1)) {
4569 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_operations_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4570 }
4571 arg1 = (CameraAbilities *)(argp1);
4572 result = (CameraOperation) ((arg1)->operations);
4573 resultobj = SWIG_From_int((int)(result));
4574 return resultobj;
4575 fail:
4576 return NULL;
4577 }
4578
4579
_wrap_CameraAbilities_file_operations_get(PyObject * self,PyObject * args)4580 SWIGINTERN PyObject *_wrap_CameraAbilities_file_operations_get(PyObject *self, PyObject *args) {
4581 PyObject *resultobj = 0;
4582 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4583 void *argp1 = 0 ;
4584 int res1 = 0 ;
4585 CameraFileOperation result;
4586
4587 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_file_operations_get takes no arguments");
4588 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4589 if (!SWIG_IsOK(res1)) {
4590 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_file_operations_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4591 }
4592 arg1 = (CameraAbilities *)(argp1);
4593 result = (CameraFileOperation) ((arg1)->file_operations);
4594 resultobj = SWIG_From_int((int)(result));
4595 return resultobj;
4596 fail:
4597 return NULL;
4598 }
4599
4600
_wrap_CameraAbilities_folder_operations_get(PyObject * self,PyObject * args)4601 SWIGINTERN PyObject *_wrap_CameraAbilities_folder_operations_get(PyObject *self, PyObject *args) {
4602 PyObject *resultobj = 0;
4603 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4604 void *argp1 = 0 ;
4605 int res1 = 0 ;
4606 CameraFolderOperation result;
4607
4608 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_folder_operations_get takes no arguments");
4609 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4610 if (!SWIG_IsOK(res1)) {
4611 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_folder_operations_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4612 }
4613 arg1 = (CameraAbilities *)(argp1);
4614 result = (CameraFolderOperation) ((arg1)->folder_operations);
4615 resultobj = SWIG_From_int((int)(result));
4616 return resultobj;
4617 fail:
4618 return NULL;
4619 }
4620
4621
_wrap_CameraAbilities_usb_vendor_get(PyObject * self,PyObject * args)4622 SWIGINTERN PyObject *_wrap_CameraAbilities_usb_vendor_get(PyObject *self, PyObject *args) {
4623 PyObject *resultobj = 0;
4624 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4625 void *argp1 = 0 ;
4626 int res1 = 0 ;
4627 int result;
4628
4629 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_usb_vendor_get takes no arguments");
4630 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4631 if (!SWIG_IsOK(res1)) {
4632 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_usb_vendor_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4633 }
4634 arg1 = (CameraAbilities *)(argp1);
4635 result = (int) ((arg1)->usb_vendor);
4636 resultobj = SWIG_From_int((int)(result));
4637 return resultobj;
4638 fail:
4639 return NULL;
4640 }
4641
4642
_wrap_CameraAbilities_usb_product_get(PyObject * self,PyObject * args)4643 SWIGINTERN PyObject *_wrap_CameraAbilities_usb_product_get(PyObject *self, PyObject *args) {
4644 PyObject *resultobj = 0;
4645 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4646 void *argp1 = 0 ;
4647 int res1 = 0 ;
4648 int result;
4649
4650 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_usb_product_get takes no arguments");
4651 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4652 if (!SWIG_IsOK(res1)) {
4653 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_usb_product_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4654 }
4655 arg1 = (CameraAbilities *)(argp1);
4656 result = (int) ((arg1)->usb_product);
4657 resultobj = SWIG_From_int((int)(result));
4658 return resultobj;
4659 fail:
4660 return NULL;
4661 }
4662
4663
_wrap_CameraAbilities_usb_class_get(PyObject * self,PyObject * args)4664 SWIGINTERN PyObject *_wrap_CameraAbilities_usb_class_get(PyObject *self, PyObject *args) {
4665 PyObject *resultobj = 0;
4666 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4667 void *argp1 = 0 ;
4668 int res1 = 0 ;
4669 int result;
4670
4671 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_usb_class_get takes no arguments");
4672 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4673 if (!SWIG_IsOK(res1)) {
4674 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_usb_class_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4675 }
4676 arg1 = (CameraAbilities *)(argp1);
4677 result = (int) ((arg1)->usb_class);
4678 resultobj = SWIG_From_int((int)(result));
4679 return resultobj;
4680 fail:
4681 return NULL;
4682 }
4683
4684
_wrap_CameraAbilities_usb_subclass_get(PyObject * self,PyObject * args)4685 SWIGINTERN PyObject *_wrap_CameraAbilities_usb_subclass_get(PyObject *self, PyObject *args) {
4686 PyObject *resultobj = 0;
4687 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4688 void *argp1 = 0 ;
4689 int res1 = 0 ;
4690 int result;
4691
4692 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_usb_subclass_get takes no arguments");
4693 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4694 if (!SWIG_IsOK(res1)) {
4695 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_usb_subclass_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4696 }
4697 arg1 = (CameraAbilities *)(argp1);
4698 result = (int) ((arg1)->usb_subclass);
4699 resultobj = SWIG_From_int((int)(result));
4700 return resultobj;
4701 fail:
4702 return NULL;
4703 }
4704
4705
_wrap_CameraAbilities_usb_protocol_get(PyObject * self,PyObject * args)4706 SWIGINTERN PyObject *_wrap_CameraAbilities_usb_protocol_get(PyObject *self, PyObject *args) {
4707 PyObject *resultobj = 0;
4708 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4709 void *argp1 = 0 ;
4710 int res1 = 0 ;
4711 int result;
4712
4713 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_usb_protocol_get takes no arguments");
4714 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4715 if (!SWIG_IsOK(res1)) {
4716 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_usb_protocol_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4717 }
4718 arg1 = (CameraAbilities *)(argp1);
4719 result = (int) ((arg1)->usb_protocol);
4720 resultobj = SWIG_From_int((int)(result));
4721 return resultobj;
4722 fail:
4723 return NULL;
4724 }
4725
4726
_wrap_CameraAbilities_library_get(PyObject * self,PyObject * args)4727 SWIGINTERN PyObject *_wrap_CameraAbilities_library_get(PyObject *self, PyObject *args) {
4728 PyObject *resultobj = 0;
4729 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4730 void *argp1 = 0 ;
4731 int res1 = 0 ;
4732 char *result = 0 ;
4733
4734 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_library_get takes no arguments");
4735 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4736 if (!SWIG_IsOK(res1)) {
4737 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_library_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4738 }
4739 arg1 = (CameraAbilities *)(argp1);
4740 result = (char *)(char *) ((arg1)->library);
4741 {
4742 size_t size = SWIG_strnlen(result, 1024);
4743
4744
4745
4746 resultobj = SWIG_FromCharPtrAndSize(result, size);
4747 }
4748 return resultobj;
4749 fail:
4750 return NULL;
4751 }
4752
4753
_wrap_CameraAbilities_id_get(PyObject * self,PyObject * args)4754 SWIGINTERN PyObject *_wrap_CameraAbilities_id_get(PyObject *self, PyObject *args) {
4755 PyObject *resultobj = 0;
4756 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4757 void *argp1 = 0 ;
4758 int res1 = 0 ;
4759 char *result = 0 ;
4760
4761 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_id_get takes no arguments");
4762 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4763 if (!SWIG_IsOK(res1)) {
4764 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_id_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4765 }
4766 arg1 = (CameraAbilities *)(argp1);
4767 result = (char *)(char *) ((arg1)->id);
4768 {
4769 size_t size = SWIG_strnlen(result, 1024);
4770
4771
4772
4773 resultobj = SWIG_FromCharPtrAndSize(result, size);
4774 }
4775 return resultobj;
4776 fail:
4777 return NULL;
4778 }
4779
4780
_wrap_CameraAbilities_device_type_get(PyObject * self,PyObject * args)4781 SWIGINTERN PyObject *_wrap_CameraAbilities_device_type_get(PyObject *self, PyObject *args) {
4782 PyObject *resultobj = 0;
4783 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4784 void *argp1 = 0 ;
4785 int res1 = 0 ;
4786 GphotoDeviceType result;
4787
4788 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_device_type_get takes no arguments");
4789 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4790 if (!SWIG_IsOK(res1)) {
4791 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_device_type_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4792 }
4793 arg1 = (CameraAbilities *)(argp1);
4794 result = (GphotoDeviceType) ((arg1)->device_type);
4795 resultobj = SWIG_From_int((int)(result));
4796 return resultobj;
4797 fail:
4798 return NULL;
4799 }
4800
4801
_wrap_CameraAbilities_reserved2_get(PyObject * self,PyObject * args)4802 SWIGINTERN PyObject *_wrap_CameraAbilities_reserved2_get(PyObject *self, PyObject *args) {
4803 PyObject *resultobj = 0;
4804 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4805 void *argp1 = 0 ;
4806 int res1 = 0 ;
4807 int result;
4808
4809 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_reserved2_get takes no arguments");
4810 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4811 if (!SWIG_IsOK(res1)) {
4812 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_reserved2_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4813 }
4814 arg1 = (CameraAbilities *)(argp1);
4815 result = (int) ((arg1)->reserved2);
4816 resultobj = SWIG_From_int((int)(result));
4817 return resultobj;
4818 fail:
4819 return NULL;
4820 }
4821
4822
_wrap_CameraAbilities_reserved3_get(PyObject * self,PyObject * args)4823 SWIGINTERN PyObject *_wrap_CameraAbilities_reserved3_get(PyObject *self, PyObject *args) {
4824 PyObject *resultobj = 0;
4825 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4826 void *argp1 = 0 ;
4827 int res1 = 0 ;
4828 int result;
4829
4830 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_reserved3_get takes no arguments");
4831 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4832 if (!SWIG_IsOK(res1)) {
4833 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_reserved3_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4834 }
4835 arg1 = (CameraAbilities *)(argp1);
4836 result = (int) ((arg1)->reserved3);
4837 resultobj = SWIG_From_int((int)(result));
4838 return resultobj;
4839 fail:
4840 return NULL;
4841 }
4842
4843
_wrap_CameraAbilities_reserved4_get(PyObject * self,PyObject * args)4844 SWIGINTERN PyObject *_wrap_CameraAbilities_reserved4_get(PyObject *self, PyObject *args) {
4845 PyObject *resultobj = 0;
4846 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4847 void *argp1 = 0 ;
4848 int res1 = 0 ;
4849 int result;
4850
4851 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_reserved4_get takes no arguments");
4852 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4853 if (!SWIG_IsOK(res1)) {
4854 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_reserved4_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4855 }
4856 arg1 = (CameraAbilities *)(argp1);
4857 result = (int) ((arg1)->reserved4);
4858 resultobj = SWIG_From_int((int)(result));
4859 return resultobj;
4860 fail:
4861 return NULL;
4862 }
4863
4864
_wrap_CameraAbilities_reserved5_get(PyObject * self,PyObject * args)4865 SWIGINTERN PyObject *_wrap_CameraAbilities_reserved5_get(PyObject *self, PyObject *args) {
4866 PyObject *resultobj = 0;
4867 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4868 void *argp1 = 0 ;
4869 int res1 = 0 ;
4870 int result;
4871
4872 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_reserved5_get takes no arguments");
4873 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4874 if (!SWIG_IsOK(res1)) {
4875 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_reserved5_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4876 }
4877 arg1 = (CameraAbilities *)(argp1);
4878 result = (int) ((arg1)->reserved5);
4879 resultobj = SWIG_From_int((int)(result));
4880 return resultobj;
4881 fail:
4882 return NULL;
4883 }
4884
4885
_wrap_CameraAbilities_reserved6_get(PyObject * self,PyObject * args)4886 SWIGINTERN PyObject *_wrap_CameraAbilities_reserved6_get(PyObject *self, PyObject *args) {
4887 PyObject *resultobj = 0;
4888 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4889 void *argp1 = 0 ;
4890 int res1 = 0 ;
4891 int result;
4892
4893 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_reserved6_get takes no arguments");
4894 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4895 if (!SWIG_IsOK(res1)) {
4896 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_reserved6_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4897 }
4898 arg1 = (CameraAbilities *)(argp1);
4899 result = (int) ((arg1)->reserved6);
4900 resultobj = SWIG_From_int((int)(result));
4901 return resultobj;
4902 fail:
4903 return NULL;
4904 }
4905
4906
_wrap_CameraAbilities_reserved7_get(PyObject * self,PyObject * args)4907 SWIGINTERN PyObject *_wrap_CameraAbilities_reserved7_get(PyObject *self, PyObject *args) {
4908 PyObject *resultobj = 0;
4909 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4910 void *argp1 = 0 ;
4911 int res1 = 0 ;
4912 int result;
4913
4914 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_reserved7_get takes no arguments");
4915 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4916 if (!SWIG_IsOK(res1)) {
4917 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_reserved7_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4918 }
4919 arg1 = (CameraAbilities *)(argp1);
4920 result = (int) ((arg1)->reserved7);
4921 resultobj = SWIG_From_int((int)(result));
4922 return resultobj;
4923 fail:
4924 return NULL;
4925 }
4926
4927
_wrap_CameraAbilities_reserved8_get(PyObject * self,PyObject * args)4928 SWIGINTERN PyObject *_wrap_CameraAbilities_reserved8_get(PyObject *self, PyObject *args) {
4929 PyObject *resultobj = 0;
4930 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4931 void *argp1 = 0 ;
4932 int res1 = 0 ;
4933 int result;
4934
4935 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "CameraAbilities_reserved8_get takes no arguments");
4936 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, 0 | 0 );
4937 if (!SWIG_IsOK(res1)) {
4938 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CameraAbilities_reserved8_get" "', argument " "1"" of type '" "CameraAbilities *""'");
4939 }
4940 arg1 = (CameraAbilities *)(argp1);
4941 result = (int) ((arg1)->reserved8);
4942 resultobj = SWIG_From_int((int)(result));
4943 return resultobj;
4944 fail:
4945 return NULL;
4946 }
4947
4948
_wrap_delete_CameraAbilities(PyObject * self,PyObject * args)4949 SWIGINTERN PyObject *_wrap_delete_CameraAbilities(PyObject *self, PyObject *args) {
4950 PyObject *resultobj = 0;
4951 CameraAbilities *arg1 = (CameraAbilities *) 0 ;
4952 void *argp1 = 0 ;
4953 int res1 = 0 ;
4954
4955 if (args && PyTuple_Check(args) && PyTuple_GET_SIZE(args) > 0) SWIG_exception_fail(SWIG_TypeError, "delete_CameraAbilities takes no arguments");
4956 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_CameraAbilities, SWIG_POINTER_DISOWN | 0 );
4957 if (!SWIG_IsOK(res1)) {
4958 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CameraAbilities" "', argument " "1"" of type '" "CameraAbilities *""'");
4959 }
4960 arg1 = (CameraAbilities *)(argp1);
4961 free((char *) arg1);
4962 resultobj = SWIG_Py_Void();
4963 return resultobj;
4964 fail:
4965 return NULL;
4966 }
4967
4968
SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CameraAbilities)4969 SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_CameraAbilities) /* defines _wrap_delete_CameraAbilities_destructor_closure */
4970
4971 SWIGINTERN PyObject *_wrap_gp_abilities_list_new(PyObject *self, PyObject *args) {
4972 PyObject *resultobj = 0;
4973 CameraAbilitiesList **arg1 = (CameraAbilitiesList **) 0 ;
4974 CameraAbilitiesList *temp1 ;
4975 int result;
4976
4977 {
4978 temp1 = NULL;
4979 arg1 = &temp1;
4980 }
4981 if (!PyArg_UnpackTuple(args, "gp_abilities_list_new", 0, 0)) SWIG_fail;
4982 result = (int)gp_abilities_list_new(arg1);
4983 resultobj = SWIG_From_int((int)(result));
4984 {
4985 resultobj = SWIG_Python_AppendOutput(
4986 resultobj, SWIG_NewPointerObj(*arg1, SWIGTYPE_p__CameraAbilitiesList, SWIG_POINTER_OWN));
4987 }
4988 return resultobj;
4989 fail:
4990 return NULL;
4991 }
4992
4993
_wrap_gp_abilities_list_load(PyObject * self,PyObject * args)4994 SWIGINTERN PyObject *_wrap_gp_abilities_list_load(PyObject *self, PyObject *args) {
4995 PyObject *resultobj = 0;
4996 CameraAbilitiesList *arg1 = (CameraAbilitiesList *) 0 ;
4997 GPContext *arg2 = (GPContext *) 0 ;
4998 void *argp1 = 0 ;
4999 int res1 = 0 ;
5000 void *argp2 = 0 ;
5001 int res2 = 0 ;
5002 PyObject * obj0 = 0 ;
5003 PyObject * obj1 = 0 ;
5004 int result;
5005
5006 {
5007 arg2 = NULL;
5008 }
5009 if (!PyArg_UnpackTuple(args, "gp_abilities_list_load", 1, 2, &obj0, &obj1)) SWIG_fail;
5010 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
5011 if (!SWIG_IsOK(res1)) {
5012 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_abilities_list_load" "', argument " "1"" of type '" "CameraAbilitiesList *""'");
5013 }
5014 arg1 = (CameraAbilitiesList *)(argp1);
5015 if (obj1) {
5016 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p__GPContext, 0 | 0 );
5017 if (!SWIG_IsOK(res2)) {
5018 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_abilities_list_load" "', argument " "2"" of type '" "GPContext *""'");
5019 }
5020 arg2 = (GPContext *)(argp2);
5021 }
5022 result = (int)gp_abilities_list_load(arg1,arg2);
5023 resultobj = SWIG_From_int((int)(result));
5024 return resultobj;
5025 fail:
5026 return NULL;
5027 }
5028
5029
_wrap_gp_abilities_list_load_dir(PyObject * self,PyObject * args)5030 SWIGINTERN PyObject *_wrap_gp_abilities_list_load_dir(PyObject *self, PyObject *args) {
5031 PyObject *resultobj = 0;
5032 CameraAbilitiesList *arg1 = (CameraAbilitiesList *) 0 ;
5033 char *arg2 = (char *) 0 ;
5034 GPContext *arg3 = (GPContext *) 0 ;
5035 void *argp1 = 0 ;
5036 int res1 = 0 ;
5037 int res2 ;
5038 char *buf2 = 0 ;
5039 int alloc2 = 0 ;
5040 void *argp3 = 0 ;
5041 int res3 = 0 ;
5042 PyObject * obj0 = 0 ;
5043 PyObject * obj1 = 0 ;
5044 PyObject * obj2 = 0 ;
5045 int result;
5046
5047 {
5048 arg3 = NULL;
5049 }
5050 if (!PyArg_UnpackTuple(args, "gp_abilities_list_load_dir", 2, 3, &obj0, &obj1, &obj2)) SWIG_fail;
5051 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
5052 if (!SWIG_IsOK(res1)) {
5053 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_abilities_list_load_dir" "', argument " "1"" of type '" "CameraAbilitiesList *""'");
5054 }
5055 arg1 = (CameraAbilitiesList *)(argp1);
5056 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5057 if (!SWIG_IsOK(res2)) {
5058 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_abilities_list_load_dir" "', argument " "2"" of type '" "char const *""'");
5059 }
5060 arg2 = (char *)(buf2);
5061 if (obj2) {
5062 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p__GPContext, 0 | 0 );
5063 if (!SWIG_IsOK(res3)) {
5064 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gp_abilities_list_load_dir" "', argument " "3"" of type '" "GPContext *""'");
5065 }
5066 arg3 = (GPContext *)(argp3);
5067 }
5068 result = (int)gp_abilities_list_load_dir(arg1,(char const *)arg2,arg3);
5069 resultobj = SWIG_From_int((int)(result));
5070 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5071 return resultobj;
5072 fail:
5073 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5074 return NULL;
5075 }
5076
5077
_wrap_gp_abilities_list_reset(PyObject * self,PyObject * args)5078 SWIGINTERN PyObject *_wrap_gp_abilities_list_reset(PyObject *self, PyObject *args) {
5079 PyObject *resultobj = 0;
5080 CameraAbilitiesList *arg1 = (CameraAbilitiesList *) 0 ;
5081 void *argp1 = 0 ;
5082 int res1 = 0 ;
5083 PyObject * obj0 = 0 ;
5084 int result;
5085
5086 if (!PyArg_UnpackTuple(args, "gp_abilities_list_reset", 1, 1, &obj0)) SWIG_fail;
5087 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
5088 if (!SWIG_IsOK(res1)) {
5089 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_abilities_list_reset" "', argument " "1"" of type '" "CameraAbilitiesList *""'");
5090 }
5091 arg1 = (CameraAbilitiesList *)(argp1);
5092 result = (int)gp_abilities_list_reset(arg1);
5093 resultobj = SWIG_From_int((int)(result));
5094 return resultobj;
5095 fail:
5096 return NULL;
5097 }
5098
5099
_wrap_gp_abilities_list_detect(PyObject * self,PyObject * args)5100 SWIGINTERN PyObject *_wrap_gp_abilities_list_detect(PyObject *self, PyObject *args) {
5101 PyObject *resultobj = 0;
5102 CameraAbilitiesList *arg1 = (CameraAbilitiesList *) 0 ;
5103 GPPortInfoList *arg2 = (GPPortInfoList *) 0 ;
5104 CameraList *arg3 = (CameraList *) 0 ;
5105 GPContext *arg4 = (GPContext *) 0 ;
5106 void *argp1 = 0 ;
5107 int res1 = 0 ;
5108 void *argp2 = 0 ;
5109 int res2 = 0 ;
5110 void *argp4 = 0 ;
5111 int res4 = 0 ;
5112 PyObject * obj0 = 0 ;
5113 PyObject * obj1 = 0 ;
5114 PyObject * obj2 = 0 ;
5115 int result;
5116
5117 {
5118 arg4 = NULL;
5119 }
5120 {
5121 int error = gp_list_new(&arg3);
5122 if (error < 0) {
5123 arg3 = NULL;
5124 /*@SWIG:src/gphoto2/common/macros.i,18,GPHOTO2_ERROR@*/
5125 PyErr_SetObject(PyExc_GPhoto2Error, PyInt_FromLong(error));
5126 /*@SWIG@*/
5127 SWIG_fail;
5128 }
5129 }
5130 if (!PyArg_UnpackTuple(args, "gp_abilities_list_detect", 2, 3, &obj0, &obj1, &obj2)) SWIG_fail;
5131 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
5132 if (!SWIG_IsOK(res1)) {
5133 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_abilities_list_detect" "', argument " "1"" of type '" "CameraAbilitiesList *""'");
5134 }
5135 arg1 = (CameraAbilitiesList *)(argp1);
5136 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p__GPPortInfoList, 0 | 0 );
5137 if (!SWIG_IsOK(res2)) {
5138 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_abilities_list_detect" "', argument " "2"" of type '" "GPPortInfoList *""'");
5139 }
5140 arg2 = (GPPortInfoList *)(argp2);
5141 if (obj2) {
5142 res4 = SWIG_ConvertPtr(obj2, &argp4,SWIGTYPE_p__GPContext, 0 | 0 );
5143 if (!SWIG_IsOK(res4)) {
5144 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gp_abilities_list_detect" "', argument " "4"" of type '" "GPContext *""'");
5145 }
5146 arg4 = (GPContext *)(argp4);
5147 }
5148 result = (int)gp_abilities_list_detect(arg1,arg2,arg3,arg4);
5149 resultobj = SWIG_From_int((int)(result));
5150 {
5151 resultobj = SWIG_Python_AppendOutput(
5152 resultobj, SWIG_NewPointerObj(arg3, SWIGTYPE_p__CameraList, SWIG_POINTER_OWN));
5153 arg3 = NULL;
5154 }
5155 {
5156 if (arg3 != NULL) {
5157 gp_list_unref(arg3);
5158 }
5159 }
5160 return resultobj;
5161 fail:
5162 {
5163 if (arg3 != NULL) {
5164 gp_list_unref(arg3);
5165 }
5166 }
5167 return NULL;
5168 }
5169
5170
_wrap_gp_abilities_list_append(PyObject * self,PyObject * args)5171 SWIGINTERN PyObject *_wrap_gp_abilities_list_append(PyObject *self, PyObject *args) {
5172 PyObject *resultobj = 0;
5173 CameraAbilitiesList *arg1 = (CameraAbilitiesList *) 0 ;
5174 CameraAbilities arg2 ;
5175 void *argp1 = 0 ;
5176 int res1 = 0 ;
5177 void *argp2 ;
5178 int res2 = 0 ;
5179 PyObject * obj0 = 0 ;
5180 PyObject * obj1 = 0 ;
5181 int result;
5182
5183 if (!PyArg_UnpackTuple(args, "gp_abilities_list_append", 2, 2, &obj0, &obj1)) SWIG_fail;
5184 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
5185 if (!SWIG_IsOK(res1)) {
5186 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_abilities_list_append" "', argument " "1"" of type '" "CameraAbilitiesList *""'");
5187 }
5188 arg1 = (CameraAbilitiesList *)(argp1);
5189 {
5190 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CameraAbilities, 0 );
5191 if (!SWIG_IsOK(res2)) {
5192 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_abilities_list_append" "', argument " "2"" of type '" "CameraAbilities""'");
5193 }
5194 if (!argp2) {
5195 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gp_abilities_list_append" "', argument " "2"" of type '" "CameraAbilities""'");
5196 } else {
5197 arg2 = *((CameraAbilities *)(argp2));
5198 }
5199 }
5200 result = (int)gp_abilities_list_append(arg1,arg2);
5201 resultobj = SWIG_From_int((int)(result));
5202 return resultobj;
5203 fail:
5204 return NULL;
5205 }
5206
5207
_wrap_gp_abilities_list_count(PyObject * self,PyObject * args)5208 SWIGINTERN PyObject *_wrap_gp_abilities_list_count(PyObject *self, PyObject *args) {
5209 PyObject *resultobj = 0;
5210 CameraAbilitiesList *arg1 = (CameraAbilitiesList *) 0 ;
5211 void *argp1 = 0 ;
5212 int res1 = 0 ;
5213 PyObject * obj0 = 0 ;
5214 int result;
5215
5216 if (!PyArg_UnpackTuple(args, "gp_abilities_list_count", 1, 1, &obj0)) SWIG_fail;
5217 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
5218 if (!SWIG_IsOK(res1)) {
5219 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_abilities_list_count" "', argument " "1"" of type '" "CameraAbilitiesList *""'");
5220 }
5221 arg1 = (CameraAbilitiesList *)(argp1);
5222 result = (int)gp_abilities_list_count(arg1);
5223 resultobj = SWIG_From_int((int)(result));
5224 return resultobj;
5225 fail:
5226 return NULL;
5227 }
5228
5229
_wrap_gp_abilities_list_lookup_model(PyObject * self,PyObject * args)5230 SWIGINTERN PyObject *_wrap_gp_abilities_list_lookup_model(PyObject *self, PyObject *args) {
5231 PyObject *resultobj = 0;
5232 CameraAbilitiesList *arg1 = (CameraAbilitiesList *) 0 ;
5233 char *arg2 = (char *) 0 ;
5234 void *argp1 = 0 ;
5235 int res1 = 0 ;
5236 int res2 ;
5237 char *buf2 = 0 ;
5238 int alloc2 = 0 ;
5239 PyObject * obj0 = 0 ;
5240 PyObject * obj1 = 0 ;
5241 int result;
5242
5243 if (!PyArg_UnpackTuple(args, "gp_abilities_list_lookup_model", 2, 2, &obj0, &obj1)) SWIG_fail;
5244 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
5245 if (!SWIG_IsOK(res1)) {
5246 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_abilities_list_lookup_model" "', argument " "1"" of type '" "CameraAbilitiesList *""'");
5247 }
5248 arg1 = (CameraAbilitiesList *)(argp1);
5249 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5250 if (!SWIG_IsOK(res2)) {
5251 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gp_abilities_list_lookup_model" "', argument " "2"" of type '" "char const *""'");
5252 }
5253 arg2 = (char *)(buf2);
5254 result = (int)gp_abilities_list_lookup_model(arg1,(char const *)arg2);
5255 resultobj = SWIG_From_int((int)(result));
5256 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5257 return resultobj;
5258 fail:
5259 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5260 return NULL;
5261 }
5262
5263
_wrap_gp_abilities_list_get_abilities(PyObject * self,PyObject * args)5264 SWIGINTERN PyObject *_wrap_gp_abilities_list_get_abilities(PyObject *self, PyObject *args) {
5265 PyObject *resultobj = 0;
5266 CameraAbilitiesList *arg1 = (CameraAbilitiesList *) 0 ;
5267 int arg2 ;
5268 CameraAbilities *arg3 = (CameraAbilities *) 0 ;
5269 void *argp1 = 0 ;
5270 int res1 = 0 ;
5271 int val2 ;
5272 int ecode2 = 0 ;
5273 PyObject * obj0 = 0 ;
5274 PyObject * obj1 = 0 ;
5275 int result;
5276
5277 {
5278 arg3 = (CameraAbilities *)calloc(1, sizeof(CameraAbilities));
5279 if (arg3 == NULL) {
5280 PyErr_SetString(PyExc_MemoryError, "Cannot allocate " "CameraAbilities");
5281 SWIG_fail;
5282 }
5283 }
5284 if (!PyArg_UnpackTuple(args, "gp_abilities_list_get_abilities", 2, 2, &obj0, &obj1)) SWIG_fail;
5285 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p__CameraAbilitiesList, 0 | 0 );
5286 if (!SWIG_IsOK(res1)) {
5287 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_abilities_list_get_abilities" "', argument " "1"" of type '" "CameraAbilitiesList *""'");
5288 }
5289 arg1 = (CameraAbilitiesList *)(argp1);
5290 ecode2 = SWIG_AsVal_int(obj1, &val2);
5291 if (!SWIG_IsOK(ecode2)) {
5292 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gp_abilities_list_get_abilities" "', argument " "2"" of type '" "int""'");
5293 }
5294 arg2 = (int)(val2);
5295 result = (int)gp_abilities_list_get_abilities(arg1,arg2,arg3);
5296 resultobj = SWIG_From_int((int)(result));
5297 {
5298 resultobj = SWIG_Python_AppendOutput(
5299 resultobj, SWIG_NewPointerObj(arg3, SWIGTYPE_p_CameraAbilities, SWIG_POINTER_OWN));
5300 arg3 = NULL;
5301 }
5302 {
5303 free(arg3);
5304 }
5305 return resultobj;
5306 fail:
5307 {
5308 free(arg3);
5309 }
5310 return NULL;
5311 }
5312
5313
_wrap_gp_message_codeset(PyObject * self,PyObject * args)5314 SWIGINTERN PyObject *_wrap_gp_message_codeset(PyObject *self, PyObject *args) {
5315 PyObject *resultobj = 0;
5316 char *arg1 = (char *) 0 ;
5317 int res1 ;
5318 char *buf1 = 0 ;
5319 int alloc1 = 0 ;
5320 PyObject * obj0 = 0 ;
5321 char *result = 0 ;
5322
5323 if (!PyArg_UnpackTuple(args, "gp_message_codeset", 1, 1, &obj0)) SWIG_fail;
5324 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5325 if (!SWIG_IsOK(res1)) {
5326 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gp_message_codeset" "', argument " "1"" of type '" "char const *""'");
5327 }
5328 arg1 = (char *)(buf1);
5329 result = (char *)gp_message_codeset((char const *)arg1);
5330 resultobj = SWIG_FromCharPtr((const char *)result);
5331 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5332 return resultobj;
5333 fail:
5334 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5335 return NULL;
5336 }
5337
5338
5339 static PyMethodDef SwigMethods[] = {
5340 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
5341 { "SWIG_PyStaticMethod_New", SWIG_PyStaticMethod_New, METH_O, NULL},
5342 { "gp_abilities_list_new", _wrap_gp_abilities_list_new, METH_VARARGS, "\n"
5343 "gp_abilities_list_new() -> int\n"
5344 "Allocate the memory for a new abilities list. \n"
5345 "\n"
5346 "Function to allocate the memory for a new abilities list. \n"
5347 "\n"
5348 "Parameters\n"
5349 "----------\n"
5350 "* `list` : \n"
5351 " CameraAbilitiesList object to initialize \n"
5352 "\n"
5353 "Returns\n"
5354 "-------\n"
5355 "gphoto2 error code \n"
5356 "\n"
5357 "You would then call gp_abilities_list_load() in order to populate it.\n"
5358 "\n"
5359 "See also gphoto2.CameraAbilitiesList\n"
5360 ""},
5361 { "gp_abilities_list_load", _wrap_gp_abilities_list_load, METH_VARARGS, "\n"
5362 "gp_abilities_list_load(list, context) -> int\n"
5363 "\n"
5364 "Parameters\n"
5365 "----------\n"
5366 "list: gphoto2.CameraAbilitiesList\n"
5367 "context: gphoto2.Context (default=None)\n"
5368 "\n"
5369 "Scans the system for camera drivers. \n"
5370 "\n"
5371 "Parameters\n"
5372 "----------\n"
5373 "* `list` : \n"
5374 " a CameraAbilitiesList \n"
5375 "* `context` : \n"
5376 " a GPContext \n"
5377 "\n"
5378 "Returns\n"
5379 "-------\n"
5380 "a gphoto2 error code \n"
5381 "\n"
5382 "All supported camera models will then be added to the list.\n"
5383 "\n"
5384 "See also gphoto2.CameraAbilitiesList.load\n"
5385 ""},
5386 { "gp_abilities_list_load_dir", _wrap_gp_abilities_list_load_dir, METH_VARARGS, "\n"
5387 "gp_abilities_list_load_dir(list, dir, context) -> int\n"
5388 "\n"
5389 "Parameters\n"
5390 "----------\n"
5391 "list: gphoto2.CameraAbilitiesList\n"
5392 "dir: str\n"
5393 "context: gphoto2.Context (default=None)\n"
5394 "\n"
5395 ""},
5396 { "gp_abilities_list_reset", _wrap_gp_abilities_list_reset, METH_VARARGS, "\n"
5397 "gp_abilities_list_reset(list) -> int\n"
5398 "\n"
5399 "Parameters\n"
5400 "----------\n"
5401 "list: gphoto2.CameraAbilitiesList\n"
5402 "\n"
5403 "Reset the list. \n"
5404 "\n"
5405 "Parameters\n"
5406 "----------\n"
5407 "* `list` : \n"
5408 " a CameraAbilitiesList \n"
5409 "\n"
5410 "Returns\n"
5411 "-------\n"
5412 "a gphoto2 error code\n"
5413 "\n"
5414 "See also gphoto2.CameraAbilitiesList.reset\n"
5415 ""},
5416 { "gp_abilities_list_detect", _wrap_gp_abilities_list_detect, METH_VARARGS, "\n"
5417 "gp_abilities_list_detect(list, info_list, context) -> int\n"
5418 "\n"
5419 "Parameters\n"
5420 "----------\n"
5421 "list: gphoto2.CameraAbilitiesList\n"
5422 "info_list: gphoto2.GPPortInfoList\n"
5423 "context: gphoto2.Context (default=None)\n"
5424 "\n"
5425 "Parameters\n"
5426 "----------\n"
5427 "* `list` : \n"
5428 " a CameraAbilitiesList \n"
5429 "* `info_list` : \n"
5430 " the GPPortInfoList of ports to use for detection \n"
5431 "* `l` : \n"
5432 " a CameraList that contains the autodetected cameras after the call \n"
5433 "* `context` : \n"
5434 " a GPContext \n"
5435 "\n"
5436 "Tries to detect any camera connected to the computer using the supplied\n"
5437 "list of supported cameras and the supplied info_list of ports. \n"
5438 "\n"
5439 "Returns\n"
5440 "-------\n"
5441 "a gphoto2 error code\n"
5442 "\n"
5443 "See also gphoto2.CameraAbilitiesList.detect\n"
5444 ""},
5445 { "gp_abilities_list_append", _wrap_gp_abilities_list_append, METH_VARARGS, "\n"
5446 "gp_abilities_list_append(list, abilities) -> int\n"
5447 "\n"
5448 "Parameters\n"
5449 "----------\n"
5450 "list: gphoto2.CameraAbilitiesList\n"
5451 "abilities: gphoto2.CameraAbilities\n"
5452 "\n"
5453 "Append the abilities to the list. \n"
5454 "\n"
5455 "Parameters\n"
5456 "----------\n"
5457 "* `list` : \n"
5458 " CameraAbilitiesList \n"
5459 "* `abilities` : \n"
5460 " CameraAbilities \n"
5461 "\n"
5462 "Returns\n"
5463 "-------\n"
5464 "a gphoto2 error code \n"
5465 "\n"
5466 "This function is called by a camera library on camera_abilities() in\n"
5467 "order to inform libgphoto2 about a supported camera model.\n"
5468 "\n"
5469 "See also gphoto2.CameraAbilitiesList.append\n"
5470 ""},
5471 { "gp_abilities_list_count", _wrap_gp_abilities_list_count, METH_VARARGS, "\n"
5472 "gp_abilities_list_count(list) -> int\n"
5473 "\n"
5474 "Parameters\n"
5475 "----------\n"
5476 "list: gphoto2.CameraAbilitiesList\n"
5477 "\n"
5478 "Count the entries in the supplied list. \n"
5479 "\n"
5480 "Parameters\n"
5481 "----------\n"
5482 "* `list` : \n"
5483 " a CameraAbilitiesList \n"
5484 "\n"
5485 "Returns\n"
5486 "-------\n"
5487 "The number of entries or a gphoto2 error code\n"
5488 "\n"
5489 "See also gphoto2.CameraAbilitiesList.count\n"
5490 ""},
5491 { "gp_abilities_list_lookup_model", _wrap_gp_abilities_list_lookup_model, METH_VARARGS, "\n"
5492 "gp_abilities_list_lookup_model(list, model) -> int\n"
5493 "\n"
5494 "Parameters\n"
5495 "----------\n"
5496 "list: gphoto2.CameraAbilitiesList\n"
5497 "model: str\n"
5498 "\n"
5499 "Search the list for an entry of given model name. \n"
5500 "\n"
5501 "Parameters\n"
5502 "----------\n"
5503 "* `list` : \n"
5504 " a CameraAbilitiesList \n"
5505 "* `model` : \n"
5506 " a camera model name \n"
5507 "\n"
5508 "Returns\n"
5509 "-------\n"
5510 "Index of entry or gphoto2 error code\n"
5511 "\n"
5512 "See also gphoto2.CameraAbilitiesList.lookup_model\n"
5513 ""},
5514 { "gp_abilities_list_get_abilities", _wrap_gp_abilities_list_get_abilities, METH_VARARGS, "\n"
5515 "gp_abilities_list_get_abilities(list, index) -> int\n"
5516 "\n"
5517 "Parameters\n"
5518 "----------\n"
5519 "list: gphoto2.CameraAbilitiesList\n"
5520 "index: int\n"
5521 "\n"
5522 "Retrieve the camera abilities of entry with supplied index number. \n"
5523 "\n"
5524 "Parameters\n"
5525 "----------\n"
5526 "* `list` : \n"
5527 " a CameraAbilitiesList \n"
5528 "* `index` : \n"
5529 " index \n"
5530 "* `abilities` : \n"
5531 " pointer to CameraAbilities for returned data. \n"
5532 "\n"
5533 "Returns\n"
5534 "-------\n"
5535 "a gphoto2 error code \n"
5536 "\n"
5537 "Retrieves the camera abilities of entry with supplied index number.\n"
5538 "Typically, you would call gp_camera_set_abilities() afterwards in order\n"
5539 "to prepare the initialization of a camera.\n"
5540 "\n"
5541 "See also gphoto2.CameraAbilitiesList.get_abilities\n"
5542 ""},
5543 { "gp_message_codeset", _wrap_gp_message_codeset, METH_VARARGS, "\n"
5544 "gp_message_codeset(arg1) -> char const *\n"
5545 "\n"
5546 "Parameters\n"
5547 "----------\n"
5548 "arg1: str\n"
5549 "\n"
5550 "Set the current character codeset libgphoto2 is operating in. \n"
5551 "\n"
5552 "Set the codeset for all messages returned by libgphoto2. \n"
5553 "\n"
5554 "Parameters\n"
5555 "----------\n"
5556 "* `codeset` : \n"
5557 " New codeset for the messages. For instance \"utf-8\". \n"
5558 "\n"
5559 "Returns\n"
5560 "-------\n"
5561 "old codeset as returned from bind_textdomain_codeset(). \n"
5562 "\n"
5563 "You would then call gp_abilities_list_load() in order to populate it.\n"
5564 ""},
5565 { NULL, NULL, 0, NULL }
5566 };
5567
5568 static PyMethodDef SwigMethods_proxydocs[] = {
5569 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
5570 { "SWIG_PyStaticMethod_New", SWIG_PyStaticMethod_New, METH_O, NULL},
5571 { "gp_abilities_list_new", _wrap_gp_abilities_list_new, METH_VARARGS, "\n"
5572 "gp_abilities_list_new() -> int\n"
5573 "Allocate the memory for a new abilities list. \n"
5574 "\n"
5575 "Function to allocate the memory for a new abilities list. \n"
5576 "\n"
5577 "Parameters\n"
5578 "----------\n"
5579 "* `list` : \n"
5580 " CameraAbilitiesList object to initialize \n"
5581 "\n"
5582 "Returns\n"
5583 "-------\n"
5584 "gphoto2 error code \n"
5585 "\n"
5586 "You would then call gp_abilities_list_load() in order to populate it.\n"
5587 "\n"
5588 "See also gphoto2.CameraAbilitiesList\n"
5589 ""},
5590 { "gp_abilities_list_load", _wrap_gp_abilities_list_load, METH_VARARGS, "\n"
5591 "gp_abilities_list_load(list, context) -> int\n"
5592 "\n"
5593 "Parameters\n"
5594 "----------\n"
5595 "list: gphoto2.CameraAbilitiesList\n"
5596 "context: gphoto2.Context (default=None)\n"
5597 "\n"
5598 "Scans the system for camera drivers. \n"
5599 "\n"
5600 "Parameters\n"
5601 "----------\n"
5602 "* `list` : \n"
5603 " a CameraAbilitiesList \n"
5604 "* `context` : \n"
5605 " a GPContext \n"
5606 "\n"
5607 "Returns\n"
5608 "-------\n"
5609 "a gphoto2 error code \n"
5610 "\n"
5611 "All supported camera models will then be added to the list.\n"
5612 "\n"
5613 "See also gphoto2.CameraAbilitiesList.load\n"
5614 ""},
5615 { "gp_abilities_list_load_dir", _wrap_gp_abilities_list_load_dir, METH_VARARGS, "\n"
5616 "gp_abilities_list_load_dir(list, dir, context) -> int\n"
5617 "\n"
5618 "Parameters\n"
5619 "----------\n"
5620 "list: gphoto2.CameraAbilitiesList\n"
5621 "dir: str\n"
5622 "context: gphoto2.Context (default=None)\n"
5623 "\n"
5624 ""},
5625 { "gp_abilities_list_reset", _wrap_gp_abilities_list_reset, METH_VARARGS, "\n"
5626 "gp_abilities_list_reset(list) -> int\n"
5627 "\n"
5628 "Parameters\n"
5629 "----------\n"
5630 "list: gphoto2.CameraAbilitiesList\n"
5631 "\n"
5632 "Reset the list. \n"
5633 "\n"
5634 "Parameters\n"
5635 "----------\n"
5636 "* `list` : \n"
5637 " a CameraAbilitiesList \n"
5638 "\n"
5639 "Returns\n"
5640 "-------\n"
5641 "a gphoto2 error code\n"
5642 "\n"
5643 "See also gphoto2.CameraAbilitiesList.reset\n"
5644 ""},
5645 { "gp_abilities_list_detect", _wrap_gp_abilities_list_detect, METH_VARARGS, "\n"
5646 "gp_abilities_list_detect(list, info_list, context) -> int\n"
5647 "\n"
5648 "Parameters\n"
5649 "----------\n"
5650 "list: gphoto2.CameraAbilitiesList\n"
5651 "info_list: gphoto2.GPPortInfoList\n"
5652 "context: gphoto2.Context (default=None)\n"
5653 "\n"
5654 "Parameters\n"
5655 "----------\n"
5656 "* `list` : \n"
5657 " a CameraAbilitiesList \n"
5658 "* `info_list` : \n"
5659 " the GPPortInfoList of ports to use for detection \n"
5660 "* `l` : \n"
5661 " a CameraList that contains the autodetected cameras after the call \n"
5662 "* `context` : \n"
5663 " a GPContext \n"
5664 "\n"
5665 "Tries to detect any camera connected to the computer using the supplied\n"
5666 "list of supported cameras and the supplied info_list of ports. \n"
5667 "\n"
5668 "Returns\n"
5669 "-------\n"
5670 "a gphoto2 error code\n"
5671 "\n"
5672 "See also gphoto2.CameraAbilitiesList.detect\n"
5673 ""},
5674 { "gp_abilities_list_append", _wrap_gp_abilities_list_append, METH_VARARGS, "\n"
5675 "gp_abilities_list_append(list, abilities) -> int\n"
5676 "\n"
5677 "Parameters\n"
5678 "----------\n"
5679 "list: gphoto2.CameraAbilitiesList\n"
5680 "abilities: gphoto2.CameraAbilities\n"
5681 "\n"
5682 "Append the abilities to the list. \n"
5683 "\n"
5684 "Parameters\n"
5685 "----------\n"
5686 "* `list` : \n"
5687 " CameraAbilitiesList \n"
5688 "* `abilities` : \n"
5689 " CameraAbilities \n"
5690 "\n"
5691 "Returns\n"
5692 "-------\n"
5693 "a gphoto2 error code \n"
5694 "\n"
5695 "This function is called by a camera library on camera_abilities() in\n"
5696 "order to inform libgphoto2 about a supported camera model.\n"
5697 "\n"
5698 "See also gphoto2.CameraAbilitiesList.append\n"
5699 ""},
5700 { "gp_abilities_list_count", _wrap_gp_abilities_list_count, METH_VARARGS, "\n"
5701 "gp_abilities_list_count(list) -> int\n"
5702 "\n"
5703 "Parameters\n"
5704 "----------\n"
5705 "list: gphoto2.CameraAbilitiesList\n"
5706 "\n"
5707 "Count the entries in the supplied list. \n"
5708 "\n"
5709 "Parameters\n"
5710 "----------\n"
5711 "* `list` : \n"
5712 " a CameraAbilitiesList \n"
5713 "\n"
5714 "Returns\n"
5715 "-------\n"
5716 "The number of entries or a gphoto2 error code\n"
5717 "\n"
5718 "See also gphoto2.CameraAbilitiesList.count\n"
5719 ""},
5720 { "gp_abilities_list_lookup_model", _wrap_gp_abilities_list_lookup_model, METH_VARARGS, "\n"
5721 "gp_abilities_list_lookup_model(list, model) -> int\n"
5722 "\n"
5723 "Parameters\n"
5724 "----------\n"
5725 "list: gphoto2.CameraAbilitiesList\n"
5726 "model: str\n"
5727 "\n"
5728 "Search the list for an entry of given model name. \n"
5729 "\n"
5730 "Parameters\n"
5731 "----------\n"
5732 "* `list` : \n"
5733 " a CameraAbilitiesList \n"
5734 "* `model` : \n"
5735 " a camera model name \n"
5736 "\n"
5737 "Returns\n"
5738 "-------\n"
5739 "Index of entry or gphoto2 error code\n"
5740 "\n"
5741 "See also gphoto2.CameraAbilitiesList.lookup_model\n"
5742 ""},
5743 { "gp_abilities_list_get_abilities", _wrap_gp_abilities_list_get_abilities, METH_VARARGS, "\n"
5744 "gp_abilities_list_get_abilities(list, index) -> int\n"
5745 "\n"
5746 "Parameters\n"
5747 "----------\n"
5748 "list: gphoto2.CameraAbilitiesList\n"
5749 "index: int\n"
5750 "\n"
5751 "Retrieve the camera abilities of entry with supplied index number. \n"
5752 "\n"
5753 "Parameters\n"
5754 "----------\n"
5755 "* `list` : \n"
5756 " a CameraAbilitiesList \n"
5757 "* `index` : \n"
5758 " index \n"
5759 "* `abilities` : \n"
5760 " pointer to CameraAbilities for returned data. \n"
5761 "\n"
5762 "Returns\n"
5763 "-------\n"
5764 "a gphoto2 error code \n"
5765 "\n"
5766 "Retrieves the camera abilities of entry with supplied index number.\n"
5767 "Typically, you would call gp_camera_set_abilities() afterwards in order\n"
5768 "to prepare the initialization of a camera.\n"
5769 "\n"
5770 "See also gphoto2.CameraAbilitiesList.get_abilities\n"
5771 ""},
5772 { "gp_message_codeset", _wrap_gp_message_codeset, METH_VARARGS, "\n"
5773 "gp_message_codeset(arg1) -> char const *\n"
5774 "\n"
5775 "Parameters\n"
5776 "----------\n"
5777 "arg1: str\n"
5778 "\n"
5779 "Set the current character codeset libgphoto2 is operating in. \n"
5780 "\n"
5781 "Set the codeset for all messages returned by libgphoto2. \n"
5782 "\n"
5783 "Parameters\n"
5784 "----------\n"
5785 "* `codeset` : \n"
5786 " New codeset for the messages. For instance \"utf-8\". \n"
5787 "\n"
5788 "Returns\n"
5789 "-------\n"
5790 "old codeset as returned from bind_textdomain_codeset(). \n"
5791 "\n"
5792 "You would then call gp_abilities_list_load() in order to populate it.\n"
5793 ""},
5794 { NULL, NULL, 0, NULL }
5795 };
5796
5797 static SwigPyGetSet CameraAbilitiesList___dict___getset = { SwigPyObject_get___dict__, 0 };
5798 SWIGINTERN PyGetSetDef SwigPyBuiltin___CameraAbilitiesList_getset[] = {
5799 { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"_CameraAbilitiesList", &CameraAbilitiesList___dict___getset },
5800 { NULL, NULL, NULL, NULL, NULL } /* Sentinel */
5801 };
5802
5803 SWIGINTERN PyObject *
SwigPyBuiltin___CameraAbilitiesList_richcompare(PyObject * self,PyObject * other,int op)5804 SwigPyBuiltin___CameraAbilitiesList_richcompare(PyObject *self, PyObject *other, int op) {
5805 PyObject *result = NULL;
5806 PyObject *tuple = PyTuple_New(1);
5807 assert(tuple);
5808 PyTuple_SET_ITEM(tuple, 0, other);
5809 Py_XINCREF(other);
5810 if (!result) {
5811 if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) {
5812 result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op);
5813 } else {
5814 result = Py_NotImplemented;
5815 Py_INCREF(result);
5816 }
5817 }
5818 Py_DECREF(tuple);
5819 return result;
5820 }
5821
5822 SWIGINTERN PyMethodDef SwigPyBuiltin___CameraAbilitiesList_methods[] = {
5823 { "__len__", _wrap_CameraAbilitiesList___len__, METH_VARARGS, "__len__(self) -> int" },
5824 { "__getitem__", _wrap_CameraAbilitiesList___getitem__, METH_VARARGS, "\n"
5825 "__getitem__(self, idx)\n"
5826 "\n"
5827 "Parameters\n"
5828 "----------\n"
5829 "idx: int\n"
5830 "\n"
5831 "" },
5832 { "load", _wrap_CameraAbilitiesList_load, METH_VARARGS, "\n"
5833 "load(self, context)\n"
5834 "\n"
5835 "Parameters\n"
5836 "----------\n"
5837 "context: gphoto2.Context (default=None)\n"
5838 "\n"
5839 "Scans the system for camera drivers. \n"
5840 "\n"
5841 "Parameters\n"
5842 "----------\n"
5843 "* `list` : \n"
5844 " a CameraAbilitiesList \n"
5845 "* `context` : \n"
5846 " a GPContext \n"
5847 "\n"
5848 "Returns\n"
5849 "-------\n"
5850 "a gphoto2 error code \n"
5851 "\n"
5852 "All supported camera models will then be added to the list.\n"
5853 "\n"
5854 "See also gphoto2.gp_abilities_list_load\n"
5855 "" },
5856 { "load_dir", _wrap_CameraAbilitiesList_load_dir, METH_VARARGS, "\n"
5857 "load_dir(self, dir, context)\n"
5858 "\n"
5859 "Parameters\n"
5860 "----------\n"
5861 "dir: str\n"
5862 "context: gphoto2.Context (default=None)\n"
5863 "\n"
5864 "" },
5865 { "reset", _wrap_CameraAbilitiesList_reset, METH_VARARGS, "\n"
5866 "reset(self)\n"
5867 "Reset the list. \n"
5868 "\n"
5869 "Parameters\n"
5870 "----------\n"
5871 "* `list` : \n"
5872 " a CameraAbilitiesList \n"
5873 "\n"
5874 "Returns\n"
5875 "-------\n"
5876 "a gphoto2 error code\n"
5877 "\n"
5878 "See also gphoto2.gp_abilities_list_reset\n"
5879 "" },
5880 { "detect", _wrap_CameraAbilitiesList_detect, METH_VARARGS, "\n"
5881 "detect(self, info_list, context)\n"
5882 "\n"
5883 "Parameters\n"
5884 "----------\n"
5885 "info_list: gphoto2.GPPortInfoList\n"
5886 "context: gphoto2.Context (default=None)\n"
5887 "\n"
5888 "Parameters\n"
5889 "----------\n"
5890 "* `list` : \n"
5891 " a CameraAbilitiesList \n"
5892 "* `info_list` : \n"
5893 " the GPPortInfoList of ports to use for detection \n"
5894 "* `l` : \n"
5895 " a CameraList that contains the autodetected cameras after the call \n"
5896 "* `context` : \n"
5897 " a GPContext \n"
5898 "\n"
5899 "Tries to detect any camera connected to the computer using the supplied\n"
5900 "list of supported cameras and the supplied info_list of ports. \n"
5901 "\n"
5902 "Returns\n"
5903 "-------\n"
5904 "a gphoto2 error code\n"
5905 "\n"
5906 "See also gphoto2.gp_abilities_list_detect\n"
5907 "" },
5908 { "append", _wrap_CameraAbilitiesList_append, METH_VARARGS, "\n"
5909 "append(self, abilities)\n"
5910 "\n"
5911 "Parameters\n"
5912 "----------\n"
5913 "abilities: gphoto2.CameraAbilities\n"
5914 "\n"
5915 "Append the abilities to the list. \n"
5916 "\n"
5917 "Parameters\n"
5918 "----------\n"
5919 "* `list` : \n"
5920 " CameraAbilitiesList \n"
5921 "* `abilities` : \n"
5922 " CameraAbilities \n"
5923 "\n"
5924 "Returns\n"
5925 "-------\n"
5926 "a gphoto2 error code \n"
5927 "\n"
5928 "This function is called by a camera library on camera_abilities() in\n"
5929 "order to inform libgphoto2 about a supported camera model.\n"
5930 "\n"
5931 "See also gphoto2.gp_abilities_list_append\n"
5932 "" },
5933 { "count", _wrap_CameraAbilitiesList_count, METH_VARARGS, "\n"
5934 "count(self) -> int\n"
5935 "Count the entries in the supplied list. \n"
5936 "\n"
5937 "Parameters\n"
5938 "----------\n"
5939 "* `list` : \n"
5940 " a CameraAbilitiesList \n"
5941 "\n"
5942 "Returns\n"
5943 "-------\n"
5944 "The number of entries or a gphoto2 error code\n"
5945 "\n"
5946 "See also gphoto2.gp_abilities_list_count\n"
5947 "" },
5948 { "lookup_model", _wrap_CameraAbilitiesList_lookup_model, METH_VARARGS, "\n"
5949 "lookup_model(self, model) -> int\n"
5950 "\n"
5951 "Parameters\n"
5952 "----------\n"
5953 "model: str\n"
5954 "\n"
5955 "Search the list for an entry of given model name. \n"
5956 "\n"
5957 "Parameters\n"
5958 "----------\n"
5959 "* `list` : \n"
5960 " a CameraAbilitiesList \n"
5961 "* `model` : \n"
5962 " a camera model name \n"
5963 "\n"
5964 "Returns\n"
5965 "-------\n"
5966 "Index of entry or gphoto2 error code\n"
5967 "\n"
5968 "See also gphoto2.gp_abilities_list_lookup_model\n"
5969 "" },
5970 { "get_abilities", _wrap_CameraAbilitiesList_get_abilities, METH_VARARGS, "\n"
5971 "get_abilities(self, index)\n"
5972 "\n"
5973 "Parameters\n"
5974 "----------\n"
5975 "index: int\n"
5976 "\n"
5977 "Retrieve the camera abilities of entry with supplied index number. \n"
5978 "\n"
5979 "Parameters\n"
5980 "----------\n"
5981 "* `list` : \n"
5982 " a CameraAbilitiesList \n"
5983 "* `index` : \n"
5984 " index \n"
5985 "* `abilities` : \n"
5986 " pointer to CameraAbilities for returned data. \n"
5987 "\n"
5988 "Returns\n"
5989 "-------\n"
5990 "a gphoto2 error code \n"
5991 "\n"
5992 "Retrieves the camera abilities of entry with supplied index number.\n"
5993 "Typically, you would call gp_camera_set_abilities() afterwards in order\n"
5994 "to prepare the initialization of a camera.\n"
5995 "\n"
5996 "See also gphoto2.gp_abilities_list_get_abilities\n"
5997 "" },
5998 { NULL, NULL, 0, NULL } /* Sentinel */
5999 };
6000
6001 static PyHeapTypeObject SwigPyBuiltin___CameraAbilitiesList_type = {
6002 {
6003 #if PY_VERSION_HEX >= 0x03000000
6004 PyVarObject_HEAD_INIT(NULL, 0)
6005 #else
6006 PyObject_HEAD_INIT(NULL)
6007 0, /* ob_size */
6008 #endif
6009 "gphoto2.abilities_list.CameraAbilitiesList", /* tp_name */
6010 sizeof(SwigPyObject), /* tp_basicsize */
6011 0, /* tp_itemsize */
6012 _wrap_delete_CameraAbilitiesList_destructor_closure, /* tp_dealloc */
6013 (printfunc) 0, /* tp_print */
6014 (getattrfunc) 0, /* tp_getattr */
6015 (setattrfunc) 0, /* tp_setattr */
6016 #if PY_VERSION_HEX >= 0x03000000
6017 0, /* tp_compare */
6018 #else
6019 (cmpfunc) 0, /* tp_compare */
6020 #endif
6021 (reprfunc) 0, /* tp_repr */
6022 &SwigPyBuiltin___CameraAbilitiesList_type.as_number, /* tp_as_number */
6023 &SwigPyBuiltin___CameraAbilitiesList_type.as_sequence, /* tp_as_sequence */
6024 &SwigPyBuiltin___CameraAbilitiesList_type.as_mapping, /* tp_as_mapping */
6025 SwigPyObject_hash, /* tp_hash */
6026 (ternaryfunc) 0, /* tp_call */
6027 (reprfunc) 0, /* tp_str */
6028 (getattrofunc) 0, /* tp_getattro */
6029 (setattrofunc) 0, /* tp_setattro */
6030 &SwigPyBuiltin___CameraAbilitiesList_type.as_buffer, /* tp_as_buffer */
6031 #if PY_VERSION_HEX >= 0x03000000
6032 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
6033 #else
6034 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */
6035 #endif
6036 "::_CameraAbilitiesList", /* tp_doc */
6037 (traverseproc) 0, /* tp_traverse */
6038 (inquiry) 0, /* tp_clear */
6039 SwigPyBuiltin___CameraAbilitiesList_richcompare, /* tp_richcompare */
6040 0, /* tp_weaklistoffset */
6041 (getiterfunc) 0, /* tp_iter */
6042 (iternextfunc) 0, /* tp_iternext */
6043 SwigPyBuiltin___CameraAbilitiesList_methods, /* tp_methods */
6044 0, /* tp_members */
6045 SwigPyBuiltin___CameraAbilitiesList_getset, /* tp_getset */
6046 0, /* tp_base */
6047 0, /* tp_dict */
6048 (descrgetfunc) 0, /* tp_descr_get */
6049 (descrsetfunc) 0, /* tp_descr_set */
6050 offsetof(SwigPyObject, dict), /* tp_dictoffset */
6051 _wrap_new_CameraAbilitiesList, /* tp_init */
6052 (allocfunc) 0, /* tp_alloc */
6053 (newfunc) 0, /* tp_new */
6054 (freefunc) 0, /* tp_free */
6055 (inquiry) 0, /* tp_is_gc */
6056 (PyObject *) 0, /* tp_bases */
6057 (PyObject *) 0, /* tp_mro */
6058 (PyObject *) 0, /* tp_cache */
6059 (PyObject *) 0, /* tp_subclasses */
6060 (PyObject *) 0, /* tp_weaklist */
6061 (destructor) 0, /* tp_del */
6062 (int) 0, /* tp_version_tag */
6063 #if PY_VERSION_HEX >= 0x03040000
6064 (destructor) 0, /* tp_finalize */
6065 #endif
6066 #if PY_VERSION_HEX >= 0x03080000
6067 (vectorcallfunc) 0, /* tp_vectorcall */
6068 #endif
6069 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
6070 0, /* tp_print */
6071 #endif
6072 #ifdef COUNT_ALLOCS
6073 (Py_ssize_t) 0, /* tp_allocs */
6074 (Py_ssize_t) 0, /* tp_frees */
6075 (Py_ssize_t) 0, /* tp_maxalloc */
6076 0, /* tp_prev */
6077 0, /* tp_next */
6078 #endif
6079 },
6080 #if PY_VERSION_HEX >= 0x03050000
6081 {
6082 (unaryfunc) 0, /* am_await */
6083 (unaryfunc) 0, /* am_aiter */
6084 (unaryfunc) 0, /* am_anext */
6085 },
6086 #endif
6087 {
6088 (binaryfunc) 0, /* nb_add */
6089 (binaryfunc) 0, /* nb_subtract */
6090 (binaryfunc) 0, /* nb_multiply */
6091 #if PY_VERSION_HEX < 0x03000000
6092 (binaryfunc) 0, /* nb_divide */
6093 #endif
6094 (binaryfunc) 0, /* nb_remainder */
6095 (binaryfunc) 0, /* nb_divmod */
6096 (ternaryfunc) 0, /* nb_power */
6097 (unaryfunc) 0, /* nb_negative */
6098 (unaryfunc) 0, /* nb_positive */
6099 (unaryfunc) 0, /* nb_absolute */
6100 (inquiry) 0, /* nb_nonzero */
6101 (unaryfunc) 0, /* nb_invert */
6102 (binaryfunc) 0, /* nb_lshift */
6103 (binaryfunc) 0, /* nb_rshift */
6104 (binaryfunc) 0, /* nb_and */
6105 (binaryfunc) 0, /* nb_xor */
6106 (binaryfunc) 0, /* nb_or */
6107 #if PY_VERSION_HEX < 0x03000000
6108 (coercion) 0, /* nb_coerce */
6109 #endif
6110 (unaryfunc) 0, /* nb_int */
6111 #if PY_VERSION_HEX >= 0x03000000
6112 (void *) 0, /* nb_reserved */
6113 #else
6114 (unaryfunc) 0, /* nb_long */
6115 #endif
6116 (unaryfunc) 0, /* nb_float */
6117 #if PY_VERSION_HEX < 0x03000000
6118 (unaryfunc) 0, /* nb_oct */
6119 (unaryfunc) 0, /* nb_hex */
6120 #endif
6121 (binaryfunc) 0, /* nb_inplace_add */
6122 (binaryfunc) 0, /* nb_inplace_subtract */
6123 (binaryfunc) 0, /* nb_inplace_multiply */
6124 #if PY_VERSION_HEX < 0x03000000
6125 (binaryfunc) 0, /* nb_inplace_divide */
6126 #endif
6127 (binaryfunc) 0, /* nb_inplace_remainder */
6128 (ternaryfunc) 0, /* nb_inplace_power */
6129 (binaryfunc) 0, /* nb_inplace_lshift */
6130 (binaryfunc) 0, /* nb_inplace_rshift */
6131 (binaryfunc) 0, /* nb_inplace_and */
6132 (binaryfunc) 0, /* nb_inplace_xor */
6133 (binaryfunc) 0, /* nb_inplace_or */
6134 (binaryfunc) 0, /* nb_floor_divide */
6135 (binaryfunc) 0, /* nb_true_divide */
6136 (binaryfunc) 0, /* nb_inplace_floor_divide */
6137 (binaryfunc) 0, /* nb_inplace_true_divide */
6138 (unaryfunc) 0, /* nb_index */
6139 #if PY_VERSION_HEX >= 0x03050000
6140 (binaryfunc) 0, /* nb_matrix_multiply */
6141 (binaryfunc) 0, /* nb_inplace_matrix_multiply */
6142 #endif
6143 },
6144 {
6145 (lenfunc) 0, /* mp_length */
6146 (binaryfunc) 0, /* mp_subscript */
6147 (objobjargproc) 0, /* mp_ass_subscript */
6148 },
6149 {
6150 _wrap_CameraAbilitiesList___len___lenfunc_closure, /* sq_length */
6151 (binaryfunc) 0, /* sq_concat */
6152 (ssizeargfunc) 0, /* sq_repeat */
6153 _wrap_CameraAbilitiesList___getitem___ssizeargfunc_closure, /* sq_item */
6154 #if PY_VERSION_HEX >= 0x03000000
6155 (void *) 0, /* was_sq_slice */
6156 #else
6157 (ssizessizeargfunc) 0, /* sq_slice */
6158 #endif
6159 (ssizeobjargproc) 0, /* sq_ass_item */
6160 #if PY_VERSION_HEX >= 0x03000000
6161 (void *) 0, /* was_sq_ass_slice */
6162 #else
6163 (ssizessizeobjargproc) 0, /* sq_ass_slice */
6164 #endif
6165 (objobjproc) 0, /* sq_contains */
6166 (binaryfunc) 0, /* sq_inplace_concat */
6167 (ssizeargfunc) 0, /* sq_inplace_repeat */
6168 },
6169 {
6170 #if PY_VERSION_HEX < 0x03000000
6171 (readbufferproc) 0, /* bf_getreadbuffer */
6172 (writebufferproc) 0, /* bf_getwritebuffer */
6173 (segcountproc) 0, /* bf_getsegcount */
6174 (charbufferproc) 0, /* bf_getcharbuffer */
6175 #endif
6176 (getbufferproc) 0, /* bf_getbuffer */
6177 (releasebufferproc) 0, /* bf_releasebuffer */
6178 },
6179 (PyObject *) 0, /* ht_name */
6180 (PyObject *) 0, /* ht_slots */
6181 #if PY_VERSION_HEX >= 0x03030000
6182 (PyObject *) 0, /* ht_qualname */
6183 0, /* ht_cached_keys */
6184 #endif
6185 };
6186
6187 SWIGINTERN SwigPyClientData SwigPyBuiltin___CameraAbilitiesList_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin___CameraAbilitiesList_type};
6188
6189 static SwigPyGetSet CameraAbilities_usb_product_getset = { _wrap_CameraAbilities_usb_product_get, 0 };
6190 static SwigPyGetSet CameraAbilities_usb_protocol_getset = { _wrap_CameraAbilities_usb_protocol_get, 0 };
6191 static SwigPyGetSet CameraAbilities_usb_class_getset = { _wrap_CameraAbilities_usb_class_get, 0 };
6192 static SwigPyGetSet CameraAbilities_usb_vendor_getset = { _wrap_CameraAbilities_usb_vendor_get, 0 };
6193 static SwigPyGetSet CameraAbilities_speed_getset = { _wrap_CameraAbilities_speed_get, 0 };
6194 static SwigPyGetSet CameraAbilities_reserved2_getset = { _wrap_CameraAbilities_reserved2_get, 0 };
6195 static SwigPyGetSet CameraAbilities_model_getset = { _wrap_CameraAbilities_model_get, 0 };
6196 static SwigPyGetSet CameraAbilities_reserved3_getset = { _wrap_CameraAbilities_reserved3_get, 0 };
6197 static SwigPyGetSet CameraAbilities___dict___getset = { SwigPyObject_get___dict__, 0 };
6198 static SwigPyGetSet CameraAbilities_reserved4_getset = { _wrap_CameraAbilities_reserved4_get, 0 };
6199 static SwigPyGetSet CameraAbilities_reserved5_getset = { _wrap_CameraAbilities_reserved5_get, 0 };
6200 static SwigPyGetSet CameraAbilities_id_getset = { _wrap_CameraAbilities_id_get, 0 };
6201 static SwigPyGetSet CameraAbilities_reserved6_getset = { _wrap_CameraAbilities_reserved6_get, 0 };
6202 static SwigPyGetSet CameraAbilities_folder_operations_getset = { _wrap_CameraAbilities_folder_operations_get, 0 };
6203 static SwigPyGetSet CameraAbilities_file_operations_getset = { _wrap_CameraAbilities_file_operations_get, 0 };
6204 static SwigPyGetSet CameraAbilities_operations_getset = { _wrap_CameraAbilities_operations_get, 0 };
6205 static SwigPyGetSet CameraAbilities_reserved7_getset = { _wrap_CameraAbilities_reserved7_get, 0 };
6206 static SwigPyGetSet CameraAbilities_usb_subclass_getset = { _wrap_CameraAbilities_usb_subclass_get, 0 };
6207 static SwigPyGetSet CameraAbilities_device_type_getset = { _wrap_CameraAbilities_device_type_get, 0 };
6208 static SwigPyGetSet CameraAbilities_reserved8_getset = { _wrap_CameraAbilities_reserved8_get, 0 };
6209 static SwigPyGetSet CameraAbilities_port_getset = { _wrap_CameraAbilities_port_get, 0 };
6210 static SwigPyGetSet CameraAbilities_status_getset = { _wrap_CameraAbilities_status_get, 0 };
6211 static SwigPyGetSet CameraAbilities_library_getset = { _wrap_CameraAbilities_library_get, 0 };
6212 SWIGINTERN PyGetSetDef SwigPyBuiltin__CameraAbilities_getset[] = {
6213 { (char *)"usb_product", SwigPyBuiltin_GetterClosure, 0, (char *)"usb_product", &CameraAbilities_usb_product_getset },
6214 { (char *)"usb_protocol", SwigPyBuiltin_GetterClosure, 0, (char *)"usb_protocol", &CameraAbilities_usb_protocol_getset },
6215 { (char *)"usb_class", SwigPyBuiltin_GetterClosure, 0, (char *)"usb_class", &CameraAbilities_usb_class_getset },
6216 { (char *)"usb_vendor", SwigPyBuiltin_GetterClosure, 0, (char *)"usb_vendor", &CameraAbilities_usb_vendor_getset },
6217 { (char *)"speed", SwigPyBuiltin_GetterClosure, 0, (char *)"speed", &CameraAbilities_speed_getset },
6218 { (char *)"reserved2", SwigPyBuiltin_GetterClosure, 0, (char *)"reserved2", &CameraAbilities_reserved2_getset },
6219 { (char *)"model", SwigPyBuiltin_GetterClosure, 0, (char *)"model", &CameraAbilities_model_getset },
6220 { (char *)"reserved3", SwigPyBuiltin_GetterClosure, 0, (char *)"reserved3", &CameraAbilities_reserved3_getset },
6221 { (char *)"__dict__", SwigPyBuiltin_GetterClosure, 0, (char *)"model", &CameraAbilities___dict___getset },
6222 { (char *)"reserved4", SwigPyBuiltin_GetterClosure, 0, (char *)"reserved4", &CameraAbilities_reserved4_getset },
6223 { (char *)"reserved5", SwigPyBuiltin_GetterClosure, 0, (char *)"reserved5", &CameraAbilities_reserved5_getset },
6224 { (char *)"id", SwigPyBuiltin_GetterClosure, 0, (char *)"id", &CameraAbilities_id_getset },
6225 { (char *)"reserved6", SwigPyBuiltin_GetterClosure, 0, (char *)"reserved6", &CameraAbilities_reserved6_getset },
6226 { (char *)"folder_operations", SwigPyBuiltin_GetterClosure, 0, (char *)"folder_operations", &CameraAbilities_folder_operations_getset },
6227 { (char *)"file_operations", SwigPyBuiltin_GetterClosure, 0, (char *)"file_operations", &CameraAbilities_file_operations_getset },
6228 { (char *)"operations", SwigPyBuiltin_GetterClosure, 0, (char *)"operations", &CameraAbilities_operations_getset },
6229 { (char *)"reserved7", SwigPyBuiltin_GetterClosure, 0, (char *)"reserved7", &CameraAbilities_reserved7_getset },
6230 { (char *)"usb_subclass", SwigPyBuiltin_GetterClosure, 0, (char *)"usb_subclass", &CameraAbilities_usb_subclass_getset },
6231 { (char *)"device_type", SwigPyBuiltin_GetterClosure, 0, (char *)"device_type", &CameraAbilities_device_type_getset },
6232 { (char *)"reserved8", SwigPyBuiltin_GetterClosure, 0, (char *)"reserved8", &CameraAbilities_reserved8_getset },
6233 { (char *)"port", SwigPyBuiltin_GetterClosure, 0, (char *)"port", &CameraAbilities_port_getset },
6234 { (char *)"status", SwigPyBuiltin_GetterClosure, 0, (char *)"status", &CameraAbilities_status_getset },
6235 { (char *)"library", SwigPyBuiltin_GetterClosure, 0, (char *)"library", &CameraAbilities_library_getset },
6236 { NULL, NULL, NULL, NULL, NULL } /* Sentinel */
6237 };
6238
6239 SWIGINTERN PyObject *
SwigPyBuiltin__CameraAbilities_richcompare(PyObject * self,PyObject * other,int op)6240 SwigPyBuiltin__CameraAbilities_richcompare(PyObject *self, PyObject *other, int op) {
6241 PyObject *result = NULL;
6242 PyObject *tuple = PyTuple_New(1);
6243 assert(tuple);
6244 PyTuple_SET_ITEM(tuple, 0, other);
6245 Py_XINCREF(other);
6246 if (!result) {
6247 if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) {
6248 result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op);
6249 } else {
6250 result = Py_NotImplemented;
6251 Py_INCREF(result);
6252 }
6253 }
6254 Py_DECREF(tuple);
6255 return result;
6256 }
6257
6258 SWIGINTERN PyMethodDef SwigPyBuiltin__CameraAbilities_methods[] = {
6259 { NULL, NULL, 0, NULL } /* Sentinel */
6260 };
6261
6262 static PyHeapTypeObject SwigPyBuiltin__CameraAbilities_type = {
6263 {
6264 #if PY_VERSION_HEX >= 0x03000000
6265 PyVarObject_HEAD_INIT(NULL, 0)
6266 #else
6267 PyObject_HEAD_INIT(NULL)
6268 0, /* ob_size */
6269 #endif
6270 "gphoto2.abilities_list.CameraAbilities", /* tp_name */
6271 sizeof(SwigPyObject), /* tp_basicsize */
6272 0, /* tp_itemsize */
6273 _wrap_delete_CameraAbilities_destructor_closure, /* tp_dealloc */
6274 (printfunc) 0, /* tp_print */
6275 (getattrfunc) 0, /* tp_getattr */
6276 (setattrfunc) 0, /* tp_setattr */
6277 #if PY_VERSION_HEX >= 0x03000000
6278 0, /* tp_compare */
6279 #else
6280 (cmpfunc) 0, /* tp_compare */
6281 #endif
6282 (reprfunc) 0, /* tp_repr */
6283 &SwigPyBuiltin__CameraAbilities_type.as_number, /* tp_as_number */
6284 &SwigPyBuiltin__CameraAbilities_type.as_sequence, /* tp_as_sequence */
6285 &SwigPyBuiltin__CameraAbilities_type.as_mapping, /* tp_as_mapping */
6286 SwigPyObject_hash, /* tp_hash */
6287 (ternaryfunc) 0, /* tp_call */
6288 (reprfunc) 0, /* tp_str */
6289 (getattrofunc) 0, /* tp_getattro */
6290 (setattrofunc) 0, /* tp_setattro */
6291 &SwigPyBuiltin__CameraAbilities_type.as_buffer, /* tp_as_buffer */
6292 #if PY_VERSION_HEX >= 0x03000000
6293 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
6294 #else
6295 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */
6296 #endif
6297 "\n"
6298 "Describes the properties of a specific camera. \n"
6299 "\n"
6300 "The internals of this structures are used extensively by the camlibs,\n"
6301 "but the status regarding use by frontends is questionable. \n"
6302 "\n"
6303 "C++ includes: gphoto2-abilities-list.h\n"
6304 "",/* tp_doc */
6305 (traverseproc) 0, /* tp_traverse */
6306 (inquiry) 0, /* tp_clear */
6307 SwigPyBuiltin__CameraAbilities_richcompare, /* tp_richcompare */
6308 0, /* tp_weaklistoffset */
6309 (getiterfunc) 0, /* tp_iter */
6310 (iternextfunc) 0, /* tp_iternext */
6311 SwigPyBuiltin__CameraAbilities_methods, /* tp_methods */
6312 0, /* tp_members */
6313 SwigPyBuiltin__CameraAbilities_getset, /* tp_getset */
6314 0, /* tp_base */
6315 0, /* tp_dict */
6316 (descrgetfunc) 0, /* tp_descr_get */
6317 (descrsetfunc) 0, /* tp_descr_set */
6318 offsetof(SwigPyObject, dict), /* tp_dictoffset */
6319 SwigPyBuiltin_BadInit, /* tp_init */
6320 (allocfunc) 0, /* tp_alloc */
6321 (newfunc) 0, /* tp_new */
6322 (freefunc) 0, /* tp_free */
6323 (inquiry) 0, /* tp_is_gc */
6324 (PyObject *) 0, /* tp_bases */
6325 (PyObject *) 0, /* tp_mro */
6326 (PyObject *) 0, /* tp_cache */
6327 (PyObject *) 0, /* tp_subclasses */
6328 (PyObject *) 0, /* tp_weaklist */
6329 (destructor) 0, /* tp_del */
6330 (int) 0, /* tp_version_tag */
6331 #if PY_VERSION_HEX >= 0x03040000
6332 (destructor) 0, /* tp_finalize */
6333 #endif
6334 #if PY_VERSION_HEX >= 0x03080000
6335 (vectorcallfunc) 0, /* tp_vectorcall */
6336 #endif
6337 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
6338 0, /* tp_print */
6339 #endif
6340 #ifdef COUNT_ALLOCS
6341 (Py_ssize_t) 0, /* tp_allocs */
6342 (Py_ssize_t) 0, /* tp_frees */
6343 (Py_ssize_t) 0, /* tp_maxalloc */
6344 0, /* tp_prev */
6345 0, /* tp_next */
6346 #endif
6347 },
6348 #if PY_VERSION_HEX >= 0x03050000
6349 {
6350 (unaryfunc) 0, /* am_await */
6351 (unaryfunc) 0, /* am_aiter */
6352 (unaryfunc) 0, /* am_anext */
6353 },
6354 #endif
6355 {
6356 (binaryfunc) 0, /* nb_add */
6357 (binaryfunc) 0, /* nb_subtract */
6358 (binaryfunc) 0, /* nb_multiply */
6359 #if PY_VERSION_HEX < 0x03000000
6360 (binaryfunc) 0, /* nb_divide */
6361 #endif
6362 (binaryfunc) 0, /* nb_remainder */
6363 (binaryfunc) 0, /* nb_divmod */
6364 (ternaryfunc) 0, /* nb_power */
6365 (unaryfunc) 0, /* nb_negative */
6366 (unaryfunc) 0, /* nb_positive */
6367 (unaryfunc) 0, /* nb_absolute */
6368 (inquiry) 0, /* nb_nonzero */
6369 (unaryfunc) 0, /* nb_invert */
6370 (binaryfunc) 0, /* nb_lshift */
6371 (binaryfunc) 0, /* nb_rshift */
6372 (binaryfunc) 0, /* nb_and */
6373 (binaryfunc) 0, /* nb_xor */
6374 (binaryfunc) 0, /* nb_or */
6375 #if PY_VERSION_HEX < 0x03000000
6376 (coercion) 0, /* nb_coerce */
6377 #endif
6378 (unaryfunc) 0, /* nb_int */
6379 #if PY_VERSION_HEX >= 0x03000000
6380 (void *) 0, /* nb_reserved */
6381 #else
6382 (unaryfunc) 0, /* nb_long */
6383 #endif
6384 (unaryfunc) 0, /* nb_float */
6385 #if PY_VERSION_HEX < 0x03000000
6386 (unaryfunc) 0, /* nb_oct */
6387 (unaryfunc) 0, /* nb_hex */
6388 #endif
6389 (binaryfunc) 0, /* nb_inplace_add */
6390 (binaryfunc) 0, /* nb_inplace_subtract */
6391 (binaryfunc) 0, /* nb_inplace_multiply */
6392 #if PY_VERSION_HEX < 0x03000000
6393 (binaryfunc) 0, /* nb_inplace_divide */
6394 #endif
6395 (binaryfunc) 0, /* nb_inplace_remainder */
6396 (ternaryfunc) 0, /* nb_inplace_power */
6397 (binaryfunc) 0, /* nb_inplace_lshift */
6398 (binaryfunc) 0, /* nb_inplace_rshift */
6399 (binaryfunc) 0, /* nb_inplace_and */
6400 (binaryfunc) 0, /* nb_inplace_xor */
6401 (binaryfunc) 0, /* nb_inplace_or */
6402 (binaryfunc) 0, /* nb_floor_divide */
6403 (binaryfunc) 0, /* nb_true_divide */
6404 (binaryfunc) 0, /* nb_inplace_floor_divide */
6405 (binaryfunc) 0, /* nb_inplace_true_divide */
6406 (unaryfunc) 0, /* nb_index */
6407 #if PY_VERSION_HEX >= 0x03050000
6408 (binaryfunc) 0, /* nb_matrix_multiply */
6409 (binaryfunc) 0, /* nb_inplace_matrix_multiply */
6410 #endif
6411 },
6412 {
6413 (lenfunc) 0, /* mp_length */
6414 (binaryfunc) 0, /* mp_subscript */
6415 (objobjargproc) 0, /* mp_ass_subscript */
6416 },
6417 {
6418 (lenfunc) 0, /* sq_length */
6419 (binaryfunc) 0, /* sq_concat */
6420 (ssizeargfunc) 0, /* sq_repeat */
6421 (ssizeargfunc) 0, /* sq_item */
6422 #if PY_VERSION_HEX >= 0x03000000
6423 (void *) 0, /* was_sq_slice */
6424 #else
6425 (ssizessizeargfunc) 0, /* sq_slice */
6426 #endif
6427 (ssizeobjargproc) 0, /* sq_ass_item */
6428 #if PY_VERSION_HEX >= 0x03000000
6429 (void *) 0, /* was_sq_ass_slice */
6430 #else
6431 (ssizessizeobjargproc) 0, /* sq_ass_slice */
6432 #endif
6433 (objobjproc) 0, /* sq_contains */
6434 (binaryfunc) 0, /* sq_inplace_concat */
6435 (ssizeargfunc) 0, /* sq_inplace_repeat */
6436 },
6437 {
6438 #if PY_VERSION_HEX < 0x03000000
6439 (readbufferproc) 0, /* bf_getreadbuffer */
6440 (writebufferproc) 0, /* bf_getwritebuffer */
6441 (segcountproc) 0, /* bf_getsegcount */
6442 (charbufferproc) 0, /* bf_getcharbuffer */
6443 #endif
6444 (getbufferproc) 0, /* bf_getbuffer */
6445 (releasebufferproc) 0, /* bf_releasebuffer */
6446 },
6447 (PyObject *) 0, /* ht_name */
6448 (PyObject *) 0, /* ht_slots */
6449 #if PY_VERSION_HEX >= 0x03030000
6450 (PyObject *) 0, /* ht_qualname */
6451 0, /* ht_cached_keys */
6452 #endif
6453 };
6454
6455 SWIGINTERN SwigPyClientData SwigPyBuiltin__CameraAbilities_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__CameraAbilities_type};
6456
6457
6458 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
6459
6460 static swig_type_info _swigt__p_CameraAbilities = {"_p_CameraAbilities", "CameraAbilities *", 0, 0, (void*)&SwigPyBuiltin__CameraAbilities_clientdata, 0};
6461 static swig_type_info _swigt__p_CameraCaptureType = {"_p_CameraCaptureType", "enum CameraCaptureType *|CameraCaptureType *", 0, 0, (void*)0, 0};
6462 static swig_type_info _swigt__p_CameraDriverStatus = {"_p_CameraDriverStatus", "enum CameraDriverStatus *|CameraDriverStatus *", 0, 0, (void*)0, 0};
6463 static swig_type_info _swigt__p_CameraEventType = {"_p_CameraEventType", "enum CameraEventType *|CameraEventType *", 0, 0, (void*)0, 0};
6464 static swig_type_info _swigt__p_CameraFileAccessType = {"_p_CameraFileAccessType", "enum CameraFileAccessType *|CameraFileAccessType *", 0, 0, (void*)0, 0};
6465 static swig_type_info _swigt__p_CameraFileInfoFields = {"_p_CameraFileInfoFields", "enum CameraFileInfoFields *|CameraFileInfoFields *", 0, 0, (void*)0, 0};
6466 static swig_type_info _swigt__p_CameraFileOperation = {"_p_CameraFileOperation", "enum CameraFileOperation *|CameraFileOperation *", 0, 0, (void*)0, 0};
6467 static swig_type_info _swigt__p_CameraFilePath = {"_p_CameraFilePath", "CameraFilePath *", 0, 0, (void*)0, 0};
6468 static swig_type_info _swigt__p_CameraFilePermissions = {"_p_CameraFilePermissions", "enum CameraFilePermissions *|CameraFilePermissions *", 0, 0, (void*)0, 0};
6469 static swig_type_info _swigt__p_CameraFileStatus = {"_p_CameraFileStatus", "enum CameraFileStatus *|CameraFileStatus *", 0, 0, (void*)0, 0};
6470 static swig_type_info _swigt__p_CameraFileType = {"_p_CameraFileType", "enum CameraFileType *|CameraFileType *", 0, 0, (void*)0, 0};
6471 static swig_type_info _swigt__p_CameraFolderOperation = {"_p_CameraFolderOperation", "enum CameraFolderOperation *|CameraFolderOperation *", 0, 0, (void*)0, 0};
6472 static swig_type_info _swigt__p_CameraOperation = {"_p_CameraOperation", "enum CameraOperation *|CameraOperation *", 0, 0, (void*)0, 0};
6473 static swig_type_info _swigt__p_CameraStorageAccessType = {"_p_CameraStorageAccessType", "enum CameraStorageAccessType *|CameraStorageAccessType *", 0, 0, (void*)0, 0};
6474 static swig_type_info _swigt__p_CameraStorageFilesystemType = {"_p_CameraStorageFilesystemType", "enum CameraStorageFilesystemType *|CameraStorageFilesystemType *", 0, 0, (void*)0, 0};
6475 static swig_type_info _swigt__p_CameraStorageInfoFields = {"_p_CameraStorageInfoFields", "enum CameraStorageInfoFields *|CameraStorageInfoFields *", 0, 0, (void*)0, 0};
6476 static swig_type_info _swigt__p_CameraStorageType = {"_p_CameraStorageType", "enum CameraStorageType *|CameraStorageType *", 0, 0, (void*)0, 0};
6477 static swig_type_info _swigt__p_CameraText = {"_p_CameraText", "CameraText *", 0, 0, (void*)0, 0};
6478 static swig_type_info _swigt__p_CameraWidgetType = {"_p_CameraWidgetType", "enum CameraWidgetType *|CameraWidgetType *", 0, 0, (void*)0, 0};
6479 static swig_type_info _swigt__p_GPLogLevel = {"_p_GPLogLevel", "enum GPLogLevel *|GPLogLevel *", 0, 0, (void*)0, 0};
6480 static swig_type_info _swigt__p_GPPortType = {"_p_GPPortType", "enum GPPortType *|GPPortType *", 0, 0, (void*)0, 0};
6481 static swig_type_info _swigt__p_GPVersionVerbosity = {"_p_GPVersionVerbosity", "enum GPVersionVerbosity *|GPVersionVerbosity *", 0, 0, (void*)0, 0};
6482 static swig_type_info _swigt__p_GphotoDeviceType = {"_p_GphotoDeviceType", "enum GphotoDeviceType *|GphotoDeviceType *", 0, 0, (void*)0, 0};
6483 static swig_type_info _swigt__p_SwigPyObject = {"_p_SwigPyObject", "SwigPyObject *", 0, 0, (void*)0, 0};
6484 static swig_type_info _swigt__p__Camera = {"_p__Camera", "struct _Camera *|Camera *", 0, 0, (void*)0, 0};
6485 static swig_type_info _swigt__p__CameraAbilitiesList = {"_p__CameraAbilitiesList", "struct _CameraAbilitiesList *|_CameraAbilitiesList *|CameraAbilitiesList *", 0, 0, (void*)&SwigPyBuiltin___CameraAbilitiesList_clientdata, 0};
6486 static swig_type_info _swigt__p__CameraFile = {"_p__CameraFile", "struct _CameraFile *|CameraFile *", 0, 0, (void*)0, 0};
6487 static swig_type_info _swigt__p__CameraFileHandler = {"_p__CameraFileHandler", "struct _CameraFileHandler *|CameraFileHandler *", 0, 0, (void*)0, 0};
6488 static swig_type_info _swigt__p__CameraFileInfo = {"_p__CameraFileInfo", "struct _CameraFileInfo *|CameraFileInfo *", 0, 0, (void*)0, 0};
6489 static swig_type_info _swigt__p__CameraFileInfoAudio = {"_p__CameraFileInfoAudio", "struct _CameraFileInfoAudio *|CameraFileInfoAudio *", 0, 0, (void*)0, 0};
6490 static swig_type_info _swigt__p__CameraFileInfoFile = {"_p__CameraFileInfoFile", "struct _CameraFileInfoFile *|CameraFileInfoFile *", 0, 0, (void*)0, 0};
6491 static swig_type_info _swigt__p__CameraFileInfoPreview = {"_p__CameraFileInfoPreview", "struct _CameraFileInfoPreview *|CameraFileInfoPreview *", 0, 0, (void*)0, 0};
6492 static swig_type_info _swigt__p__CameraFilesystem = {"_p__CameraFilesystem", "struct _CameraFilesystem *|CameraFilesystem *", 0, 0, (void*)0, 0};
6493 static swig_type_info _swigt__p__CameraFilesystemFuncs = {"_p__CameraFilesystemFuncs", "struct _CameraFilesystemFuncs *|CameraFilesystemFuncs *", 0, 0, (void*)0, 0};
6494 static swig_type_info _swigt__p__CameraFunctions = {"_p__CameraFunctions", "struct _CameraFunctions *|CameraFunctions *", 0, 0, (void*)0, 0};
6495 static swig_type_info _swigt__p__CameraList = {"_p__CameraList", "struct _CameraList *|CameraList *", 0, 0, (void*)0, 0};
6496 static swig_type_info _swigt__p__CameraPrivateCore = {"_p__CameraPrivateCore", "struct _CameraPrivateCore *|CameraPrivateCore *", 0, 0, (void*)0, 0};
6497 static swig_type_info _swigt__p__CameraPrivateLibrary = {"_p__CameraPrivateLibrary", "struct _CameraPrivateLibrary *|CameraPrivateLibrary *", 0, 0, (void*)0, 0};
6498 static swig_type_info _swigt__p__CameraStorageInformation = {"_p__CameraStorageInformation", "struct _CameraStorageInformation *|CameraStorageInformation *", 0, 0, (void*)0, 0};
6499 static swig_type_info _swigt__p__CameraWidget = {"_p__CameraWidget", "struct _CameraWidget *|CameraWidget *", 0, 0, (void*)0, 0};
6500 static swig_type_info _swigt__p__GPContext = {"_p__GPContext", "struct _GPContext *|GPContext *", 0, 0, (void*)0, 0};
6501 static swig_type_info _swigt__p__GPContextFeedback = {"_p__GPContextFeedback", "enum _GPContextFeedback *|GPContextFeedback *", 0, 0, (void*)0, 0};
6502 static swig_type_info _swigt__p__GPPortInfoList = {"_p__GPPortInfoList", "struct _GPPortInfoList *|GPPortInfoList *", 0, 0, (void*)0, 0};
6503 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
6504 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};
6505 static swig_type_info _swigt__p_long = {"_p_long", "long *|time_t *", 0, 0, (void*)0, 0};
6506 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};
6507 static swig_type_info _swigt__p_p__CameraAbilitiesList = {"_p_p__CameraAbilitiesList", "struct _CameraAbilitiesList **|CameraAbilitiesList **", 0, 0, (void*)0, 0};
6508 static swig_type_info _swigt__p_short = {"_p_short", "short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
6509 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};
6510 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};
6511 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};
6512 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};
6513 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
6514
6515 static swig_type_info *swig_type_initial[] = {
6516 &_swigt__p_CameraAbilities,
6517 &_swigt__p_CameraCaptureType,
6518 &_swigt__p_CameraDriverStatus,
6519 &_swigt__p_CameraEventType,
6520 &_swigt__p_CameraFileAccessType,
6521 &_swigt__p_CameraFileInfoFields,
6522 &_swigt__p_CameraFileOperation,
6523 &_swigt__p_CameraFilePath,
6524 &_swigt__p_CameraFilePermissions,
6525 &_swigt__p_CameraFileStatus,
6526 &_swigt__p_CameraFileType,
6527 &_swigt__p_CameraFolderOperation,
6528 &_swigt__p_CameraOperation,
6529 &_swigt__p_CameraStorageAccessType,
6530 &_swigt__p_CameraStorageFilesystemType,
6531 &_swigt__p_CameraStorageInfoFields,
6532 &_swigt__p_CameraStorageType,
6533 &_swigt__p_CameraText,
6534 &_swigt__p_CameraWidgetType,
6535 &_swigt__p_GPLogLevel,
6536 &_swigt__p_GPPortType,
6537 &_swigt__p_GPVersionVerbosity,
6538 &_swigt__p_GphotoDeviceType,
6539 &_swigt__p_SwigPyObject,
6540 &_swigt__p__Camera,
6541 &_swigt__p__CameraAbilitiesList,
6542 &_swigt__p__CameraFile,
6543 &_swigt__p__CameraFileHandler,
6544 &_swigt__p__CameraFileInfo,
6545 &_swigt__p__CameraFileInfoAudio,
6546 &_swigt__p__CameraFileInfoFile,
6547 &_swigt__p__CameraFileInfoPreview,
6548 &_swigt__p__CameraFilesystem,
6549 &_swigt__p__CameraFilesystemFuncs,
6550 &_swigt__p__CameraFunctions,
6551 &_swigt__p__CameraList,
6552 &_swigt__p__CameraPrivateCore,
6553 &_swigt__p__CameraPrivateLibrary,
6554 &_swigt__p__CameraStorageInformation,
6555 &_swigt__p__CameraWidget,
6556 &_swigt__p__GPContext,
6557 &_swigt__p__GPContextFeedback,
6558 &_swigt__p__GPPortInfoList,
6559 &_swigt__p_char,
6560 &_swigt__p_int,
6561 &_swigt__p_long,
6562 &_swigt__p_long_long,
6563 &_swigt__p_p__CameraAbilitiesList,
6564 &_swigt__p_short,
6565 &_swigt__p_signed_char,
6566 &_swigt__p_unsigned_char,
6567 &_swigt__p_unsigned_int,
6568 &_swigt__p_unsigned_long_long,
6569 &_swigt__p_unsigned_short,
6570 };
6571
6572 static swig_cast_info _swigc__p_CameraAbilities[] = { {&_swigt__p_CameraAbilities, 0, 0, 0},{0, 0, 0, 0}};
6573 static swig_cast_info _swigc__p_CameraCaptureType[] = { {&_swigt__p_CameraCaptureType, 0, 0, 0},{0, 0, 0, 0}};
6574 static swig_cast_info _swigc__p_CameraDriverStatus[] = { {&_swigt__p_CameraDriverStatus, 0, 0, 0},{0, 0, 0, 0}};
6575 static swig_cast_info _swigc__p_CameraEventType[] = { {&_swigt__p_CameraEventType, 0, 0, 0},{0, 0, 0, 0}};
6576 static swig_cast_info _swigc__p_CameraFileAccessType[] = { {&_swigt__p_CameraFileAccessType, 0, 0, 0},{0, 0, 0, 0}};
6577 static swig_cast_info _swigc__p_CameraFileInfoFields[] = { {&_swigt__p_CameraFileInfoFields, 0, 0, 0},{0, 0, 0, 0}};
6578 static swig_cast_info _swigc__p_CameraFileOperation[] = { {&_swigt__p_CameraFileOperation, 0, 0, 0},{0, 0, 0, 0}};
6579 static swig_cast_info _swigc__p_CameraFilePath[] = { {&_swigt__p_CameraFilePath, 0, 0, 0},{0, 0, 0, 0}};
6580 static swig_cast_info _swigc__p_CameraFilePermissions[] = { {&_swigt__p_CameraFilePermissions, 0, 0, 0},{0, 0, 0, 0}};
6581 static swig_cast_info _swigc__p_CameraFileStatus[] = { {&_swigt__p_CameraFileStatus, 0, 0, 0},{0, 0, 0, 0}};
6582 static swig_cast_info _swigc__p_CameraFileType[] = { {&_swigt__p_CameraFileType, 0, 0, 0},{0, 0, 0, 0}};
6583 static swig_cast_info _swigc__p_CameraFolderOperation[] = { {&_swigt__p_CameraFolderOperation, 0, 0, 0},{0, 0, 0, 0}};
6584 static swig_cast_info _swigc__p_CameraOperation[] = { {&_swigt__p_CameraOperation, 0, 0, 0},{0, 0, 0, 0}};
6585 static swig_cast_info _swigc__p_CameraStorageAccessType[] = { {&_swigt__p_CameraStorageAccessType, 0, 0, 0},{0, 0, 0, 0}};
6586 static swig_cast_info _swigc__p_CameraStorageFilesystemType[] = { {&_swigt__p_CameraStorageFilesystemType, 0, 0, 0},{0, 0, 0, 0}};
6587 static swig_cast_info _swigc__p_CameraStorageInfoFields[] = { {&_swigt__p_CameraStorageInfoFields, 0, 0, 0},{0, 0, 0, 0}};
6588 static swig_cast_info _swigc__p_CameraStorageType[] = { {&_swigt__p_CameraStorageType, 0, 0, 0},{0, 0, 0, 0}};
6589 static swig_cast_info _swigc__p_CameraText[] = { {&_swigt__p_CameraText, 0, 0, 0},{0, 0, 0, 0}};
6590 static swig_cast_info _swigc__p_CameraWidgetType[] = { {&_swigt__p_CameraWidgetType, 0, 0, 0},{0, 0, 0, 0}};
6591 static swig_cast_info _swigc__p_GPLogLevel[] = { {&_swigt__p_GPLogLevel, 0, 0, 0},{0, 0, 0, 0}};
6592 static swig_cast_info _swigc__p_GPPortType[] = { {&_swigt__p_GPPortType, 0, 0, 0},{0, 0, 0, 0}};
6593 static swig_cast_info _swigc__p_GPVersionVerbosity[] = { {&_swigt__p_GPVersionVerbosity, 0, 0, 0},{0, 0, 0, 0}};
6594 static swig_cast_info _swigc__p_GphotoDeviceType[] = { {&_swigt__p_GphotoDeviceType, 0, 0, 0},{0, 0, 0, 0}};
6595 static swig_cast_info _swigc__p_SwigPyObject[] = { {&_swigt__p_SwigPyObject, 0, 0, 0},{0, 0, 0, 0}};
6596 static swig_cast_info _swigc__p__Camera[] = { {&_swigt__p__Camera, 0, 0, 0},{0, 0, 0, 0}};
6597 static swig_cast_info _swigc__p__CameraAbilitiesList[] = { {&_swigt__p__CameraAbilitiesList, 0, 0, 0},{0, 0, 0, 0}};
6598 static swig_cast_info _swigc__p__CameraFile[] = { {&_swigt__p__CameraFile, 0, 0, 0},{0, 0, 0, 0}};
6599 static swig_cast_info _swigc__p__CameraFileHandler[] = { {&_swigt__p__CameraFileHandler, 0, 0, 0},{0, 0, 0, 0}};
6600 static swig_cast_info _swigc__p__CameraFileInfo[] = { {&_swigt__p__CameraFileInfo, 0, 0, 0},{0, 0, 0, 0}};
6601 static swig_cast_info _swigc__p__CameraFileInfoAudio[] = { {&_swigt__p__CameraFileInfoAudio, 0, 0, 0},{0, 0, 0, 0}};
6602 static swig_cast_info _swigc__p__CameraFileInfoFile[] = { {&_swigt__p__CameraFileInfoFile, 0, 0, 0},{0, 0, 0, 0}};
6603 static swig_cast_info _swigc__p__CameraFileInfoPreview[] = { {&_swigt__p__CameraFileInfoPreview, 0, 0, 0},{0, 0, 0, 0}};
6604 static swig_cast_info _swigc__p__CameraFilesystem[] = { {&_swigt__p__CameraFilesystem, 0, 0, 0},{0, 0, 0, 0}};
6605 static swig_cast_info _swigc__p__CameraFilesystemFuncs[] = { {&_swigt__p__CameraFilesystemFuncs, 0, 0, 0},{0, 0, 0, 0}};
6606 static swig_cast_info _swigc__p__CameraFunctions[] = { {&_swigt__p__CameraFunctions, 0, 0, 0},{0, 0, 0, 0}};
6607 static swig_cast_info _swigc__p__CameraList[] = { {&_swigt__p__CameraList, 0, 0, 0},{0, 0, 0, 0}};
6608 static swig_cast_info _swigc__p__CameraPrivateCore[] = { {&_swigt__p__CameraPrivateCore, 0, 0, 0},{0, 0, 0, 0}};
6609 static swig_cast_info _swigc__p__CameraPrivateLibrary[] = { {&_swigt__p__CameraPrivateLibrary, 0, 0, 0},{0, 0, 0, 0}};
6610 static swig_cast_info _swigc__p__CameraStorageInformation[] = { {&_swigt__p__CameraStorageInformation, 0, 0, 0},{0, 0, 0, 0}};
6611 static swig_cast_info _swigc__p__CameraWidget[] = { {&_swigt__p__CameraWidget, 0, 0, 0},{0, 0, 0, 0}};
6612 static swig_cast_info _swigc__p__GPContext[] = { {&_swigt__p__GPContext, 0, 0, 0},{0, 0, 0, 0}};
6613 static swig_cast_info _swigc__p__GPContextFeedback[] = { {&_swigt__p__GPContextFeedback, 0, 0, 0},{0, 0, 0, 0}};
6614 static swig_cast_info _swigc__p__GPPortInfoList[] = { {&_swigt__p__GPPortInfoList, 0, 0, 0},{0, 0, 0, 0}};
6615 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
6616 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
6617 static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
6618 static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
6619 static swig_cast_info _swigc__p_p__CameraAbilitiesList[] = { {&_swigt__p_p__CameraAbilitiesList, 0, 0, 0},{0, 0, 0, 0}};
6620 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
6621 static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
6622 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
6623 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
6624 static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
6625 static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
6626
6627 static swig_cast_info *swig_cast_initial[] = {
6628 _swigc__p_CameraAbilities,
6629 _swigc__p_CameraCaptureType,
6630 _swigc__p_CameraDriverStatus,
6631 _swigc__p_CameraEventType,
6632 _swigc__p_CameraFileAccessType,
6633 _swigc__p_CameraFileInfoFields,
6634 _swigc__p_CameraFileOperation,
6635 _swigc__p_CameraFilePath,
6636 _swigc__p_CameraFilePermissions,
6637 _swigc__p_CameraFileStatus,
6638 _swigc__p_CameraFileType,
6639 _swigc__p_CameraFolderOperation,
6640 _swigc__p_CameraOperation,
6641 _swigc__p_CameraStorageAccessType,
6642 _swigc__p_CameraStorageFilesystemType,
6643 _swigc__p_CameraStorageInfoFields,
6644 _swigc__p_CameraStorageType,
6645 _swigc__p_CameraText,
6646 _swigc__p_CameraWidgetType,
6647 _swigc__p_GPLogLevel,
6648 _swigc__p_GPPortType,
6649 _swigc__p_GPVersionVerbosity,
6650 _swigc__p_GphotoDeviceType,
6651 _swigc__p_SwigPyObject,
6652 _swigc__p__Camera,
6653 _swigc__p__CameraAbilitiesList,
6654 _swigc__p__CameraFile,
6655 _swigc__p__CameraFileHandler,
6656 _swigc__p__CameraFileInfo,
6657 _swigc__p__CameraFileInfoAudio,
6658 _swigc__p__CameraFileInfoFile,
6659 _swigc__p__CameraFileInfoPreview,
6660 _swigc__p__CameraFilesystem,
6661 _swigc__p__CameraFilesystemFuncs,
6662 _swigc__p__CameraFunctions,
6663 _swigc__p__CameraList,
6664 _swigc__p__CameraPrivateCore,
6665 _swigc__p__CameraPrivateLibrary,
6666 _swigc__p__CameraStorageInformation,
6667 _swigc__p__CameraWidget,
6668 _swigc__p__GPContext,
6669 _swigc__p__GPContextFeedback,
6670 _swigc__p__GPPortInfoList,
6671 _swigc__p_char,
6672 _swigc__p_int,
6673 _swigc__p_long,
6674 _swigc__p_long_long,
6675 _swigc__p_p__CameraAbilitiesList,
6676 _swigc__p_short,
6677 _swigc__p_signed_char,
6678 _swigc__p_unsigned_char,
6679 _swigc__p_unsigned_int,
6680 _swigc__p_unsigned_long_long,
6681 _swigc__p_unsigned_short,
6682 };
6683
6684
6685 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
6686
6687 static swig_const_info swig_const_table[] = {
6688 {0, 0, 0, 0.0, 0, 0}};
6689
6690 #ifdef __cplusplus
6691 }
6692 #endif
6693 static PyTypeObject *builtin_bases[2];
6694
6695 /* -----------------------------------------------------------------------------
6696 * Type initialization:
6697 * This problem is tough by the requirement that no dynamic
6698 * memory is used. Also, since swig_type_info structures store pointers to
6699 * swig_cast_info structures and swig_cast_info structures store pointers back
6700 * to swig_type_info structures, we need some lookup code at initialization.
6701 * The idea is that swig generates all the structures that are needed.
6702 * The runtime then collects these partially filled structures.
6703 * The SWIG_InitializeModule function takes these initial arrays out of
6704 * swig_module, and does all the lookup, filling in the swig_module.types
6705 * array with the correct data and linking the correct swig_cast_info
6706 * structures together.
6707 *
6708 * The generated swig_type_info structures are assigned statically to an initial
6709 * array. We just loop through that array, and handle each type individually.
6710 * First we lookup if this type has been already loaded, and if so, use the
6711 * loaded structure instead of the generated one. Then we have to fill in the
6712 * cast linked list. The cast data is initially stored in something like a
6713 * two-dimensional array. Each row corresponds to a type (there are the same
6714 * number of rows as there are in the swig_type_initial array). Each entry in
6715 * a column is one of the swig_cast_info structures for that type.
6716 * The cast_initial array is actually an array of arrays, because each row has
6717 * a variable number of columns. So to actually build the cast linked list,
6718 * we find the array of casts associated with the type, and loop through it
6719 * adding the casts to the list. The one last trick we need to do is making
6720 * sure the type pointer in the swig_cast_info struct is correct.
6721 *
6722 * First off, we lookup the cast->type name to see if it is already loaded.
6723 * There are three cases to handle:
6724 * 1) If the cast->type has already been loaded AND the type we are adding
6725 * casting info to has not been loaded (it is in this module), THEN we
6726 * replace the cast->type pointer with the type pointer that has already
6727 * been loaded.
6728 * 2) If BOTH types (the one we are adding casting info to, and the
6729 * cast->type) are loaded, THEN the cast info has already been loaded by
6730 * the previous module so we just ignore it.
6731 * 3) Finally, if cast->type has not already been loaded, then we add that
6732 * swig_cast_info to the linked list (because the cast->type) pointer will
6733 * be correct.
6734 * ----------------------------------------------------------------------------- */
6735
6736 #ifdef __cplusplus
6737 extern "C" {
6738 #if 0
6739 } /* c-mode */
6740 #endif
6741 #endif
6742
6743 #if 0
6744 #define SWIGRUNTIME_DEBUG
6745 #endif
6746
6747
6748 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)6749 SWIG_InitializeModule(void *clientdata) {
6750 size_t i;
6751 swig_module_info *module_head, *iter;
6752 int init;
6753
6754 /* check to see if the circular list has been setup, if not, set it up */
6755 if (swig_module.next==0) {
6756 /* Initialize the swig_module */
6757 swig_module.type_initial = swig_type_initial;
6758 swig_module.cast_initial = swig_cast_initial;
6759 swig_module.next = &swig_module;
6760 init = 1;
6761 } else {
6762 init = 0;
6763 }
6764
6765 /* Try and load any already created modules */
6766 module_head = SWIG_GetModule(clientdata);
6767 if (!module_head) {
6768 /* This is the first module loaded for this interpreter */
6769 /* so set the swig module into the interpreter */
6770 SWIG_SetModule(clientdata, &swig_module);
6771 } else {
6772 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
6773 iter=module_head;
6774 do {
6775 if (iter==&swig_module) {
6776 /* Our module is already in the list, so there's nothing more to do. */
6777 return;
6778 }
6779 iter=iter->next;
6780 } while (iter!= module_head);
6781
6782 /* otherwise we must add our module into the list */
6783 swig_module.next = module_head->next;
6784 module_head->next = &swig_module;
6785 }
6786
6787 /* When multiple interpreters are used, a module could have already been initialized in
6788 a different interpreter, but not yet have a pointer in this interpreter.
6789 In this case, we do not want to continue adding types... everything should be
6790 set up already */
6791 if (init == 0) return;
6792
6793 /* Now work on filling in swig_module.types */
6794 #ifdef SWIGRUNTIME_DEBUG
6795 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
6796 #endif
6797 for (i = 0; i < swig_module.size; ++i) {
6798 swig_type_info *type = 0;
6799 swig_type_info *ret;
6800 swig_cast_info *cast;
6801
6802 #ifdef SWIGRUNTIME_DEBUG
6803 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
6804 #endif
6805
6806 /* if there is another module already loaded */
6807 if (swig_module.next != &swig_module) {
6808 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
6809 }
6810 if (type) {
6811 /* Overwrite clientdata field */
6812 #ifdef SWIGRUNTIME_DEBUG
6813 printf("SWIG_InitializeModule: found type %s\n", type->name);
6814 #endif
6815 if (swig_module.type_initial[i]->clientdata) {
6816 type->clientdata = swig_module.type_initial[i]->clientdata;
6817 #ifdef SWIGRUNTIME_DEBUG
6818 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
6819 #endif
6820 }
6821 } else {
6822 type = swig_module.type_initial[i];
6823 }
6824
6825 /* Insert casting types */
6826 cast = swig_module.cast_initial[i];
6827 while (cast->type) {
6828 /* Don't need to add information already in the list */
6829 ret = 0;
6830 #ifdef SWIGRUNTIME_DEBUG
6831 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
6832 #endif
6833 if (swig_module.next != &swig_module) {
6834 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
6835 #ifdef SWIGRUNTIME_DEBUG
6836 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
6837 #endif
6838 }
6839 if (ret) {
6840 if (type == swig_module.type_initial[i]) {
6841 #ifdef SWIGRUNTIME_DEBUG
6842 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
6843 #endif
6844 cast->type = ret;
6845 ret = 0;
6846 } else {
6847 /* Check for casting already in the list */
6848 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
6849 #ifdef SWIGRUNTIME_DEBUG
6850 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
6851 #endif
6852 if (!ocast) ret = 0;
6853 }
6854 }
6855
6856 if (!ret) {
6857 #ifdef SWIGRUNTIME_DEBUG
6858 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
6859 #endif
6860 if (type->cast) {
6861 type->cast->prev = cast;
6862 cast->next = type->cast;
6863 }
6864 type->cast = cast;
6865 }
6866 cast++;
6867 }
6868 /* Set entry in modules->types array equal to the type */
6869 swig_module.types[i] = type;
6870 }
6871 swig_module.types[i] = 0;
6872
6873 #ifdef SWIGRUNTIME_DEBUG
6874 printf("**** SWIG_InitializeModule: Cast List ******\n");
6875 for (i = 0; i < swig_module.size; ++i) {
6876 int j = 0;
6877 swig_cast_info *cast = swig_module.cast_initial[i];
6878 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
6879 while (cast->type) {
6880 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
6881 cast++;
6882 ++j;
6883 }
6884 printf("---- Total casts: %d\n",j);
6885 }
6886 printf("**** SWIG_InitializeModule: Cast List ******\n");
6887 #endif
6888 }
6889
6890 /* This function will propagate the clientdata field of type to
6891 * any new swig_type_info structures that have been added into the list
6892 * of equivalent types. It is like calling
6893 * SWIG_TypeClientData(type, clientdata) a second time.
6894 */
6895 SWIGRUNTIME void
SWIG_PropagateClientData(void)6896 SWIG_PropagateClientData(void) {
6897 size_t i;
6898 swig_cast_info *equiv;
6899 static int init_run = 0;
6900
6901 if (init_run) return;
6902 init_run = 1;
6903
6904 for (i = 0; i < swig_module.size; i++) {
6905 if (swig_module.types[i]->clientdata) {
6906 equiv = swig_module.types[i]->cast;
6907 while (equiv) {
6908 if (!equiv->converter) {
6909 if (equiv->type && !equiv->type->clientdata)
6910 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
6911 }
6912 equiv = equiv->next;
6913 }
6914 }
6915 }
6916 }
6917
6918 #ifdef __cplusplus
6919 #if 0
6920 {
6921 /* c-mode */
6922 #endif
6923 }
6924 #endif
6925
6926
6927
6928 #ifdef __cplusplus
6929 extern "C" {
6930 #endif
6931
6932 /* Python-specific SWIG API */
6933 #define SWIG_newvarlink() SWIG_Python_newvarlink()
6934 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
6935 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
6936
6937 /* -----------------------------------------------------------------------------
6938 * global variable support code.
6939 * ----------------------------------------------------------------------------- */
6940
6941 typedef struct swig_globalvar {
6942 char *name; /* Name of global variable */
6943 PyObject *(*get_attr)(void); /* Return the current value */
6944 int (*set_attr)(PyObject *); /* Set the value */
6945 struct swig_globalvar *next;
6946 } swig_globalvar;
6947
6948 typedef struct swig_varlinkobject {
6949 PyObject_HEAD
6950 swig_globalvar *vars;
6951 } swig_varlinkobject;
6952
6953 SWIGINTERN PyObject *
swig_varlink_repr(swig_varlinkobject * SWIGUNUSEDPARM (v))6954 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
6955 #if PY_VERSION_HEX >= 0x03000000
6956 return PyUnicode_InternFromString("<Swig global variables>");
6957 #else
6958 return PyString_FromString("<Swig global variables>");
6959 #endif
6960 }
6961
6962 SWIGINTERN PyObject *
swig_varlink_str(swig_varlinkobject * v)6963 swig_varlink_str(swig_varlinkobject *v) {
6964 #if PY_VERSION_HEX >= 0x03000000
6965 PyObject *str = PyUnicode_InternFromString("(");
6966 PyObject *tail;
6967 PyObject *joined;
6968 swig_globalvar *var;
6969 for (var = v->vars; var; var=var->next) {
6970 tail = PyUnicode_FromString(var->name);
6971 joined = PyUnicode_Concat(str, tail);
6972 Py_DecRef(str);
6973 Py_DecRef(tail);
6974 str = joined;
6975 if (var->next) {
6976 tail = PyUnicode_InternFromString(", ");
6977 joined = PyUnicode_Concat(str, tail);
6978 Py_DecRef(str);
6979 Py_DecRef(tail);
6980 str = joined;
6981 }
6982 }
6983 tail = PyUnicode_InternFromString(")");
6984 joined = PyUnicode_Concat(str, tail);
6985 Py_DecRef(str);
6986 Py_DecRef(tail);
6987 str = joined;
6988 #else
6989 PyObject *str = PyString_FromString("(");
6990 swig_globalvar *var;
6991 for (var = v->vars; var; var=var->next) {
6992 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
6993 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
6994 }
6995 PyString_ConcatAndDel(&str,PyString_FromString(")"));
6996 #endif
6997 return str;
6998 }
6999
7000 SWIGINTERN void
swig_varlink_dealloc(swig_varlinkobject * v)7001 swig_varlink_dealloc(swig_varlinkobject *v) {
7002 swig_globalvar *var = v->vars;
7003 while (var) {
7004 swig_globalvar *n = var->next;
7005 free(var->name);
7006 free(var);
7007 var = n;
7008 }
7009 }
7010
7011 SWIGINTERN PyObject *
swig_varlink_getattr(swig_varlinkobject * v,char * n)7012 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
7013 PyObject *res = NULL;
7014 swig_globalvar *var = v->vars;
7015 while (var) {
7016 if (strcmp(var->name,n) == 0) {
7017 res = (*var->get_attr)();
7018 break;
7019 }
7020 var = var->next;
7021 }
7022 if (res == NULL && !PyErr_Occurred()) {
7023 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
7024 }
7025 return res;
7026 }
7027
7028 SWIGINTERN int
swig_varlink_setattr(swig_varlinkobject * v,char * n,PyObject * p)7029 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
7030 int res = 1;
7031 swig_globalvar *var = v->vars;
7032 while (var) {
7033 if (strcmp(var->name,n) == 0) {
7034 res = (*var->set_attr)(p);
7035 break;
7036 }
7037 var = var->next;
7038 }
7039 if (res == 1 && !PyErr_Occurred()) {
7040 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
7041 }
7042 return res;
7043 }
7044
7045 SWIGINTERN PyTypeObject*
swig_varlink_type(void)7046 swig_varlink_type(void) {
7047 static char varlink__doc__[] = "Swig var link object";
7048 static PyTypeObject varlink_type;
7049 static int type_init = 0;
7050 if (!type_init) {
7051 const PyTypeObject tmp = {
7052 #if PY_VERSION_HEX >= 0x03000000
7053 PyVarObject_HEAD_INIT(NULL, 0)
7054 #else
7055 PyObject_HEAD_INIT(NULL)
7056 0, /* ob_size */
7057 #endif
7058 "swigvarlink", /* tp_name */
7059 sizeof(swig_varlinkobject), /* tp_basicsize */
7060 0, /* tp_itemsize */
7061 (destructor) swig_varlink_dealloc, /* tp_dealloc */
7062 0, /* tp_print */
7063 (getattrfunc) swig_varlink_getattr, /* tp_getattr */
7064 (setattrfunc) swig_varlink_setattr, /* tp_setattr */
7065 0, /* tp_compare */
7066 (reprfunc) swig_varlink_repr, /* tp_repr */
7067 0, /* tp_as_number */
7068 0, /* tp_as_sequence */
7069 0, /* tp_as_mapping */
7070 0, /* tp_hash */
7071 0, /* tp_call */
7072 (reprfunc) swig_varlink_str, /* tp_str */
7073 0, /* tp_getattro */
7074 0, /* tp_setattro */
7075 0, /* tp_as_buffer */
7076 0, /* tp_flags */
7077 varlink__doc__, /* tp_doc */
7078 0, /* tp_traverse */
7079 0, /* tp_clear */
7080 0, /* tp_richcompare */
7081 0, /* tp_weaklistoffset */
7082 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
7083 0, /* tp_del */
7084 0, /* tp_version_tag */
7085 #if PY_VERSION_HEX >= 0x03040000
7086 0, /* tp_finalize */
7087 #endif
7088 #if PY_VERSION_HEX >= 0x03080000
7089 0, /* tp_vectorcall */
7090 #endif
7091 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
7092 0, /* tp_print */
7093 #endif
7094 #ifdef COUNT_ALLOCS
7095 0, /* tp_allocs */
7096 0, /* tp_frees */
7097 0, /* tp_maxalloc */
7098 0, /* tp_prev */
7099 0 /* tp_next */
7100 #endif
7101 };
7102 varlink_type = tmp;
7103 type_init = 1;
7104 if (PyType_Ready(&varlink_type) < 0)
7105 return NULL;
7106 }
7107 return &varlink_type;
7108 }
7109
7110 /* Create a variable linking object for use later */
7111 SWIGINTERN PyObject *
SWIG_Python_newvarlink(void)7112 SWIG_Python_newvarlink(void) {
7113 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
7114 if (result) {
7115 result->vars = 0;
7116 }
7117 return ((PyObject*) result);
7118 }
7119
7120 SWIGINTERN void
SWIG_Python_addvarlink(PyObject * p,const char * name,PyObject * (* get_attr)(void),int (* set_attr)(PyObject * p))7121 SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
7122 swig_varlinkobject *v = (swig_varlinkobject *) p;
7123 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
7124 if (gv) {
7125 size_t size = strlen(name)+1;
7126 gv->name = (char *)malloc(size);
7127 if (gv->name) {
7128 memcpy(gv->name, name, size);
7129 gv->get_attr = get_attr;
7130 gv->set_attr = set_attr;
7131 gv->next = v->vars;
7132 }
7133 }
7134 v->vars = gv;
7135 }
7136
7137 SWIGINTERN PyObject *
SWIG_globals(void)7138 SWIG_globals(void) {
7139 static PyObject *globals = 0;
7140 if (!globals) {
7141 globals = SWIG_newvarlink();
7142 }
7143 return globals;
7144 }
7145
7146 /* -----------------------------------------------------------------------------
7147 * constants/methods manipulation
7148 * ----------------------------------------------------------------------------- */
7149
7150 /* Install Constants */
7151 SWIGINTERN void
SWIG_Python_InstallConstants(PyObject * d,swig_const_info constants[])7152 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
7153 PyObject *obj = 0;
7154 size_t i;
7155 for (i = 0; constants[i].type; ++i) {
7156 switch(constants[i].type) {
7157 case SWIG_PY_POINTER:
7158 obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
7159 break;
7160 case SWIG_PY_BINARY:
7161 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
7162 break;
7163 default:
7164 obj = 0;
7165 break;
7166 }
7167 if (obj) {
7168 PyDict_SetItemString(d, constants[i].name, obj);
7169 Py_DECREF(obj);
7170 }
7171 }
7172 }
7173
7174 /* -----------------------------------------------------------------------------*/
7175 /* Fix SwigMethods to carry the callback ptrs when needed */
7176 /* -----------------------------------------------------------------------------*/
7177
7178 SWIGINTERN void
SWIG_Python_FixMethods(PyMethodDef * methods,swig_const_info * const_table,swig_type_info ** types,swig_type_info ** types_initial)7179 SWIG_Python_FixMethods(PyMethodDef *methods,
7180 swig_const_info *const_table,
7181 swig_type_info **types,
7182 swig_type_info **types_initial) {
7183 size_t i;
7184 for (i = 0; methods[i].ml_name; ++i) {
7185 const char *c = methods[i].ml_doc;
7186 if (!c) continue;
7187 c = strstr(c, "swig_ptr: ");
7188 if (c) {
7189 int j;
7190 swig_const_info *ci = 0;
7191 const char *name = c + 10;
7192 for (j = 0; const_table[j].type; ++j) {
7193 if (strncmp(const_table[j].name, name,
7194 strlen(const_table[j].name)) == 0) {
7195 ci = &(const_table[j]);
7196 break;
7197 }
7198 }
7199 if (ci) {
7200 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
7201 if (ptr) {
7202 size_t shift = (ci->ptype) - types;
7203 swig_type_info *ty = types_initial[shift];
7204 size_t ldoc = (c - methods[i].ml_doc);
7205 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
7206 char *ndoc = (char*)malloc(ldoc + lptr + 10);
7207 if (ndoc) {
7208 char *buff = ndoc;
7209 memcpy(buff, methods[i].ml_doc, ldoc);
7210 buff += ldoc;
7211 memcpy(buff, "swig_ptr: ", 10);
7212 buff += 10;
7213 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
7214 methods[i].ml_doc = ndoc;
7215 }
7216 }
7217 }
7218 }
7219 }
7220 }
7221
7222 /* -----------------------------------------------------------------------------
7223 * Method creation and docstring support functions
7224 * ----------------------------------------------------------------------------- */
7225
7226 /* -----------------------------------------------------------------------------
7227 * Function to find the method definition with the correct docstring for the
7228 * proxy module as opposed to the low-level API
7229 * ----------------------------------------------------------------------------- */
7230
SWIG_PythonGetProxyDoc(const char * name)7231 SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
7232 /* Find the function in the modified method table */
7233 size_t offset = 0;
7234 int found = 0;
7235 while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
7236 if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
7237 found = 1;
7238 break;
7239 }
7240 offset++;
7241 }
7242 /* Use the copy with the modified docstring if available */
7243 return found ? &SwigMethods_proxydocs[offset] : NULL;
7244 }
7245
7246 /* -----------------------------------------------------------------------------
7247 * Wrapper of PyInstanceMethod_New() used in Python 3
7248 * It is exported to the generated module, used for -fastproxy
7249 * ----------------------------------------------------------------------------- */
7250
SWIG_PyInstanceMethod_New(PyObject * SWIGUNUSEDPARM (self),PyObject * func)7251 SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
7252 if (PyCFunction_Check(func)) {
7253 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
7254 PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
7255 if (ml)
7256 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
7257 }
7258 #if PY_VERSION_HEX >= 0x03000000
7259 return PyInstanceMethod_New(func);
7260 #else
7261 return PyMethod_New(func, NULL, NULL);
7262 #endif
7263 }
7264
7265 /* -----------------------------------------------------------------------------
7266 * Wrapper of PyStaticMethod_New()
7267 * It is exported to the generated module, used for -fastproxy
7268 * ----------------------------------------------------------------------------- */
7269
SWIG_PyStaticMethod_New(PyObject * SWIGUNUSEDPARM (self),PyObject * func)7270 SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
7271 if (PyCFunction_Check(func)) {
7272 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
7273 PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
7274 if (ml)
7275 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
7276 }
7277 return PyStaticMethod_New(func);
7278 }
7279
7280 #ifdef __cplusplus
7281 }
7282 #endif
7283
7284 /* -----------------------------------------------------------------------------*
7285 * Partial Init method
7286 * -----------------------------------------------------------------------------*/
7287
7288 #ifdef __cplusplus
7289 extern "C"
7290 #endif
7291
7292 SWIGEXPORT
7293 #if PY_VERSION_HEX >= 0x03000000
7294 PyObject*
7295 #else
7296 void
7297 #endif
SWIG_init(void)7298 SWIG_init(void) {
7299 PyObject *m, *d, *md, *globals;
7300
7301 #if PY_VERSION_HEX >= 0x03000000
7302 static struct PyModuleDef SWIG_module = {
7303 PyModuleDef_HEAD_INIT,
7304 SWIG_name,
7305 NULL,
7306 -1,
7307 SwigMethods,
7308 NULL,
7309 NULL,
7310 NULL,
7311 NULL
7312 };
7313 #endif
7314
7315 #if defined(SWIGPYTHON_BUILTIN)
7316 static SwigPyClientData SwigPyObject_clientdata = {
7317 0, 0, 0, 0, 0, 0, 0
7318 };
7319 static PyGetSetDef this_getset_def = {
7320 (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
7321 };
7322 static SwigPyGetSet thisown_getset_closure = {
7323 SwigPyObject_own,
7324 SwigPyObject_own
7325 };
7326 static PyGetSetDef thisown_getset_def = {
7327 (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
7328 };
7329 PyTypeObject *builtin_pytype;
7330 int builtin_base_count;
7331 swig_type_info *builtin_basetype;
7332 PyObject *tuple;
7333 PyGetSetDescrObject *static_getset;
7334 PyTypeObject *metatype;
7335 PyTypeObject *swigpyobject;
7336 SwigPyClientData *cd;
7337 PyObject *public_interface, *public_symbol;
7338 PyObject *this_descr;
7339 PyObject *thisown_descr;
7340 PyObject *self = 0;
7341 int i;
7342
7343 (void)builtin_pytype;
7344 (void)builtin_base_count;
7345 (void)builtin_basetype;
7346 (void)tuple;
7347 (void)static_getset;
7348 (void)self;
7349
7350 /* Metaclass is used to implement static member variables */
7351 metatype = SwigPyObjectType();
7352 assert(metatype);
7353 #endif
7354
7355 (void)globals;
7356
7357 /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
7358 SWIG_This();
7359 SWIG_Python_TypeCache();
7360 SwigPyPacked_type();
7361 #ifndef SWIGPYTHON_BUILTIN
7362 SwigPyObject_type();
7363 #endif
7364
7365 /* Fix SwigMethods to carry the callback ptrs when needed */
7366 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
7367
7368 #if PY_VERSION_HEX >= 0x03000000
7369 m = PyModule_Create(&SWIG_module);
7370 #else
7371 m = Py_InitModule(SWIG_name, SwigMethods);
7372 #endif
7373
7374 md = d = PyModule_GetDict(m);
7375 (void)md;
7376
7377 SWIG_InitializeModule(0);
7378
7379 #ifdef SWIGPYTHON_BUILTIN
7380 swigpyobject = SwigPyObject_TypeOnce();
7381
7382 SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
7383 assert(SwigPyObject_stype);
7384 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
7385 if (!cd) {
7386 SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
7387 SwigPyObject_clientdata.pytype = swigpyobject;
7388 } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
7389 PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
7390 # if PY_VERSION_HEX >= 0x03000000
7391 return NULL;
7392 # else
7393 return;
7394 # endif
7395 }
7396
7397 /* All objects have a 'this' attribute */
7398 this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
7399 (void)this_descr;
7400
7401 /* All objects have a 'thisown' attribute */
7402 thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
7403 (void)thisown_descr;
7404
7405 public_interface = PyList_New(0);
7406 public_symbol = 0;
7407 (void)public_symbol;
7408
7409 PyDict_SetItemString(md, "__all__", public_interface);
7410 Py_DECREF(public_interface);
7411 for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
7412 SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
7413 for (i = 0; swig_const_table[i].name != 0; ++i)
7414 SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
7415 #endif
7416
7417 SWIG_InstallConstants(d,swig_const_table);
7418
7419
7420 {
7421 PyObject *module = PyImport_ImportModule("gphoto2");
7422 if (module != NULL) {
7423 PyExc_GPhoto2Error = PyObject_GetAttrString(module, "GPhoto2Error");
7424 Py_DECREF(module);
7425 }
7426 if (PyExc_GPhoto2Error == NULL)
7427 #if PY_VERSION_HEX >= 0x03000000
7428 return NULL;
7429 #else
7430 return;
7431 #endif
7432 }
7433
7434
7435 /* type '::_CameraAbilitiesList' */
7436 builtin_pytype = (PyTypeObject *)&SwigPyBuiltin___CameraAbilitiesList_type;
7437 builtin_pytype->tp_dict = d = PyDict_New();
7438 SwigPyBuiltin_SetMetaType(builtin_pytype, metatype);
7439 builtin_pytype->tp_new = PyType_GenericNew;
7440 builtin_base_count = 0;
7441 builtin_bases[builtin_base_count] = NULL;
7442 SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases);
7443 PyDict_SetItemString(d, "this", this_descr);
7444 PyDict_SetItemString(d, "thisown", thisown_descr);
7445 if (PyType_Ready(builtin_pytype) < 0) {
7446 PyErr_SetString(PyExc_TypeError, "Could not create type 'CameraAbilitiesList'.");
7447 #if PY_VERSION_HEX >= 0x03000000
7448 return NULL;
7449 #else
7450 return;
7451 #endif
7452 }
7453 Py_INCREF(builtin_pytype);
7454 PyModule_AddObject(m, "CameraAbilitiesList", (PyObject *)builtin_pytype);
7455 SwigPyBuiltin_AddPublicSymbol(public_interface, "CameraAbilitiesList");
7456 d = md;
7457 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_DRIVER_STATUS_PRODUCTION",SWIG_From_int((int)(GP_DRIVER_STATUS_PRODUCTION)));
7458 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_DRIVER_STATUS_TESTING",SWIG_From_int((int)(GP_DRIVER_STATUS_TESTING)));
7459 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_DRIVER_STATUS_EXPERIMENTAL",SWIG_From_int((int)(GP_DRIVER_STATUS_EXPERIMENTAL)));
7460 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_DRIVER_STATUS_DEPRECATED",SWIG_From_int((int)(GP_DRIVER_STATUS_DEPRECATED)));
7461 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_DEVICE_STILL_CAMERA",SWIG_From_int((int)(GP_DEVICE_STILL_CAMERA)));
7462 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_DEVICE_AUDIO_PLAYER",SWIG_From_int((int)(GP_DEVICE_AUDIO_PLAYER)));
7463 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_OPERATION_NONE",SWIG_From_int((int)(GP_OPERATION_NONE)));
7464 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_OPERATION_CAPTURE_IMAGE",SWIG_From_int((int)(GP_OPERATION_CAPTURE_IMAGE)));
7465 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_OPERATION_CAPTURE_VIDEO",SWIG_From_int((int)(GP_OPERATION_CAPTURE_VIDEO)));
7466 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_OPERATION_CAPTURE_AUDIO",SWIG_From_int((int)(GP_OPERATION_CAPTURE_AUDIO)));
7467 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_OPERATION_CAPTURE_PREVIEW",SWIG_From_int((int)(GP_OPERATION_CAPTURE_PREVIEW)));
7468 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_OPERATION_CONFIG",SWIG_From_int((int)(GP_OPERATION_CONFIG)));
7469 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_OPERATION_TRIGGER_CAPTURE",SWIG_From_int((int)(GP_OPERATION_TRIGGER_CAPTURE)));
7470 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FILE_OPERATION_NONE",SWIG_From_int((int)(GP_FILE_OPERATION_NONE)));
7471 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FILE_OPERATION_DELETE",SWIG_From_int((int)(GP_FILE_OPERATION_DELETE)));
7472 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FILE_OPERATION_PREVIEW",SWIG_From_int((int)(GP_FILE_OPERATION_PREVIEW)));
7473 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FILE_OPERATION_RAW",SWIG_From_int((int)(GP_FILE_OPERATION_RAW)));
7474 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FILE_OPERATION_AUDIO",SWIG_From_int((int)(GP_FILE_OPERATION_AUDIO)));
7475 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FILE_OPERATION_EXIF",SWIG_From_int((int)(GP_FILE_OPERATION_EXIF)));
7476 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FOLDER_OPERATION_NONE",SWIG_From_int((int)(GP_FOLDER_OPERATION_NONE)));
7477 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FOLDER_OPERATION_DELETE_ALL",SWIG_From_int((int)(GP_FOLDER_OPERATION_DELETE_ALL)));
7478 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FOLDER_OPERATION_PUT_FILE",SWIG_From_int((int)(GP_FOLDER_OPERATION_PUT_FILE)));
7479 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FOLDER_OPERATION_MAKE_DIR",SWIG_From_int((int)(GP_FOLDER_OPERATION_MAKE_DIR)));
7480 SWIG_Python_SetConstant(d, d == md ? public_interface : NULL, "GP_FOLDER_OPERATION_REMOVE_DIR",SWIG_From_int((int)(GP_FOLDER_OPERATION_REMOVE_DIR)));
7481
7482 /* type '::CameraAbilities' */
7483 builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__CameraAbilities_type;
7484 builtin_pytype->tp_dict = d = PyDict_New();
7485 SwigPyBuiltin_SetMetaType(builtin_pytype, metatype);
7486 builtin_pytype->tp_new = PyType_GenericNew;
7487 builtin_base_count = 0;
7488 builtin_bases[builtin_base_count] = NULL;
7489 SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases);
7490 PyDict_SetItemString(d, "this", this_descr);
7491 PyDict_SetItemString(d, "thisown", thisown_descr);
7492 if (PyType_Ready(builtin_pytype) < 0) {
7493 PyErr_SetString(PyExc_TypeError, "Could not create type 'CameraAbilities'.");
7494 #if PY_VERSION_HEX >= 0x03000000
7495 return NULL;
7496 #else
7497 return;
7498 #endif
7499 }
7500 Py_INCREF(builtin_pytype);
7501 PyModule_AddObject(m, "CameraAbilities", (PyObject *)builtin_pytype);
7502 SwigPyBuiltin_AddPublicSymbol(public_interface, "CameraAbilities");
7503 d = md;
7504 #if PY_VERSION_HEX >= 0x03000000
7505 return m;
7506 #else
7507 return;
7508 #endif
7509 }
7510
7511