1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 1.3.23
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
11 #define SWIGPYTHON
13 #ifdef __cplusplus
14 template<class T> class SwigValueWrapper {
15 T *tt;
16 public:
17 SwigValueWrapper() : tt(0) { }
18 SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
19 SwigValueWrapper(const T& t) : tt(new T(t)) { }
20 ~SwigValueWrapper() { delete tt; }
21 SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
22 operator T&() const { return *tt; }
23 T *operator&() { return tt; }
24 private:
25 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
26 };
27 #endif
30 #ifndef SWIG_TEMPLATE_DISAMBIGUATOR
31 # if defined(__SUNPRO_CC)
32 # define SWIG_TEMPLATE_DISAMBIGUATOR template
33 # else
34 # define SWIG_TEMPLATE_DISAMBIGUATOR
35 # endif
36 #endif
39 #include <Python.h>
41 /***********************************************************************
42 * common.swg
43 *
44 * This file contains generic SWIG runtime support for pointer
45 * type checking as well as a few commonly used macros to control
46 * external linkage.
47 *
48 * Author : David Beazley (beazley@cs.uchicago.edu)
49 *
50 * Copyright (c) 1999-2000, The University of Chicago
51 *
52 * This file may be freely redistributed without license or fee provided
53 * this copyright message remains intact.
54 ************************************************************************/
56 #include <string.h>
58 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
59 # if !defined(STATIC_LINKED)
60 # define SWIGEXPORT(a) __declspec(dllexport) a
61 # else
62 # define SWIGEXPORT(a) a
63 # endif
64 #else
65 # define SWIGEXPORT(a) a
66 #endif
68 #define SWIGRUNTIME(x) static x
70 #ifndef SWIGINLINE
71 #if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
72 # define SWIGINLINE inline
73 #else
74 # define SWIGINLINE
75 #endif
76 #endif
79 /* This should only be incremented when either the layout of swig_type_info changes,
80 or for whatever reason, the runtime changes incompatibly */
81 #define SWIG_RUNTIME_VERSION "1"
83 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
84 #ifdef SWIG_TYPE_TABLE
85 #define SWIG_QUOTE_STRING(x) #x
86 #define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
87 #define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
88 #else
89 #define SWIG_TYPE_TABLE_NAME
90 #endif
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
96 typedef void *(*swig_converter_func)(void *);
97 typedef struct swig_type_info *(*swig_dycast_func)(void **);
99 typedef struct swig_type_info {
100 const char *name;
101 swig_converter_func converter;
102 const char *str;
103 void *clientdata;
104 swig_dycast_func dcast;
105 struct swig_type_info *next;
106 struct swig_type_info *prev;
107 } swig_type_info;
109 static swig_type_info *swig_type_list = 0;
110 static swig_type_info **swig_type_list_handle = &swig_type_list;
112 /*
113 Compare two type names skipping the space characters, therefore
114 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
116 Return 0 when the two name types are equivalent, as in
117 strncmp, but skipping ' '.
118 */
119 static int
120 SWIG_TypeNameComp(const char *f1, const char *l1,
121 const char *f2, const char *l2) {
122 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
123 while ((*f1 == ' ') && (f1 != l1)) ++f1;
124 while ((*f2 == ' ') && (f2 != l2)) ++f2;
125 if (*f1 != *f2) return *f1 - *f2;
126 }
127 return (l1 - f1) - (l2 - f2);
128 }
130 /*
131 Check type equivalence in a name list like <name1>|<name2>|...
132 */
133 static int
134 SWIG_TypeEquiv(const char *nb, const char *tb) {
135 int equiv = 0;
136 const char* te = tb + strlen(tb);
137 const char* ne = nb;
138 while (!equiv && *ne) {
139 for (nb = ne; *ne; ++ne) {
140 if (*ne == '|') break;
141 }
142 equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
143 if (*ne) ++ne;
144 }
145 return equiv;
146 }
149 /* Register a type mapping with the type-checking */
150 static swig_type_info *
151 SWIG_TypeRegister(swig_type_info *ti) {
152 swig_type_info *tc, *head, *ret, *next;
153 /* Check to see if this type has already been registered */
154 tc = *swig_type_list_handle;
155 while (tc) {
156 /* check simple type equivalence */
157 int typeequiv = (strcmp(tc->name, ti->name) == 0);
158 /* check full type equivalence, resolving typedefs */
159 if (!typeequiv) {
160 /* only if tc is not a typedef (no '|' on it) */
161 if (tc->str && ti->str && !strstr(tc->str,"|")) {
162 typeequiv = SWIG_TypeEquiv(ti->str,tc->str);
163 }
164 }
165 if (typeequiv) {
166 /* Already exists in the table. Just add additional types to the list */
167 if (ti->clientdata) tc->clientdata = ti->clientdata;
168 head = tc;
169 next = tc->next;
170 goto l1;
171 }
172 tc = tc->prev;
173 }
174 head = ti;
175 next = 0;
177 /* Place in list */
178 ti->prev = *swig_type_list_handle;
179 *swig_type_list_handle = ti;
181 /* Build linked lists */
182 l1:
183 ret = head;
184 tc = ti + 1;
185 /* Patch up the rest of the links */
186 while (tc->name) {
187 head->next = tc;
188 tc->prev = head;
189 head = tc;
190 tc++;
191 }
192 if (next) next->prev = head;
193 head->next = next;
195 return ret;
196 }
198 /* Check the typename */
199 static swig_type_info *
200 SWIG_TypeCheck(char *c, swig_type_info *ty) {
201 swig_type_info *s;
202 if (!ty) return 0; /* Void pointer */
203 s = ty->next; /* First element always just a name */
204 do {
205 if (strcmp(s->name,c) == 0) {
206 if (s == ty->next) return s;
207 /* Move s to the top of the linked list */
208 s->prev->next = s->next;
209 if (s->next) {
210 s->next->prev = s->prev;
211 }
212 /* Insert s as second element in the list */
213 s->next = ty->next;
214 if (ty->next) ty->next->prev = s;
215 ty->next = s;
216 s->prev = ty;
217 return s;
218 }
219 s = s->next;
220 } while (s && (s != ty->next));
221 return 0;
222 }
224 /* Cast a pointer up an inheritance hierarchy */
225 static SWIGINLINE void *
226 SWIG_TypeCast(swig_type_info *ty, void *ptr) {
227 if ((!ty) || (!ty->converter)) return ptr;
228 return (*ty->converter)(ptr);
229 }
231 /* Dynamic pointer casting. Down an inheritance hierarchy */
232 static swig_type_info *
233 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
234 swig_type_info *lastty = ty;
235 if (!ty || !ty->dcast) return ty;
236 while (ty && (ty->dcast)) {
237 ty = (*ty->dcast)(ptr);
238 if (ty) lastty = ty;
239 }
240 return lastty;
241 }
243 /* Return the name associated with this type */
244 static SWIGINLINE const char *
245 SWIG_TypeName(const swig_type_info *ty) {
246 return ty->name;
247 }
249 /* Return the pretty name associated with this type,
250 that is an unmangled type name in a form presentable to the user.
251 */
252 static const char *
253 SWIG_TypePrettyName(const swig_type_info *type) {
254 /* The "str" field contains the equivalent pretty names of the
255 type, separated by vertical-bar characters. We choose
256 to print the last name, as it is often (?) the most
257 specific. */
258 if (type->str != NULL) {
259 const char *last_name = type->str;
260 const char *s;
261 for (s = type->str; *s; s++)
262 if (*s == '|') last_name = s+1;
263 return last_name;
264 }
265 else
266 return type->name;
267 }
269 /* Search for a swig_type_info structure */
270 static swig_type_info *
271 SWIG_TypeQuery(const char *name) {
272 swig_type_info *ty = *swig_type_list_handle;
273 while (ty) {
274 if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;
275 if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
276 ty = ty->prev;
277 }
278 return 0;
279 }
281 /* Set the clientdata field for a type */
282 static void
283 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
284 swig_type_info *tc, *equiv;
285 if (ti->clientdata) return;
286 /* if (ti->clientdata == clientdata) return; */
287 ti->clientdata = clientdata;
288 equiv = ti->next;
289 while (equiv) {
290 if (!equiv->converter) {
291 tc = *swig_type_list_handle;
292 while (tc) {
293 if ((strcmp(tc->name, equiv->name) == 0))
294 SWIG_TypeClientData(tc,clientdata);
295 tc = tc->prev;
296 }
297 }
298 equiv = equiv->next;
299 }
300 }
302 /* Pack binary data into a string */
303 static char *
304 SWIG_PackData(char *c, void *ptr, size_t sz) {
305 static char hex[17] = "0123456789abcdef";
306 unsigned char *u = (unsigned char *) ptr;
307 const unsigned char *eu = u + sz;
308 register unsigned char uu;
309 for (; u != eu; ++u) {
310 uu = *u;
311 *(c++) = hex[(uu & 0xf0) >> 4];
312 *(c++) = hex[uu & 0xf];
313 }
314 return c;
315 }
317 /* Unpack binary data from a string */
318 static char *
319 SWIG_UnpackData(char *c, void *ptr, size_t sz) {
320 register unsigned char uu = 0;
321 register int d;
322 unsigned char *u = (unsigned char *) ptr;
323 const unsigned char *eu = u + sz;
324 for (; u != eu; ++u) {
325 d = *(c++);
326 if ((d >= '0') && (d <= '9'))
327 uu = ((d - '0') << 4);
328 else if ((d >= 'a') && (d <= 'f'))
329 uu = ((d - ('a'-10)) << 4);
330 d = *(c++);
331 if ((d >= '0') && (d <= '9'))
332 uu |= (d - '0');
333 else if ((d >= 'a') && (d <= 'f'))
334 uu |= (d - ('a'-10));
335 *u = uu;
336 }
337 return c;
338 }
340 /* This function will propagate the clientdata field of type to
341 * any new swig_type_info structures that have been added into the list
342 * of equivalent types. It is like calling
343 * SWIG_TypeClientData(type, clientdata) a second time.
344 */
345 static void
346 SWIG_PropagateClientData(swig_type_info *type) {
347 swig_type_info *equiv = type->next;
348 swig_type_info *tc;
349 if (!type->clientdata) return;
350 while (equiv) {
351 if (!equiv->converter) {
352 tc = *swig_type_list_handle;
353 while (tc) {
354 if ((strcmp(tc->name, equiv->name) == 0) && !tc->clientdata)
355 SWIG_TypeClientData(tc, type->clientdata);
356 tc = tc->prev;
357 }
358 }
359 equiv = equiv->next;
360 }
361 }
363 #ifdef __cplusplus
364 }
365 #endif
367 /* -----------------------------------------------------------------------------
368 * SWIG API. Portion that goes into the runtime
369 * ----------------------------------------------------------------------------- */
371 #ifdef __cplusplus
372 extern "C" {
373 #endif
375 /* -----------------------------------------------------------------------------
376 * for internal method declarations
377 * ----------------------------------------------------------------------------- */
379 #ifndef SWIGINTERN
380 #define SWIGINTERN static
381 #endif
383 #ifndef SWIGINTERNSHORT
384 #ifdef __cplusplus
385 #define SWIGINTERNSHORT static inline
386 #else /* C case */
387 #define SWIGINTERNSHORT static
388 #endif /* __cplusplus */
389 #endif
392 /* Common SWIG API */
393 #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Python_ConvertPtr(obj, pp, type, flags)
394 #define SWIG_NewPointerObj(p, type, flags) SWIG_Python_NewPointerObj(p, type, flags)
395 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
397 /* Python-specific SWIG API */
398 #define SWIG_newvarlink() SWIG_Python_newvarlink()
399 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
400 #define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) SWIG_Python_ConvertPacked(obj, ptr, sz, ty, flags)
401 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
402 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
404 /*
405 Exception handling in wrappers
406 */
407 #define SWIG_fail goto fail
408 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
409 #define SWIG_append_errmsg(msg) SWIG_Python_AddErrMesg(msg,0)
410 #define SWIG_preppend_errmsg(msg) SWIG_Python_AddErrMesg(msg,1)
411 #define SWIG_type_error(type,obj) SWIG_Python_TypeError(type,obj)
412 #define SWIG_null_ref(type) SWIG_Python_NullRef(type)
414 /*
415 Contract support
416 */
417 #define SWIG_contract_assert(expr, msg) \
418 if (!(expr)) { PyErr_SetString(PyExc_RuntimeError, (char *) msg ); goto fail; } else
420 /* -----------------------------------------------------------------------------
421 * Constant declarations
422 * ----------------------------------------------------------------------------- */
424 /* Constant Types */
425 #define SWIG_PY_INT 1
426 #define SWIG_PY_FLOAT 2
427 #define SWIG_PY_STRING 3
428 #define SWIG_PY_POINTER 4
429 #define SWIG_PY_BINARY 5
431 /* Constant information structure */
432 typedef struct swig_const_info {
433 int type;
434 char *name;
435 long lvalue;
436 double dvalue;
437 void *pvalue;
438 swig_type_info **ptype;
439 } swig_const_info;
441 /* -----------------------------------------------------------------------------
442 * Pointer declarations
443 * ----------------------------------------------------------------------------- */
444 /*
445 Use SWIG_NO_COBJECT_TYPES to force the use of strings to represent
446 C/C++ pointers in the python side. Very useful for debugging, but
447 not always safe.
448 */
449 #if !defined(SWIG_NO_COBJECT_TYPES) && !defined(SWIG_COBJECT_TYPES)
450 # define SWIG_COBJECT_TYPES
451 #endif
453 /* Flags for pointer conversion */
454 #define SWIG_POINTER_EXCEPTION 0x1
455 #define SWIG_POINTER_DISOWN 0x2
457 /* -----------------------------------------------------------------------------
458 * Alloc. memory flags
459 * ----------------------------------------------------------------------------- */
460 #define SWIG_OLDOBJ 1
461 #define SWIG_NEWOBJ SWIG_OLDOBJ + 1
462 #define SWIG_PYSTR SWIG_NEWOBJ + 1
464 #ifdef __cplusplus
465 }
466 #endif
469 /***********************************************************************
470 * pyrun.swg
471 *
472 * This file contains the runtime support for Python modules
473 * and includes code for managing global variables and pointer
474 * type checking.
475 *
476 * Author : David Beazley (beazley@cs.uchicago.edu)
477 ************************************************************************/
479 #ifdef __cplusplus
480 extern "C" {
481 #endif
483 /* -----------------------------------------------------------------------------
484 * global variable support code.
485 * ----------------------------------------------------------------------------- */
487 typedef struct swig_globalvar {
488 char *name; /* Name of global variable */
489 PyObject *(*get_attr)(); /* Return the current value */
490 int (*set_attr)(PyObject *); /* Set the value */
491 struct swig_globalvar *next;
492 } swig_globalvar;
494 typedef struct swig_varlinkobject {
495 PyObject_HEAD
496 swig_globalvar *vars;
497 } swig_varlinkobject;
499 static PyObject *
500 swig_varlink_repr(swig_varlinkobject *v) {
501 v = v;
502 return PyString_FromString("<Global variables>");
503 }
505 static int
506 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags) {
507 swig_globalvar *var;
508 flags = flags;
509 fprintf(fp,"Global variables { ");
510 for (var = v->vars; var; var=var->next) {
511 fprintf(fp,"%s", var->name);
512 if (var->next) fprintf(fp,", ");
513 }
514 fprintf(fp," }\n");
515 return 0;
516 }
518 static PyObject *
519 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
520 swig_globalvar *var = v->vars;
521 while (var) {
522 if (strcmp(var->name,n) == 0) {
523 return (*var->get_attr)();
524 }
525 var = var->next;
526 }
527 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
528 return NULL;
529 }
531 static int
532 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
533 swig_globalvar *var = v->vars;
534 while (var) {
535 if (strcmp(var->name,n) == 0) {
536 return (*var->set_attr)(p);
537 }
538 var = var->next;
539 }
540 PyErr_SetString(PyExc_NameError,"Unknown C global variable");
541 return 1;
542 }
544 static PyTypeObject varlinktype = {
545 PyObject_HEAD_INIT(0)
546 0, /* Number of items in variable part (ob_size) */
547 (char *)"swigvarlink", /* Type name (tp_name) */
548 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
549 0, /* Itemsize (tp_itemsize) */
550 0, /* Deallocator (tp_dealloc) */
551 (printfunc) swig_varlink_print, /* Print (tp_print) */
552 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
553 (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
554 0, /* tp_compare */
555 (reprfunc) swig_varlink_repr, /* tp_repr */
556 0, /* tp_as_number */
557 0, /* tp_as_sequence */
558 0, /* tp_as_mapping */
559 0, /* tp_hash */
560 0, /* tp_call */
561 0, /* tp_str */
562 0, /* tp_getattro */
563 0, /* tp_setattro */
564 0, /* tp_as_buffer */
565 0, /* tp_flags */
566 0, /* tp_doc */
567 0, /* tp_traverse */
568 0, /* tp_clear */
569 0, /* tp_richcompare */
570 0, /* tp_weaklistoffset */
571 #if PY_VERSION_HEX >= 0x02020000
572 0, /* tp_iter */
573 0, /* tp_iternext */
574 0, /* tp_methods */
575 0, /* tp_members */
576 0, /* tp_getset */
577 0, /* tp_base */
578 0, /* tp_dict */
579 0, /* tp_descr_get */
580 0, /* tp_descr_set */
581 0, /* tp_dictoffset */
582 0, /* tp_init */
583 0, /* tp_alloc */
584 0, /* tp_new */
585 0, /* tp_free */
586 0, /* tp_is_gc */
587 0, /* tp_bases */
588 0, /* tp_mro */
589 0, /* tp_cache */
590 0, /* tp_subclasses */
591 0, /* tp_weaklist */
592 #endif
593 #if PY_VERSION_HEX >= 0x02030000
594 0, /* tp_del */
595 #endif
596 #ifdef COUNT_ALLOCS
597 /* these must be last */
598 0, /* tp_alloc */
599 0, /* tp_free */
600 0, /* tp_maxalloc */
601 0, /* tp_next */
602 #endif
603 };
605 /* Create a variable linking object for use later */
606 static PyObject *
607 SWIG_Python_newvarlink(void) {
608 swig_varlinkobject *result = 0;
609 result = PyMem_NEW(swig_varlinkobject,1);
610 varlinktype.ob_type = &PyType_Type; /* Patch varlinktype into a PyType */
611 result->ob_type = &varlinktype;
612 result->vars = 0;
613 result->ob_refcnt = 0;
614 Py_XINCREF((PyObject *) result);
615 return ((PyObject*) result);
616 }
618 static void
619 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
620 swig_varlinkobject *v;
621 swig_globalvar *gv;
622 v= (swig_varlinkobject *) p;
623 gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
624 gv->name = (char *) malloc(strlen(name)+1);
625 strcpy(gv->name,name);
626 gv->get_attr = get_attr;
627 gv->set_attr = set_attr;
628 gv->next = v->vars;
629 v->vars = gv;
630 }
632 /* -----------------------------------------------------------------------------
633 * errors manipulation
634 * ----------------------------------------------------------------------------- */
636 static void
637 SWIG_Python_TypeError(const char *type, PyObject *obj)
638 {
639 if (type) {
640 if (!PyCObject_Check(obj)) {
641 const char *otype = (obj ? obj->ob_type->tp_name : 0);
642 if (otype) {
643 PyObject *str = PyObject_Str(obj);
644 const char *cstr = str ? PyString_AsString(str) : 0;
645 if (cstr) {
646 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
647 type, otype, cstr);
648 } else {
649 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
650 type, otype);
651 }
652 Py_DECREF(str);
653 return;
654 }
655 } else {
656 const char *otype = (char *) PyCObject_GetDesc(obj);
657 if (otype) {
658 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PyCObject(%s)' is received",
659 type, otype);
660 return;
661 }
662 }
663 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
665 } else {
666 PyErr_Format(PyExc_TypeError, "unexpected type is received");
667 }
668 }
670 static SWIGINLINE void
671 SWIG_Python_NullRef(const char *type)
672 {
673 if (type) {
674 PyErr_Format(PyExc_TypeError, "null reference of type '%s' was received",type);
675 } else {
676 PyErr_Format(PyExc_TypeError, "null reference was received");
677 }
678 }
680 static int
681 SWIG_Python_AddErrMesg(const char* mesg, int infront)
682 {
683 if (PyErr_Occurred()) {
684 PyObject *type = 0;
685 PyObject *value = 0;
686 PyObject *traceback = 0;
687 PyErr_Fetch(&type, &value, &traceback);
688 if (value) {
689 PyObject *old_str = PyObject_Str(value);
690 Py_XINCREF(type);
691 PyErr_Clear();
692 if (infront) {
693 PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
694 } else {
695 PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
696 }
697 Py_DECREF(old_str);
698 }
699 return 1;
700 } else {
701 return 0;
702 }
703 }
705 static int
706 SWIG_Python_ArgFail(int argnum)
707 {
708 if (PyErr_Occurred()) {
709 /* add information about failing argument */
710 char mesg[256];
711 sprintf(mesg, "argument number %d:", argnum);
712 return SWIG_Python_AddErrMesg(mesg, 1);
713 } else {
714 return 0;
715 }
716 }
719 /* -----------------------------------------------------------------------------
720 * pointers/data manipulation
721 * ----------------------------------------------------------------------------- */
723 /* Convert a pointer value */
724 static int
725 SWIG_Python_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
726 swig_type_info *tc;
727 char *c = 0;
728 static PyObject *SWIG_this = 0;
729 int newref = 0;
730 PyObject *pyobj = 0;
731 void *vptr;
733 if (!obj) return 0;
734 if (obj == Py_None) {
735 *ptr = 0;
736 return 0;
737 }
739 #ifdef SWIG_COBJECT_TYPES
740 if (!(PyCObject_Check(obj))) {
741 if (!SWIG_this)
742 SWIG_this = PyString_FromString("this");
743 pyobj = obj;
744 obj = PyObject_GetAttr(obj,SWIG_this);
745 newref = 1;
746 if (!obj) goto type_error;
747 if (!PyCObject_Check(obj)) {
748 Py_DECREF(obj);
749 goto type_error;
750 }
751 }
752 vptr = PyCObject_AsVoidPtr(obj);
753 c = (char *) PyCObject_GetDesc(obj);
754 if (newref) Py_DECREF(obj);
755 goto type_check;
756 #else
757 if (!(PyString_Check(obj))) {
758 if (!SWIG_this)
759 SWIG_this = PyString_FromString("this");
760 pyobj = obj;
761 obj = PyObject_GetAttr(obj,SWIG_this);
762 newref = 1;
763 if (!obj) goto type_error;
764 if (!PyString_Check(obj)) {
765 Py_DECREF(obj);
766 goto type_error;
767 }
768 }
769 c = PyString_AS_STRING(obj);
770 /* Pointer values must start with leading underscore */
771 if (*c != '_') {
772 if (strcmp(c,"NULL") == 0) {
773 if (newref) { Py_DECREF(obj); }
774 *ptr = (void *) 0;
775 return 0;
776 } else {
777 if (newref) { Py_DECREF(obj); }
778 goto type_error;
779 }
780 }
781 c++;
782 c = SWIG_UnpackData(c,&vptr,sizeof(void *));
783 if (newref) { Py_DECREF(obj); }
784 #endif
786 type_check:
788 if (ty) {
789 tc = SWIG_TypeCheck(c,ty);
790 if (!tc) goto type_error;
791 *ptr = SWIG_TypeCast(tc,vptr);
792 }
794 if ((pyobj) && (flags & SWIG_POINTER_DISOWN)) {
795 PyObject_SetAttrString(pyobj,(char*)"thisown",Py_False);
796 }
797 return 0;
799 type_error:
800 PyErr_Clear();
801 if (pyobj && !obj) {
802 obj = pyobj;
803 if (PyCFunction_Check(obj)) {
804 /* here we get the method pointer for callbacks */
805 char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
806 c = doc ? strstr(doc, "swig_ptr: ") : 0;
807 if (c) {
808 c += 10;
809 if (*c == '_') {
810 c++;
811 c = SWIG_UnpackData(c,&vptr,sizeof(void *));
812 goto type_check;
813 }
814 }
815 }
816 }
817 if (flags & SWIG_POINTER_EXCEPTION) {
818 if (ty) {
819 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
820 } else {
821 SWIG_Python_TypeError("C/C++ pointer", obj);
822 }
823 }
824 return -1;
825 }
827 /* Convert a pointer value, signal an exception on a type mismatch */
828 static void *
829 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
830 void *result;
831 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
832 PyErr_Clear();
833 if (flags & SWIG_POINTER_EXCEPTION) {
834 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
835 SWIG_Python_ArgFail(argnum);
836 }
837 }
838 return result;
839 }
841 /* Convert a packed value value */
842 static int
843 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty, int flags) {
844 swig_type_info *tc;
845 char *c = 0;
847 if ((!obj) || (!PyString_Check(obj))) goto type_error;
848 c = PyString_AS_STRING(obj);
849 /* Pointer values must start with leading underscore */
850 if (*c != '_') goto type_error;
851 c++;
852 c = SWIG_UnpackData(c,ptr,sz);
853 if (ty) {
854 tc = SWIG_TypeCheck(c,ty);
855 if (!tc) goto type_error;
856 }
857 return 0;
859 type_error:
860 PyErr_Clear();
861 if (flags & SWIG_POINTER_EXCEPTION) {
862 if (ty) {
863 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
864 } else {
865 SWIG_Python_TypeError("C/C++ packed data", obj);
866 }
867 }
868 return -1;
869 }
871 /* Create a new pointer string */
872 static char *
873 SWIG_Python_PointerStr(char *buff, void *ptr, const char *name, size_t bsz) {
874 char *r = buff;
875 if ((2*sizeof(void *) + 2) > bsz) return 0;
876 *(r++) = '_';
877 r = SWIG_PackData(r,&ptr,sizeof(void *));
878 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
879 strcpy(r,name);
880 return buff;
881 }
884 /* Create a new pointer object */
885 static PyObject *
886 SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int own) {
887 PyObject *robj;
888 if (!ptr) {
889 Py_INCREF(Py_None);
890 return Py_None;
891 }
892 #ifdef SWIG_COBJECT_TYPES
893 robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, (char *) type->name, NULL);
894 #else
895 {
896 char result[1024];
897 SWIG_Python_PointerStr(result, ptr, type->name, 1024);
898 robj = PyString_FromString(result);
899 }
900 #endif
901 if (!robj || (robj == Py_None)) return robj;
902 if (type->clientdata) {
903 PyObject *inst;
904 PyObject *args = Py_BuildValue((char*)"(O)", robj);
905 Py_DECREF(robj);
906 inst = PyObject_CallObject((PyObject *) type->clientdata, args);
907 Py_DECREF(args);
908 if (inst) {
909 if (own) {
910 PyObject_SetAttrString(inst,(char*)"thisown",Py_True);
911 }
912 robj = inst;
913 }
914 }
915 return robj;
916 }
918 static PyObject *
919 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
920 char result[1024];
921 char *r = result;
922 if ((2*sz + 2 + strlen(type->name)) > 1024) return 0;
923 *(r++) = '_';
924 r = SWIG_PackData(r,ptr,sz);
925 strcpy(r,type->name);
926 return PyString_FromString(result);
927 }
930 /* -----------------------------------------------------------------------------
931 * constants/methods manipulation
932 * ----------------------------------------------------------------------------- */
934 /* Install Constants */
935 static void
936 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
937 int i;
938 PyObject *obj;
939 for (i = 0; constants[i].type; i++) {
940 switch(constants[i].type) {
941 case SWIG_PY_INT:
942 obj = PyInt_FromLong(constants[i].lvalue);
943 break;
944 case SWIG_PY_FLOAT:
945 obj = PyFloat_FromDouble(constants[i].dvalue);
946 break;
947 case SWIG_PY_STRING:
948 if (constants[i].pvalue) {
949 obj = PyString_FromString((char *) constants[i].pvalue);
950 } else {
951 Py_INCREF(Py_None);
952 obj = Py_None;
953 }
954 break;
955 case SWIG_PY_POINTER:
956 obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
957 break;
958 case SWIG_PY_BINARY:
959 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
960 break;
961 default:
962 obj = 0;
963 break;
964 }
965 if (obj) {
966 PyDict_SetItemString(d,constants[i].name,obj);
967 Py_DECREF(obj);
968 }
969 }
970 }
972 /* Fix SwigMethods to carry the callback ptrs when needed */
973 static void
974 SWIG_Python_FixMethods(PyMethodDef *methods,
975 swig_const_info *const_table,
976 swig_type_info **types,
977 swig_type_info **types_initial) {
978 int i;
979 for (i = 0; methods[i].ml_name; ++i) {
980 char *c = methods[i].ml_doc;
981 if (c && (c = strstr(c, "swig_ptr: "))) {
982 int j;
983 swig_const_info *ci = 0;
984 char *name = c + 10;
985 for (j = 0; const_table[j].type; j++) {
986 if (strncmp(const_table[j].name, name,
987 strlen(const_table[j].name)) == 0) {
988 ci = &(const_table[j]);
989 break;
990 }
991 }
992 if (ci) {
993 size_t shift = (ci->ptype) - types;
994 swig_type_info *ty = types_initial[shift];
995 size_t ldoc = (c - methods[i].ml_doc);
996 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
997 char *ndoc = (char*)malloc(ldoc + lptr + 10);
998 char *buff = ndoc;
999 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue: (void *)(ci->lvalue);
1000 strncpy(buff, methods[i].ml_doc, ldoc);
1001 buff += ldoc;
1002 strncpy(buff, "swig_ptr: ", 10);
1003 buff += 10;
1004 SWIG_Python_PointerStr(buff, ptr, ty->name, lptr);
1005 methods[i].ml_doc = ndoc;
1006 }
1007 }
1008 }
1009 }
1012 /* -----------------------------------------------------------------------------
1013 * Lookup type pointer
1014 * ----------------------------------------------------------------------------- */
1015 #if PY_MAJOR_VERSION < 2
1016 /* PyModule_AddObject function was introduced in Python 2.0. The following function
1017 is copied out of Python/modsupport.c in python version 2.3.4 */
1018 static int
1019 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
1020 {
1021 PyObject *dict;
1022 if (!PyModule_Check(m)) {
1023 PyErr_SetString(PyExc_TypeError,
1024 "PyModule_AddObject() needs module as first arg");
1025 return -1;
1026 }
1027 if (!o) {
1028 PyErr_SetString(PyExc_TypeError,
1029 "PyModule_AddObject() needs non-NULL value");
1030 return -1;
1031 }
1033 dict = PyModule_GetDict(m);
1034 if (dict == NULL) {
1035 /* Internal error -- modules must have a dict! */
1036 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
1037 PyModule_GetName(m));
1038 return -1;
1039 }
1040 if (PyDict_SetItemString(dict, name, o))
1041 return -1;
1042 Py_DECREF(o);
1043 return 0;
1044 }
1045 #endif
1046 static PyMethodDef swig_empty_runtime_method_table[] = {
1047 {NULL, NULL, 0, NULL} /* Sentinel */
1048 };
1050 static void
1051 SWIG_Python_LookupTypePointer(swig_type_info ***type_list_handle) {
1052 PyObject *module, *pointer;
1053 void *type_pointer;
1055 /* first check if module already created */
1056 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
1057 if (type_pointer) {
1058 *type_list_handle = (swig_type_info **) type_pointer;
1059 } else {
1060 PyErr_Clear();
1061 /* create a new module and variable */
1062 module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
1063 pointer = PyCObject_FromVoidPtr((void *) (*type_list_handle), NULL);
1064 if (pointer && module) {
1065 PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
1066 }
1067 }
1068 }
1070 #ifdef __cplusplus
1071 }
1072 #endif
1075 /* -------- TYPES TABLE (BEGIN) -------- */
1077 #define SWIGTYPE_p_Inkscape__Extension__Script__Desktop swig_types[0]
1078 #define SWIGTYPE_p_Inkscape__Extension__Script__Inkscape swig_types[1]
1079 #define SWIGTYPE_p_char swig_types[2]
1080 #define SWIGTYPE_p_Inkscape__Extension__Script__DialogManager swig_types[3]
1081 #define SWIGTYPE_size_t swig_types[4]
1082 #define SWIGTYPE_std__size_t swig_types[5]
1083 #define SWIGTYPE_p_Inkscape__Extension__Script__Document swig_types[6]
1084 #define SWIGTYPE_ptrdiff_t swig_types[7]
1085 #define SWIGTYPE_std__ptrdiff_t swig_types[8]
1086 static swig_type_info *swig_types[10];
1088 /* -------- TYPES TABLE (END) -------- */
1091 /*-----------------------------------------------
1092 @(target):= _inkscape_py.so
1093 ------------------------------------------------*/
1094 #define SWIG_init init_inkscape_py
1096 #define SWIG_name "_inkscape_py"
1098 #include "InkscapeBinding.h"
1100 #ifdef __cplusplus
1101 extern "C" {
1102 #endif
1103 static PyObject *_wrap_getInkscape(PyObject *, PyObject *args) {
1104 PyObject *resultobj;
1105 Inkscape::Extension::Script::Inkscape *result;
1107 if(!PyArg_ParseTuple(args,(char *)":getInkscape")) goto fail;
1108 result = (Inkscape::Extension::Script::Inkscape *)Inkscape::Extension::Script::getInkscape();
1110 resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_Inkscape__Extension__Script__Inkscape, 0);
1111 return resultobj;
1112 fail:
1113 return NULL;
1114 }
1117 static PyObject *_wrap_delete_Inkscape(PyObject *, PyObject *args) {
1118 PyObject *resultobj;
1119 Inkscape::Extension::Script::Inkscape *arg1 = (Inkscape::Extension::Script::Inkscape *) 0 ;
1120 PyObject * obj0 = 0 ;
1122 if(!PyArg_ParseTuple(args,(char *)"O:delete_Inkscape",&obj0)) goto fail;
1123 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_Inkscape__Extension__Script__Inkscape, SWIG_POINTER_EXCEPTION | 0);
1124 if (SWIG_arg_fail(1)) SWIG_fail;
1125 delete arg1;
1127 Py_INCREF(Py_None); resultobj = Py_None;
1128 return resultobj;
1129 fail:
1130 return NULL;
1131 }
1134 static PyObject *_wrap_Inkscape_getDesktop(PyObject *, PyObject *args) {
1135 PyObject *resultobj;
1136 Inkscape::Extension::Script::Inkscape *arg1 = (Inkscape::Extension::Script::Inkscape *) 0 ;
1137 Inkscape::Extension::Script::Desktop *result;
1138 PyObject * obj0 = 0 ;
1140 if(!PyArg_ParseTuple(args,(char *)"O:Inkscape_getDesktop",&obj0)) goto fail;
1141 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_Inkscape__Extension__Script__Inkscape, SWIG_POINTER_EXCEPTION | 0);
1142 if (SWIG_arg_fail(1)) SWIG_fail;
1143 result = (Inkscape::Extension::Script::Desktop *)(arg1)->getDesktop();
1145 resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_Inkscape__Extension__Script__Desktop, 0);
1146 return resultobj;
1147 fail:
1148 return NULL;
1149 }
1152 static PyObject *_wrap_Inkscape_getDialogManager(PyObject *, PyObject *args) {
1153 PyObject *resultobj;
1154 Inkscape::Extension::Script::Inkscape *arg1 = (Inkscape::Extension::Script::Inkscape *) 0 ;
1155 Inkscape::Extension::Script::DialogManager *result;
1156 PyObject * obj0 = 0 ;
1158 if(!PyArg_ParseTuple(args,(char *)"O:Inkscape_getDialogManager",&obj0)) goto fail;
1159 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_Inkscape__Extension__Script__Inkscape, SWIG_POINTER_EXCEPTION | 0);
1160 if (SWIG_arg_fail(1)) SWIG_fail;
1161 result = (Inkscape::Extension::Script::DialogManager *)(arg1)->getDialogManager();
1163 resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_Inkscape__Extension__Script__DialogManager, 0);
1164 return resultobj;
1165 fail:
1166 return NULL;
1167 }
1170 static PyObject * Inkscape_swigregister(PyObject *, PyObject *args) {
1171 PyObject *obj;
1172 if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
1173 SWIG_TypeClientData(SWIGTYPE_p_Inkscape__Extension__Script__Inkscape, obj);
1174 Py_INCREF(obj);
1175 return Py_BuildValue((char *)"");
1176 }
1177 static PyObject *_wrap_delete_DialogManager(PyObject *, PyObject *args) {
1178 PyObject *resultobj;
1179 Inkscape::Extension::Script::DialogManager *arg1 = (Inkscape::Extension::Script::DialogManager *) 0 ;
1180 PyObject * obj0 = 0 ;
1182 if(!PyArg_ParseTuple(args,(char *)"O:delete_DialogManager",&obj0)) goto fail;
1183 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_Inkscape__Extension__Script__DialogManager, SWIG_POINTER_EXCEPTION | 0);
1184 if (SWIG_arg_fail(1)) SWIG_fail;
1185 delete arg1;
1187 Py_INCREF(Py_None); resultobj = Py_None;
1188 return resultobj;
1189 fail:
1190 return NULL;
1191 }
1194 static PyObject *_wrap_DialogManager_showAbout(PyObject *, PyObject *args) {
1195 PyObject *resultobj;
1196 Inkscape::Extension::Script::DialogManager *arg1 = (Inkscape::Extension::Script::DialogManager *) 0 ;
1197 PyObject * obj0 = 0 ;
1199 if(!PyArg_ParseTuple(args,(char *)"O:DialogManager_showAbout",&obj0)) goto fail;
1200 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_Inkscape__Extension__Script__DialogManager, SWIG_POINTER_EXCEPTION | 0);
1201 if (SWIG_arg_fail(1)) SWIG_fail;
1202 (arg1)->showAbout();
1204 Py_INCREF(Py_None); resultobj = Py_None;
1205 return resultobj;
1206 fail:
1207 return NULL;
1208 }
1211 static PyObject * DialogManager_swigregister(PyObject *, PyObject *args) {
1212 PyObject *obj;
1213 if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
1214 SWIG_TypeClientData(SWIGTYPE_p_Inkscape__Extension__Script__DialogManager, obj);
1215 Py_INCREF(obj);
1216 return Py_BuildValue((char *)"");
1217 }
1218 static PyObject *_wrap_delete_Desktop(PyObject *, PyObject *args) {
1219 PyObject *resultobj;
1220 Inkscape::Extension::Script::Desktop *arg1 = (Inkscape::Extension::Script::Desktop *) 0 ;
1221 PyObject * obj0 = 0 ;
1223 if(!PyArg_ParseTuple(args,(char *)"O:delete_Desktop",&obj0)) goto fail;
1224 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_Inkscape__Extension__Script__Desktop, SWIG_POINTER_EXCEPTION | 0);
1225 if (SWIG_arg_fail(1)) SWIG_fail;
1226 delete arg1;
1228 Py_INCREF(Py_None); resultobj = Py_None;
1229 return resultobj;
1230 fail:
1231 return NULL;
1232 }
1235 static PyObject *_wrap_Desktop_getDocument(PyObject *, PyObject *args) {
1236 PyObject *resultobj;
1237 Inkscape::Extension::Script::Desktop *arg1 = (Inkscape::Extension::Script::Desktop *) 0 ;
1238 Inkscape::Extension::Script::Document *result;
1239 PyObject * obj0 = 0 ;
1241 if(!PyArg_ParseTuple(args,(char *)"O:Desktop_getDocument",&obj0)) goto fail;
1242 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_Inkscape__Extension__Script__Desktop, SWIG_POINTER_EXCEPTION | 0);
1243 if (SWIG_arg_fail(1)) SWIG_fail;
1244 result = (Inkscape::Extension::Script::Document *)(arg1)->getDocument();
1246 resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_Inkscape__Extension__Script__Document, 0);
1247 return resultobj;
1248 fail:
1249 return NULL;
1250 }
1253 static PyObject * Desktop_swigregister(PyObject *, PyObject *args) {
1254 PyObject *obj;
1255 if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
1256 SWIG_TypeClientData(SWIGTYPE_p_Inkscape__Extension__Script__Desktop, obj);
1257 Py_INCREF(obj);
1258 return Py_BuildValue((char *)"");
1259 }
1260 static PyObject *_wrap_delete_Document(PyObject *, PyObject *args) {
1261 PyObject *resultobj;
1262 Inkscape::Extension::Script::Document *arg1 = (Inkscape::Extension::Script::Document *) 0 ;
1263 PyObject * obj0 = 0 ;
1265 if(!PyArg_ParseTuple(args,(char *)"O:delete_Document",&obj0)) goto fail;
1266 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_Inkscape__Extension__Script__Document, SWIG_POINTER_EXCEPTION | 0);
1267 if (SWIG_arg_fail(1)) SWIG_fail;
1268 delete arg1;
1270 Py_INCREF(Py_None); resultobj = Py_None;
1271 return resultobj;
1272 fail:
1273 return NULL;
1274 }
1277 static PyObject *_wrap_Document_hello(PyObject *, PyObject *args) {
1278 PyObject *resultobj;
1279 Inkscape::Extension::Script::Document *arg1 = (Inkscape::Extension::Script::Document *) 0 ;
1280 PyObject * obj0 = 0 ;
1282 if(!PyArg_ParseTuple(args,(char *)"O:Document_hello",&obj0)) goto fail;
1283 SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_Inkscape__Extension__Script__Document, SWIG_POINTER_EXCEPTION | 0);
1284 if (SWIG_arg_fail(1)) SWIG_fail;
1285 (arg1)->hello();
1287 Py_INCREF(Py_None); resultobj = Py_None;
1288 return resultobj;
1289 fail:
1290 return NULL;
1291 }
1294 static PyObject * Document_swigregister(PyObject *, PyObject *args) {
1295 PyObject *obj;
1296 if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
1297 SWIG_TypeClientData(SWIGTYPE_p_Inkscape__Extension__Script__Document, obj);
1298 Py_INCREF(obj);
1299 return Py_BuildValue((char *)"");
1300 }
1301 static PyMethodDef SwigMethods[] = {
1302 { (char *)"getInkscape", _wrap_getInkscape, METH_VARARGS, NULL},
1303 { (char *)"delete_Inkscape", _wrap_delete_Inkscape, METH_VARARGS, NULL},
1304 { (char *)"Inkscape_getDesktop", _wrap_Inkscape_getDesktop, METH_VARARGS, NULL},
1305 { (char *)"Inkscape_getDialogManager", _wrap_Inkscape_getDialogManager, METH_VARARGS, NULL},
1306 { (char *)"Inkscape_swigregister", Inkscape_swigregister, METH_VARARGS, NULL},
1307 { (char *)"delete_DialogManager", _wrap_delete_DialogManager, METH_VARARGS, NULL},
1308 { (char *)"DialogManager_showAbout", _wrap_DialogManager_showAbout, METH_VARARGS, NULL},
1309 { (char *)"DialogManager_swigregister", DialogManager_swigregister, METH_VARARGS, NULL},
1310 { (char *)"delete_Desktop", _wrap_delete_Desktop, METH_VARARGS, NULL},
1311 { (char *)"Desktop_getDocument", _wrap_Desktop_getDocument, METH_VARARGS, NULL},
1312 { (char *)"Desktop_swigregister", Desktop_swigregister, METH_VARARGS, NULL},
1313 { (char *)"delete_Document", _wrap_delete_Document, METH_VARARGS, NULL},
1314 { (char *)"Document_hello", _wrap_Document_hello, METH_VARARGS, NULL},
1315 { (char *)"Document_swigregister", Document_swigregister, METH_VARARGS, NULL},
1316 { NULL, NULL, 0, NULL }
1317 };
1320 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
1322 static swig_type_info _swigt__p_Inkscape__Extension__Script__Desktop[] = {{"_p_Inkscape__Extension__Script__Desktop", 0, "Inkscape::Extension::Script::Desktop *", 0, 0, 0, 0},{"_p_Inkscape__Extension__Script__Desktop", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
1323 static swig_type_info _swigt__p_Inkscape__Extension__Script__Inkscape[] = {{"_p_Inkscape__Extension__Script__Inkscape", 0, "Inkscape::Extension::Script::Inkscape *", 0, 0, 0, 0},{"_p_Inkscape__Extension__Script__Inkscape", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
1324 static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0, 0, 0, 0},{"_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
1325 static swig_type_info _swigt__p_Inkscape__Extension__Script__DialogManager[] = {{"_p_Inkscape__Extension__Script__DialogManager", 0, "Inkscape::Extension::Script::DialogManager *", 0, 0, 0, 0},{"_p_Inkscape__Extension__Script__DialogManager", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
1326 static swig_type_info _swigt__size_t[] = {{"_size_t", 0, "size_t", 0, 0, 0, 0},{"_size_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
1327 static swig_type_info _swigt__std__size_t[] = {{"_std__size_t", 0, "std::size_t", 0, 0, 0, 0},{"_std__size_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
1328 static swig_type_info _swigt__p_Inkscape__Extension__Script__Document[] = {{"_p_Inkscape__Extension__Script__Document", 0, "Inkscape::Extension::Script::Document *", 0, 0, 0, 0},{"_p_Inkscape__Extension__Script__Document", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
1329 static swig_type_info _swigt__ptrdiff_t[] = {{"_ptrdiff_t", 0, "ptrdiff_t", 0, 0, 0, 0},{"_ptrdiff_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
1330 static swig_type_info _swigt__std__ptrdiff_t[] = {{"_std__ptrdiff_t", 0, "std::ptrdiff_t", 0, 0, 0, 0},{"_std__ptrdiff_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
1332 static swig_type_info *swig_types_initial[] = {
1333 _swigt__p_Inkscape__Extension__Script__Desktop,
1334 _swigt__p_Inkscape__Extension__Script__Inkscape,
1335 _swigt__p_char,
1336 _swigt__p_Inkscape__Extension__Script__DialogManager,
1337 _swigt__size_t,
1338 _swigt__std__size_t,
1339 _swigt__p_Inkscape__Extension__Script__Document,
1340 _swigt__ptrdiff_t,
1341 _swigt__std__ptrdiff_t,
1342 0
1343 };
1346 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
1348 static swig_const_info swig_const_table[] = {
1349 {0, 0, 0, 0.0, 0, 0}};
1351 #ifdef __cplusplus
1352 }
1353 #endif
1356 #ifdef SWIG_LINK_RUNTIME
1357 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1358 # if defined(_MSC_VER) || defined(__GNUC__)
1359 # define SWIGIMPORT(a) extern a
1360 # else
1361 # if defined(__BORLANDC__)
1362 # define SWIGIMPORT(a) a _export
1363 # else
1364 # define SWIGIMPORT(a) a
1365 # endif
1366 # endif
1367 #else
1368 # define SWIGIMPORT(a) a
1369 #endif
1370 #ifdef __cplusplus
1371 extern "C"
1372 #endif
1373 SWIGEXPORT(void *) SWIG_ReturnGlobalTypeList(void *);
1374 #endif
1376 #ifdef __cplusplus
1377 extern "C"
1378 #endif
1379 SWIGEXPORT(void) SWIG_init(void) {
1380 static PyObject *SWIG_globals = 0;
1381 static int typeinit = 0;
1382 PyObject *m, *d;
1383 int i;
1384 if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
1386 /* Fix SwigMethods to carry the callback ptrs when needed */
1387 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_types_initial);
1389 m = Py_InitModule((char *) SWIG_name, SwigMethods);
1390 d = PyModule_GetDict(m);
1392 if (!typeinit) {
1393 #ifdef SWIG_LINK_RUNTIME
1394 swig_type_list_handle = (swig_type_info **) SWIG_ReturnGlobalTypeList(swig_type_list_handle);
1395 #else
1396 # ifndef SWIG_STATIC_RUNTIME
1397 SWIG_Python_LookupTypePointer(&swig_type_list_handle);
1398 # endif
1399 #endif
1400 for (i = 0; swig_types_initial[i]; i++) {
1401 swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
1402 }
1403 typeinit = 1;
1404 }
1405 SWIG_InstallConstants(d,swig_const_table);
1407 }