Graphviz 13.0.0~dev.20250210.0415
Loading...
Searching...
No Matches
gv_python3.cpp
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.0
4 *
5 * Do not make changes to this file unless you know what you are doing - modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9
10#define SWIG_VERSION 0x040200
11#define SWIGPYTHON
12#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
13
14/* -----------------------------------------------------------------------------
15 * This section contains generic SWIG labels for method/variable
16 * declarations/attributes, and other compiler dependent labels.
17 * ----------------------------------------------------------------------------- */
18
19/* template workaround for compilers that cannot correctly implement the C++ standard */
20#ifndef SWIGTEMPLATEDISAMBIGUATOR
21# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
22# define SWIGTEMPLATEDISAMBIGUATOR template
23# elif defined(__HP_aCC)
24/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
25/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
26# define SWIGTEMPLATEDISAMBIGUATOR template
27# else
28# define SWIGTEMPLATEDISAMBIGUATOR
29# endif
30#endif
31
32/* inline attribute */
33#ifndef SWIGINLINE
34# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
35# define SWIGINLINE inline
36# else
37# define SWIGINLINE
38# endif
39#endif
40
41/* attribute recognised by some compilers to avoid 'unused' warnings */
42#ifndef SWIGUNUSED
43# if defined(__GNUC__)
44# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
45# define SWIGUNUSED __attribute__ ((__unused__))
46# else
47# define SWIGUNUSED
48# endif
49# elif defined(__ICC)
50# define SWIGUNUSED __attribute__ ((__unused__))
51# else
52# define SWIGUNUSED
53# endif
54#endif
55
56#ifndef SWIG_MSC_UNSUPPRESS_4505
57# if defined(_MSC_VER)
58# pragma warning(disable : 4505) /* unreferenced local function has been removed */
59# endif
60#endif
61
62#ifndef SWIGUNUSEDPARM
63# ifdef __cplusplus
64# define SWIGUNUSEDPARM(p)
65# else
66# define SWIGUNUSEDPARM(p) p SWIGUNUSED
67# endif
68#endif
69
70/* internal SWIG method */
71#ifndef SWIGINTERN
72# define SWIGINTERN static SWIGUNUSED
73#endif
74
75/* internal inline SWIG method */
76#ifndef SWIGINTERNINLINE
77# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
78#endif
79
80/* exporting methods */
81#if defined(__GNUC__)
82# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
83# ifndef GCC_HASCLASSVISIBILITY
84# define GCC_HASCLASSVISIBILITY
85# endif
86# endif
87#endif
88
89#ifndef SWIGEXPORT
90# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
91# if defined(STATIC_LINKED)
92# define SWIGEXPORT
93# else
94# define SWIGEXPORT __declspec(dllexport)
95# endif
96# else
97# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
98# define SWIGEXPORT __attribute__ ((visibility("default")))
99# else
100# define SWIGEXPORT
101# endif
102# endif
103#endif
104
105/* calling conventions for Windows */
106#ifndef SWIGSTDCALL
107# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
108# define SWIGSTDCALL __stdcall
109# else
110# define SWIGSTDCALL
111# endif
112#endif
113
114/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
115#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
116# define _CRT_SECURE_NO_DEPRECATE
117#endif
118
119/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
120#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
121# define _SCL_SECURE_NO_DEPRECATE
122#endif
123
124/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
125#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
126# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
127#endif
128
129/* Intel's compiler complains if a variable which was never initialised is
130 * cast to void, which is a common idiom which we use to indicate that we
131 * are aware a variable isn't used. So we just silence that warning.
132 * See: https://github.com/swig/swig/issues/192 for more discussion.
133 */
134#ifdef __INTEL_COMPILER
135# pragma warning disable 592
136#endif
137
138#if __cplusplus >=201103L
139# define SWIG_NULLPTR nullptr
140#else
141# define SWIG_NULLPTR NULL
142#endif
143
144
145#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
146/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
147# include <math.h>
148#endif
149
150#if !defined(PY_SSIZE_T_CLEAN) && !defined(SWIG_NO_PY_SSIZE_T_CLEAN)
151#define PY_SSIZE_T_CLEAN
152#endif
153
154#if __GNUC__ >= 7
155#pragma GCC diagnostic push
156#if defined(__cplusplus) && __cplusplus >=201703L
157#pragma GCC diagnostic ignored "-Wregister" /* For python-2.7 headers that use register */
158#endif
159#endif
160
161#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
162/* Use debug wrappers with the Python release dll */
163
164#if defined(_MSC_VER) && _MSC_VER >= 1929
165/* Workaround compilation errors when redefining _DEBUG in MSVC 2019 version 16.10 and later
166 * See https://github.com/swig/swig/issues/2090 */
167# include <corecrt.h>
168#endif
169
170# undef _DEBUG
171# include <Python.h>
172# define _DEBUG 1
173#else
174# include <Python.h>
175#endif
176
177#if __GNUC__ >= 7
178#pragma GCC diagnostic pop
179#endif
180
181#include <stdio.h>
182
183/* -----------------------------------------------------------------------------
184 * swigrun.swg
185 *
186 * This file contains generic C API SWIG runtime support for pointer
187 * type checking.
188 * ----------------------------------------------------------------------------- */
189
190/* This should only be incremented when either the layout of swig_type_info changes,
191 or for whatever reason, the runtime changes incompatibly */
192#define SWIG_RUNTIME_VERSION "4"
193
194/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
195#ifdef SWIG_TYPE_TABLE
196# define SWIG_QUOTE_STRING(x) #x
197# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
198# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
199#else
200# define SWIG_TYPE_TABLE_NAME
201#endif
202
203/*
204 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
205 creating a static or dynamic library from the SWIG runtime code.
206 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
207
208 But only do this if strictly necessary, ie, if you have problems
209 with your compiler or suchlike.
210*/
211
212#ifndef SWIGRUNTIME
213# define SWIGRUNTIME SWIGINTERN
214#endif
215
216#ifndef SWIGRUNTIMEINLINE
217# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
218#endif
219
220/* Generic buffer size */
221#ifndef SWIG_BUFFER_SIZE
222# define SWIG_BUFFER_SIZE 1024
223#endif
224
225/* Flags for pointer conversions */
226#define SWIG_POINTER_DISOWN 0x1
227#define SWIG_CAST_NEW_MEMORY 0x2
228#define SWIG_POINTER_NO_NULL 0x4
229#define SWIG_POINTER_CLEAR 0x8
230#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
231
232/* Flags for new pointer objects */
233#define SWIG_POINTER_OWN 0x1
234
235
236/*
237 Flags/methods for returning states.
238
239 The SWIG conversion methods, as ConvertPtr, return an integer
240 that tells if the conversion was successful or not. And if not,
241 an error code can be returned (see swigerrors.swg for the codes).
242
243 Use the following macros/flags to set or process the returning
244 states.
245
246 In old versions of SWIG, code such as the following was usually written:
247
248 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
249 // success code
250 } else {
251 //fail code
252 }
253
254 Now you can be more explicit:
255
256 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
257 if (SWIG_IsOK(res)) {
258 // success code
259 } else {
260 // fail code
261 }
262
263 which is the same really, but now you can also do
264
265 Type *ptr;
266 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
267 if (SWIG_IsOK(res)) {
268 // success code
269 if (SWIG_IsNewObj(res) {
270 ...
271 delete *ptr;
272 } else {
273 ...
274 }
275 } else {
276 // fail code
277 }
278
279 I.e., now SWIG_ConvertPtr can return new objects and you can
280 identify the case and take care of the deallocation. Of course that
281 also requires SWIG_ConvertPtr to return new result values, such as
282
283 int SWIG_ConvertPtr(obj, ptr,...) {
284 if (<obj is ok>) {
285 if (<need new object>) {
286 *ptr = <ptr to new allocated object>;
287 return SWIG_NEWOBJ;
288 } else {
289 *ptr = <ptr to old object>;
290 return SWIG_OLDOBJ;
291 }
292 } else {
293 return SWIG_BADOBJ;
294 }
295 }
296
297 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
298 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
299 SWIG errors code.
300
301 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
302 allows returning the 'cast rank', for example, if you have this
303
304 int food(double)
305 int fooi(int);
306
307 and you call
308
309 food(1) // cast rank '1' (1 -> 1.0)
310 fooi(1) // cast rank '0'
311
312 just use the SWIG_AddCast()/SWIG_CheckState()
313*/
314
315#define SWIG_OK (0)
316/* Runtime errors are < 0 */
317#define SWIG_ERROR (-1)
318/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
319/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
320/* Errors < -200 are generic runtime specific errors */
321#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
322
323#define SWIG_IsOK(r) (r >= 0)
324#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
325
326/* The CastRankLimit says how many bits are used for the cast rank */
327#define SWIG_CASTRANKLIMIT (1 << 8)
328/* The NewMask denotes the object was created (using new/malloc) */
329#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
330/* The TmpMask is for in/out typemaps that use temporary objects */
331#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
332/* Simple returning values */
333#define SWIG_BADOBJ (SWIG_ERROR)
334#define SWIG_OLDOBJ (SWIG_OK)
335#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
336#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
337/* Check, add and del object mask methods */
338#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
339#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
340#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
341#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
342#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
343#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
344
345/* Cast-Rank Mode */
346#if defined(SWIG_CASTRANK_MODE)
347# ifndef SWIG_TypeRank
348# define SWIG_TypeRank unsigned long
349# endif
350# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
351# define SWIG_MAXCASTRANK (2)
352# endif
353# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
354# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
356 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
357}
359 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
360}
361#else /* no cast-rank mode */
362# define SWIG_AddCast(r) (r)
363# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
364#endif
365
366/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
367 * if you're missing it.
368 */
369#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
370 (defined __cplusplus && __cplusplus >= 201103L) || \
371 defined SWIG_HAVE_SNPRINTF) && \
372 !defined SWIG_NO_SNPRINTF
373# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
374# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
375#else
376/* Fallback versions ignore the buffer size, but most of our uses either have a
377 * fixed maximum possible size or dynamically allocate a buffer that's large
378 * enough.
379 */
380# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
381# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
382#endif
383
384#include <string.h>
385
386#ifdef __cplusplus
387extern "C" {
388#endif
389
390typedef void *(*swig_converter_func)(void *, int *);
391typedef struct swig_type_info *(*swig_dycast_func)(void **);
392
393/* Structure to store information on one type */
394typedef struct swig_type_info {
395 const char *name; /* mangled name of this type */
396 const char *str; /* human readable name of this type */
397 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
398 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
399 void *clientdata; /* language specific type data */
400 int owndata; /* flag if the structure owns the clientdata */
402
403/* Structure to store a type and conversion function used for casting */
404typedef struct swig_cast_info {
405 swig_type_info *type; /* pointer to type that is equivalent to this type */
406 swig_converter_func converter; /* function to cast the void pointers */
407 struct swig_cast_info *next; /* pointer to next cast in linked list */
408 struct swig_cast_info *prev; /* pointer to the previous cast */
410
411/* Structure used to store module information
412 * Each module generates one structure like this, and the runtime collects
413 * all of these structures and stores them in a circularly linked list.*/
414typedef struct swig_module_info {
415 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
416 size_t size; /* Number of types in this module */
417 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
418 swig_type_info **type_initial; /* Array of initially generated type structures */
419 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
420 void *clientdata; /* Language specific module data */
422
423/*
424 Compare two type names skipping the space characters, therefore
425 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
426
427 Return 0 when the two name types are equivalent, as in
428 strncmp, but skipping ' '.
429*/
430SWIGRUNTIME int
431SWIG_TypeNameComp(const char *f1, const char *l1,
432 const char *f2, const char *l2) {
433 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
434 while ((*f1 == ' ') && (f1 != l1)) ++f1;
435 while ((*f2 == ' ') && (f2 != l2)) ++f2;
436 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
437 }
438 return (int)((l1 - f1) - (l2 - f2));
439}
440
441/*
442 Check type equivalence in a name list like <name1>|<name2>|...
443 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
444*/
445SWIGRUNTIME int
446SWIG_TypeCmp(const char *nb, const char *tb) {
447 int equiv = 1;
448 const char* te = tb + strlen(tb);
449 const char* ne = nb;
450 while (equiv != 0 && *ne) {
451 for (nb = ne; *ne; ++ne) {
452 if (*ne == '|') break;
453 }
454 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
455 if (*ne) ++ne;
456 }
457 return equiv;
458}
459
460/*
461 Check type equivalence in a name list like <name1>|<name2>|...
462 Return 0 if not equal, 1 if equal
463*/
464SWIGRUNTIME int
465SWIG_TypeEquiv(const char *nb, const char *tb) {
466 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
467}
468
469/*
470 Check the typename
471*/
473SWIG_TypeCheck(const char *c, swig_type_info *ty) {
474 if (ty) {
475 swig_cast_info *iter = ty->cast;
476 while (iter) {
477 if (strcmp(iter->type->name, c) == 0) {
478 if (iter == ty->cast)
479 return iter;
480 /* Move iter to the top of the linked list */
481 iter->prev->next = iter->next;
482 if (iter->next)
483 iter->next->prev = iter->prev;
484 iter->next = ty->cast;
485 iter->prev = 0;
486 if (ty->cast) ty->cast->prev = iter;
487 ty->cast = iter;
488 return iter;
489 }
490 iter = iter->next;
491 }
492 }
493 return 0;
494}
495
496/*
497 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
498*/
501 if (ty) {
502 swig_cast_info *iter = ty->cast;
503 while (iter) {
504 if (iter->type == from) {
505 if (iter == ty->cast)
506 return iter;
507 /* Move iter to the top of the linked list */
508 iter->prev->next = iter->next;
509 if (iter->next)
510 iter->next->prev = iter->prev;
511 iter->next = ty->cast;
512 iter->prev = 0;
513 if (ty->cast) ty->cast->prev = iter;
514 ty->cast = iter;
515 return iter;
516 }
517 iter = iter->next;
518 }
519 }
520 return 0;
521}
522
523/*
524 Cast a pointer up an inheritance hierarchy
525*/
527SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
528 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
529}
530
531/*
532 Dynamic pointer casting. Down an inheritance hierarchy
533*/
536 swig_type_info *lastty = ty;
537 if (!ty || !ty->dcast) return ty;
538 while (ty && (ty->dcast)) {
539 ty = (*ty->dcast)(ptr);
540 if (ty) lastty = ty;
541 }
542 return lastty;
543}
544
545/*
546 Return the name associated with this type
547*/
548SWIGRUNTIMEINLINE const char *
550 return ty->name;
551}
552
553/*
554 Return the pretty name associated with this type,
555 that is an unmangled type name in a form presentable to the user.
556*/
557SWIGRUNTIME const char *
559 /* The "str" field contains the equivalent pretty names of the
560 type, separated by vertical-bar characters. Choose the last
561 name. It should be the most specific; a fully resolved name
562 but not necessarily with default template parameters expanded. */
563 if (!type) return NULL;
564 if (type->str != NULL) {
565 const char *last_name = type->str;
566 const char *s;
567 for (s = type->str; *s; s++)
568 if (*s == '|') last_name = s+1;
569 return last_name;
570 }
571 else
572 return type->name;
573}
574
575/*
576 Set the clientdata field for a type
577*/
578SWIGRUNTIME void
580 swig_cast_info *cast = ti->cast;
581 /* if (ti->clientdata == clientdata) return; */
583
584 while (cast) {
585 if (!cast->converter) {
586 swig_type_info *tc = cast->type;
587 if (!tc->clientdata) {
589 }
590 }
591 cast = cast->next;
592 }
593}
594SWIGRUNTIME void
599
600/*
601 Search for a swig_type_info structure only by mangled name
602 Search is a O(log #types)
603
604 We start searching at module start, and finish searching when start == end.
605 Note: if start == end at the beginning of the function, we go all the way around
606 the circular list.
607*/
610 swig_module_info *end,
611 const char *name) {
612 swig_module_info *iter = start;
613 do {
614 if (iter->size) {
615 size_t l = 0;
616 size_t r = iter->size - 1;
617 do {
618 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
619 size_t i = (l + r) >> 1;
620 const char *iname = iter->types[i]->name;
621 if (iname) {
622 int compare = strcmp(name, iname);
623 if (compare == 0) {
624 return iter->types[i];
625 } else if (compare < 0) {
626 if (i) {
627 r = i - 1;
628 } else {
629 break;
630 }
631 } else if (compare > 0) {
632 l = i + 1;
633 }
634 } else {
635 break; /* should never happen */
636 }
637 } while (l <= r);
638 }
639 iter = iter->next;
640 } while (iter != end);
641 return 0;
642}
643
644/*
645 Search for a swig_type_info structure for either a mangled name or a human readable name.
646 It first searches the mangled names of the types, which is a O(log #types)
647 If a type is not found it then searches the human readable names, which is O(#types).
648
649 We start searching at module start, and finish searching when start == end.
650 Note: if start == end at the beginning of the function, we go all the way around
651 the circular list.
652*/
655 swig_module_info *end,
656 const char *name) {
657 /* STEP 1: Search the name field using binary search */
658 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
659 if (ret) {
660 return ret;
661 } else {
662 /* STEP 2: If the type hasn't been found, do a complete search
663 of the str field (the human readable name) */
664 swig_module_info *iter = start;
665 do {
666 size_t i = 0;
667 for (; i < iter->size; ++i) {
668 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
669 return iter->types[i];
670 }
671 iter = iter->next;
672 } while (iter != end);
673 }
674
675 /* neither found a match */
676 return 0;
677}
678
679/*
680 Pack binary data into a string
681*/
682SWIGRUNTIME char *
683SWIG_PackData(char *c, void *ptr, size_t sz) {
684 static const char hex[17] = "0123456789abcdef";
685 const unsigned char *u = (unsigned char *) ptr;
686 const unsigned char *eu = u + sz;
687 for (; u != eu; ++u) {
688 unsigned char uu = *u;
689 *(c++) = hex[(uu & 0xf0) >> 4];
690 *(c++) = hex[uu & 0xf];
691 }
692 return c;
693}
694
695/*
696 Unpack binary data from a string
697*/
698SWIGRUNTIME const char *
699SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
700 unsigned char *u = (unsigned char *) ptr;
701 const unsigned char *eu = u + sz;
702 for (; u != eu; ++u) {
703 char d = *(c++);
704 unsigned char uu;
705 if ((d >= '0') && (d <= '9'))
706 uu = (unsigned char)((d - '0') << 4);
707 else if ((d >= 'a') && (d <= 'f'))
708 uu = (unsigned char)((d - ('a'-10)) << 4);
709 else
710 return (char *) 0;
711 d = *(c++);
712 if ((d >= '0') && (d <= '9'))
713 uu |= (unsigned char)(d - '0');
714 else if ((d >= 'a') && (d <= 'f'))
715 uu |= (unsigned char)(d - ('a'-10));
716 else
717 return (char *) 0;
718 *u = uu;
719 }
720 return c;
721}
722
723/*
724 Pack 'void *' into a string buffer.
725*/
726SWIGRUNTIME char *
727SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
728 char *r = buff;
729 if ((2*sizeof(void *) + 2) > bsz) return 0;
730 *(r++) = '_';
731 r = SWIG_PackData(r,&ptr,sizeof(void *));
732 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
733 strcpy(r,name);
734 return buff;
735}
736
737SWIGRUNTIME const char *
738SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
739 if (*c != '_') {
740 if (strcmp(c,"NULL") == 0) {
741 *ptr = (void *) 0;
742 return name;
743 } else {
744 return 0;
745 }
746 }
747 return SWIG_UnpackData(++c,ptr,sizeof(void *));
748}
749
750SWIGRUNTIME char *
751SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
752 char *r = buff;
753 size_t lname = (name ? strlen(name) : 0);
754 if ((2*sz + 2 + lname) > bsz) return 0;
755 *(r++) = '_';
756 r = SWIG_PackData(r,ptr,sz);
757 if (lname) {
758 strncpy(r,name,lname+1);
759 } else {
760 *r = 0;
761 }
762 return buff;
763}
764
765SWIGRUNTIME const char *
766SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
767 if (*c != '_') {
768 if (strcmp(c,"NULL") == 0) {
769 memset(ptr,0,sz);
770 return name;
771 } else {
772 return 0;
773 }
774 }
775 return SWIG_UnpackData(++c,ptr,sz);
776}
777
778#ifdef __cplusplus
779}
780#endif
781
782/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
783#define SWIG_UnknownError -1
784#define SWIG_IOError -2
785#define SWIG_RuntimeError -3
786#define SWIG_IndexError -4
787#define SWIG_TypeError -5
788#define SWIG_DivisionByZero -6
789#define SWIG_OverflowError -7
790#define SWIG_SyntaxError -8
791#define SWIG_ValueError -9
792#define SWIG_SystemError -10
793#define SWIG_AttributeError -11
794#define SWIG_MemoryError -12
795#define SWIG_NullReferenceError -13
796
797
798/* Compatibility macros for Python 3 */
799#if PY_VERSION_HEX >= 0x03000000
800
801#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
802#define PyInt_Check(x) PyLong_Check(x)
803#define PyInt_AsLong(x) PyLong_AsLong(x)
804#define PyInt_FromLong(x) PyLong_FromLong(x)
805#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
806#define PyString_Check(name) PyBytes_Check(name)
807#define PyString_FromString(x) PyUnicode_FromString(x)
808#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
809#define PyString_AsString(str) PyBytes_AsString(str)
810#define PyString_Size(str) PyBytes_Size(str)
811#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
812#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
813#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
814
815#endif
816
817#ifndef Py_TYPE
818# define Py_TYPE(op) ((op)->ob_type)
819#endif
820
821/* SWIG APIs for compatibility of both Python 2 & 3 */
822
823#if PY_VERSION_HEX >= 0x03000000
824# define SWIG_Python_str_FromFormat PyUnicode_FromFormat
825#else
826# define SWIG_Python_str_FromFormat PyString_FromFormat
827#endif
828
829
830/* Wrapper around PyUnicode_AsUTF8AndSize - call Py_XDECREF on the returned pbytes when finished with the returned string */
831SWIGINTERN const char *
832SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes)
833{
834#if PY_VERSION_HEX >= 0x03030000
835# if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
836 *pbytes = NULL;
837 return PyUnicode_AsUTF8AndSize(str, psize);
838# else
839 *pbytes = PyUnicode_AsUTF8String(str);
840 const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL;
841 if (chars && psize)
842 *psize = PyBytes_Size(*pbytes);
843 return chars;
844# endif
845#else
846 char *chars = NULL;
847 *pbytes = NULL;
848 PyString_AsStringAndSize(str, &chars, psize);
849 return chars;
850#endif
851}
852
853SWIGINTERN PyObject*
855{
856#if PY_VERSION_HEX >= 0x03000000
857 return PyUnicode_FromString(c);
858#else
859 return PyString_FromString(c);
860#endif
861}
862
863#ifndef PyObject_DEL
864# define PyObject_DEL PyObject_Del
865#endif
866
867/* SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user interface files check for it. */
868# define SWIGPY_USE_CAPSULE
869#ifdef SWIGPYTHON_BUILTIN
870# define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule_builtin" SWIG_TYPE_TABLE_NAME
871#else
872# define SWIGPY_CAPSULE_ATTR_NAME "type_pointer_capsule" SWIG_TYPE_TABLE_NAME
873#endif
874# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION "." SWIGPY_CAPSULE_ATTR_NAME)
875
876#if PY_VERSION_HEX < 0x03020000
877#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
878#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
879#define Py_hash_t long
880#endif
881
882#ifdef Py_LIMITED_API
883# define PyTuple_GET_ITEM PyTuple_GetItem
884/* Note that PyTuple_SetItem() has different semantics from PyTuple_SET_ITEM as it decref's the original tuple item, so in general they cannot be used
885 interchangeably. However in SWIG-generated code PyTuple_SET_ITEM is only used with newly initialized tuples without any items and for them this does work. */
886# define PyTuple_SET_ITEM PyTuple_SetItem
887# define PyTuple_GET_SIZE PyTuple_Size
888# define PyCFunction_GET_FLAGS PyCFunction_GetFlags
889# define PyCFunction_GET_FUNCTION PyCFunction_GetFunction
890# define PyCFunction_GET_SELF PyCFunction_GetSelf
891# define PyList_GET_ITEM PyList_GetItem
892# define PyList_SET_ITEM PyList_SetItem
893# define PySliceObject PyObject
894#endif
895
896/* -----------------------------------------------------------------------------
897 * error manipulation
898 * ----------------------------------------------------------------------------- */
899
900SWIGRUNTIME PyObject*
902 PyObject* type = 0;
903 switch(code) {
904 case SWIG_MemoryError:
905 type = PyExc_MemoryError;
906 break;
907 case SWIG_IOError:
908 type = PyExc_IOError;
909 break;
911 type = PyExc_RuntimeError;
912 break;
913 case SWIG_IndexError:
914 type = PyExc_IndexError;
915 break;
916 case SWIG_TypeError:
917 type = PyExc_TypeError;
918 break;
920 type = PyExc_ZeroDivisionError;
921 break;
923 type = PyExc_OverflowError;
924 break;
925 case SWIG_SyntaxError:
926 type = PyExc_SyntaxError;
927 break;
928 case SWIG_ValueError:
929 type = PyExc_ValueError;
930 break;
931 case SWIG_SystemError:
932 type = PyExc_SystemError;
933 break;
935 type = PyExc_AttributeError;
936 break;
937 default:
938 type = PyExc_RuntimeError;
939 }
940 return type;
941}
942
943
944SWIGRUNTIME void
945SWIG_Python_AddErrorMsg(const char* mesg)
946{
947 PyObject *type = 0;
948 PyObject *value = 0;
949 PyObject *traceback = 0;
950
951 if (PyErr_Occurred())
952 PyErr_Fetch(&type, &value, &traceback);
953 if (value) {
954 PyObject *old_str = PyObject_Str(value);
955 PyObject *bytes = NULL;
956 const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes);
957 PyErr_Clear();
958 Py_XINCREF(type);
959 if (tmp)
960 PyErr_Format(type, "%s %s", tmp, mesg);
961 else
962 PyErr_Format(type, "%s", mesg);
963 Py_XDECREF(bytes);
964 Py_DECREF(old_str);
965 Py_DECREF(value);
966 } else {
967 PyErr_SetString(PyExc_RuntimeError, mesg);
968 }
969}
970
971SWIGRUNTIME int
973{
974 PyObject *error;
975 if (obj)
976 return 0;
977 error = PyErr_Occurred();
978 return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
979}
980
981SWIGRUNTIME void
983{
985 /* Use existing TypeError to preserve stacktrace and enhance with given message */
986 PyObject *newvalue;
987 PyObject *type = NULL, *value = NULL, *traceback = NULL;
988 PyErr_Fetch(&type, &value, &traceback);
989#if PY_VERSION_HEX >= 0x03000000
990 newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
991#else
992 newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
993#endif
994 if (newvalue) {
995 Py_XDECREF(value);
996 PyErr_Restore(type, newvalue, traceback);
997 } else {
998 PyErr_Restore(type, value, traceback);
999 }
1000 } else {
1001 /* Raise TypeError using given message */
1002 PyErr_SetString(PyExc_TypeError, message);
1003 }
1004}
1005
1006#if defined(SWIG_PYTHON_NO_THREADS)
1007# if defined(SWIG_PYTHON_THREADS)
1008# undef SWIG_PYTHON_THREADS
1009# endif
1010#endif
1011#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
1012# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1013# define SWIG_PYTHON_USE_GIL
1014# endif
1015# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
1016# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1017# if PY_VERSION_HEX < 0x03070000
1018# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
1019# else
1020# define SWIG_PYTHON_INITIALIZE_THREADS
1021# endif
1022# endif
1023# ifdef __cplusplus /* C++ code */
1024 class SWIG_Python_Thread_Block {
1025 bool status;
1026 PyGILState_STATE state;
1027 public:
1028 void end() { if (status) { PyGILState_Release(state); status = false;} }
1029 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1030 ~SWIG_Python_Thread_Block() { end(); }
1031 };
1032 class SWIG_Python_Thread_Allow {
1033 bool status;
1034 PyThreadState *save;
1035 public:
1036 void end() { if (status) { status = false; PyEval_RestoreThread(save); }}
1037 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1038 ~SWIG_Python_Thread_Allow() { end(); }
1039 };
1040# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1041# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1042# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1043# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1044# else /* C code */
1045# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1046# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1047# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1048# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1049# endif
1050# else /* Old thread way, not implemented, user must provide it */
1051# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1052# define SWIG_PYTHON_INITIALIZE_THREADS
1053# endif
1054# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1055# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1056# endif
1057# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1058# define SWIG_PYTHON_THREAD_END_BLOCK
1059# endif
1060# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1061# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1062# endif
1063# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1064# define SWIG_PYTHON_THREAD_END_ALLOW
1065# endif
1066# endif
1067#else /* No thread support */
1068# define SWIG_PYTHON_INITIALIZE_THREADS
1069# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1070# define SWIG_PYTHON_THREAD_END_BLOCK
1071# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1072# define SWIG_PYTHON_THREAD_END_ALLOW
1073#endif
1074
1075/* -----------------------------------------------------------------------------
1076 * Python API portion that goes into the runtime
1077 * ----------------------------------------------------------------------------- */
1078
1079#ifdef __cplusplus
1080extern "C" {
1081#endif
1082
1083/* -----------------------------------------------------------------------------
1084 * Constant declarations
1085 * ----------------------------------------------------------------------------- */
1086
1087/* Constant Types */
1088#define SWIG_PY_POINTER 4
1089#define SWIG_PY_BINARY 5
1090
1091/* Constant information structure */
1100
1101#ifdef __cplusplus
1102}
1103#endif
1104
1105
1106/* -----------------------------------------------------------------------------
1107 * pyrun.swg
1108 *
1109 * This file contains the runtime support for Python modules
1110 * and includes code for managing global variables and pointer
1111 * type checking.
1112 *
1113 * ----------------------------------------------------------------------------- */
1114
1115#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
1116# error "This version of SWIG only supports Python >= 2.7"
1117#endif
1118
1119#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03030000
1120# error "This version of SWIG only supports Python 3 >= 3.3"
1121#endif
1122
1123/* Common SWIG API */
1124
1125/* for raw pointers */
1126#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1127#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1128#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1129
1130#ifdef SWIGPYTHON_BUILTIN
1131#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1132#else
1133#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1134#endif
1135
1136#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1137
1138#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1139#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1140#define swig_owntype int
1141
1142/* for raw packed data */
1143#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1144#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1145
1146/* for class or struct pointers */
1147#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1148#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1149
1150/* for C or C++ function pointers */
1151#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1152#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1153
1154/* for C++ member pointers, ie, member methods */
1155#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1156#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1157
1158
1159/* Runtime API */
1160
1161#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1162#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1163#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1164
1165#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1166#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1167#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1168#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1169#define SWIG_fail goto fail
1170
1171
1172/* Runtime API implementation */
1173
1174/* Error manipulation */
1175
1176SWIGINTERN void
1177SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1179 PyErr_SetObject(errtype, obj);
1180 Py_DECREF(obj);
1182}
1183
1184SWIGINTERN void
1185SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1187 PyErr_SetString(errtype, msg);
1189}
1190
1191#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1192
1193/* Set a constant value */
1194
1195#if defined(SWIGPYTHON_BUILTIN)
1196
1197SWIGINTERN void
1198SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1199 PyObject *s = PyString_InternFromString(key);
1200 PyList_Append(seq, s);
1201 Py_DECREF(s);
1202}
1203
1204SWIGINTERN void
1205SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1206 PyDict_SetItemString(d, name, obj);
1207 Py_DECREF(obj);
1208 if (public_interface)
1209 SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1210}
1211
1212#else
1213
1214SWIGINTERN void
1215SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1216 PyDict_SetItemString(d, name, obj);
1217 Py_DECREF(obj);
1218}
1219
1220#endif
1221
1222/* Append a value to the result obj */
1223
1224SWIGINTERN PyObject*
1225SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1226 if (!result) {
1227 result = obj;
1228 } else if (result == Py_None) {
1229 Py_DECREF(result);
1230 result = obj;
1231 } else {
1232 if (!PyList_Check(result)) {
1233 PyObject *o2 = result;
1234 result = PyList_New(1);
1235 if (result) {
1236 PyList_SET_ITEM(result, 0, o2);
1237 } else {
1238 Py_DECREF(obj);
1239 return o2;
1240 }
1241 }
1242 PyList_Append(result,obj);
1243 Py_DECREF(obj);
1244 }
1245 return result;
1246}
1247
1248/* Unpack the argument tuple */
1249
1250SWIGINTERN Py_ssize_t
1251SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1252{
1253 if (!args) {
1254 if (!min && !max) {
1255 return 1;
1256 } else {
1257 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1258 name, (min == max ? "" : "at least "), (int)min);
1259 return 0;
1260 }
1261 }
1262 if (!PyTuple_Check(args)) {
1263 if (min <= 1 && max >= 1) {
1264 Py_ssize_t i;
1265 objs[0] = args;
1266 for (i = 1; i < max; ++i) {
1267 objs[i] = 0;
1268 }
1269 return 2;
1270 }
1271 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1272 return 0;
1273 } else {
1274 Py_ssize_t l = PyTuple_GET_SIZE(args);
1275 if (l < min) {
1276 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1277 name, (min == max ? "" : "at least "), (int)min, (int)l);
1278 return 0;
1279 } else if (l > max) {
1280 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1281 name, (min == max ? "" : "at most "), (int)max, (int)l);
1282 return 0;
1283 } else {
1284 Py_ssize_t i;
1285 for (i = 0; i < l; ++i) {
1286 objs[i] = PyTuple_GET_ITEM(args, i);
1287 }
1288 for (; l < max; ++l) {
1289 objs[l] = 0;
1290 }
1291 return i + 1;
1292 }
1293 }
1294}
1295
1296SWIGINTERN int
1297SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
1298 int no_kwargs = 1;
1299 if (kwargs) {
1300 assert(PyDict_Check(kwargs));
1301 if (PyDict_Size(kwargs) > 0) {
1302 PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
1303 no_kwargs = 0;
1304 }
1305 }
1306 return no_kwargs;
1307}
1308
1309/* A functor is a function object with one single object argument */
1310#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1311
1312/*
1313 Helper for static pointer initialization for both C and C++ code, for example
1314 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1315*/
1316#ifdef __cplusplus
1317#define SWIG_STATIC_POINTER(var) var
1318#else
1319#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1320#endif
1321
1322#ifdef __cplusplus
1323extern "C" {
1324#endif
1325
1326/* Python-specific SWIG API */
1327#define SWIG_newvarlink() SWIG_Python_newvarlink()
1328#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
1329#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
1330
1331/* -----------------------------------------------------------------------------
1332 * global variable support code.
1333 * ----------------------------------------------------------------------------- */
1334
1335typedef struct swig_globalvar {
1336 char *name; /* Name of global variable */
1337 PyObject *(*get_attr)(void); /* Return the current value */
1338 int (*set_attr)(PyObject *); /* Set the value */
1341
1346
1347SWIGINTERN PyObject *
1349#if PY_VERSION_HEX >= 0x03000000
1350 return PyUnicode_InternFromString("<Swig global variables>");
1351#else
1352 return PyString_FromString("<Swig global variables>");
1353#endif
1354}
1355
1356SWIGINTERN PyObject *
1357swig_varlink_str(PyObject *o) {
1359#if PY_VERSION_HEX >= 0x03000000
1360 PyObject *str = PyUnicode_InternFromString("(");
1361 PyObject *tail;
1362 PyObject *joined;
1363 swig_globalvar *var;
1364 for (var = v->vars; var; var=var->next) {
1365 tail = PyUnicode_FromString(var->name);
1366 joined = PyUnicode_Concat(str, tail);
1367 Py_DecRef(str);
1368 Py_DecRef(tail);
1369 str = joined;
1370 if (var->next) {
1371 tail = PyUnicode_InternFromString(", ");
1372 joined = PyUnicode_Concat(str, tail);
1373 Py_DecRef(str);
1374 Py_DecRef(tail);
1375 str = joined;
1376 }
1377 }
1378 tail = PyUnicode_InternFromString(")");
1379 joined = PyUnicode_Concat(str, tail);
1380 Py_DecRef(str);
1381 Py_DecRef(tail);
1382 str = joined;
1383#else
1384 PyObject *str = PyString_FromString("(");
1385 swig_globalvar *var;
1386 for (var = v->vars; var; var=var->next) {
1387 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
1388 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
1389 }
1390 PyString_ConcatAndDel(&str,PyString_FromString(")"));
1391#endif
1392 return str;
1393}
1394
1395SWIGINTERN void
1398 swig_globalvar *var = v->vars;
1399 while (var) {
1400 swig_globalvar *n = var->next;
1401 free(var->name);
1402 free(var);
1403 var = n;
1404 }
1405}
1406
1407SWIGINTERN PyObject *
1408swig_varlink_getattr(PyObject *o, char *n) {
1410 PyObject *res = NULL;
1411 swig_globalvar *var = v->vars;
1412 while (var) {
1413 if (strcmp(var->name,n) == 0) {
1414 res = (*var->get_attr)();
1415 break;
1416 }
1417 var = var->next;
1418 }
1419 if (res == NULL && !PyErr_Occurred()) {
1420 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
1421 }
1422 return res;
1423}
1424
1425SWIGINTERN int
1426swig_varlink_setattr(PyObject *o, char *n, PyObject *p) {
1428 int res = 1;
1429 swig_globalvar *var = v->vars;
1430 while (var) {
1431 if (strcmp(var->name,n) == 0) {
1432 res = (*var->set_attr)(p);
1433 break;
1434 }
1435 var = var->next;
1436 }
1437 if (res == 1 && !PyErr_Occurred()) {
1438 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
1439 }
1440 return res;
1441}
1442
1443SWIGINTERN PyTypeObject*
1445 static char varlink__doc__[] = "Swig var link object";
1446#ifndef Py_LIMITED_API
1447 static PyTypeObject varlink_type;
1448 static int type_init = 0;
1449 if (!type_init) {
1450 const PyTypeObject tmp = {
1451#if PY_VERSION_HEX >= 0x03000000
1452 PyVarObject_HEAD_INIT(NULL, 0)
1453#else
1454 PyObject_HEAD_INIT(NULL)
1455 0, /* ob_size */
1456#endif
1457 "swigvarlink", /* tp_name */
1458 sizeof(swig_varlinkobject), /* tp_basicsize */
1459 0, /* tp_itemsize */
1460 (destructor) swig_varlink_dealloc, /* tp_dealloc */
1461#if PY_VERSION_HEX < 0x030800b4
1462 (printfunc)0, /*tp_print*/
1463#else
1464 (Py_ssize_t)0, /*tp_vectorcall_offset*/
1465#endif
1466 (getattrfunc) swig_varlink_getattr, /* tp_getattr */
1467 (setattrfunc) swig_varlink_setattr, /* tp_setattr */
1468 0, /* tp_compare */
1469 (reprfunc) swig_varlink_repr, /* tp_repr */
1470 0, /* tp_as_number */
1471 0, /* tp_as_sequence */
1472 0, /* tp_as_mapping */
1473 0, /* tp_hash */
1474 0, /* tp_call */
1475 (reprfunc) swig_varlink_str, /* tp_str */
1476 0, /* tp_getattro */
1477 0, /* tp_setattro */
1478 0, /* tp_as_buffer */
1479 0, /* tp_flags */
1480 varlink__doc__, /* tp_doc */
1481 0, /* tp_traverse */
1482 0, /* tp_clear */
1483 0, /* tp_richcompare */
1484 0, /* tp_weaklistoffset */
1485 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
1486 0, /* tp_del */
1487 0, /* tp_version_tag */
1488#if PY_VERSION_HEX >= 0x03040000
1489 0, /* tp_finalize */
1490#endif
1491#if PY_VERSION_HEX >= 0x03080000
1492 0, /* tp_vectorcall */
1493#endif
1494#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1495 0, /* tp_print */
1496#endif
1497#if PY_VERSION_HEX >= 0x030C0000
1498 0, /* tp_watched */
1499#endif
1500#ifdef COUNT_ALLOCS
1501 0, /* tp_allocs */
1502 0, /* tp_frees */
1503 0, /* tp_maxalloc */
1504 0, /* tp_prev */
1505 0 /* tp_next */
1506#endif
1507 };
1508 varlink_type = tmp;
1509 type_init = 1;
1510 if (PyType_Ready(&varlink_type) < 0)
1511 return NULL;
1512 }
1513 return &varlink_type;
1514#else
1515 PyType_Slot slots[] = {
1516 { Py_tp_dealloc, (void *)swig_varlink_dealloc },
1517 { Py_tp_repr, (void *)swig_varlink_repr },
1518 { Py_tp_getattr, (void *)swig_varlink_getattr },
1519 { Py_tp_setattr, (void *)swig_varlink_setattr },
1520 { Py_tp_str, (void *)swig_varlink_str },
1521 { Py_tp_doc, (void *)varlink__doc__ },
1522 { 0, NULL }
1523 };
1524 PyType_Spec spec = {
1525 "swigvarlink",
1526 sizeof(swig_varlinkobject),
1527 0,
1528 Py_TPFLAGS_DEFAULT,
1529 slots
1530 };
1531 return (PyTypeObject *)PyType_FromSpec(&spec);
1532#endif
1533}
1534
1535/* Create a variable linking object for use later */
1536SWIGINTERN PyObject *
1538 swig_varlinkobject *result = PyObject_New(swig_varlinkobject, swig_varlink_type());
1539 if (result) {
1540 result->vars = 0;
1541 }
1542 return ((PyObject*) result);
1543}
1544
1545SWIGINTERN void
1546SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
1549 if (gv) {
1550 size_t size = strlen(name)+1;
1551 gv->name = (char *)malloc(size);
1552 if (gv->name) {
1553 memcpy(gv->name, name, size);
1554 gv->get_attr = get_attr;
1555 gv->set_attr = set_attr;
1556 gv->next = v->vars;
1557 }
1558 }
1559 v->vars = gv;
1560}
1561
1562
1563static PyObject *Swig_Globals_global = NULL;
1564
1565SWIGINTERN PyObject *
1567 if (Swig_Globals_global == NULL) {
1569 }
1570 return Swig_Globals_global;
1571}
1572
1573#ifdef __cplusplus
1574}
1575#endif
1576
1577/* -----------------------------------------------------------------------------
1578 * Pointer declarations
1579 * ----------------------------------------------------------------------------- */
1580
1581/* Flags for new pointer objects */
1582#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1583#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1584
1585#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1586
1587#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1588#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1589
1590#ifdef __cplusplus
1591extern "C" {
1592#endif
1593
1594/* The python void return value */
1595
1596SWIGRUNTIMEINLINE PyObject *
1598{
1599 PyObject *none = Py_None;
1600 Py_INCREF(none);
1601 return none;
1602}
1603
1604/* SwigPyClientData */
1605
1606typedef struct {
1607 PyObject *klass;
1608 PyObject *newraw;
1609 PyObject *newargs;
1610 PyObject *destroy;
1613 PyTypeObject *pytype;
1615
1618{
1620 int fail = data ? data->implicitconv : 0;
1621 if (fail)
1622 PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
1623 return fail;
1624}
1625
1626SWIGRUNTIMEINLINE PyObject *
1628 SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1629 PyObject *klass = data ? data->klass : 0;
1630 return (klass ? klass : PyExc_RuntimeError);
1631}
1632
1633
1636{
1637 if (!obj) {
1638 return 0;
1639 } else {
1641 /* the klass element */
1642 data->klass = obj;
1643 Py_INCREF(data->klass);
1644 /* the newraw method and newargs arguments used to create a new raw instance */
1645 if (PyClass_Check(obj)) {
1646 data->newraw = 0;
1647 Py_INCREF(obj);
1648 data->newargs = obj;
1649 } else {
1650 data->newraw = PyObject_GetAttrString(data->klass, "__new__");
1651 if (data->newraw) {
1652 data->newargs = PyTuple_New(1);
1653 if (data->newargs) {
1654 Py_INCREF(obj);
1655 PyTuple_SET_ITEM(data->newargs, 0, obj);
1656 } else {
1657 Py_DECREF(data->newraw);
1658 Py_DECREF(data->klass);
1659 free(data);
1660 return 0;
1661 }
1662 } else {
1663 Py_INCREF(obj);
1664 data->newargs = obj;
1665 }
1666 }
1667 /* the destroy method, aka as the C++ delete method */
1668 data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1669 if (PyErr_Occurred()) {
1670 PyErr_Clear();
1671 data->destroy = 0;
1672 }
1673 if (data->destroy) {
1674 data->delargs = !(PyCFunction_GET_FLAGS(data->destroy) & METH_O);
1675 } else {
1676 data->delargs = 0;
1677 }
1678 data->implicitconv = 0;
1679 data->pytype = 0;
1680 return data;
1681 }
1682}
1683
1684SWIGRUNTIME void
1686{
1687 Py_XDECREF(data->klass);
1688 Py_XDECREF(data->newraw);
1689 Py_XDECREF(data->newargs);
1690 Py_XDECREF(data->destroy);
1691 free(data);
1692}
1693
1694/* =============== SwigPyObject =====================*/
1695
1696typedef struct {
1697 PyObject_HEAD
1698 void *ptr;
1700 int own;
1701 PyObject *next;
1702#ifdef SWIGPYTHON_BUILTIN
1703 PyObject *dict;
1704#endif
1705} SwigPyObject;
1706
1707
1708#ifdef SWIGPYTHON_BUILTIN
1709
1710SWIGRUNTIME PyObject *
1711SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1712{
1713 SwigPyObject *sobj = (SwigPyObject *)v;
1714
1715 if (!sobj->dict)
1716 sobj->dict = PyDict_New();
1717
1718 Py_XINCREF(sobj->dict);
1719 return sobj->dict;
1720}
1721
1722#endif
1723
1724SWIGRUNTIME PyObject *
1726{
1727 return PyLong_FromVoidPtr(v->ptr);
1728}
1729
1730SWIGRUNTIME PyObject *
1732{
1733 PyObject *res = NULL;
1734 PyObject *args = PyTuple_New(1);
1735 if (args) {
1736 PyObject *val = SwigPyObject_long(v);
1737 if (val) {
1738 PyObject *ofmt;
1739 PyTuple_SET_ITEM(args, 0, val);
1740 ofmt = SWIG_Python_str_FromChar(fmt);
1741 if (ofmt) {
1742#if PY_VERSION_HEX >= 0x03000000
1743 res = PyUnicode_Format(ofmt,args);
1744#else
1745 res = PyString_Format(ofmt,args);
1746#endif
1747 Py_DECREF(ofmt);
1748 }
1749 }
1750 Py_DECREF(args);
1751 }
1752 return res;
1753}
1754
1755SWIGRUNTIME PyObject *
1757{
1758 return SwigPyObject_format("%o",v);
1759}
1760
1761SWIGRUNTIME PyObject *
1763{
1764 return SwigPyObject_format("%x",v);
1765}
1766
1767SWIGRUNTIME PyObject *
1769{
1770 const char *name = SWIG_TypePrettyName(v->ty);
1771 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1772 if (repr && v->next) {
1773 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1774 if (nrep) {
1775# if PY_VERSION_HEX >= 0x03000000
1776 PyObject *joined = PyUnicode_Concat(repr, nrep);
1777 Py_DecRef(repr);
1778 Py_DecRef(nrep);
1779 repr = joined;
1780# else
1781 PyString_ConcatAndDel(&repr,nrep);
1782# endif
1783 } else {
1784 Py_DecRef(repr);
1785 repr = NULL;
1786 }
1787 }
1788 return repr;
1789}
1790
1791/* We need a version taking two PyObject* parameters so it's a valid
1792 * PyCFunction to use in swigobject_methods[]. */
1793SWIGRUNTIME PyObject *
1794SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1795{
1796 return SwigPyObject_repr((SwigPyObject*)v);
1797}
1798
1799SWIGRUNTIME int
1801{
1802 void *i = v->ptr;
1803 void *j = w->ptr;
1804 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1805}
1806
1807/* Added for Python 3.x, would it also be useful for Python 2.x? */
1808SWIGRUNTIME PyObject*
1810{
1811 PyObject* res = NULL;
1812 if (!PyErr_Occurred()) {
1813 if (op != Py_EQ && op != Py_NE) {
1814 Py_INCREF(Py_NotImplemented);
1815 return Py_NotImplemented;
1816 }
1817 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1818 }
1819 return res;
1820}
1821
1822
1823SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1824
1825#ifdef SWIGPYTHON_BUILTIN
1826static swig_type_info *SwigPyObject_stype = 0;
1827SWIGRUNTIME PyTypeObject*
1828SwigPyObject_type(void) {
1829 SwigPyClientData *cd;
1830 assert(SwigPyObject_stype);
1831 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1832 assert(cd);
1833 assert(cd->pytype);
1834 return cd->pytype;
1835}
1836#else
1837SWIGRUNTIME PyTypeObject*
1839 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1840 return type;
1841}
1842#endif
1843
1845SwigPyObject_Check(PyObject *op) {
1846 PyTypeObject *target_tp = SwigPyObject_type();
1847 PyTypeObject *op_type = Py_TYPE(op);
1848#ifdef SWIGPYTHON_BUILTIN
1849 if (PyType_IsSubtype(op_type, target_tp))
1850 return 1;
1851 return (strcmp(op_type->tp_name, "SwigPyObject") == 0);
1852#else
1853 if (op_type == target_tp)
1854 return 1;
1855# ifdef Py_LIMITED_API
1856 int cmp;
1857 PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__");
1858 if (!tp_name)
1859 return 0;
1860 cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject");
1861 Py_DECREF(tp_name);
1862 return cmp == 0;
1863# else
1864 return (strcmp(op_type->tp_name, "SwigPyObject") == 0);
1865# endif
1866#endif
1867}
1868
1869SWIGRUNTIME PyObject *
1870SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1871
1872static PyObject* Swig_Capsule_global = NULL;
1873
1874SWIGRUNTIME void
1876{
1877 SwigPyObject *sobj = (SwigPyObject *) v;
1878 PyObject *next = sobj->next;
1879 if (sobj->own == SWIG_POINTER_OWN) {
1880 swig_type_info *ty = sobj->ty;
1882 PyObject *destroy = data ? data->destroy : 0;
1883 if (destroy) {
1884 /* destroy is always a VARARGS method */
1885 PyObject *res;
1886
1887 /* PyObject_CallFunction() has the potential to silently drop
1888 the active exception. In cases of unnamed temporary
1889 variable or where we just finished iterating over a generator
1890 StopIteration will be active right now, and this needs to
1891 remain true upon return from SwigPyObject_dealloc. So save
1892 and restore. */
1893
1894 PyObject *type = NULL, *value = NULL, *traceback = NULL;
1895 PyErr_Fetch(&type, &value, &traceback);
1896
1897 if (data->delargs) {
1898 /* we need to create a temporary object to carry the destroy operation */
1899 PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1900 if (tmp) {
1901 res = SWIG_Python_CallFunctor(destroy, tmp);
1902 } else {
1903 res = 0;
1904 }
1905 Py_XDECREF(tmp);
1906 } else {
1907 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1908 PyObject *mself = PyCFunction_GET_SELF(destroy);
1909 res = ((*meth)(mself, v));
1910 }
1911 if (!res)
1912 PyErr_WriteUnraisable(destroy);
1913
1914 PyErr_Restore(type, value, traceback);
1915
1916 Py_XDECREF(res);
1917 }
1918#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1919 else {
1920 const char *name = SWIG_TypePrettyName(ty);
1921 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1922 }
1923#endif
1924 Py_XDECREF(Swig_Capsule_global);
1925 }
1926 Py_XDECREF(next);
1927#ifdef SWIGPYTHON_BUILTIN
1928 Py_XDECREF(sobj->dict);
1929#endif
1930 PyObject_DEL(v);
1931}
1932
1933SWIGRUNTIME PyObject*
1934SwigPyObject_append(PyObject* v, PyObject* next)
1935{
1936 SwigPyObject *sobj = (SwigPyObject *) v;
1937 if (!SwigPyObject_Check(next)) {
1938 PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1939 return NULL;
1940 }
1941 ((SwigPyObject *)next)->next = sobj->next;
1942 sobj->next = next;
1943 Py_INCREF(next);
1944 return SWIG_Py_Void();
1945}
1946
1947SWIGRUNTIME PyObject*
1948SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1949{
1950 SwigPyObject *sobj = (SwigPyObject *) v;
1951 if (sobj->next) {
1952 Py_INCREF(sobj->next);
1953 return sobj->next;
1954 } else {
1955 return SWIG_Py_Void();
1956 }
1957}
1958
1959SWIGINTERN PyObject*
1960SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1961{
1962 SwigPyObject *sobj = (SwigPyObject *)v;
1963 sobj->own = 0;
1964 return SWIG_Py_Void();
1965}
1966
1967SWIGINTERN PyObject*
1968SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1969{
1970 SwigPyObject *sobj = (SwigPyObject *)v;
1971 sobj->own = SWIG_POINTER_OWN;
1972 return SWIG_Py_Void();
1973}
1974
1975SWIGINTERN PyObject*
1976SwigPyObject_own(PyObject *v, PyObject *args)
1977{
1978 PyObject *val = 0;
1979 if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1980 return NULL;
1981 } else {
1982 SwigPyObject *sobj = (SwigPyObject *)v;
1983 PyObject *obj = PyBool_FromLong(sobj->own);
1984 if (val) {
1985 if (PyObject_IsTrue(val)) {
1986 Py_DECREF(SwigPyObject_acquire(v,args));
1987 } else {
1988 Py_DECREF(SwigPyObject_disown(v,args));
1989 }
1990 }
1991 return obj;
1992 }
1993}
1994
1995static PyMethodDef
1997 {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
1998 {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
1999 {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
2000 {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
2001 {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
2002 {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
2003 {0, 0, 0, 0}
2004};
2005
2006SWIGRUNTIME PyTypeObject*
2008 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
2009#ifndef Py_LIMITED_API
2010 static PyNumberMethods SwigPyObject_as_number = {
2011 (binaryfunc)0, /*nb_add*/
2012 (binaryfunc)0, /*nb_subtract*/
2013 (binaryfunc)0, /*nb_multiply*/
2014 /* nb_divide removed in Python 3 */
2015#if PY_VERSION_HEX < 0x03000000
2016 (binaryfunc)0, /*nb_divide*/
2017#endif
2018 (binaryfunc)0, /*nb_remainder*/
2019 (binaryfunc)0, /*nb_divmod*/
2020 (ternaryfunc)0,/*nb_power*/
2021 (unaryfunc)0, /*nb_negative*/
2022 (unaryfunc)0, /*nb_positive*/
2023 (unaryfunc)0, /*nb_absolute*/
2024 (inquiry)0, /*nb_nonzero*/
2025 0, /*nb_invert*/
2026 0, /*nb_lshift*/
2027 0, /*nb_rshift*/
2028 0, /*nb_and*/
2029 0, /*nb_xor*/
2030 0, /*nb_or*/
2031#if PY_VERSION_HEX < 0x03000000
2032 0, /*nb_coerce*/
2033#endif
2034 (unaryfunc)SwigPyObject_long, /*nb_int*/
2035#if PY_VERSION_HEX < 0x03000000
2036 (unaryfunc)SwigPyObject_long, /*nb_long*/
2037#else
2038 0, /*nb_reserved*/
2039#endif
2040 (unaryfunc)0, /*nb_float*/
2041#if PY_VERSION_HEX < 0x03000000
2042 (unaryfunc)SwigPyObject_oct, /*nb_oct*/
2043 (unaryfunc)SwigPyObject_hex, /*nb_hex*/
2044#endif
2045#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
2046 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
2047#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
2048 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
2049#else
2050 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
2051#endif
2052 };
2053
2054 static PyTypeObject swigpyobject_type;
2055 static int type_init = 0;
2056 if (!type_init) {
2057 const PyTypeObject tmp = {
2058#if PY_VERSION_HEX >= 0x03000000
2059 PyVarObject_HEAD_INIT(NULL, 0)
2060#else
2061 PyObject_HEAD_INIT(NULL)
2062 0, /* ob_size */
2063#endif
2064 "SwigPyObject", /* tp_name */
2065 sizeof(SwigPyObject), /* tp_basicsize */
2066 0, /* tp_itemsize */
2067 (destructor)SwigPyObject_dealloc, /* tp_dealloc */
2068#if PY_VERSION_HEX < 0x030800b4
2069 (printfunc)0, /*tp_print*/
2070#else
2071 (Py_ssize_t)0, /*tp_vectorcall_offset*/
2072#endif
2073 (getattrfunc)0, /* tp_getattr */
2074 (setattrfunc)0, /* tp_setattr */
2075#if PY_VERSION_HEX >= 0x03000000
2076 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
2077#else
2078 (cmpfunc)SwigPyObject_compare, /* tp_compare */
2079#endif
2080 (reprfunc)SwigPyObject_repr, /* tp_repr */
2081 &SwigPyObject_as_number, /* tp_as_number */
2082 0, /* tp_as_sequence */
2083 0, /* tp_as_mapping */
2084 (hashfunc)0, /* tp_hash */
2085 (ternaryfunc)0, /* tp_call */
2086 0, /* tp_str */
2087 PyObject_GenericGetAttr, /* tp_getattro */
2088 0, /* tp_setattro */
2089 0, /* tp_as_buffer */
2090 Py_TPFLAGS_DEFAULT, /* tp_flags */
2091 swigobject_doc, /* tp_doc */
2092 0, /* tp_traverse */
2093 0, /* tp_clear */
2094 (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
2095 0, /* tp_weaklistoffset */
2096 0, /* tp_iter */
2097 0, /* tp_iternext */
2098 swigobject_methods, /* tp_methods */
2099 0, /* tp_members */
2100 0, /* tp_getset */
2101 0, /* tp_base */
2102 0, /* tp_dict */
2103 0, /* tp_descr_get */
2104 0, /* tp_descr_set */
2105 0, /* tp_dictoffset */
2106 0, /* tp_init */
2107 0, /* tp_alloc */
2108 0, /* tp_new */
2109 0, /* tp_free */
2110 0, /* tp_is_gc */
2111 0, /* tp_bases */
2112 0, /* tp_mro */
2113 0, /* tp_cache */
2114 0, /* tp_subclasses */
2115 0, /* tp_weaklist */
2116 0, /* tp_del */
2117 0, /* tp_version_tag */
2118#if PY_VERSION_HEX >= 0x03040000
2119 0, /* tp_finalize */
2120#endif
2121#if PY_VERSION_HEX >= 0x03080000
2122 0, /* tp_vectorcall */
2123#endif
2124#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
2125 0, /* tp_print */
2126#endif
2127#if PY_VERSION_HEX >= 0x030C0000
2128 0, /* tp_watched */
2129#endif
2130#ifdef COUNT_ALLOCS
2131 0, /* tp_allocs */
2132 0, /* tp_frees */
2133 0, /* tp_maxalloc */
2134 0, /* tp_prev */
2135 0 /* tp_next */
2136#endif
2137 };
2138 swigpyobject_type = tmp;
2139 type_init = 1;
2140 if (PyType_Ready(&swigpyobject_type) != 0)
2141 return NULL;
2142 }
2143 return &swigpyobject_type;
2144#else
2145 PyType_Slot slots[] = {
2146 { Py_tp_dealloc, (void *)SwigPyObject_dealloc },
2147 { Py_tp_repr, (void *)SwigPyObject_repr },
2148 { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
2149 { Py_tp_doc, (void *)swigobject_doc },
2150 { Py_tp_richcompare, (void *)SwigPyObject_richcompare },
2151 { Py_tp_methods, (void *)swigobject_methods },
2152 { Py_nb_int, (void *)SwigPyObject_long },
2153 { 0, NULL }
2154 };
2155 PyType_Spec spec = {
2156 "SwigPyObject",
2157 sizeof(SwigPyObject),
2158 0,
2159 Py_TPFLAGS_DEFAULT,
2160 slots
2161 };
2162 return (PyTypeObject *)PyType_FromSpec(&spec);
2163#endif
2164}
2165
2166SWIGRUNTIME PyObject *
2167SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
2168{
2169 SwigPyObject *sobj = PyObject_New(SwigPyObject, SwigPyObject_type());
2170 if (sobj) {
2171 sobj->ptr = ptr;
2172 sobj->ty = ty;
2173 sobj->own = own;
2174 sobj->next = 0;
2175#ifdef SWIGPYTHON_BUILTIN
2176 sobj->dict = 0;
2177#endif
2178 if (own == SWIG_POINTER_OWN) {
2179 /* Obtain a reference to the Python capsule wrapping the module information, so that the
2180 * module information is correctly destroyed after all SWIG python objects have been freed
2181 * by the GC (and corresponding destructors invoked) */
2182 Py_XINCREF(Swig_Capsule_global);
2183 }
2184 }
2185 return (PyObject *)sobj;
2186}
2187
2188/* -----------------------------------------------------------------------------
2189 * Implements a simple Swig Packed type, and use it instead of string
2190 * ----------------------------------------------------------------------------- */
2191
2192typedef struct {
2193 PyObject_HEAD
2194 void *pack;
2196 size_t size;
2197} SwigPyPacked;
2198
2199SWIGRUNTIME PyObject *
2201{
2202 char result[SWIG_BUFFER_SIZE];
2203 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2204 return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
2205 } else {
2206 return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
2207 }
2208}
2209
2210SWIGRUNTIME PyObject *
2212{
2213 char result[SWIG_BUFFER_SIZE];
2214 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
2215 return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
2216 } else {
2217 return SWIG_Python_str_FromChar(v->ty->name);
2218 }
2219}
2220
2221SWIGRUNTIME int
2223{
2224 size_t i = v->size;
2225 size_t j = w->size;
2226 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2227 return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
2228}
2229
2230SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
2231
2232SWIGRUNTIME PyTypeObject*
2234 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2235 return type;
2236}
2237
2239SwigPyPacked_Check(PyObject *op) {
2240 PyTypeObject* op_type = Py_TYPE(op);
2241 if (op_type == SwigPyPacked_TypeOnce())
2242 return 1;
2243#ifdef Py_LIMITED_API
2244 int cmp;
2245 PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__");
2246 if (!tp_name)
2247 return 0;
2248 cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked");
2249 Py_DECREF(tp_name);
2250 return cmp == 0;
2251#else
2252 return (strcmp(op_type->tp_name, "SwigPyPacked") == 0);
2253#endif
2254}
2255
2256SWIGRUNTIME void
2258{
2259 if (SwigPyPacked_Check(v)) {
2260 SwigPyPacked *sobj = (SwigPyPacked *) v;
2261 free(sobj->pack);
2262 }
2263 PyObject_DEL(v);
2264}
2265
2266SWIGRUNTIME PyTypeObject*
2268 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
2269#ifndef Py_LIMITED_API
2270 static PyTypeObject swigpypacked_type;
2271 static int type_init = 0;
2272 if (!type_init) {
2273 const PyTypeObject tmp = {
2274#if PY_VERSION_HEX>=0x03000000
2275 PyVarObject_HEAD_INIT(NULL, 0)
2276#else
2277 PyObject_HEAD_INIT(NULL)
2278 0, /* ob_size */
2279#endif
2280 "SwigPyPacked", /* tp_name */
2281 sizeof(SwigPyPacked), /* tp_basicsize */
2282 0, /* tp_itemsize */
2283 (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
2284#if PY_VERSION_HEX < 0x030800b4
2285 (printfunc)0, /*tp_print*/
2286#else
2287 (Py_ssize_t)0, /*tp_vectorcall_offset*/
2288#endif
2289 (getattrfunc)0, /* tp_getattr */
2290 (setattrfunc)0, /* tp_setattr */
2291#if PY_VERSION_HEX>=0x03000000
2292 0, /* tp_reserved in 3.0.1 */
2293#else
2294 (cmpfunc)SwigPyPacked_compare, /* tp_compare */
2295#endif
2296 (reprfunc)SwigPyPacked_repr, /* tp_repr */
2297 0, /* tp_as_number */
2298 0, /* tp_as_sequence */
2299 0, /* tp_as_mapping */
2300 (hashfunc)0, /* tp_hash */
2301 (ternaryfunc)0, /* tp_call */
2302 (reprfunc)SwigPyPacked_str, /* tp_str */
2303 PyObject_GenericGetAttr, /* tp_getattro */
2304 0, /* tp_setattro */
2305 0, /* tp_as_buffer */
2306 Py_TPFLAGS_DEFAULT, /* tp_flags */
2307 swigpacked_doc, /* tp_doc */
2308 0, /* tp_traverse */
2309 0, /* tp_clear */
2310 0, /* tp_richcompare */
2311 0, /* tp_weaklistoffset */
2312 0, /* tp_iter */
2313 0, /* tp_iternext */
2314 0, /* tp_methods */
2315 0, /* tp_members */
2316 0, /* tp_getset */
2317 0, /* tp_base */
2318 0, /* tp_dict */
2319 0, /* tp_descr_get */
2320 0, /* tp_descr_set */
2321 0, /* tp_dictoffset */
2322 0, /* tp_init */
2323 0, /* tp_alloc */
2324 0, /* tp_new */
2325 0, /* tp_free */
2326 0, /* tp_is_gc */
2327 0, /* tp_bases */
2328 0, /* tp_mro */
2329 0, /* tp_cache */
2330 0, /* tp_subclasses */
2331 0, /* tp_weaklist */
2332 0, /* tp_del */
2333 0, /* tp_version_tag */
2334#if PY_VERSION_HEX >= 0x03040000
2335 0, /* tp_finalize */
2336#endif
2337#if PY_VERSION_HEX >= 0x03080000
2338 0, /* tp_vectorcall */
2339#endif
2340#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
2341 0, /* tp_print */
2342#endif
2343#if PY_VERSION_HEX >= 0x030C0000
2344 0, /* tp_watched */
2345#endif
2346#ifdef COUNT_ALLOCS
2347 0, /* tp_allocs */
2348 0, /* tp_frees */
2349 0, /* tp_maxalloc */
2350 0, /* tp_prev */
2351 0 /* tp_next */
2352#endif
2353 };
2354 swigpypacked_type = tmp;
2355 type_init = 1;
2356 if (PyType_Ready(&swigpypacked_type) != 0)
2357 return NULL;
2358 }
2359 return &swigpypacked_type;
2360#else
2361 PyType_Slot slots[] = {
2362 { Py_tp_dealloc, (void *)SwigPyPacked_dealloc },
2363 { Py_tp_repr, (void *)SwigPyPacked_repr },
2364 { Py_tp_str, (void *)SwigPyPacked_str },
2365 { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
2366 { Py_tp_doc, (void *)swigpacked_doc },
2367 { 0, NULL }
2368 };
2369 PyType_Spec spec = {
2370 "SwigPyPacked",
2371 sizeof(SwigPyPacked),
2372 0,
2373 Py_TPFLAGS_DEFAULT,
2374 slots
2375 };
2376 return (PyTypeObject *)PyType_FromSpec(&spec);
2377#endif
2378}
2379
2380SWIGRUNTIME PyObject *
2381SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2382{
2383 SwigPyPacked *sobj = PyObject_New(SwigPyPacked, SwigPyPacked_type());
2384 if (sobj) {
2385 void *pack = malloc(size);
2386 if (pack) {
2387 memcpy(pack, ptr, size);
2388 sobj->pack = pack;
2389 sobj->ty = ty;
2390 sobj->size = size;
2391 } else {
2392 PyObject_DEL((PyObject *) sobj);
2393 sobj = 0;
2394 }
2395 }
2396 return (PyObject *) sobj;
2397}
2398
2400SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2401{
2402 if (SwigPyPacked_Check(obj)) {
2403 SwigPyPacked *sobj = (SwigPyPacked *)obj;
2404 if (sobj->size != size) return 0;
2405 memcpy(ptr, sobj->pack, size);
2406 return sobj->ty;
2407 } else {
2408 return 0;
2409 }
2410}
2411
2412/* -----------------------------------------------------------------------------
2413 * pointers/data manipulation
2414 * ----------------------------------------------------------------------------- */
2415
2416static PyObject *Swig_This_global = NULL;
2417
2418SWIGRUNTIME PyObject *
2420{
2421 if (Swig_This_global == NULL)
2423 return Swig_This_global;
2424}
2425
2426/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2427
2428/* TODO: I don't know how to implement the fast getset in Python 3 right now */
2429#if PY_VERSION_HEX>=0x03000000
2430#define SWIG_PYTHON_SLOW_GETSET_THIS
2431#endif
2432
2435{
2436 PyObject *obj;
2437
2438 if (SwigPyObject_Check(pyobj))
2439 return (SwigPyObject *) pyobj;
2440
2441#ifdef SWIGPYTHON_BUILTIN
2442 (void)obj;
2443# ifdef PyWeakref_CheckProxy
2444 if (PyWeakref_CheckProxy(pyobj)) {
2445 pyobj = PyWeakref_GET_OBJECT(pyobj);
2446 if (pyobj && SwigPyObject_Check(pyobj))
2447 return (SwigPyObject*) pyobj;
2448 }
2449# endif
2450 return NULL;
2451#else
2452
2453 obj = 0;
2454
2455#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2456 if (PyInstance_Check(pyobj)) {
2457 obj = _PyInstance_Lookup(pyobj, SWIG_This());
2458 } else {
2459 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2460 if (dictptr != NULL) {
2461 PyObject *dict = *dictptr;
2462 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2463 } else {
2464#ifdef PyWeakref_CheckProxy
2465 if (PyWeakref_CheckProxy(pyobj)) {
2466 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2467 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2468 }
2469#endif
2470 obj = PyObject_GetAttr(pyobj,SWIG_This());
2471 if (obj) {
2472 Py_DECREF(obj);
2473 } else {
2474 if (PyErr_Occurred()) PyErr_Clear();
2475 return 0;
2476 }
2477 }
2478 }
2479#else
2480 obj = PyObject_GetAttr(pyobj,SWIG_This());
2481 if (obj) {
2482 Py_DECREF(obj);
2483 } else {
2484 if (PyErr_Occurred()) PyErr_Clear();
2485 return 0;
2486 }
2487#endif
2488 if (obj && !SwigPyObject_Check(obj)) {
2489 /* a PyObject is called 'this', try to get the 'real this'
2490 SwigPyObject from it */
2491 return SWIG_Python_GetSwigThis(obj);
2492 }
2493 return (SwigPyObject *)obj;
2494#endif
2495}
2496
2497/* Acquire a pointer value */
2498
2499SWIGRUNTIME int
2500SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2501 if (own == SWIG_POINTER_OWN) {
2503 if (sobj) {
2504 int oldown = sobj->own;
2505 sobj->own = own;
2506 return oldown;
2507 }
2508 }
2509 return 0;
2510}
2511
2512/* Convert a pointer value */
2513
2514SWIGRUNTIME int
2515SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2516 int res;
2517 SwigPyObject *sobj;
2518 int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2519
2520 if (!obj)
2521 return SWIG_ERROR;
2522 if (obj == Py_None && !implicit_conv) {
2523 if (ptr)
2524 *ptr = 0;
2526 }
2527
2528 res = SWIG_ERROR;
2529
2530 sobj = SWIG_Python_GetSwigThis(obj);
2531 if (own)
2532 *own = 0;
2533 while (sobj) {
2534 void *vptr = sobj->ptr;
2535 if (ty) {
2536 swig_type_info *to = sobj->ty;
2537 if (to == ty) {
2538 /* no type cast needed */
2539 if (ptr) *ptr = vptr;
2540 break;
2541 } else {
2542 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2543 if (!tc) {
2544 sobj = (SwigPyObject *)sobj->next;
2545 } else {
2546 if (ptr) {
2547 int newmemory = 0;
2548 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2549 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2550 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2551 if (own)
2552 *own = *own | SWIG_CAST_NEW_MEMORY;
2553 }
2554 }
2555 break;
2556 }
2557 }
2558 } else {
2559 if (ptr) *ptr = vptr;
2560 break;
2561 }
2562 }
2563 if (sobj) {
2564 if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !sobj->own) {
2566 } else {
2567 if (own)
2568 *own = *own | sobj->own;
2569 if (flags & SWIG_POINTER_DISOWN) {
2570 sobj->own = 0;
2571 }
2572 if (flags & SWIG_POINTER_CLEAR) {
2573 sobj->ptr = 0;
2574 }
2575 res = SWIG_OK;
2576 }
2577 } else {
2578 if (implicit_conv) {
2580 if (data && !data->implicitconv) {
2581 PyObject *klass = data->klass;
2582 if (klass) {
2583 PyObject *impconv;
2584 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2585 impconv = SWIG_Python_CallFunctor(klass, obj);
2586 data->implicitconv = 0;
2587 if (PyErr_Occurred()) {
2588 PyErr_Clear();
2589 impconv = 0;
2590 }
2591 if (impconv) {
2592 SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2593 if (iobj) {
2594 void *vptr;
2595 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2596 if (SWIG_IsOK(res)) {
2597 if (ptr) {
2598 *ptr = vptr;
2599 /* transfer the ownership to 'ptr' */
2600 iobj->own = 0;
2601 res = SWIG_AddCast(res);
2602 res = SWIG_AddNewMask(res);
2603 } else {
2604 res = SWIG_AddCast(res);
2605 }
2606 }
2607 }
2608 Py_DECREF(impconv);
2609 }
2610 }
2611 }
2612 if (!SWIG_IsOK(res) && obj == Py_None) {
2613 if (ptr)
2614 *ptr = 0;
2615 if (PyErr_Occurred())
2616 PyErr_Clear();
2617 res = SWIG_OK;
2618 }
2619 }
2620 }
2621 return res;
2622}
2623
2624/* Convert a function ptr value */
2625
2626SWIGRUNTIME int
2627SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2628 if (!PyCFunction_Check(obj)) {
2629 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2630 } else {
2631 void *vptr = 0;
2632 swig_cast_info *tc;
2633
2634 /* here we get the method pointer for callbacks */
2635#ifndef Py_LIMITED_API
2636 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2637#else
2638 PyObject* pystr_doc = PyObject_GetAttrString(obj, "__doc__");
2639 PyObject *bytes = NULL;
2640 const char *doc = pystr_doc ? SWIG_PyUnicode_AsUTF8AndSize(pystr_doc, NULL, &bytes) : 0;
2641#endif
2642 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2643 if (desc)
2644 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2645#ifdef Py_LIMITED_API
2646 Py_XDECREF(bytes);
2647 Py_XDECREF(pystr_doc);
2648#endif
2649 if (!desc)
2650 return SWIG_ERROR;
2651 tc = SWIG_TypeCheck(desc,ty);
2652 if (tc) {
2653 int newmemory = 0;
2654 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2655 assert(!newmemory); /* newmemory handling not yet implemented */
2656 } else {
2657 return SWIG_ERROR;
2658 }
2659 return SWIG_OK;
2660 }
2661}
2662
2663/* Convert a packed pointer value */
2664
2665SWIGRUNTIME int
2666SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2667 swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2668 if (!to) return SWIG_ERROR;
2669 if (ty) {
2670 if (to != ty) {
2671 /* check type cast? */
2672 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2673 if (!tc) return SWIG_ERROR;
2674 }
2675 }
2676 return SWIG_OK;
2677}
2678
2679/* -----------------------------------------------------------------------------
2680 * Create a new pointer object
2681 * ----------------------------------------------------------------------------- */
2682
2683/*
2684 Create a new instance object, without calling __init__, and set the
2685 'this' attribute.
2686*/
2687
2688SWIGRUNTIME PyObject*
2690{
2691 PyObject *inst = 0;
2692 PyObject *newraw = data->newraw;
2693 if (newraw) {
2694 inst = PyObject_Call(newraw, data->newargs, NULL);
2695 if (inst) {
2696#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2697 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2698 if (dictptr != NULL) {
2699 PyObject *dict = *dictptr;
2700 if (dict == NULL) {
2701 dict = PyDict_New();
2702 *dictptr = dict;
2703 }
2704 if (dict) {
2705 PyDict_SetItem(dict, SWIG_This(), swig_this);
2706 } else{
2707 Py_DECREF(inst);
2708 inst = 0;
2709 }
2710 }
2711#else
2712 if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2713 Py_DECREF(inst);
2714 inst = 0;
2715 }
2716#endif
2717 }
2718 } else {
2719#if PY_VERSION_HEX >= 0x03000000
2720 PyObject *empty_args = PyTuple_New(0);
2721 if (empty_args) {
2722 PyObject *empty_kwargs = PyDict_New();
2723 if (empty_kwargs) {
2724#ifndef Py_LIMITED_API
2725 newfunc newfn = ((PyTypeObject *)data->newargs)->tp_new;
2726#else
2727 newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new);
2728#endif
2729 inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
2730 Py_DECREF(empty_kwargs);
2731 if (inst) {
2732 if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2733 Py_DECREF(inst);
2734 inst = 0;
2735 } else {
2736 PyType_Modified(Py_TYPE(inst));
2737 }
2738 }
2739 }
2740 Py_DECREF(empty_args);
2741 }
2742#else
2743 PyObject *dict = PyDict_New();
2744 if (dict) {
2745 PyDict_SetItem(dict, SWIG_This(), swig_this);
2746 inst = PyInstance_NewRaw(data->newargs, dict);
2747 Py_DECREF(dict);
2748 }
2749#endif
2750 }
2751 return inst;
2752}
2753
2754SWIGRUNTIME int
2755SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2756{
2757#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2758 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2759 if (dictptr != NULL) {
2760 PyObject *dict = *dictptr;
2761 if (dict == NULL) {
2762 dict = PyDict_New();
2763 *dictptr = dict;
2764 }
2765 if (dict) {
2766 return PyDict_SetItem(dict, SWIG_This(), swig_this);
2767 } else{
2768 return -1;
2769 }
2770 }
2771#endif
2772 return PyObject_SetAttr(inst, SWIG_This(), swig_this);
2773}
2774
2775
2776SWIGINTERN PyObject *
2778 PyObject *obj[2];
2779 if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2780 return NULL;
2781 } else {
2782 SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2783 if (sthis) {
2784 Py_DECREF(SwigPyObject_append((PyObject*) sthis, obj[1]));
2785 } else {
2786 if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
2787 return NULL;
2788 }
2789 return SWIG_Py_Void();
2790 }
2791}
2792
2793/* Create a new pointer object */
2794
2795SWIGRUNTIME PyObject *
2796SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2797 SwigPyClientData *clientdata;
2798 PyObject * robj;
2799 int own;
2800
2801 if (!ptr)
2802 return SWIG_Py_Void();
2803
2804 clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2805 own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2806 if (clientdata && clientdata->pytype) {
2807 SwigPyObject *newobj;
2809 newobj = (SwigPyObject*) self;
2810 if (newobj->ptr) {
2811#ifndef Py_LIMITED_API
2812 allocfunc alloc = clientdata->pytype->tp_alloc;
2813#else
2814 allocfunc alloc = (allocfunc)PyType_GetSlot(clientdata->pytype, Py_tp_alloc);
2815#endif
2816 PyObject *next_self = alloc(clientdata->pytype, 0);
2817 while (newobj->next)
2818 newobj = (SwigPyObject *) newobj->next;
2819 newobj->next = next_self;
2820 newobj = (SwigPyObject *)next_self;
2821#ifdef SWIGPYTHON_BUILTIN
2822 newobj->dict = 0;
2823#endif
2824 }
2825 } else {
2826 newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2827#ifdef SWIGPYTHON_BUILTIN
2828 if (newobj) {
2829 newobj->dict = 0;
2830 }
2831#endif
2832 }
2833 if (newobj) {
2834 newobj->ptr = ptr;
2835 newobj->ty = type;
2836 newobj->own = own;
2837 newobj->next = 0;
2838 return (PyObject*) newobj;
2839 }
2840 return SWIG_Py_Void();
2841 }
2842
2843 assert(!(flags & SWIG_BUILTIN_TP_INIT));
2844
2845 robj = SwigPyObject_New(ptr, type, own);
2846 if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2847 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2848 Py_DECREF(robj);
2849 robj = inst;
2850 }
2851 return robj;
2852}
2853
2854/* Create a new packed object */
2855
2856SWIGRUNTIMEINLINE PyObject *
2858 return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2859}
2860
2861/* -----------------------------------------------------------------------------*
2862 * Get type list
2863 * -----------------------------------------------------------------------------*/
2864
2865#ifdef SWIG_LINK_RUNTIME
2866void *SWIG_ReturnGlobalTypeList(void *);
2867#endif
2868
2869static PyObject *Swig_TypeCache_global = NULL;
2870
2871/* The python cached type query */
2872SWIGRUNTIME PyObject *
2874 if (Swig_TypeCache_global == NULL) {
2875 Swig_TypeCache_global = PyDict_New();
2876 }
2877 return Swig_TypeCache_global;
2878}
2879
2882#ifdef SWIG_LINK_RUNTIME
2883 static void *type_pointer = (void *)0;
2884 /* first check if module already created */
2885 if (!type_pointer) {
2886 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2887 }
2888#else
2889 void *type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2890 if (PyErr_Occurred()) {
2891 PyErr_Clear();
2892 type_pointer = (void *)0;
2893 }
2894#endif
2895 return (swig_module_info *) type_pointer;
2896}
2897
2898
2899static int interpreter_counter = 0; /* how many (sub-)interpreters are using swig_module's types */
2900
2901SWIGRUNTIME void
2903{
2904 swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2905 swig_type_info **types = swig_module->types;
2906 size_t i;
2907 if (--interpreter_counter != 0) /* another sub-interpreter may still be using the swig_module's types */
2908 return;
2909 for (i =0; i < swig_module->size; ++i) {
2910 swig_type_info *ty = types[i];
2911 if (ty->owndata) {
2913 ty->clientdata = 0;
2915 }
2916 }
2917 Py_DECREF(SWIG_This());
2919 Py_DECREF(SWIG_globals());
2921 Py_DECREF(SWIG_Python_TypeCache());
2924}
2925
2926SWIGRUNTIME void
2928#if PY_VERSION_HEX >= 0x03000000
2929 /* Add a dummy module object into sys.modules */
2930 PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2931#else
2932 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2933 PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2934#endif
2935 PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2936 if (pointer && module) {
2937 if (PyModule_AddObject(module, SWIGPY_CAPSULE_ATTR_NAME, pointer) == 0) {
2939 Swig_Capsule_global = pointer;
2940 } else {
2941 Py_DECREF(pointer);
2942 }
2943 } else {
2944 Py_XDECREF(pointer);
2945 }
2946}
2947
2950{
2951 PyObject *cache = SWIG_Python_TypeCache();
2952 PyObject *key = SWIG_Python_str_FromChar(type);
2953 PyObject *obj = PyDict_GetItem(cache, key);
2954 swig_type_info *descriptor;
2955 if (obj) {
2956 descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2957 } else {
2960 if (descriptor) {
2961 obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2962 if (obj) {
2963 PyDict_SetItem(cache, key, obj);
2964 Py_DECREF(obj);
2965 }
2966 }
2967 }
2968 Py_DECREF(key);
2969 return descriptor;
2970}
2971
2972/*
2973 For backward compatibility only
2974*/
2975#define SWIG_POINTER_EXCEPTION 0
2976#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2977#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2978
2979SWIGRUNTIME int
2980SWIG_Python_AddErrMesg(const char* mesg, int infront)
2981{
2982 if (PyErr_Occurred()) {
2983 PyObject *type = 0;
2984 PyObject *value = 0;
2985 PyObject *traceback = 0;
2986 PyErr_Fetch(&type, &value, &traceback);
2987 if (value) {
2988 PyObject *old_str = PyObject_Str(value);
2989 PyObject *bytes = NULL;
2990 const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes);
2991 const char *errmesg = tmp ? tmp : "Invalid error message";
2992 Py_XINCREF(type);
2993 PyErr_Clear();
2994 if (infront) {
2995 PyErr_Format(type, "%s %s", mesg, errmesg);
2996 } else {
2997 PyErr_Format(type, "%s %s", errmesg, mesg);
2998 }
2999 Py_XDECREF(bytes);
3000 Py_DECREF(old_str);
3001 }
3002 return 1;
3003 } else {
3004 return 0;
3005 }
3006}
3007
3008SWIGRUNTIME int
3010{
3011 if (PyErr_Occurred()) {
3012 /* add information about failing argument */
3013 char mesg[256];
3014 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
3015 return SWIG_Python_AddErrMesg(mesg, 1);
3016 } else {
3017 return 0;
3018 }
3019}
3020
3021SWIGRUNTIMEINLINE const char *
3023{
3024 SwigPyObject *v = (SwigPyObject *)self;
3025 swig_type_info *ty = v ? v->ty : 0;
3026 return ty ? ty->str : "";
3027}
3028
3029SWIGRUNTIME void
3030SWIG_Python_TypeError(const char *type, PyObject *obj)
3031{
3032 if (type) {
3033#if defined(SWIG_COBJECT_TYPES)
3034 if (obj && SwigPyObject_Check(obj)) {
3035 const char *otype = (const char *) SwigPyObject_GetDesc(obj);
3036 if (otype) {
3037 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
3038 type, otype);
3039 return;
3040 }
3041 } else
3042#endif
3043 {
3044#ifndef Py_LIMITED_API
3045 /* tp_name is not accessible */
3046 const char *otype = (obj ? obj->ob_type->tp_name : 0);
3047 if (otype) {
3048 PyObject *str = PyObject_Str(obj);
3049 PyObject *bytes = NULL;
3050 const char *cstr = str ? SWIG_PyUnicode_AsUTF8AndSize(str, NULL, &bytes) : 0;
3051 if (cstr) {
3052 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
3053 type, otype, cstr);
3054 } else {
3055 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
3056 type, otype);
3057 }
3058 Py_XDECREF(bytes);
3059 Py_XDECREF(str);
3060 return;
3061 }
3062#endif
3063 }
3064 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
3065 } else {
3066 PyErr_Format(PyExc_TypeError, "unexpected type is received");
3067 }
3068}
3069
3070
3071/* Convert a pointer value, signal an exception on a type mismatch */
3072SWIGRUNTIME void *
3073SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
3074 void *result;
3075 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
3076 PyErr_Clear();
3077 }
3078 return result;
3079}
3080
3081#ifdef SWIGPYTHON_BUILTIN
3082SWIGRUNTIME int
3083SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
3084 PyTypeObject *tp = obj->ob_type;
3085 PyObject *descr;
3086 PyObject *encoded_name;
3087 descrsetfunc f;
3088 int res = -1;
3089
3090# ifdef Py_USING_UNICODE
3091 if (PyString_Check(name)) {
3092 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
3093 if (!name)
3094 return -1;
3095 } else if (!PyUnicode_Check(name))
3096# else
3097 if (!PyString_Check(name))
3098# endif
3099 {
3100 PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
3101 return -1;
3102 } else {
3103 Py_INCREF(name);
3104 }
3105
3106 if (!tp->tp_dict) {
3107 if (PyType_Ready(tp) != 0)
3108 goto done;
3109 }
3110
3111 descr = _PyType_Lookup(tp, name);
3112 f = NULL;
3113 if (descr != NULL)
3114 f = descr->ob_type->tp_descr_set;
3115 if (!f) {
3116 if (PyString_Check(name)) {
3117 encoded_name = name;
3118 Py_INCREF(name);
3119 } else {
3120 encoded_name = PyUnicode_AsUTF8String(name);
3121 if (!encoded_name)
3122 goto done;
3123 }
3124 PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
3125 Py_DECREF(encoded_name);
3126 } else {
3127 res = f(descr, obj, value);
3128 }
3129
3130 done:
3131 Py_DECREF(name);
3132 return res;
3133}
3134#endif
3135
3136
3137#ifdef __cplusplus
3138}
3139#endif
3140
3141
3142
3143#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
3144
3145#define SWIG_contract_assert(expr, msg) do { if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } } while (0)
3146
3147
3148
3149/* -------- TYPES TABLE (BEGIN) -------- */
3150
3151#define SWIGTYPE_p_Agedge_t swig_types[0]
3152#define SWIGTYPE_p_Agnode_t swig_types[1]
3153#define SWIGTYPE_p_Agraph_t swig_types[2]
3154#define SWIGTYPE_p_Agsym_t swig_types[3]
3155#define SWIGTYPE_p_FILE swig_types[4]
3156#define SWIGTYPE_p_char swig_types[5]
3158static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0};
3159#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3160#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3161
3162/* -------- TYPES TABLE (END) -------- */
3163
3164#ifdef SWIG_TypeQuery
3165# undef SWIG_TypeQuery
3166#endif
3167#define SWIG_TypeQuery SWIG_Python_TypeQuery
3168
3169/*-----------------------------------------------
3170 @(target):= _gv.so
3171 ------------------------------------------------*/
3172#if PY_VERSION_HEX >= 0x03000000
3173# define SWIG_init PyInit__gv
3174
3175#else
3176# define SWIG_init init_gv
3177
3178#endif
3179#define SWIG_name "_gv"
3180
3181#ifdef __cplusplus
3182#include <utility>
3183/* SwigValueWrapper is described in swig.swg */
3184template<typename T> class SwigValueWrapper {
3185 struct SwigSmartPointer {
3186 T *ptr;
3187 SwigSmartPointer(T *p) : ptr(p) { }
3188 ~SwigSmartPointer() { delete ptr; }
3189 SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
3190 void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
3191 } pointer;
3192 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
3193 SwigValueWrapper(const SwigValueWrapper<T>& rhs);
3194public:
3195 SwigValueWrapper() : pointer(0) { }
3196 SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
3197#if __cplusplus >=201103L
3198 SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
3199 operator T&&() const { return std::move(*pointer.ptr); }
3200#else
3201 operator T&() const { return *pointer.ptr; }
3202#endif
3203 T *operator&() const { return pointer.ptr; }
3204 static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
3205};
3206
3207/*
3208 * SwigValueInit() is a generic initialisation solution as the following approach:
3209 *
3210 * T c_result = T();
3211 *
3212 * doesn't compile for all types for example:
3213 *
3214 * unsigned int c_result = unsigned int();
3215 */
3216template <typename T> T SwigValueInit() {
3217 return T();
3218}
3219
3220#if __cplusplus >=201103L
3221# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
3222#else
3223# define SWIG_STD_MOVE(OBJ) OBJ
3224#endif
3225
3226#endif
3227
3228
3229#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
3230#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
3231
3232
3233#include <stdexcept>
3234
3235
3236namespace swig {
3238 protected:
3239 PyObject *_obj;
3240
3241 public:
3243 {
3244 }
3245
3252
3253 SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
3254 {
3255 if (initial_ref) {
3257 Py_XINCREF(_obj);
3259 }
3260 }
3261
3263 {
3265 Py_XINCREF(item._obj);
3266 Py_XDECREF(_obj);
3267 _obj = item._obj;
3269 return *this;
3270 }
3271
3278
3279 operator PyObject *() const
3280 {
3281 return _obj;
3282 }
3283
3284 PyObject *operator->() const
3285 {
3286 return _obj;
3287 }
3288 };
3289}
3290
3291
3292namespace swig {
3294 SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
3295
3297 {
3298 Py_XDECREF(_obj);
3299 _obj = obj;
3300 return *this;
3301 }
3302 };
3303}
3304
3305
3306#include <gvc/gvc.h>
3307
3309/*** New empty graph */
3310extern Agraph_t *graph(char *name);
3311extern Agraph_t *digraph(char *name);
3312extern Agraph_t *strictgraph(char *name);
3313extern Agraph_t *strictdigraph(char *name);
3314/*** New graph from a dot-syntax string or file */
3315extern Agraph_t *readstring(char *string);
3316extern Agraph_t *read(const char *filename);
3317extern Agraph_t *read(FILE *f);
3318/*** Add new subgraph to existing graph */
3319extern Agraph_t *graph(Agraph_t *g, char *name);
3320
3322/*** Add new node to existing graph */
3323extern Agnode_t *node(Agraph_t *g, char *name);
3324
3326/*** Add new edge between existing nodes */
3327extern Agedge_t *edge(Agnode_t *t, Agnode_t *h);
3328/*** Add a new edge between an existing tail node, and a named head node which will be induced in the graph if it doesn't already exist */
3329extern Agedge_t *edge(Agnode_t *t, char *hname);
3330/*** Add a new edge between an existing head node, and a named tail node which will be induced in the graph if it doesn't already exist */
3331extern Agedge_t *edge(char *tname, Agnode_t *h);
3332/*** Add a new edge between named tail and head nodes which will be induced in the graph if they don't already exist */
3333extern Agedge_t *edge(Agraph_t *g, char *tname, char *hname);
3334
3336/*** Set value of named attribute of graph/node/edge - creating attribute if necessary */
3337extern char *setv(Agraph_t *g, char *attr, char *val);
3338extern char *setv(Agnode_t *n, char *attr, char *val);
3339extern char *setv(Agedge_t *e, char *attr, char *val);
3340
3341/*** Set value of existing attribute of graph/node/edge (using attribute handle) */
3342extern char *setv(Agraph_t *g, Agsym_t *a, char *val);
3343extern char *setv(Agnode_t *n, Agsym_t *a, char *val);
3344extern char *setv(Agedge_t *e, Agsym_t *a, char *val);
3345
3347/*** Get value of named attribute of graph/node/edge */
3348extern char *getv(Agraph_t *g, char *attr);
3349extern char *getv(Agnode_t *n, char *attr);
3350extern char *getv(Agedge_t *e, char *attr);
3351
3352/*** Get value of attribute of graph/node/edge (using attribute handle) */
3353extern char *getv(Agraph_t *g, Agsym_t *a);
3354extern char *getv(Agnode_t *n, Agsym_t *a);
3355extern char *getv(Agedge_t *e, Agsym_t *a);
3356
3358extern char *nameof(Agraph_t *g);
3359extern char *nameof(Agnode_t *n);
3360extern char *nameof(Agsym_t *a);
3361
3363extern Agraph_t *findsubg(Agraph_t *g, char *name);
3364extern Agnode_t *findnode(Agraph_t *g, char *name);
3365extern Agedge_t *findedge(Agnode_t *t, Agnode_t *h);
3366
3368extern Agsym_t *findattr(Agraph_t *g, char *name);
3369extern Agsym_t *findattr(Agnode_t *n, char *name);
3370extern Agsym_t *findattr(Agedge_t *e, char *name);
3371
3373extern Agnode_t *headof(Agedge_t *e);
3374extern Agnode_t *tailof(Agedge_t *e);
3375extern Agraph_t *graphof(Agraph_t *g);
3376extern Agraph_t *graphof(Agedge_t *e);
3377extern Agraph_t *graphof(Agnode_t *n);
3378extern Agraph_t *rootof(Agraph_t *g);
3379
3381extern Agnode_t *protonode(Agraph_t *g);
3382extern Agedge_t *protoedge(Agraph_t *g);
3383
3385/*** Iteration termination tests */
3386extern bool ok(Agraph_t *g);
3387extern bool ok(Agnode_t *n);
3388extern bool ok(Agedge_t *e);
3389extern bool ok(Agsym_t *a);
3390
3391/*** Iterate over subgraphs of a graph */
3392extern Agraph_t *firstsubg(Agraph_t *g);
3393extern Agraph_t *nextsubg(Agraph_t *g, Agraph_t *sg);
3394
3395/*** Iterate over supergraphs of a graph (obscure and rarely useful) */
3396extern Agraph_t *firstsupg(Agraph_t *g);
3397extern Agraph_t *nextsupg(Agraph_t *g, Agraph_t *sg);
3398
3399/*** Iterate over edges of a graph */
3400extern Agedge_t *firstedge(Agraph_t *g);
3401extern Agedge_t *nextedge(Agraph_t *g, Agedge_t *e);
3402
3403/*** Iterate over outedges of a graph */
3404extern Agedge_t *firstout(Agraph_t *g);
3405extern Agedge_t *nextout(Agraph_t *g, Agedge_t *e);
3406
3407/*** Iterate over edges of a node */
3408extern Agedge_t *firstedge(Agnode_t *n);
3409extern Agedge_t *nextedge(Agnode_t *n, Agedge_t *e);
3410
3411/*** Iterate over out-edges of a node */
3412extern Agedge_t *firstout(Agnode_t *n);
3413extern Agedge_t *nextout(Agnode_t *n, Agedge_t *e);
3414
3415/*** Iterate over head nodes reachable from out-edges of a node */
3416extern Agnode_t *firsthead(Agnode_t *n);
3417extern Agnode_t *nexthead(Agnode_t *n, Agnode_t *h);
3418
3419/*** Iterate over in-edges of a graph */
3420extern Agedge_t *firstin(Agraph_t *g);
3421extern Agedge_t *nextin(Agnode_t *n, Agedge_t *e);
3422
3423/*** Iterate over in-edges of a node */
3424extern Agedge_t *firstin(Agnode_t *n);
3425extern Agedge_t *nextin(Agraph_t *g, Agedge_t *e);
3426
3427/*** Iterate over tail nodes reachable from in-edges of a node */
3428extern Agnode_t *firsttail(Agnode_t *n);
3429extern Agnode_t *nexttail(Agnode_t *n, Agnode_t *t);
3430
3431/*** Iterate over nodes of a graph */
3432extern Agnode_t *firstnode(Agraph_t *g);
3433extern Agnode_t *nextnode(Agraph_t *g, Agnode_t *n);
3434
3435/*** Iterate over nodes of an edge */
3436extern Agnode_t *firstnode(Agedge_t *e);
3437extern Agnode_t *nextnode(Agedge_t *e, Agnode_t *n);
3438
3439/*** Iterate over attributes of a graph */
3440extern Agsym_t *firstattr(Agraph_t *g);
3441extern Agsym_t *nextattr(Agraph_t *g, Agsym_t *a);
3442
3443/*** Iterate over attributes of an edge */
3444extern Agsym_t *firstattr(Agedge_t *e);
3445extern Agsym_t *nextattr(Agedge_t *e, Agsym_t *a);
3446
3447/*** Iterate over attributes of a node */
3448extern Agsym_t *firstattr(Agnode_t *n);
3449extern Agsym_t *nextattr(Agnode_t *n, Agsym_t *a);
3450
3452extern bool rm(Agraph_t *g);
3453extern bool rm(Agnode_t *n);
3454extern bool rm(Agedge_t *e);
3455
3457/*** Annotate a graph with layout attributes and values using a specific layout engine */
3458extern bool layout(Agraph_t *g, const char *engine);
3459
3461/*** Render a layout into attributes of the graph */
3462extern bool render(Agraph_t *g);
3463/*** Render a layout to stdout */
3464extern bool render(Agraph_t *g, const char *format);
3465/*** Render to an open file */
3466extern bool render(Agraph_t *g, const char *format, FILE *fout);
3467/*** Render a layout to an unopened file by name */
3468extern bool render(Agraph_t *g, const char *format, const char *filename);
3469/*** Render to a string result */
3470#ifdef SWIGJAVA
3471extern char* renderresult(Agraph_t *ing, const char *format);
3472#else
3473extern void renderresult(Agraph_t *g, const char *format, char *outdata);
3474/*** Render to an open channel */
3475extern bool renderchannel(Agraph_t *g, const char *format, const char *channelname);
3476#endif
3477/*** Render a layout to a malloc'ed string, to be free'd by the caller */
3478/*** (deprecated - too easy to leak memory) */
3479/*** (still needed for "eval [gv::renderdata $G tk]" ) */
3480extern char* renderdata(Agraph_t *g, const char *format);
3481
3482/*** Writing graph back to file */
3483extern bool write(Agraph_t *g, const char *filename);
3484extern bool write(Agraph_t *g, FILE *f);
3485
3486/*** Graph transformation tools */
3487extern bool tred(Agraph_t *g);
3488
3489
3490
3493{
3494 static int init = 0;
3495 static swig_type_info* info = 0;
3496 if (!init) {
3497 info = SWIG_TypeQuery("_p_char");
3498 init = 1;
3499 }
3500 return info;
3501}
3502
3503
3504/* Return string from Python obj. NOTE: obj must remain in scope in order
3505 to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */
3506SWIGINTERN int
3507SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc)
3508{
3509#if PY_VERSION_HEX>=0x03000000
3510#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3511 if (PyBytes_Check(obj))
3512#else
3513 if (PyUnicode_Check(obj))
3514#endif
3515#else
3516 if (PyString_Check(obj))
3517#endif
3518 {
3519 char *cstr; Py_ssize_t len;
3520 PyObject *bytes = NULL;
3521 int ret = SWIG_OK;
3522 if (alloc)
3523 *alloc = SWIG_OLDOBJ;
3524#if PY_VERSION_HEX>=0x03000000 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3525 if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
3526 return SWIG_TypeError;
3527#else
3528 cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, &len, &bytes);
3529 if (!cstr)
3530 return SWIG_TypeError;
3531 /* The returned string is only duplicated if the char * returned is not owned and memory managed by obj */
3532 if (bytes && cptr) {
3533 if (alloc) {
3534 cstr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3535 *alloc = SWIG_NEWOBJ;
3536 } else {
3537 /* alloc must be set in order to clean up allocated memory */
3538 return SWIG_RuntimeError;
3539 }
3540 }
3541#endif
3542 if (cptr) *cptr = cstr;
3543 if (psize) *psize = len + 1;
3544 Py_XDECREF(bytes);
3545 return ret;
3546 } else {
3547#if defined(SWIG_PYTHON_2_UNICODE)
3548#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3549#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3550#endif
3551#if PY_VERSION_HEX<0x03000000
3552 if (PyUnicode_Check(obj)) {
3553 char *cstr; Py_ssize_t len;
3554 if (!alloc && cptr) {
3555 return SWIG_RuntimeError;
3556 }
3557 obj = PyUnicode_AsUTF8String(obj);
3558 if (!obj)
3559 return SWIG_TypeError;
3560 if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3561 if (cptr) {
3562 if (alloc) *alloc = SWIG_NEWOBJ;
3563 *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3564 }
3565 if (psize) *psize = len + 1;
3566
3567 Py_XDECREF(obj);
3568 return SWIG_OK;
3569 } else {
3570 Py_XDECREF(obj);
3571 }
3572 }
3573#endif
3574#endif
3575
3576 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3577 if (pchar_descriptor) {
3578 void* vptr = 0;
3579 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3580 if (cptr) *cptr = (char *) vptr;
3581 if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3582 if (alloc) *alloc = SWIG_OLDOBJ;
3583 return SWIG_OK;
3584 }
3585 }
3586 }
3587 return SWIG_TypeError;
3588}
3589
3590
3591
3592
3593
3594SWIGINTERNINLINE PyObject *
3595SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3596{
3597 if (carray) {
3598 if (size > INT_MAX) {
3599 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3600 return pchar_descriptor ?
3601 SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3602 } else {
3603#if PY_VERSION_HEX >= 0x03000000
3604#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3605 return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3606#else
3607 return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
3608#endif
3609#else
3610 return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3611#endif
3612 }
3613 } else {
3614 return SWIG_Py_Void();
3615 }
3616}
3617
3618
3619SWIGINTERNINLINE PyObject *
3620SWIG_FromCharPtr(const char *cptr)
3621{
3622 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3623}
3624
3625
3626SWIGINTERNINLINE PyObject*
3627 SWIG_From_bool (bool value)
3628{
3629 return PyBool_FromLong(value ? 1 : 0);
3630}
3631
3632#ifdef __cplusplus
3633extern "C" {
3634#endif
3635SWIGINTERN PyObject *_wrap_graph__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
3636 PyObject *resultobj = 0;
3637 char *arg1 = (char *) 0 ;
3638 int res1 ;
3639 char *buf1 = 0 ;
3640 int alloc1 = 0 ;
3641 Agraph_t *result = 0 ;
3642
3643 (void)self;
3644 if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
3645 res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
3646 if (!SWIG_IsOK(res1)) {
3647 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "graph" "', argument " "1"" of type '" "char *""'");
3648 }
3649 arg1 = reinterpret_cast< char * >(buf1);
3650 result = (Agraph_t *)graph(arg1);
3651 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
3652 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3653 return resultobj;
3654fail:
3655 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3656 return NULL;
3657}
3658
3659
3660SWIGINTERN PyObject *_wrap_digraph(PyObject *self, PyObject *args) {
3661 PyObject *resultobj = 0;
3662 char *arg1 = (char *) 0 ;
3663 int res1 ;
3664 char *buf1 = 0 ;
3665 int alloc1 = 0 ;
3666 PyObject *swig_obj[1] ;
3667 Agraph_t *result = 0 ;
3668
3669 (void)self;
3670 if (!args) SWIG_fail;
3671 swig_obj[0] = args;
3672 res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
3673 if (!SWIG_IsOK(res1)) {
3674 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "digraph" "', argument " "1"" of type '" "char *""'");
3675 }
3676 arg1 = reinterpret_cast< char * >(buf1);
3677 result = (Agraph_t *)digraph(arg1);
3678 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
3679 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3680 return resultobj;
3681fail:
3682 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3683 return NULL;
3684}
3685
3686
3687SWIGINTERN PyObject *_wrap_strictgraph(PyObject *self, PyObject *args) {
3688 PyObject *resultobj = 0;
3689 char *arg1 = (char *) 0 ;
3690 int res1 ;
3691 char *buf1 = 0 ;
3692 int alloc1 = 0 ;
3693 PyObject *swig_obj[1] ;
3694 Agraph_t *result = 0 ;
3695
3696 (void)self;
3697 if (!args) SWIG_fail;
3698 swig_obj[0] = args;
3699 res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
3700 if (!SWIG_IsOK(res1)) {
3701 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "strictgraph" "', argument " "1"" of type '" "char *""'");
3702 }
3703 arg1 = reinterpret_cast< char * >(buf1);
3704 result = (Agraph_t *)strictgraph(arg1);
3705 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
3706 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3707 return resultobj;
3708fail:
3709 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3710 return NULL;
3711}
3712
3713
3714SWIGINTERN PyObject *_wrap_strictdigraph(PyObject *self, PyObject *args) {
3715 PyObject *resultobj = 0;
3716 char *arg1 = (char *) 0 ;
3717 int res1 ;
3718 char *buf1 = 0 ;
3719 int alloc1 = 0 ;
3720 PyObject *swig_obj[1] ;
3721 Agraph_t *result = 0 ;
3722
3723 (void)self;
3724 if (!args) SWIG_fail;
3725 swig_obj[0] = args;
3726 res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
3727 if (!SWIG_IsOK(res1)) {
3728 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "strictdigraph" "', argument " "1"" of type '" "char *""'");
3729 }
3730 arg1 = reinterpret_cast< char * >(buf1);
3731 result = (Agraph_t *)strictdigraph(arg1);
3732 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
3733 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3734 return resultobj;
3735fail:
3736 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3737 return NULL;
3738}
3739
3740
3741SWIGINTERN PyObject *_wrap_readstring(PyObject *self, PyObject *args) {
3742 PyObject *resultobj = 0;
3743 char *arg1 = (char *) 0 ;
3744 int res1 ;
3745 char *buf1 = 0 ;
3746 int alloc1 = 0 ;
3747 PyObject *swig_obj[1] ;
3748 Agraph_t *result = 0 ;
3749
3750 (void)self;
3751 if (!args) SWIG_fail;
3752 swig_obj[0] = args;
3753 res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
3754 if (!SWIG_IsOK(res1)) {
3755 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "readstring" "', argument " "1"" of type '" "char *""'");
3756 }
3757 arg1 = reinterpret_cast< char * >(buf1);
3758 result = (Agraph_t *)readstring(arg1);
3759 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
3760 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3761 return resultobj;
3762fail:
3763 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3764 return NULL;
3765}
3766
3767
3768SWIGINTERN PyObject *_wrap_read__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
3769 PyObject *resultobj = 0;
3770 char *arg1 = (char *) 0 ;
3771 int res1 ;
3772 char *buf1 = 0 ;
3773 int alloc1 = 0 ;
3774 Agraph_t *result = 0 ;
3775
3776 (void)self;
3777 if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
3778 res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
3779 if (!SWIG_IsOK(res1)) {
3780 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read" "', argument " "1"" of type '" "char const *""'");
3781 }
3782 arg1 = reinterpret_cast< char * >(buf1);
3783 result = (Agraph_t *)read((char const *)arg1);
3784 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
3785 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3786 return resultobj;
3787fail:
3788 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3789 return NULL;
3790}
3791
3792
3793SWIGINTERN PyObject *_wrap_read__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
3794 PyObject *resultobj = 0;
3795 FILE *arg1 = (FILE *) 0 ;
3796 void *argp1 = 0 ;
3797 int res1 = 0 ;
3798 Agraph_t *result = 0 ;
3799
3800 (void)self;
3801 if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
3802 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 | 0 );
3803 if (!SWIG_IsOK(res1)) {
3804 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read" "', argument " "1"" of type '" "FILE *""'");
3805 }
3806 arg1 = reinterpret_cast< FILE * >(argp1);
3807 result = (Agraph_t *)read(arg1);
3808 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
3809 return resultobj;
3810fail:
3811 return NULL;
3812}
3813
3814
3815SWIGINTERN PyObject *_wrap_read(PyObject *self, PyObject *args) {
3816 Py_ssize_t argc;
3817 PyObject *argv[2] = {
3818 0
3819 };
3820
3821 if (!(argc = SWIG_Python_UnpackTuple(args, "read", 0, 1, argv))) SWIG_fail;
3822 --argc;
3823 if (argc == 1) {
3824 int _v = 0;
3825 void *vptr = 0;
3826 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FILE, 0);
3827 _v = SWIG_CheckState(res);
3828 if (_v) {
3829 return _wrap_read__SWIG_1(self, argc, argv);
3830 }
3831 }
3832 if (argc == 1) {
3833 int _v = 0;
3834 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3835 _v = SWIG_CheckState(res);
3836 if (_v) {
3837 return _wrap_read__SWIG_0(self, argc, argv);
3838 }
3839 }
3840
3841fail:
3842 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'read'.\n"
3843 " Possible C/C++ prototypes are:\n"
3844 " read(char const *)\n"
3845 " read(FILE *)\n");
3846 return 0;
3847}
3848
3849
3850SWIGINTERN PyObject *_wrap_graph__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
3851 PyObject *resultobj = 0;
3852 Agraph_t *arg1 = (Agraph_t *) 0 ;
3853 char *arg2 = (char *) 0 ;
3854 void *argp1 = 0 ;
3855 int res1 = 0 ;
3856 int res2 ;
3857 char *buf2 = 0 ;
3858 int alloc2 = 0 ;
3859 Agraph_t *result = 0 ;
3860
3861 (void)self;
3862 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
3863 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
3864 if (!SWIG_IsOK(res1)) {
3865 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "graph" "', argument " "1"" of type '" "Agraph_t *""'");
3866 }
3867 arg1 = reinterpret_cast< Agraph_t * >(argp1);
3868 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
3869 if (!SWIG_IsOK(res2)) {
3870 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "graph" "', argument " "2"" of type '" "char *""'");
3871 }
3872 arg2 = reinterpret_cast< char * >(buf2);
3873 result = (Agraph_t *)graph(arg1,arg2);
3874 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
3875 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
3876 return resultobj;
3877fail:
3878 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
3879 return NULL;
3880}
3881
3882
3883SWIGINTERN PyObject *_wrap_graph(PyObject *self, PyObject *args) {
3884 Py_ssize_t argc;
3885 PyObject *argv[3] = {
3886 0
3887 };
3888
3889 if (!(argc = SWIG_Python_UnpackTuple(args, "graph", 0, 2, argv))) SWIG_fail;
3890 --argc;
3891 if (argc == 1) {
3892 int _v = 0;
3893 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
3894 _v = SWIG_CheckState(res);
3895 if (_v) {
3896 return _wrap_graph__SWIG_0(self, argc, argv);
3897 }
3898 }
3899 if (argc == 2) {
3900 int _v = 0;
3901 void *vptr = 0;
3902 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agraph_t, 0);
3903 _v = SWIG_CheckState(res);
3904 if (_v) {
3905 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
3906 _v = SWIG_CheckState(res);
3907 if (_v) {
3908 return _wrap_graph__SWIG_1(self, argc, argv);
3909 }
3910 }
3911 }
3912
3913fail:
3914 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'graph'.\n"
3915 " Possible C/C++ prototypes are:\n"
3916 " graph(char *)\n"
3917 " graph(Agraph_t *,char *)\n");
3918 return 0;
3919}
3920
3921
3922SWIGINTERN PyObject *_wrap_node(PyObject *self, PyObject *args) {
3923 PyObject *resultobj = 0;
3924 Agraph_t *arg1 = (Agraph_t *) 0 ;
3925 char *arg2 = (char *) 0 ;
3926 void *argp1 = 0 ;
3927 int res1 = 0 ;
3928 int res2 ;
3929 char *buf2 = 0 ;
3930 int alloc2 = 0 ;
3931 PyObject *swig_obj[2] ;
3932 Agnode_t *result = 0 ;
3933
3934 (void)self;
3935 if (!SWIG_Python_UnpackTuple(args, "node", 2, 2, swig_obj)) SWIG_fail;
3936 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
3937 if (!SWIG_IsOK(res1)) {
3938 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "node" "', argument " "1"" of type '" "Agraph_t *""'");
3939 }
3940 arg1 = reinterpret_cast< Agraph_t * >(argp1);
3941 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
3942 if (!SWIG_IsOK(res2)) {
3943 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "node" "', argument " "2"" of type '" "char *""'");
3944 }
3945 arg2 = reinterpret_cast< char * >(buf2);
3946 result = (Agnode_t *)node(arg1,arg2);
3947 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agnode_t, 0 | 0 );
3948 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
3949 return resultobj;
3950fail:
3951 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
3952 return NULL;
3953}
3954
3955
3956SWIGINTERN PyObject *_wrap_edge__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
3957 PyObject *resultobj = 0;
3958 Agnode_t *arg1 = (Agnode_t *) 0 ;
3959 Agnode_t *arg2 = (Agnode_t *) 0 ;
3960 void *argp1 = 0 ;
3961 int res1 = 0 ;
3962 void *argp2 = 0 ;
3963 int res2 = 0 ;
3964 Agedge_t *result = 0 ;
3965
3966 (void)self;
3967 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
3968 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agnode_t, 0 | 0 );
3969 if (!SWIG_IsOK(res1)) {
3970 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "edge" "', argument " "1"" of type '" "Agnode_t *""'");
3971 }
3972 arg1 = reinterpret_cast< Agnode_t * >(argp1);
3973 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Agnode_t, 0 | 0 );
3974 if (!SWIG_IsOK(res2)) {
3975 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "edge" "', argument " "2"" of type '" "Agnode_t *""'");
3976 }
3977 arg2 = reinterpret_cast< Agnode_t * >(argp2);
3978 result = (Agedge_t *)edge(arg1,arg2);
3979 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agedge_t, 0 | 0 );
3980 return resultobj;
3981fail:
3982 return NULL;
3983}
3984
3985
3986SWIGINTERN PyObject *_wrap_edge__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
3987 PyObject *resultobj = 0;
3988 Agnode_t *arg1 = (Agnode_t *) 0 ;
3989 char *arg2 = (char *) 0 ;
3990 void *argp1 = 0 ;
3991 int res1 = 0 ;
3992 int res2 ;
3993 char *buf2 = 0 ;
3994 int alloc2 = 0 ;
3995 Agedge_t *result = 0 ;
3996
3997 (void)self;
3998 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
3999 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agnode_t, 0 | 0 );
4000 if (!SWIG_IsOK(res1)) {
4001 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "edge" "', argument " "1"" of type '" "Agnode_t *""'");
4002 }
4003 arg1 = reinterpret_cast< Agnode_t * >(argp1);
4004 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
4005 if (!SWIG_IsOK(res2)) {
4006 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "edge" "', argument " "2"" of type '" "char *""'");
4007 }
4008 arg2 = reinterpret_cast< char * >(buf2);
4009 result = (Agedge_t *)edge(arg1,arg2);
4010 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agedge_t, 0 | 0 );
4011 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4012 return resultobj;
4013fail:
4014 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4015 return NULL;
4016}
4017
4018
4019SWIGINTERN PyObject *_wrap_edge__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4020 PyObject *resultobj = 0;
4021 char *arg1 = (char *) 0 ;
4022 Agnode_t *arg2 = (Agnode_t *) 0 ;
4023 int res1 ;
4024 char *buf1 = 0 ;
4025 int alloc1 = 0 ;
4026 void *argp2 = 0 ;
4027 int res2 = 0 ;
4028 Agedge_t *result = 0 ;
4029
4030 (void)self;
4031 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4032 res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4033 if (!SWIG_IsOK(res1)) {
4034 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "edge" "', argument " "1"" of type '" "char *""'");
4035 }
4036 arg1 = reinterpret_cast< char * >(buf1);
4037 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Agnode_t, 0 | 0 );
4038 if (!SWIG_IsOK(res2)) {
4039 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "edge" "', argument " "2"" of type '" "Agnode_t *""'");
4040 }
4041 arg2 = reinterpret_cast< Agnode_t * >(argp2);
4042 result = (Agedge_t *)edge(arg1,arg2);
4043 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agedge_t, 0 | 0 );
4044 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4045 return resultobj;
4046fail:
4047 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4048 return NULL;
4049}
4050
4051
4052SWIGINTERN PyObject *_wrap_edge__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4053 PyObject *resultobj = 0;
4054 Agraph_t *arg1 = (Agraph_t *) 0 ;
4055 char *arg2 = (char *) 0 ;
4056 char *arg3 = (char *) 0 ;
4057 void *argp1 = 0 ;
4058 int res1 = 0 ;
4059 int res2 ;
4060 char *buf2 = 0 ;
4061 int alloc2 = 0 ;
4062 int res3 ;
4063 char *buf3 = 0 ;
4064 int alloc3 = 0 ;
4065 Agedge_t *result = 0 ;
4066
4067 (void)self;
4068 if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
4069 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
4070 if (!SWIG_IsOK(res1)) {
4071 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "edge" "', argument " "1"" of type '" "Agraph_t *""'");
4072 }
4073 arg1 = reinterpret_cast< Agraph_t * >(argp1);
4074 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
4075 if (!SWIG_IsOK(res2)) {
4076 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "edge" "', argument " "2"" of type '" "char *""'");
4077 }
4078 arg2 = reinterpret_cast< char * >(buf2);
4079 res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
4080 if (!SWIG_IsOK(res3)) {
4081 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "edge" "', argument " "3"" of type '" "char *""'");
4082 }
4083 arg3 = reinterpret_cast< char * >(buf3);
4084 result = (Agedge_t *)edge(arg1,arg2,arg3);
4085 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agedge_t, 0 | 0 );
4086 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4087 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4088 return resultobj;
4089fail:
4090 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4091 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4092 return NULL;
4093}
4094
4095
4096SWIGINTERN PyObject *_wrap_edge(PyObject *self, PyObject *args) {
4097 Py_ssize_t argc;
4098 PyObject *argv[4] = {
4099 0
4100 };
4101
4102 if (!(argc = SWIG_Python_UnpackTuple(args, "edge", 0, 3, argv))) SWIG_fail;
4103 --argc;
4104 if (argc == 2) {
4105 int _v = 0;
4106 void *vptr = 0;
4107 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agnode_t, 0);
4108 _v = SWIG_CheckState(res);
4109 if (_v) {
4110 void *vptr = 0;
4111 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Agnode_t, 0);
4112 _v = SWIG_CheckState(res);
4113 if (_v) {
4114 return _wrap_edge__SWIG_0(self, argc, argv);
4115 }
4116 }
4117 }
4118 if (argc == 2) {
4119 int _v = 0;
4120 void *vptr = 0;
4121 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agnode_t, 0);
4122 _v = SWIG_CheckState(res);
4123 if (_v) {
4124 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
4125 _v = SWIG_CheckState(res);
4126 if (_v) {
4127 return _wrap_edge__SWIG_1(self, argc, argv);
4128 }
4129 }
4130 }
4131 if (argc == 2) {
4132 int _v = 0;
4133 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
4134 _v = SWIG_CheckState(res);
4135 if (_v) {
4136 void *vptr = 0;
4137 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Agnode_t, 0);
4138 _v = SWIG_CheckState(res);
4139 if (_v) {
4140 return _wrap_edge__SWIG_2(self, argc, argv);
4141 }
4142 }
4143 }
4144 if (argc == 3) {
4145 int _v = 0;
4146 void *vptr = 0;
4147 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agraph_t, 0);
4148 _v = SWIG_CheckState(res);
4149 if (_v) {
4150 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
4151 _v = SWIG_CheckState(res);
4152 if (_v) {
4153 int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
4154 _v = SWIG_CheckState(res);
4155 if (_v) {
4156 return _wrap_edge__SWIG_3(self, argc, argv);
4157 }
4158 }
4159 }
4160 }
4161
4162fail:
4163 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'edge'.\n"
4164 " Possible C/C++ prototypes are:\n"
4165 " edge(Agnode_t *,Agnode_t *)\n"
4166 " edge(Agnode_t *,char *)\n"
4167 " edge(char *,Agnode_t *)\n"
4168 " edge(Agraph_t *,char *,char *)\n");
4169 return 0;
4170}
4171
4172
4173SWIGINTERN PyObject *_wrap_setv__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4174 PyObject *resultobj = 0;
4175 Agraph_t *arg1 = (Agraph_t *) 0 ;
4176 char *arg2 = (char *) 0 ;
4177 char *arg3 = (char *) 0 ;
4178 void *argp1 = 0 ;
4179 int res1 = 0 ;
4180 int res2 ;
4181 char *buf2 = 0 ;
4182 int alloc2 = 0 ;
4183 int res3 ;
4184 char *buf3 = 0 ;
4185 int alloc3 = 0 ;
4186 char *result = 0 ;
4187
4188 (void)self;
4189 if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
4190 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
4191 if (!SWIG_IsOK(res1)) {
4192 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setv" "', argument " "1"" of type '" "Agraph_t *""'");
4193 }
4194 arg1 = reinterpret_cast< Agraph_t * >(argp1);
4195 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
4196 if (!SWIG_IsOK(res2)) {
4197 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setv" "', argument " "2"" of type '" "char *""'");
4198 }
4199 arg2 = reinterpret_cast< char * >(buf2);
4200 res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
4201 if (!SWIG_IsOK(res3)) {
4202 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setv" "', argument " "3"" of type '" "char *""'");
4203 }
4204 arg3 = reinterpret_cast< char * >(buf3);
4205 result = (char *)setv(arg1,arg2,arg3);
4206 resultobj = SWIG_FromCharPtr((const char *)result);
4207 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4208 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4209 return resultobj;
4210fail:
4211 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4212 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4213 return NULL;
4214}
4215
4216
4217SWIGINTERN PyObject *_wrap_setv__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4218 PyObject *resultobj = 0;
4219 Agnode_t *arg1 = (Agnode_t *) 0 ;
4220 char *arg2 = (char *) 0 ;
4221 char *arg3 = (char *) 0 ;
4222 void *argp1 = 0 ;
4223 int res1 = 0 ;
4224 int res2 ;
4225 char *buf2 = 0 ;
4226 int alloc2 = 0 ;
4227 int res3 ;
4228 char *buf3 = 0 ;
4229 int alloc3 = 0 ;
4230 char *result = 0 ;
4231
4232 (void)self;
4233 if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
4234 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agnode_t, 0 | 0 );
4235 if (!SWIG_IsOK(res1)) {
4236 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setv" "', argument " "1"" of type '" "Agnode_t *""'");
4237 }
4238 arg1 = reinterpret_cast< Agnode_t * >(argp1);
4239 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
4240 if (!SWIG_IsOK(res2)) {
4241 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setv" "', argument " "2"" of type '" "char *""'");
4242 }
4243 arg2 = reinterpret_cast< char * >(buf2);
4244 res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
4245 if (!SWIG_IsOK(res3)) {
4246 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setv" "', argument " "3"" of type '" "char *""'");
4247 }
4248 arg3 = reinterpret_cast< char * >(buf3);
4249 result = (char *)setv(arg1,arg2,arg3);
4250 resultobj = SWIG_FromCharPtr((const char *)result);
4251 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4252 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4253 return resultobj;
4254fail:
4255 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4256 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4257 return NULL;
4258}
4259
4260
4261SWIGINTERN PyObject *_wrap_setv__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4262 PyObject *resultobj = 0;
4263 Agedge_t *arg1 = (Agedge_t *) 0 ;
4264 char *arg2 = (char *) 0 ;
4265 char *arg3 = (char *) 0 ;
4266 void *argp1 = 0 ;
4267 int res1 = 0 ;
4268 int res2 ;
4269 char *buf2 = 0 ;
4270 int alloc2 = 0 ;
4271 int res3 ;
4272 char *buf3 = 0 ;
4273 int alloc3 = 0 ;
4274 char *result = 0 ;
4275
4276 (void)self;
4277 if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
4278 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agedge_t, 0 | 0 );
4279 if (!SWIG_IsOK(res1)) {
4280 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setv" "', argument " "1"" of type '" "Agedge_t *""'");
4281 }
4282 arg1 = reinterpret_cast< Agedge_t * >(argp1);
4283 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
4284 if (!SWIG_IsOK(res2)) {
4285 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setv" "', argument " "2"" of type '" "char *""'");
4286 }
4287 arg2 = reinterpret_cast< char * >(buf2);
4288 res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
4289 if (!SWIG_IsOK(res3)) {
4290 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setv" "', argument " "3"" of type '" "char *""'");
4291 }
4292 arg3 = reinterpret_cast< char * >(buf3);
4293 result = (char *)setv(arg1,arg2,arg3);
4294 resultobj = SWIG_FromCharPtr((const char *)result);
4295 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4296 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4297 return resultobj;
4298fail:
4299 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4300 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4301 return NULL;
4302}
4303
4304
4305SWIGINTERN PyObject *_wrap_setv__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4306 PyObject *resultobj = 0;
4307 Agraph_t *arg1 = (Agraph_t *) 0 ;
4308 Agsym_t *arg2 = (Agsym_t *) 0 ;
4309 char *arg3 = (char *) 0 ;
4310 void *argp1 = 0 ;
4311 int res1 = 0 ;
4312 void *argp2 = 0 ;
4313 int res2 = 0 ;
4314 int res3 ;
4315 char *buf3 = 0 ;
4316 int alloc3 = 0 ;
4317 char *result = 0 ;
4318
4319 (void)self;
4320 if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
4321 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
4322 if (!SWIG_IsOK(res1)) {
4323 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setv" "', argument " "1"" of type '" "Agraph_t *""'");
4324 }
4325 arg1 = reinterpret_cast< Agraph_t * >(argp1);
4326 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Agsym_t, 0 | 0 );
4327 if (!SWIG_IsOK(res2)) {
4328 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setv" "', argument " "2"" of type '" "Agsym_t *""'");
4329 }
4330 arg2 = reinterpret_cast< Agsym_t * >(argp2);
4331 res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
4332 if (!SWIG_IsOK(res3)) {
4333 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setv" "', argument " "3"" of type '" "char *""'");
4334 }
4335 arg3 = reinterpret_cast< char * >(buf3);
4336 result = (char *)setv(arg1,arg2,arg3);
4337 resultobj = SWIG_FromCharPtr((const char *)result);
4338 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4339 return resultobj;
4340fail:
4341 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4342 return NULL;
4343}
4344
4345
4346SWIGINTERN PyObject *_wrap_setv__SWIG_4(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4347 PyObject *resultobj = 0;
4348 Agnode_t *arg1 = (Agnode_t *) 0 ;
4349 Agsym_t *arg2 = (Agsym_t *) 0 ;
4350 char *arg3 = (char *) 0 ;
4351 void *argp1 = 0 ;
4352 int res1 = 0 ;
4353 void *argp2 = 0 ;
4354 int res2 = 0 ;
4355 int res3 ;
4356 char *buf3 = 0 ;
4357 int alloc3 = 0 ;
4358 char *result = 0 ;
4359
4360 (void)self;
4361 if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
4362 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agnode_t, 0 | 0 );
4363 if (!SWIG_IsOK(res1)) {
4364 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setv" "', argument " "1"" of type '" "Agnode_t *""'");
4365 }
4366 arg1 = reinterpret_cast< Agnode_t * >(argp1);
4367 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Agsym_t, 0 | 0 );
4368 if (!SWIG_IsOK(res2)) {
4369 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setv" "', argument " "2"" of type '" "Agsym_t *""'");
4370 }
4371 arg2 = reinterpret_cast< Agsym_t * >(argp2);
4372 res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
4373 if (!SWIG_IsOK(res3)) {
4374 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setv" "', argument " "3"" of type '" "char *""'");
4375 }
4376 arg3 = reinterpret_cast< char * >(buf3);
4377 result = (char *)setv(arg1,arg2,arg3);
4378 resultobj = SWIG_FromCharPtr((const char *)result);
4379 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4380 return resultobj;
4381fail:
4382 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4383 return NULL;
4384}
4385
4386
4387SWIGINTERN PyObject *_wrap_setv__SWIG_5(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4388 PyObject *resultobj = 0;
4389 Agedge_t *arg1 = (Agedge_t *) 0 ;
4390 Agsym_t *arg2 = (Agsym_t *) 0 ;
4391 char *arg3 = (char *) 0 ;
4392 void *argp1 = 0 ;
4393 int res1 = 0 ;
4394 void *argp2 = 0 ;
4395 int res2 = 0 ;
4396 int res3 ;
4397 char *buf3 = 0 ;
4398 int alloc3 = 0 ;
4399 char *result = 0 ;
4400
4401 (void)self;
4402 if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
4403 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agedge_t, 0 | 0 );
4404 if (!SWIG_IsOK(res1)) {
4405 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "setv" "', argument " "1"" of type '" "Agedge_t *""'");
4406 }
4407 arg1 = reinterpret_cast< Agedge_t * >(argp1);
4408 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Agsym_t, 0 | 0 );
4409 if (!SWIG_IsOK(res2)) {
4410 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "setv" "', argument " "2"" of type '" "Agsym_t *""'");
4411 }
4412 arg2 = reinterpret_cast< Agsym_t * >(argp2);
4413 res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
4414 if (!SWIG_IsOK(res3)) {
4415 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "setv" "', argument " "3"" of type '" "char *""'");
4416 }
4417 arg3 = reinterpret_cast< char * >(buf3);
4418 result = (char *)setv(arg1,arg2,arg3);
4419 resultobj = SWIG_FromCharPtr((const char *)result);
4420 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4421 return resultobj;
4422fail:
4423 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4424 return NULL;
4425}
4426
4427
4428SWIGINTERN PyObject *_wrap_setv(PyObject *self, PyObject *args) {
4429 Py_ssize_t argc;
4430 PyObject *argv[4] = {
4431 0
4432 };
4433
4434 if (!(argc = SWIG_Python_UnpackTuple(args, "setv", 0, 3, argv))) SWIG_fail;
4435 --argc;
4436 if (argc == 3) {
4437 int _v = 0;
4438 void *vptr = 0;
4439 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agraph_t, 0);
4440 _v = SWIG_CheckState(res);
4441 if (_v) {
4442 void *vptr = 0;
4443 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Agsym_t, 0);
4444 _v = SWIG_CheckState(res);
4445 if (_v) {
4446 int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
4447 _v = SWIG_CheckState(res);
4448 if (_v) {
4449 return _wrap_setv__SWIG_3(self, argc, argv);
4450 }
4451 }
4452 }
4453 }
4454 if (argc == 3) {
4455 int _v = 0;
4456 void *vptr = 0;
4457 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agnode_t, 0);
4458 _v = SWIG_CheckState(res);
4459 if (_v) {
4460 void *vptr = 0;
4461 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Agsym_t, 0);
4462 _v = SWIG_CheckState(res);
4463 if (_v) {
4464 int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
4465 _v = SWIG_CheckState(res);
4466 if (_v) {
4467 return _wrap_setv__SWIG_4(self, argc, argv);
4468 }
4469 }
4470 }
4471 }
4472 if (argc == 3) {
4473 int _v = 0;
4474 void *vptr = 0;
4475 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agedge_t, 0);
4476 _v = SWIG_CheckState(res);
4477 if (_v) {
4478 void *vptr = 0;
4479 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Agsym_t, 0);
4480 _v = SWIG_CheckState(res);
4481 if (_v) {
4482 int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
4483 _v = SWIG_CheckState(res);
4484 if (_v) {
4485 return _wrap_setv__SWIG_5(self, argc, argv);
4486 }
4487 }
4488 }
4489 }
4490 if (argc == 3) {
4491 int _v = 0;
4492 void *vptr = 0;
4493 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agraph_t, 0);
4494 _v = SWIG_CheckState(res);
4495 if (_v) {
4496 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
4497 _v = SWIG_CheckState(res);
4498 if (_v) {
4499 int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
4500 _v = SWIG_CheckState(res);
4501 if (_v) {
4502 return _wrap_setv__SWIG_0(self, argc, argv);
4503 }
4504 }
4505 }
4506 }
4507 if (argc == 3) {
4508 int _v = 0;
4509 void *vptr = 0;
4510 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agnode_t, 0);
4511 _v = SWIG_CheckState(res);
4512 if (_v) {
4513 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
4514 _v = SWIG_CheckState(res);
4515 if (_v) {
4516 int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
4517 _v = SWIG_CheckState(res);
4518 if (_v) {
4519 return _wrap_setv__SWIG_1(self, argc, argv);
4520 }
4521 }
4522 }
4523 }
4524 if (argc == 3) {
4525 int _v = 0;
4526 void *vptr = 0;
4527 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agedge_t, 0);
4528 _v = SWIG_CheckState(res);
4529 if (_v) {
4530 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
4531 _v = SWIG_CheckState(res);
4532 if (_v) {
4533 int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
4534 _v = SWIG_CheckState(res);
4535 if (_v) {
4536 return _wrap_setv__SWIG_2(self, argc, argv);
4537 }
4538 }
4539 }
4540 }
4541
4542fail:
4543 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'setv'.\n"
4544 " Possible C/C++ prototypes are:\n"
4545 " setv(Agraph_t *,char *,char *)\n"
4546 " setv(Agnode_t *,char *,char *)\n"
4547 " setv(Agedge_t *,char *,char *)\n"
4548 " setv(Agraph_t *,Agsym_t *,char *)\n"
4549 " setv(Agnode_t *,Agsym_t *,char *)\n"
4550 " setv(Agedge_t *,Agsym_t *,char *)\n");
4551 return 0;
4552}
4553
4554
4555SWIGINTERN PyObject *_wrap_getv__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4556 PyObject *resultobj = 0;
4557 Agraph_t *arg1 = (Agraph_t *) 0 ;
4558 char *arg2 = (char *) 0 ;
4559 void *argp1 = 0 ;
4560 int res1 = 0 ;
4561 int res2 ;
4562 char *buf2 = 0 ;
4563 int alloc2 = 0 ;
4564 char *result = 0 ;
4565
4566 (void)self;
4567 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4568 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
4569 if (!SWIG_IsOK(res1)) {
4570 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getv" "', argument " "1"" of type '" "Agraph_t *""'");
4571 }
4572 arg1 = reinterpret_cast< Agraph_t * >(argp1);
4573 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
4574 if (!SWIG_IsOK(res2)) {
4575 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getv" "', argument " "2"" of type '" "char *""'");
4576 }
4577 arg2 = reinterpret_cast< char * >(buf2);
4578 result = (char *)getv(arg1,arg2);
4579 resultobj = SWIG_FromCharPtr((const char *)result);
4580 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4581 return resultobj;
4582fail:
4583 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4584 return NULL;
4585}
4586
4587
4588SWIGINTERN PyObject *_wrap_getv__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4589 PyObject *resultobj = 0;
4590 Agnode_t *arg1 = (Agnode_t *) 0 ;
4591 char *arg2 = (char *) 0 ;
4592 void *argp1 = 0 ;
4593 int res1 = 0 ;
4594 int res2 ;
4595 char *buf2 = 0 ;
4596 int alloc2 = 0 ;
4597 char *result = 0 ;
4598
4599 (void)self;
4600 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4601 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agnode_t, 0 | 0 );
4602 if (!SWIG_IsOK(res1)) {
4603 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getv" "', argument " "1"" of type '" "Agnode_t *""'");
4604 }
4605 arg1 = reinterpret_cast< Agnode_t * >(argp1);
4606 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
4607 if (!SWIG_IsOK(res2)) {
4608 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getv" "', argument " "2"" of type '" "char *""'");
4609 }
4610 arg2 = reinterpret_cast< char * >(buf2);
4611 result = (char *)getv(arg1,arg2);
4612 resultobj = SWIG_FromCharPtr((const char *)result);
4613 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4614 return resultobj;
4615fail:
4616 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4617 return NULL;
4618}
4619
4620
4621SWIGINTERN PyObject *_wrap_getv__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4622 PyObject *resultobj = 0;
4623 Agedge_t *arg1 = (Agedge_t *) 0 ;
4624 char *arg2 = (char *) 0 ;
4625 void *argp1 = 0 ;
4626 int res1 = 0 ;
4627 int res2 ;
4628 char *buf2 = 0 ;
4629 int alloc2 = 0 ;
4630 char *result = 0 ;
4631
4632 (void)self;
4633 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4634 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agedge_t, 0 | 0 );
4635 if (!SWIG_IsOK(res1)) {
4636 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getv" "', argument " "1"" of type '" "Agedge_t *""'");
4637 }
4638 arg1 = reinterpret_cast< Agedge_t * >(argp1);
4639 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
4640 if (!SWIG_IsOK(res2)) {
4641 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getv" "', argument " "2"" of type '" "char *""'");
4642 }
4643 arg2 = reinterpret_cast< char * >(buf2);
4644 result = (char *)getv(arg1,arg2);
4645 resultobj = SWIG_FromCharPtr((const char *)result);
4646 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4647 return resultobj;
4648fail:
4649 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4650 return NULL;
4651}
4652
4653
4654SWIGINTERN PyObject *_wrap_getv__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4655 PyObject *resultobj = 0;
4656 Agraph_t *arg1 = (Agraph_t *) 0 ;
4657 Agsym_t *arg2 = (Agsym_t *) 0 ;
4658 void *argp1 = 0 ;
4659 int res1 = 0 ;
4660 void *argp2 = 0 ;
4661 int res2 = 0 ;
4662 char *result = 0 ;
4663
4664 (void)self;
4665 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4666 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
4667 if (!SWIG_IsOK(res1)) {
4668 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getv" "', argument " "1"" of type '" "Agraph_t *""'");
4669 }
4670 arg1 = reinterpret_cast< Agraph_t * >(argp1);
4671 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Agsym_t, 0 | 0 );
4672 if (!SWIG_IsOK(res2)) {
4673 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getv" "', argument " "2"" of type '" "Agsym_t *""'");
4674 }
4675 arg2 = reinterpret_cast< Agsym_t * >(argp2);
4676 result = (char *)getv(arg1,arg2);
4677 resultobj = SWIG_FromCharPtr((const char *)result);
4678 return resultobj;
4679fail:
4680 return NULL;
4681}
4682
4683
4684SWIGINTERN PyObject *_wrap_getv__SWIG_4(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4685 PyObject *resultobj = 0;
4686 Agnode_t *arg1 = (Agnode_t *) 0 ;
4687 Agsym_t *arg2 = (Agsym_t *) 0 ;
4688 void *argp1 = 0 ;
4689 int res1 = 0 ;
4690 void *argp2 = 0 ;
4691 int res2 = 0 ;
4692 char *result = 0 ;
4693
4694 (void)self;
4695 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4696 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agnode_t, 0 | 0 );
4697 if (!SWIG_IsOK(res1)) {
4698 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getv" "', argument " "1"" of type '" "Agnode_t *""'");
4699 }
4700 arg1 = reinterpret_cast< Agnode_t * >(argp1);
4701 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Agsym_t, 0 | 0 );
4702 if (!SWIG_IsOK(res2)) {
4703 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getv" "', argument " "2"" of type '" "Agsym_t *""'");
4704 }
4705 arg2 = reinterpret_cast< Agsym_t * >(argp2);
4706 result = (char *)getv(arg1,arg2);
4707 resultobj = SWIG_FromCharPtr((const char *)result);
4708 return resultobj;
4709fail:
4710 return NULL;
4711}
4712
4713
4714SWIGINTERN PyObject *_wrap_getv__SWIG_5(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4715 PyObject *resultobj = 0;
4716 Agedge_t *arg1 = (Agedge_t *) 0 ;
4717 Agsym_t *arg2 = (Agsym_t *) 0 ;
4718 void *argp1 = 0 ;
4719 int res1 = 0 ;
4720 void *argp2 = 0 ;
4721 int res2 = 0 ;
4722 char *result = 0 ;
4723
4724 (void)self;
4725 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
4726 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agedge_t, 0 | 0 );
4727 if (!SWIG_IsOK(res1)) {
4728 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getv" "', argument " "1"" of type '" "Agedge_t *""'");
4729 }
4730 arg1 = reinterpret_cast< Agedge_t * >(argp1);
4731 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Agsym_t, 0 | 0 );
4732 if (!SWIG_IsOK(res2)) {
4733 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getv" "', argument " "2"" of type '" "Agsym_t *""'");
4734 }
4735 arg2 = reinterpret_cast< Agsym_t * >(argp2);
4736 result = (char *)getv(arg1,arg2);
4737 resultobj = SWIG_FromCharPtr((const char *)result);
4738 return resultobj;
4739fail:
4740 return NULL;
4741}
4742
4743
4744SWIGINTERN PyObject *_wrap_getv(PyObject *self, PyObject *args) {
4745 Py_ssize_t argc;
4746 PyObject *argv[3] = {
4747 0
4748 };
4749
4750 if (!(argc = SWIG_Python_UnpackTuple(args, "getv", 0, 2, argv))) SWIG_fail;
4751 --argc;
4752 if (argc == 2) {
4753 int _v = 0;
4754 void *vptr = 0;
4755 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agraph_t, 0);
4756 _v = SWIG_CheckState(res);
4757 if (_v) {
4758 void *vptr = 0;
4759 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Agsym_t, 0);
4760 _v = SWIG_CheckState(res);
4761 if (_v) {
4762 return _wrap_getv__SWIG_3(self, argc, argv);
4763 }
4764 }
4765 }
4766 if (argc == 2) {
4767 int _v = 0;
4768 void *vptr = 0;
4769 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agnode_t, 0);
4770 _v = SWIG_CheckState(res);
4771 if (_v) {
4772 void *vptr = 0;
4773 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Agsym_t, 0);
4774 _v = SWIG_CheckState(res);
4775 if (_v) {
4776 return _wrap_getv__SWIG_4(self, argc, argv);
4777 }
4778 }
4779 }
4780 if (argc == 2) {
4781 int _v = 0;
4782 void *vptr = 0;
4783 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agedge_t, 0);
4784 _v = SWIG_CheckState(res);
4785 if (_v) {
4786 void *vptr = 0;
4787 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Agsym_t, 0);
4788 _v = SWIG_CheckState(res);
4789 if (_v) {
4790 return _wrap_getv__SWIG_5(self, argc, argv);
4791 }
4792 }
4793 }
4794 if (argc == 2) {
4795 int _v = 0;
4796 void *vptr = 0;
4797 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agraph_t, 0);
4798 _v = SWIG_CheckState(res);
4799 if (_v) {
4800 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
4801 _v = SWIG_CheckState(res);
4802 if (_v) {
4803 return _wrap_getv__SWIG_0(self, argc, argv);
4804 }
4805 }
4806 }
4807 if (argc == 2) {
4808 int _v = 0;
4809 void *vptr = 0;
4810 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agnode_t, 0);
4811 _v = SWIG_CheckState(res);
4812 if (_v) {
4813 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
4814 _v = SWIG_CheckState(res);
4815 if (_v) {
4816 return _wrap_getv__SWIG_1(self, argc, argv);
4817 }
4818 }
4819 }
4820 if (argc == 2) {
4821 int _v = 0;
4822 void *vptr = 0;
4823 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agedge_t, 0);
4824 _v = SWIG_CheckState(res);
4825 if (_v) {
4826 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
4827 _v = SWIG_CheckState(res);
4828 if (_v) {
4829 return _wrap_getv__SWIG_2(self, argc, argv);
4830 }
4831 }
4832 }
4833
4834fail:
4835 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'getv'.\n"
4836 " Possible C/C++ prototypes are:\n"
4837 " getv(Agraph_t *,char *)\n"
4838 " getv(Agnode_t *,char *)\n"
4839 " getv(Agedge_t *,char *)\n"
4840 " getv(Agraph_t *,Agsym_t *)\n"
4841 " getv(Agnode_t *,Agsym_t *)\n"
4842 " getv(Agedge_t *,Agsym_t *)\n");
4843 return 0;
4844}
4845
4846
4847SWIGINTERN PyObject *_wrap_nameof__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4848 PyObject *resultobj = 0;
4849 Agraph_t *arg1 = (Agraph_t *) 0 ;
4850 void *argp1 = 0 ;
4851 int res1 = 0 ;
4852 char *result = 0 ;
4853
4854 (void)self;
4855 if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
4856 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
4857 if (!SWIG_IsOK(res1)) {
4858 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nameof" "', argument " "1"" of type '" "Agraph_t *""'");
4859 }
4860 arg1 = reinterpret_cast< Agraph_t * >(argp1);
4861 result = (char *)nameof(arg1);
4862 resultobj = SWIG_FromCharPtr((const char *)result);
4863 return resultobj;
4864fail:
4865 return NULL;
4866}
4867
4868
4869SWIGINTERN PyObject *_wrap_nameof__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4870 PyObject *resultobj = 0;
4871 Agnode_t *arg1 = (Agnode_t *) 0 ;
4872 void *argp1 = 0 ;
4873 int res1 = 0 ;
4874 char *result = 0 ;
4875
4876 (void)self;
4877 if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
4878 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agnode_t, 0 | 0 );
4879 if (!SWIG_IsOK(res1)) {
4880 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nameof" "', argument " "1"" of type '" "Agnode_t *""'");
4881 }
4882 arg1 = reinterpret_cast< Agnode_t * >(argp1);
4883 result = (char *)nameof(arg1);
4884 resultobj = SWIG_FromCharPtr((const char *)result);
4885 return resultobj;
4886fail:
4887 return NULL;
4888}
4889
4890
4891SWIGINTERN PyObject *_wrap_nameof__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
4892 PyObject *resultobj = 0;
4893 Agsym_t *arg1 = (Agsym_t *) 0 ;
4894 void *argp1 = 0 ;
4895 int res1 = 0 ;
4896 char *result = 0 ;
4897
4898 (void)self;
4899 if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
4900 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agsym_t, 0 | 0 );
4901 if (!SWIG_IsOK(res1)) {
4902 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "nameof" "', argument " "1"" of type '" "Agsym_t *""'");
4903 }
4904 arg1 = reinterpret_cast< Agsym_t * >(argp1);
4905 result = (char *)nameof(arg1);
4906 resultobj = SWIG_FromCharPtr((const char *)result);
4907 return resultobj;
4908fail:
4909 return NULL;
4910}
4911
4912
4913SWIGINTERN PyObject *_wrap_nameof(PyObject *self, PyObject *args) {
4914 Py_ssize_t argc;
4915 PyObject *argv[2] = {
4916 0
4917 };
4918
4919 if (!(argc = SWIG_Python_UnpackTuple(args, "nameof", 0, 1, argv))) SWIG_fail;
4920 --argc;
4921 if (argc == 1) {
4922 int _v = 0;
4923 void *vptr = 0;
4924 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agraph_t, 0);
4925 _v = SWIG_CheckState(res);
4926 if (_v) {
4927 return _wrap_nameof__SWIG_0(self, argc, argv);
4928 }
4929 }
4930 if (argc == 1) {
4931 int _v = 0;
4932 void *vptr = 0;
4933 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agnode_t, 0);
4934 _v = SWIG_CheckState(res);
4935 if (_v) {
4936 return _wrap_nameof__SWIG_1(self, argc, argv);
4937 }
4938 }
4939 if (argc == 1) {
4940 int _v = 0;
4941 void *vptr = 0;
4942 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agsym_t, 0);
4943 _v = SWIG_CheckState(res);
4944 if (_v) {
4945 return _wrap_nameof__SWIG_2(self, argc, argv);
4946 }
4947 }
4948
4949fail:
4950 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'nameof'.\n"
4951 " Possible C/C++ prototypes are:\n"
4952 " nameof(Agraph_t *)\n"
4953 " nameof(Agnode_t *)\n"
4954 " nameof(Agsym_t *)\n");
4955 return 0;
4956}
4957
4958
4959SWIGINTERN PyObject *_wrap_findsubg(PyObject *self, PyObject *args) {
4960 PyObject *resultobj = 0;
4961 Agraph_t *arg1 = (Agraph_t *) 0 ;
4962 char *arg2 = (char *) 0 ;
4963 void *argp1 = 0 ;
4964 int res1 = 0 ;
4965 int res2 ;
4966 char *buf2 = 0 ;
4967 int alloc2 = 0 ;
4968 PyObject *swig_obj[2] ;
4969 Agraph_t *result = 0 ;
4970
4971 (void)self;
4972 if (!SWIG_Python_UnpackTuple(args, "findsubg", 2, 2, swig_obj)) SWIG_fail;
4973 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
4974 if (!SWIG_IsOK(res1)) {
4975 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "findsubg" "', argument " "1"" of type '" "Agraph_t *""'");
4976 }
4977 arg1 = reinterpret_cast< Agraph_t * >(argp1);
4978 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
4979 if (!SWIG_IsOK(res2)) {
4980 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "findsubg" "', argument " "2"" of type '" "char *""'");
4981 }
4982 arg2 = reinterpret_cast< char * >(buf2);
4983 result = (Agraph_t *)findsubg(arg1,arg2);
4984 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
4985 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4986 return resultobj;
4987fail:
4988 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4989 return NULL;
4990}
4991
4992
4993SWIGINTERN PyObject *_wrap_findnode(PyObject *self, PyObject *args) {
4994 PyObject *resultobj = 0;
4995 Agraph_t *arg1 = (Agraph_t *) 0 ;
4996 char *arg2 = (char *) 0 ;
4997 void *argp1 = 0 ;
4998 int res1 = 0 ;
4999 int res2 ;
5000 char *buf2 = 0 ;
5001 int alloc2 = 0 ;
5002 PyObject *swig_obj[2] ;
5003 Agnode_t *result = 0 ;
5004
5005 (void)self;
5006 if (!SWIG_Python_UnpackTuple(args, "findnode", 2, 2, swig_obj)) SWIG_fail;
5007 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
5008 if (!SWIG_IsOK(res1)) {
5009 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "findnode" "', argument " "1"" of type '" "Agraph_t *""'");
5010 }
5011 arg1 = reinterpret_cast< Agraph_t * >(argp1);
5012 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
5013 if (!SWIG_IsOK(res2)) {
5014 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "findnode" "', argument " "2"" of type '" "char *""'");
5015 }
5016 arg2 = reinterpret_cast< char * >(buf2);
5017 result = (Agnode_t *)findnode(arg1,arg2);
5018 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agnode_t, 0 | 0 );
5019 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5020 return resultobj;
5021fail:
5022 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5023 return NULL;
5024}
5025
5026
5027SWIGINTERN PyObject *_wrap_findedge(PyObject *self, PyObject *args) {
5028 PyObject *resultobj = 0;
5029 Agnode_t *arg1 = (Agnode_t *) 0 ;
5030 Agnode_t *arg2 = (Agnode_t *) 0 ;
5031 void *argp1 = 0 ;
5032 int res1 = 0 ;
5033 void *argp2 = 0 ;
5034 int res2 = 0 ;
5035 PyObject *swig_obj[2] ;
5036 Agedge_t *result = 0 ;
5037
5038 (void)self;
5039 if (!SWIG_Python_UnpackTuple(args, "findedge", 2, 2, swig_obj)) SWIG_fail;
5040 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agnode_t, 0 | 0 );
5041 if (!SWIG_IsOK(res1)) {
5042 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "findedge" "', argument " "1"" of type '" "Agnode_t *""'");
5043 }
5044 arg1 = reinterpret_cast< Agnode_t * >(argp1);
5045 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Agnode_t, 0 | 0 );
5046 if (!SWIG_IsOK(res2)) {
5047 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "findedge" "', argument " "2"" of type '" "Agnode_t *""'");
5048 }
5049 arg2 = reinterpret_cast< Agnode_t * >(argp2);
5050 result = (Agedge_t *)findedge(arg1,arg2);
5051 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agedge_t, 0 | 0 );
5052 return resultobj;
5053fail:
5054 return NULL;
5055}
5056
5057
5058SWIGINTERN PyObject *_wrap_findattr__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
5059 PyObject *resultobj = 0;
5060 Agraph_t *arg1 = (Agraph_t *) 0 ;
5061 char *arg2 = (char *) 0 ;
5062 void *argp1 = 0 ;
5063 int res1 = 0 ;
5064 int res2 ;
5065 char *buf2 = 0 ;
5066 int alloc2 = 0 ;
5067 Agsym_t *result = 0 ;
5068
5069 (void)self;
5070 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
5071 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
5072 if (!SWIG_IsOK(res1)) {
5073 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "findattr" "', argument " "1"" of type '" "Agraph_t *""'");
5074 }
5075 arg1 = reinterpret_cast< Agraph_t * >(argp1);
5076 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
5077 if (!SWIG_IsOK(res2)) {
5078 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "findattr" "', argument " "2"" of type '" "char *""'");
5079 }
5080 arg2 = reinterpret_cast< char * >(buf2);
5081 result = (Agsym_t *)findattr(arg1,arg2);
5082 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agsym_t, 0 | 0 );
5083 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5084 return resultobj;
5085fail:
5086 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5087 return NULL;
5088}
5089
5090
5091SWIGINTERN PyObject *_wrap_findattr__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
5092 PyObject *resultobj = 0;
5093 Agnode_t *arg1 = (Agnode_t *) 0 ;
5094 char *arg2 = (char *) 0 ;
5095 void *argp1 = 0 ;
5096 int res1 = 0 ;
5097 int res2 ;
5098 char *buf2 = 0 ;
5099 int alloc2 = 0 ;
5100 Agsym_t *result = 0 ;
5101
5102 (void)self;
5103 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
5104 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agnode_t, 0 | 0 );
5105 if (!SWIG_IsOK(res1)) {
5106 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "findattr" "', argument " "1"" of type '" "Agnode_t *""'");
5107 }
5108 arg1 = reinterpret_cast< Agnode_t * >(argp1);
5109 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
5110 if (!SWIG_IsOK(res2)) {
5111 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "findattr" "', argument " "2"" of type '" "char *""'");
5112 }
5113 arg2 = reinterpret_cast< char * >(buf2);
5114 result = (Agsym_t *)findattr(arg1,arg2);
5115 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agsym_t, 0 | 0 );
5116 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5117 return resultobj;
5118fail:
5119 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5120 return NULL;
5121}
5122
5123
5124SWIGINTERN PyObject *_wrap_findattr__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
5125 PyObject *resultobj = 0;
5126 Agedge_t *arg1 = (Agedge_t *) 0 ;
5127 char *arg2 = (char *) 0 ;
5128 void *argp1 = 0 ;
5129 int res1 = 0 ;
5130 int res2 ;
5131 char *buf2 = 0 ;
5132 int alloc2 = 0 ;
5133 Agsym_t *result = 0 ;
5134
5135 (void)self;
5136 if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
5137 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agedge_t, 0 | 0 );
5138 if (!SWIG_IsOK(res1)) {
5139 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "findattr" "', argument " "1"" of type '" "Agedge_t *""'");
5140 }
5141 arg1 = reinterpret_cast< Agedge_t * >(argp1);
5142 res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
5143 if (!SWIG_IsOK(res2)) {
5144 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "findattr" "', argument " "2"" of type '" "char *""'");
5145 }
5146 arg2 = reinterpret_cast< char * >(buf2);
5147 result = (Agsym_t *)findattr(arg1,arg2);
5148 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agsym_t, 0 | 0 );
5149 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5150 return resultobj;
5151fail:
5152 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5153 return NULL;
5154}
5155
5156
5157SWIGINTERN PyObject *_wrap_findattr(PyObject *self, PyObject *args) {
5158 Py_ssize_t argc;
5159 PyObject *argv[3] = {
5160 0
5161 };
5162
5163 if (!(argc = SWIG_Python_UnpackTuple(args, "findattr", 0, 2, argv))) SWIG_fail;
5164 --argc;
5165 if (argc == 2) {
5166 int _v = 0;
5167 void *vptr = 0;
5168 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agraph_t, 0);
5169 _v = SWIG_CheckState(res);
5170 if (_v) {
5171 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
5172 _v = SWIG_CheckState(res);
5173 if (_v) {
5174 return _wrap_findattr__SWIG_0(self, argc, argv);
5175 }
5176 }
5177 }
5178 if (argc == 2) {
5179 int _v = 0;
5180 void *vptr = 0;
5181 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agnode_t, 0);
5182 _v = SWIG_CheckState(res);
5183 if (_v) {
5184 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
5185 _v = SWIG_CheckState(res);
5186 if (_v) {
5187 return _wrap_findattr__SWIG_1(self, argc, argv);
5188 }
5189 }
5190 }
5191 if (argc == 2) {
5192 int _v = 0;
5193 void *vptr = 0;
5194 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Agedge_t, 0);
5195 _v = SWIG_CheckState(res);
5196 if (_v) {
5197 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
5198 _v = SWIG_CheckState(res);
5199 if (_v) {
5200 return _wrap_findattr__SWIG_2(self, argc, argv);
5201 }
5202 }
5203 }
5204
5205fail:
5206 SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'findattr'.\n"
5207 " Possible C/C++ prototypes are:\n"
5208 " findattr(Agraph_t *,char *)\n"
5209 " findattr(Agnode_t *,char *)\n"
5210 " findattr(Agedge_t *,char *)\n");
5211 return 0;
5212}
5213
5214
5215SWIGINTERN PyObject *_wrap_headof(PyObject *self, PyObject *args) {
5216 PyObject *resultobj = 0;
5217 Agedge_t *arg1 = (Agedge_t *) 0 ;
5218 void *argp1 = 0 ;
5219 int res1 = 0 ;
5220 PyObject *swig_obj[1] ;
5221 Agnode_t *result = 0 ;
5222
5223 (void)self;
5224 if (!args) SWIG_fail;
5225 swig_obj[0] = args;
5226 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agedge_t, 0 | 0 );
5227 if (!SWIG_IsOK(res1)) {
5228 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "headof" "', argument " "1"" of type '" "Agedge_t *""'");
5229 }
5230 arg1 = reinterpret_cast< Agedge_t * >(argp1);
5231 result = (Agnode_t *)headof(arg1);
5232 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agnode_t, 0 | 0 );
5233 return resultobj;
5234fail:
5235 return NULL;
5236}
5237
5238
5239SWIGINTERN PyObject *_wrap_tailof(PyObject *self, PyObject *args) {
5240 PyObject *resultobj = 0;
5241 Agedge_t *arg1 = (Agedge_t *) 0 ;
5242 void *argp1 = 0 ;
5243 int res1 = 0 ;
5244 PyObject *swig_obj[1] ;
5245 Agnode_t *result = 0 ;
5246
5247 (void)self;
5248 if (!args) SWIG_fail;
5249 swig_obj[0] = args;
5250 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agedge_t, 0 | 0 );
5251 if (!SWIG_IsOK(res1)) {
5252 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tailof" "', argument " "1"" of type '" "Agedge_t *""'");
5253 }
5254 arg1 = reinterpret_cast< Agedge_t * >(argp1);
5255 result = (Agnode_t *)tailof(arg1);
5256 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agnode_t, 0 | 0 );
5257 return resultobj;
5258fail:
5259 return NULL;
5260}
5261
5262
5263SWIGINTERN PyObject *_wrap_graphof__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
5264 PyObject *resultobj = 0;
5265 Agraph_t *arg1 = (Agraph_t *) 0 ;
5266 void *argp1 = 0 ;
5267 int res1 = 0 ;
5268 Agraph_t *result = 0 ;
5269
5270 (void)self;
5271 if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
5272 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agraph_t, 0 | 0 );
5273 if (!SWIG_IsOK(res1)) {
5274 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "graphof" "', argument " "1"" of type '" "Agraph_t *""'");
5275 }
5276 arg1 = reinterpret_cast< Agraph_t * >(argp1);
5277 result = (Agraph_t *)graphof(arg1);
5278 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
5279 return resultobj;
5280fail:
5281 return NULL;
5282}
5283
5284
5285SWIGINTERN PyObject *_wrap_graphof__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
5286 PyObject *resultobj = 0;
5287 Agedge_t *arg1 = (Agedge_t *) 0 ;
5288 void *argp1 = 0 ;
5289 int res1 = 0 ;
5290 Agraph_t *result = 0 ;
5291
5292 (void)self;
5293 if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
5294 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Agedge_t, 0 | 0 );
5295 if (!SWIG_IsOK(res1)) {
5296 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "graphof" "', argument " "1"" of type '" "Agedge_t *""'");
5297 }
5298 arg1 = reinterpret_cast< Agedge_t * >(argp1);
5299 result = (Agraph_t *)graphof(arg1);
5300 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Agraph_t, 0 | 0 );
5301 return resultobj;
5302fail:
5303 return