1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
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 * ----------------------------------------------------------------------------- */
12 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
13 /* -----------------------------------------------------------------------------
14 * This section contains generic SWIG labels for method/variable
15 * declarations/attributes, and other compiler dependent labels.
16 * ----------------------------------------------------------------------------- */
18 /* template workaround for compilers that cannot correctly implement the C++ standard */
19 #ifndef SWIGTEMPLATEDISAMBIGUATOR
20 # if defined(__SUNPRO_CC)
21 # if (__SUNPRO_CC <= 0x560)
22 # define SWIGTEMPLATEDISAMBIGUATOR template
24 # define SWIGTEMPLATEDISAMBIGUATOR
27 # define SWIGTEMPLATEDISAMBIGUATOR
31 /* inline attribute */
33 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
34 # define SWIGINLINE inline
40 /* attribute recognised by some compilers to avoid 'unused' warnings */
42 # if defined(__GNUC__)
43 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
44 # define SWIGUNUSED __attribute__ ((__unused__))
49 # define SWIGUNUSED __attribute__ ((__unused__))
55 #ifndef SWIGUNUSEDPARM
57 # define SWIGUNUSEDPARM(p)
59 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
63 /* internal SWIG method */
65 # define SWIGINTERN static SWIGUNUSED
68 /* internal inline SWIG method */
69 #ifndef SWIGINTERNINLINE
70 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
73 /* exporting methods */
74 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
75 # ifndef GCC_HASCLASSVISIBILITY
76 # define GCC_HASCLASSVISIBILITY
81 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
82 # if defined(STATIC_LINKED)
85 # define SWIGEXPORT __declspec(dllexport)
88 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
89 # define SWIGEXPORT __attribute__ ((visibility("default")))
96 /* calling conventions for Windows */
98 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
99 # define SWIGSTDCALL __stdcall
105 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
106 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
107 # define _CRT_SECURE_NO_DEPRECATE
111 /* Python.h has to appear first */
114 /* -----------------------------------------------------------------------------
117 * This file contains generic CAPI SWIG runtime support for pointer
119 * ----------------------------------------------------------------------------- */
121 /* This should only be incremented when either the layout of swig_type_info changes,
122 or for whatever reason, the runtime changes incompatibly */
123 #define SWIG_RUNTIME_VERSION "3"
125 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
126 #ifdef SWIG_TYPE_TABLE
127 # define SWIG_QUOTE_STRING(x) #x
128 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
129 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
131 # define SWIG_TYPE_TABLE_NAME
135 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
136 creating a static or dynamic library from the swig runtime code.
137 In 99.9% of the cases, swig just needs to declare them as 'static'.
139 But only do this if is strictly necessary, ie, if you have problems
140 with your compiler or so.
144 # define SWIGRUNTIME SWIGINTERN
147 #ifndef SWIGRUNTIMEINLINE
148 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
151 /* Generic buffer size */
152 #ifndef SWIG_BUFFER_SIZE
153 # define SWIG_BUFFER_SIZE 1024
156 /* Flags for pointer conversions */
157 #define SWIG_POINTER_DISOWN 0x1
159 /* Flags for new pointer objects */
160 #define SWIG_POINTER_OWN 0x1
164 Flags/methods for returning states.
166 The swig conversion methods, as ConvertPtr, return and integer
167 that tells if the conversion was successful or not. And if not,
168 an error code can be returned (see swigerrors.swg for the codes).
170 Use the following macros/flags to set or process the returning
173 In old swig versions, you usually write code as:
175 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
181 Now you can be more explicit as:
183 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
184 if (SWIG_IsOK(res)) {
190 that seems to be the same, but now you can also do
193 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
194 if (SWIG_IsOK(res)) {
196 if (SWIG_IsNewObj(res) {
206 I.e., now SWIG_ConvertPtr can return new objects and you can
207 identify the case and take care of the deallocation. Of course that
208 requires also to SWIG_ConvertPtr to return new result values, as
210 int SWIG_ConvertPtr(obj, ptr,...) {
212 if (<need new object>) {
213 *ptr = <ptr to new allocated object>;
216 *ptr = <ptr to old object>;
224 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
225 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
228 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
229 allows to return the 'cast rank', for example, if you have this
236 food(1) // cast rank '1' (1 -> 1.0)
237 fooi(1) // cast rank '0'
239 just use the SWIG_AddCast()/SWIG_CheckState()
244 #define SWIG_ERROR (-1)
245 #define SWIG_IsOK(r) (r >= 0)
246 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
248 /* The CastRankLimit says how many bits are used for the cast rank */
249 #define SWIG_CASTRANKLIMIT (1 << 8)
250 /* The NewMask denotes the object was created (using new/malloc) */
251 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
252 /* The TmpMask is for in/out typemaps that use temporal objects */
253 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
254 /* Simple returning values */
255 #define SWIG_BADOBJ (SWIG_ERROR)
256 #define SWIG_OLDOBJ (SWIG_OK)
257 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
258 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
259 /* Check, add and del mask methods */
260 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
261 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
262 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
263 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
264 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
265 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
269 #if defined(SWIG_CASTRANK_MODE)
270 # ifndef SWIG_TypeRank
271 # define SWIG_TypeRank unsigned long
273 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
274 # define SWIG_MAXCASTRANK (2)
276 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
277 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
278 SWIGINTERNINLINE
int SWIG_AddCast(int r
) {
279 return SWIG_IsOK(r
) ? ((SWIG_CastRank(r
) < SWIG_MAXCASTRANK
) ? (r
+ 1) : SWIG_ERROR
) : r
;
281 SWIGINTERNINLINE
int SWIG_CheckState(int r
) {
282 return SWIG_IsOK(r
) ? SWIG_CastRank(r
) + 1 : 0;
284 #else /* no cast-rank mode */
285 # define SWIG_AddCast
286 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
298 typedef void *(*swig_converter_func
)(void *);
299 typedef struct swig_type_info
*(*swig_dycast_func
)(void **);
301 /* Structure to store inforomation on one type */
302 typedef struct swig_type_info
{
303 const char *name
; /* mangled name of this type */
304 const char *str
; /* human readable name of this type */
305 swig_dycast_func dcast
; /* dynamic cast function down a hierarchy */
306 struct swig_cast_info
*cast
; /* linked list of types that can cast into this type */
307 void *clientdata
; /* language specific type data */
308 int owndata
; /* flag if the structure owns the clientdata */
311 /* Structure to store a type and conversion function used for casting */
312 typedef struct swig_cast_info
{
313 swig_type_info
*type
; /* pointer to type that is equivalent to this type */
314 swig_converter_func converter
; /* function to cast the void pointers */
315 struct swig_cast_info
*next
; /* pointer to next cast in linked list */
316 struct swig_cast_info
*prev
; /* pointer to the previous cast */
319 /* Structure used to store module information
320 * Each module generates one structure like this, and the runtime collects
321 * all of these structures and stores them in a circularly linked list.*/
322 typedef struct swig_module_info
{
323 swig_type_info
**types
; /* Array of pointers to swig_type_info structures that are in this module */
324 size_t size
; /* Number of types in this module */
325 struct swig_module_info
*next
; /* Pointer to next element in circularly linked list */
326 swig_type_info
**type_initial
; /* Array of initially generated type structures */
327 swig_cast_info
**cast_initial
; /* Array of initially generated casting structures */
328 void *clientdata
; /* Language specific module data */
332 Compare two type names skipping the space characters, therefore
333 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
335 Return 0 when the two name types are equivalent, as in
336 strncmp, but skipping ' '.
339 SWIG_TypeNameComp(const char *f1
, const char *l1
,
340 const char *f2
, const char *l2
) {
341 for (;(f1
!= l1
) && (f2
!= l2
); ++f1
, ++f2
) {
342 while ((*f1
== ' ') && (f1
!= l1
)) ++f1
;
343 while ((*f2
== ' ') && (f2
!= l2
)) ++f2
;
344 if (*f1
!= *f2
) return (*f1
> *f2
) ? 1 : -1;
346 return (l1
- f1
) - (l2
- f2
);
350 Check type equivalence in a name list like <name1>|<name2>|...
351 Return 0 if not equal, 1 if equal
354 SWIG_TypeEquiv(const char *nb
, const char *tb
) {
356 const char* te
= tb
+ strlen(tb
);
358 while (!equiv
&& *ne
) {
359 for (nb
= ne
; *ne
; ++ne
) {
360 if (*ne
== '|') break;
362 equiv
= (SWIG_TypeNameComp(nb
, ne
, tb
, te
) == 0) ? 1 : 0;
369 Check type equivalence in a name list like <name1>|<name2>|...
370 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
373 SWIG_TypeCompare(const char *nb
, const char *tb
) {
375 const char* te
= tb
+ strlen(tb
);
377 while (!equiv
&& *ne
) {
378 for (nb
= ne
; *ne
; ++ne
) {
379 if (*ne
== '|') break;
381 equiv
= (SWIG_TypeNameComp(nb
, ne
, tb
, te
) == 0) ? 1 : 0;
388 /* think of this as a c++ template<> or a scheme macro */
389 #define SWIG_TypeCheck_Template(comparison, ty) \
391 swig_cast_info *iter = ty->cast; \
394 if (iter == ty->cast) return iter; \
395 /* Move iter to the top of the linked list */ \
396 iter->prev->next = iter->next; \
398 iter->next->prev = iter->prev; \
399 iter->next = ty->cast; \
401 if (ty->cast) ty->cast->prev = iter; \
413 SWIGRUNTIME swig_cast_info
*
414 SWIG_TypeCheck(const char *c
, swig_type_info
*ty
) {
415 SWIG_TypeCheck_Template(strcmp(iter
->type
->name
, c
) == 0, ty
);
418 /* Same as previous function, except strcmp is replaced with a pointer comparison */
419 SWIGRUNTIME swig_cast_info
*
420 SWIG_TypeCheckStruct(swig_type_info
*from
, swig_type_info
*into
) {
421 SWIG_TypeCheck_Template(iter
->type
== from
, into
);
425 Cast a pointer up an inheritance hierarchy
427 SWIGRUNTIMEINLINE
void *
428 SWIG_TypeCast(swig_cast_info
*ty
, void *ptr
) {
429 return ((!ty
) || (!ty
->converter
)) ? ptr
: (*ty
->converter
)(ptr
);
433 Dynamic pointer casting. Down an inheritance hierarchy
435 SWIGRUNTIME swig_type_info
*
436 SWIG_TypeDynamicCast(swig_type_info
*ty
, void **ptr
) {
437 swig_type_info
*lastty
= ty
;
438 if (!ty
|| !ty
->dcast
) return ty
;
439 while (ty
&& (ty
->dcast
)) {
440 ty
= (*ty
->dcast
)(ptr
);
447 Return the name associated with this type
449 SWIGRUNTIMEINLINE
const char *
450 SWIG_TypeName(const swig_type_info
*ty
) {
455 Return the pretty name associated with this type,
456 that is an unmangled type name in a form presentable to the user.
458 SWIGRUNTIME
const char *
459 SWIG_TypePrettyName(const swig_type_info
*type
) {
460 /* The "str" field contains the equivalent pretty names of the
461 type, separated by vertical-bar characters. We choose
462 to print the last name, as it is often (?) the most
464 if (!type
) return NULL
;
465 if (type
->str
!= NULL
) {
466 const char *last_name
= type
->str
;
468 for (s
= type
->str
; *s
; s
++)
469 if (*s
== '|') last_name
= s
+1;
477 Set the clientdata field for a type
480 SWIG_TypeClientData(swig_type_info
*ti
, void *clientdata
) {
481 swig_cast_info
*cast
= ti
->cast
;
482 /* if (ti->clientdata == clientdata) return; */
483 ti
->clientdata
= clientdata
;
486 if (!cast
->converter
) {
487 swig_type_info
*tc
= cast
->type
;
488 if (!tc
->clientdata
) {
489 SWIG_TypeClientData(tc
, clientdata
);
496 SWIG_TypeNewClientData(swig_type_info
*ti
, void *clientdata
) {
497 SWIG_TypeClientData(ti
, clientdata
);
502 Search for a swig_type_info structure only by mangled name
503 Search is a O(log #types)
505 We start searching at module start, and finish searching when start == end.
506 Note: if start == end at the beginning of the function, we go all the way around
509 SWIGRUNTIME swig_type_info
*
510 SWIG_MangledTypeQueryModule(swig_module_info
*start
,
511 swig_module_info
*end
,
513 swig_module_info
*iter
= start
;
516 register size_t l
= 0;
517 register size_t r
= iter
->size
- 1;
519 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
520 register size_t i
= (l
+ r
) >> 1;
521 const char *iname
= iter
->types
[i
]->name
;
523 register int compare
= strcmp(name
, iname
);
525 return iter
->types
[i
];
526 } else if (compare
< 0) {
532 } else if (compare
> 0) {
536 break; /* should never happen */
541 } while (iter
!= end
);
546 Search for a swig_type_info structure for either a mangled name or a human readable name.
547 It first searches the mangled names of the types, which is a O(log #types)
548 If a type is not found it then searches the human readable names, which is O(#types).
550 We start searching at module start, and finish searching when start == end.
551 Note: if start == end at the beginning of the function, we go all the way around
554 SWIGRUNTIME swig_type_info
*
555 SWIG_TypeQueryModule(swig_module_info
*start
,
556 swig_module_info
*end
,
558 /* STEP 1: Search the name field using binary search */
559 swig_type_info
*ret
= SWIG_MangledTypeQueryModule(start
, end
, name
);
563 /* STEP 2: If the type hasn't been found, do a complete search
564 of the str field (the human readable name) */
565 swig_module_info
*iter
= start
;
567 register size_t i
= 0;
568 for (; i
< iter
->size
; ++i
) {
569 if (iter
->types
[i
]->str
&& (SWIG_TypeEquiv(iter
->types
[i
]->str
, name
)))
570 return iter
->types
[i
];
573 } while (iter
!= end
);
576 /* neither found a match */
581 Pack binary data into a string
584 SWIG_PackData(char *c
, void *ptr
, size_t sz
) {
585 static const char hex
[17] = "0123456789abcdef";
586 register const unsigned char *u
= (unsigned char *) ptr
;
587 register const unsigned char *eu
= u
+ sz
;
588 for (; u
!= eu
; ++u
) {
589 register unsigned char uu
= *u
;
590 *(c
++) = hex
[(uu
& 0xf0) >> 4];
591 *(c
++) = hex
[uu
& 0xf];
597 Unpack binary data from a string
599 SWIGRUNTIME
const char *
600 SWIG_UnpackData(const char *c
, void *ptr
, size_t sz
) {
601 register unsigned char *u
= (unsigned char *) ptr
;
602 register const unsigned char *eu
= u
+ sz
;
603 for (; u
!= eu
; ++u
) {
604 register char d
= *(c
++);
605 register unsigned char uu
;
606 if ((d
>= '0') && (d
<= '9'))
607 uu
= ((d
- '0') << 4);
608 else if ((d
>= 'a') && (d
<= 'f'))
609 uu
= ((d
- ('a'-10)) << 4);
613 if ((d
>= '0') && (d
<= '9'))
615 else if ((d
>= 'a') && (d
<= 'f'))
616 uu
|= (d
- ('a'-10));
625 Pack 'void *' into a string buffer.
628 SWIG_PackVoidPtr(char *buff
, void *ptr
, const char *name
, size_t bsz
) {
630 if ((2*sizeof(void *) + 2) > bsz
) return 0;
632 r
= SWIG_PackData(r
,&ptr
,sizeof(void *));
633 if (strlen(name
) + 1 > (bsz
- (r
- buff
))) return 0;
638 SWIGRUNTIME
const char *
639 SWIG_UnpackVoidPtr(const char *c
, void **ptr
, const char *name
) {
641 if (strcmp(c
,"NULL") == 0) {
648 return SWIG_UnpackData(++c
,ptr
,sizeof(void *));
652 SWIG_PackDataName(char *buff
, void *ptr
, size_t sz
, const char *name
, size_t bsz
) {
654 size_t lname
= (name
? strlen(name
) : 0);
655 if ((2*sz
+ 2 + lname
) > bsz
) return 0;
657 r
= SWIG_PackData(r
,ptr
,sz
);
659 strncpy(r
,name
,lname
+1);
666 SWIGRUNTIME
const char *
667 SWIG_UnpackDataName(const char *c
, void *ptr
, size_t sz
, const char *name
) {
669 if (strcmp(c
,"NULL") == 0) {
676 return SWIG_UnpackData(++c
,ptr
,sz
);
684 #define SWIG_UnknownError -1
685 #define SWIG_IOError -2
686 #define SWIG_RuntimeError -3
687 #define SWIG_IndexError -4
688 #define SWIG_TypeError -5
689 #define SWIG_DivisionByZero -6
690 #define SWIG_OverflowError -7
691 #define SWIG_SyntaxError -8
692 #define SWIG_ValueError -9
693 #define SWIG_SystemError -10
694 #define SWIG_AttributeError -11
695 #define SWIG_MemoryError -12
696 #define SWIG_NullReferenceError -13
701 /* Add PyOS_snprintf for old Pythons */
702 #if PY_VERSION_HEX < 0x02020000
703 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
704 # define PyOS_snprintf _snprintf
706 # define PyOS_snprintf snprintf
710 /* A crude PyString_FromFormat implementation for old Pythons */
711 #if PY_VERSION_HEX < 0x02020000
713 #ifndef SWIG_PYBUFFER_SIZE
714 # define SWIG_PYBUFFER_SIZE 1024
718 PyString_FromFormat(const char *fmt
, ...) {
720 char buf
[SWIG_PYBUFFER_SIZE
* 2];
723 res
= vsnprintf(buf
, sizeof(buf
), fmt
, ap
);
725 return (res
< 0 || res
>= (int)sizeof(buf
)) ? 0 : PyString_FromString(buf
);
729 /* Add PyObject_Del for old Pythons */
730 #if PY_VERSION_HEX < 0x01060000
731 # define PyObject_Del(op) PyMem_DEL((op))
734 # define PyObject_DEL PyObject_Del
737 /* A crude PyExc_StopIteration exception for old Pythons */
738 #if PY_VERSION_HEX < 0x02020000
739 # ifndef PyExc_StopIteration
740 # define PyExc_StopIteration PyExc_RuntimeError
742 # ifndef PyObject_GenericGetAttr
743 # define PyObject_GenericGetAttr 0
746 /* Py_NotImplemented is defined in 2.1 and up. */
747 #if PY_VERSION_HEX < 0x02010000
748 # ifndef Py_NotImplemented
749 # define Py_NotImplemented PyExc_RuntimeError
754 /* A crude PyString_AsStringAndSize implementation for old Pythons */
755 #if PY_VERSION_HEX < 0x02010000
756 # ifndef PyString_AsStringAndSize
757 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
761 /* PySequence_Size for old Pythons */
762 #if PY_VERSION_HEX < 0x02000000
763 # ifndef PySequence_Size
764 # define PySequence_Size PySequence_Length
769 /* PyBool_FromLong for old Pythons */
770 #if PY_VERSION_HEX < 0x02030000
772 PyObject
*PyBool_FromLong(long ok
)
774 PyObject
*result
= ok
? Py_True
: Py_False
;
780 /* Py_ssize_t for old Pythons */
781 /* This code is as recommended by: */
782 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
783 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
784 typedef int Py_ssize_t
;
785 # define PY_SSIZE_T_MAX INT_MAX
786 # define PY_SSIZE_T_MIN INT_MIN
789 /* -----------------------------------------------------------------------------
791 * ----------------------------------------------------------------------------- */
793 SWIGRUNTIME PyObject
*
794 SWIG_Python_ErrorType(int code
) {
797 case SWIG_MemoryError
:
798 type
= PyExc_MemoryError
;
801 type
= PyExc_IOError
;
803 case SWIG_RuntimeError
:
804 type
= PyExc_RuntimeError
;
806 case SWIG_IndexError
:
807 type
= PyExc_IndexError
;
810 type
= PyExc_TypeError
;
812 case SWIG_DivisionByZero
:
813 type
= PyExc_ZeroDivisionError
;
815 case SWIG_OverflowError
:
816 type
= PyExc_OverflowError
;
818 case SWIG_SyntaxError
:
819 type
= PyExc_SyntaxError
;
821 case SWIG_ValueError
:
822 type
= PyExc_ValueError
;
824 case SWIG_SystemError
:
825 type
= PyExc_SystemError
;
827 case SWIG_AttributeError
:
828 type
= PyExc_AttributeError
;
831 type
= PyExc_RuntimeError
;
838 SWIG_Python_AddErrorMsg(const char* mesg
)
842 PyObject
*traceback
= 0;
844 if (PyErr_Occurred()) PyErr_Fetch(&type
, &value
, &traceback
);
846 PyObject
*old_str
= PyObject_Str(value
);
849 PyErr_Format(type
, "%s %s", PyString_AsString(old_str
), mesg
);
853 PyErr_Format(PyExc_RuntimeError
, mesg
);
859 #if defined(SWIG_PYTHON_NO_THREADS)
860 # if defined(SWIG_PYTHON_THREADS)
861 # undef SWIG_PYTHON_THREADS
864 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
865 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
866 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
867 # define SWIG_PYTHON_USE_GIL
870 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
871 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
872 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
874 # ifdef __cplusplus /* C++ code */
875 class SWIG_Python_Thread_Block
{
877 PyGILState_STATE state
;
879 void end() { if (status
) { PyGILState_Release(state
); status
= false;} }
880 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
881 ~SWIG_Python_Thread_Block() { end(); }
883 class SWIG_Python_Thread_Allow
{
887 void end() { if (status
) { PyEval_RestoreThread(save
); status
= false; }}
888 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
889 ~SWIG_Python_Thread_Allow() { end(); }
891 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
892 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
893 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
894 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
896 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
897 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
898 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
899 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
901 # else /* Old thread way, not implemented, user must provide it */
902 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
903 # define SWIG_PYTHON_INITIALIZE_THREADS
905 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
906 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
908 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
909 # define SWIG_PYTHON_THREAD_END_BLOCK
911 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
912 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
914 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
915 # define SWIG_PYTHON_THREAD_END_ALLOW
918 #else /* No thread support */
919 # define SWIG_PYTHON_INITIALIZE_THREADS
920 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
921 # define SWIG_PYTHON_THREAD_END_BLOCK
922 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
923 # define SWIG_PYTHON_THREAD_END_ALLOW
926 /* -----------------------------------------------------------------------------
927 * Python API portion that goes into the runtime
928 * ----------------------------------------------------------------------------- */
937 /* -----------------------------------------------------------------------------
938 * Constant declarations
939 * ----------------------------------------------------------------------------- */
942 #define SWIG_PY_POINTER 4
943 #define SWIG_PY_BINARY 5
945 /* Constant information structure */
946 typedef struct swig_const_info
{
952 swig_type_info
**ptype
;
963 /* -----------------------------------------------------------------------------
964 * See the LICENSE file for information on copyright, usage and redistribution
965 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
969 * This file contains the runtime support for Python modules
970 * and includes code for managing global variables and pointer
973 * ----------------------------------------------------------------------------- */
975 /* Common SWIG API */
977 /* for raw pointers */
978 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
979 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
980 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
981 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags)
982 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
983 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
984 #define swig_owntype int
986 /* for raw packed data */
987 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
988 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
990 /* for class or struct pointers */
991 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
992 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
994 /* for C or C++ function pointers */
995 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
996 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0)
998 /* for C++ member pointers, ie, member methods */
999 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1000 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1005 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
1006 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1007 #define SWIG_NewClientData(obj) PySwigClientData_New(obj)
1009 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1010 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1011 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1012 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1013 #define SWIG_fail goto fail
1016 /* Runtime API implementation */
1018 /* Error manipulation */
1021 SWIG_Python_SetErrorObj(PyObject
*errtype
, PyObject
*obj
) {
1022 SWIG_PYTHON_THREAD_BEGIN_BLOCK
;
1023 PyErr_SetObject(errtype
, obj
);
1025 SWIG_PYTHON_THREAD_END_BLOCK
;
1029 SWIG_Python_SetErrorMsg(PyObject
*errtype
, const char *msg
) {
1030 SWIG_PYTHON_THREAD_BEGIN_BLOCK
;
1031 PyErr_SetString(errtype
, (char *) msg
);
1032 SWIG_PYTHON_THREAD_END_BLOCK
;
1035 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1037 /* Set a constant value */
1040 SWIG_Python_SetConstant(PyObject
*d
, const char *name
, PyObject
*obj
) {
1041 PyDict_SetItemString(d
, (char*) name
, obj
);
1045 /* Append a value to the result obj */
1047 SWIGINTERN PyObject
*
1048 SWIG_Python_AppendOutput(PyObject
* result
, PyObject
* obj
) {
1049 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1052 } else if (result
== Py_None
) {
1056 if (!PyList_Check(result
)) {
1057 PyObject
*o2
= result
;
1058 result
= PyList_New(1);
1059 PyList_SetItem(result
, 0, o2
);
1061 PyList_Append(result
,obj
);
1070 } else if (result
== Py_None
) {
1074 if (!PyTuple_Check(result
)) {
1076 result
= PyTuple_New(1);
1077 PyTuple_SET_ITEM(result
, 0, o2
);
1079 o3
= PyTuple_New(1);
1080 PyTuple_SET_ITEM(o3
, 0, obj
);
1082 result
= PySequence_Concat(o2
, o3
);
1090 /* Unpack the argument tuple */
1093 SWIG_Python_UnpackTuple(PyObject
*args
, const char *name
, int min
, int max
, PyObject
**objs
)
1099 PyErr_Format(PyExc_TypeError
, "%s expected %s%d arguments, got none",
1100 name
, (min
== max
? "" : "at least "), min
);
1104 if (!PyTuple_Check(args
)) {
1105 PyErr_SetString(PyExc_SystemError
, "UnpackTuple() argument list is not a tuple");
1108 register int l
= PyTuple_GET_SIZE(args
);
1110 PyErr_Format(PyExc_TypeError
, "%s expected %s%d arguments, got %d",
1111 name
, (min
== max
? "" : "at least "), min
, l
);
1113 } else if (l
> max
) {
1114 PyErr_Format(PyExc_TypeError
, "%s expected %s%d arguments, got %d",
1115 name
, (min
== max
? "" : "at most "), max
, l
);
1119 for (i
= 0; i
< l
; ++i
) {
1120 objs
[i
] = PyTuple_GET_ITEM(args
, i
);
1122 for (; l
< max
; ++l
) {
1130 /* A functor is a function object with one single object argument */
1131 #if PY_VERSION_HEX >= 0x02020000
1132 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1134 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1138 Helper for static pointer initialization for both C and C++ code, for example
1139 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1142 #define SWIG_STATIC_POINTER(var) var
1144 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1147 /* -----------------------------------------------------------------------------
1148 * Pointer declarations
1149 * ----------------------------------------------------------------------------- */
1151 /* Flags for new pointer objects */
1152 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1153 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1155 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1164 /* How to access Py_None */
1165 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1166 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1167 # ifndef SWIG_PYTHON_BUILD_NONE
1168 # define SWIG_PYTHON_BUILD_NONE
1173 #ifdef SWIG_PYTHON_BUILD_NONE
1176 # define Py_None SWIG_Py_None()
1178 SWIGRUNTIMEINLINE PyObject
*
1181 PyObject
*none
= Py_BuildValue((char*)"");
1185 SWIGRUNTIME PyObject
*
1188 static PyObject
*SWIG_STATIC_POINTER(none
) = _SWIG_Py_None();
1193 /* The python void return value */
1195 SWIGRUNTIMEINLINE PyObject
*
1198 PyObject
*none
= Py_None
;
1203 /* PySwigClientData */
1214 SWIGRUNTIMEINLINE
int
1215 SWIG_Python_CheckImplicit(swig_type_info
*ty
)
1217 PySwigClientData
*data
= (PySwigClientData
*)ty
->clientdata
;
1218 return data
? data
->implicitconv
: 0;
1221 SWIGRUNTIMEINLINE PyObject
*
1222 SWIG_Python_ExceptionType(swig_type_info
*desc
) {
1223 PySwigClientData
*data
= desc
? (PySwigClientData
*) desc
->clientdata
: 0;
1224 PyObject
*klass
= data
? data
->klass
: 0;
1225 return (klass
? klass
: PyExc_RuntimeError
);
1229 SWIGRUNTIME PySwigClientData
*
1230 PySwigClientData_New(PyObject
* obj
)
1235 PySwigClientData
*data
= (PySwigClientData
*)malloc(sizeof(PySwigClientData
));
1236 /* the klass element */
1238 Py_INCREF(data
->klass
);
1239 /* the newraw method and newargs arguments used to create a new raw instance */
1240 if (PyClass_Check(obj
)) {
1242 data
->newargs
= obj
;
1245 #if (PY_VERSION_HEX < 0x02020000)
1248 data
->newraw
= PyObject_GetAttrString(data
->klass
, (char *)"__new__");
1251 Py_INCREF(data
->newraw
);
1252 data
->newargs
= PyTuple_New(1);
1253 PyTuple_SetItem(data
->newargs
, 0, obj
);
1255 data
->newargs
= obj
;
1257 Py_INCREF(data
->newargs
);
1259 /* the destroy method, aka as the C++ delete method */
1260 data
->destroy
= PyObject_GetAttrString(data
->klass
, (char *)"__swig_destroy__");
1261 if (PyErr_Occurred()) {
1265 if (data
->destroy
) {
1267 Py_INCREF(data
->destroy
);
1268 flags
= PyCFunction_GET_FLAGS(data
->destroy
);
1270 data
->delargs
= !(flags
& (METH_O
));
1277 data
->implicitconv
= 0;
1283 PySwigClientData_Del(PySwigClientData
* data
)
1285 Py_XDECREF(data
->newraw
);
1286 Py_XDECREF(data
->newargs
);
1287 Py_XDECREF(data
->destroy
);
1290 /* =============== PySwigObject =====================*/
1300 SWIGRUNTIME PyObject
*
1301 PySwigObject_long(PySwigObject
*v
)
1303 return PyLong_FromVoidPtr(v
->ptr
);
1306 SWIGRUNTIME PyObject
*
1307 PySwigObject_format(const char* fmt
, PySwigObject
*v
)
1309 PyObject
*res
= NULL
;
1310 PyObject
*args
= PyTuple_New(1);
1312 if (PyTuple_SetItem(args
, 0, PySwigObject_long(v
)) == 0) {
1313 PyObject
*ofmt
= PyString_FromString(fmt
);
1315 res
= PyString_Format(ofmt
,args
);
1324 SWIGRUNTIME PyObject
*
1325 PySwigObject_oct(PySwigObject
*v
)
1327 return PySwigObject_format("%o",v
);
1330 SWIGRUNTIME PyObject
*
1331 PySwigObject_hex(PySwigObject
*v
)
1333 return PySwigObject_format("%x",v
);
1336 SWIGRUNTIME PyObject
*
1338 PySwigObject_repr(PySwigObject
*v
)
1340 PySwigObject_repr(PySwigObject
*v
, PyObject
*args
)
1343 const char *name
= SWIG_TypePrettyName(v
->ty
);
1344 PyObject
*hex
= PySwigObject_hex(v
);
1345 PyObject
*repr
= PyString_FromFormat("<Swig Object of type '%s' at 0x%s>", name
, PyString_AsString(hex
));
1349 PyObject
*nrep
= PySwigObject_repr((PySwigObject
*)v
->next
);
1351 PyObject
*nrep
= PySwigObject_repr((PySwigObject
*)v
->next
, args
);
1353 PyString_ConcatAndDel(&repr
,nrep
);
1359 PySwigObject_print(PySwigObject
*v
, FILE *fp
, int SWIGUNUSEDPARM(flags
))
1362 PyObject
*repr
= PySwigObject_repr(v
);
1364 PyObject
*repr
= PySwigObject_repr(v
, NULL
);
1367 fputs(PyString_AsString(repr
), fp
);
1375 SWIGRUNTIME PyObject
*
1376 PySwigObject_str(PySwigObject
*v
)
1378 char result
[SWIG_BUFFER_SIZE
];
1379 return SWIG_PackVoidPtr(result
, v
->ptr
, v
->ty
->name
, sizeof(result
)) ?
1380 PyString_FromString(result
) : 0;
1384 PySwigObject_compare(PySwigObject
*v
, PySwigObject
*w
)
1388 return (i
< j
) ? -1 : ((i
> j
) ? 1 : 0);
1391 SWIGRUNTIME PyTypeObject
* _PySwigObject_type(void);
1393 SWIGRUNTIME PyTypeObject
*
1394 PySwigObject_type(void) {
1395 static PyTypeObject
*SWIG_STATIC_POINTER(type
) = _PySwigObject_type();
1399 SWIGRUNTIMEINLINE
int
1400 PySwigObject_Check(PyObject
*op
) {
1401 return ((op
)->ob_type
== PySwigObject_type())
1402 || (strcmp((op
)->ob_type
->tp_name
,"PySwigObject") == 0);
1405 SWIGRUNTIME PyObject
*
1406 PySwigObject_New(void *ptr
, swig_type_info
*ty
, int own
);
1409 PySwigObject_dealloc(PyObject
*v
)
1411 PySwigObject
*sobj
= (PySwigObject
*) v
;
1412 PyObject
*next
= sobj
->next
;
1414 swig_type_info
*ty
= sobj
->ty
;
1415 PySwigClientData
*data
= ty
? (PySwigClientData
*) ty
->clientdata
: 0;
1416 PyObject
*destroy
= data
? data
->destroy
: 0;
1418 /* destroy is always a VARARGS method */
1420 if (data
->delargs
) {
1421 /* we need to create a temporal object to carry the destroy operation */
1422 PyObject
*tmp
= PySwigObject_New(sobj
->ptr
, ty
, 0);
1423 res
= SWIG_Python_CallFunctor(destroy
, tmp
);
1426 PyCFunction meth
= PyCFunction_GET_FUNCTION(destroy
);
1427 PyObject
*mself
= PyCFunction_GET_SELF(destroy
);
1428 res
= ((*meth
)(mself
, v
));
1432 const char *name
= SWIG_TypePrettyName(ty
);
1433 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1434 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name
);
1442 SWIGRUNTIME PyObject
*
1443 PySwigObject_append(PyObject
* v
, PyObject
* next
)
1445 PySwigObject
*sobj
= (PySwigObject
*) v
;
1448 if (!PyArg_ParseTuple(next
,(char *)"O:append", &tmp
)) return NULL
;
1451 if (!PySwigObject_Check(next
)) {
1456 return SWIG_Py_Void();
1459 SWIGRUNTIME PyObject
*
1461 PySwigObject_next(PyObject
* v
)
1463 PySwigObject_next(PyObject
* v
, PyObject
*SWIGUNUSEDPARM(args
))
1466 PySwigObject
*sobj
= (PySwigObject
*) v
;
1468 Py_INCREF(sobj
->next
);
1471 return SWIG_Py_Void();
1475 SWIGINTERN PyObject
*
1477 PySwigObject_disown(PyObject
*v
)
1479 PySwigObject_disown(PyObject
* v
, PyObject
*SWIGUNUSEDPARM(args
))
1482 PySwigObject
*sobj
= (PySwigObject
*)v
;
1484 return SWIG_Py_Void();
1487 SWIGINTERN PyObject
*
1489 PySwigObject_acquire(PyObject
*v
)
1491 PySwigObject_acquire(PyObject
* v
, PyObject
*SWIGUNUSEDPARM(args
))
1494 PySwigObject
*sobj
= (PySwigObject
*)v
;
1495 sobj
->own
= SWIG_POINTER_OWN
;
1496 return SWIG_Py_Void();
1499 SWIGINTERN PyObject
*
1500 PySwigObject_own(PyObject
*v
, PyObject
*args
)
1503 #if (PY_VERSION_HEX < 0x02020000)
1504 if (!PyArg_ParseTuple(args
,(char *)"|O:own",&val
))
1506 if (!PyArg_UnpackTuple(args
, (char *)"own", 0, 1, &val
))
1513 PySwigObject
*sobj
= (PySwigObject
*)v
;
1514 PyObject
*obj
= PyBool_FromLong(sobj
->own
);
1517 if (PyObject_IsTrue(val
)) {
1518 PySwigObject_acquire(v
);
1520 PySwigObject_disown(v
);
1523 if (PyObject_IsTrue(val
)) {
1524 PySwigObject_acquire(v
,args
);
1526 PySwigObject_disown(v
,args
);
1536 swigobject_methods
[] = {
1537 {(char *)"disown", (PyCFunction
)PySwigObject_disown
, METH_NOARGS
, (char *)"releases ownership of the pointer"},
1538 {(char *)"acquire", (PyCFunction
)PySwigObject_acquire
, METH_NOARGS
, (char *)"aquires ownership of the pointer"},
1539 {(char *)"own", (PyCFunction
)PySwigObject_own
, METH_VARARGS
, (char *)"returns/sets ownership of the pointer"},
1540 {(char *)"append", (PyCFunction
)PySwigObject_append
, METH_O
, (char *)"appends another 'this' object"},
1541 {(char *)"next", (PyCFunction
)PySwigObject_next
, METH_NOARGS
, (char *)"returns the next 'this' object"},
1542 {(char *)"__repr__",(PyCFunction
)PySwigObject_repr
, METH_NOARGS
, (char *)"returns object representation"},
1547 swigobject_methods
[] = {
1548 {(char *)"disown", (PyCFunction
)PySwigObject_disown
, METH_VARARGS
, (char *)"releases ownership of the pointer"},
1549 {(char *)"acquire", (PyCFunction
)PySwigObject_acquire
, METH_VARARGS
, (char *)"aquires ownership of the pointer"},
1550 {(char *)"own", (PyCFunction
)PySwigObject_own
, METH_VARARGS
, (char *)"returns/sets ownership of the pointer"},
1551 {(char *)"append", (PyCFunction
)PySwigObject_append
, METH_VARARGS
, (char *)"appends another 'this' object"},
1552 {(char *)"next", (PyCFunction
)PySwigObject_next
, METH_VARARGS
, (char *)"returns the next 'this' object"},
1553 {(char *)"__repr__",(PyCFunction
)PySwigObject_repr
, METH_VARARGS
, (char *)"returns object representation"},
1558 #if PY_VERSION_HEX < 0x02020000
1559 SWIGINTERN PyObject
*
1560 PySwigObject_getattr(PySwigObject
*sobj
,char *name
)
1562 return Py_FindMethod(swigobject_methods
, (PyObject
*)sobj
, name
);
1566 SWIGRUNTIME PyTypeObject
*
1567 _PySwigObject_type(void) {
1568 static char swigobject_doc
[] = "Swig object carries a C/C++ instance pointer";
1570 static PyNumberMethods PySwigObject_as_number
= {
1571 (binaryfunc
)0, /*nb_add*/
1572 (binaryfunc
)0, /*nb_subtract*/
1573 (binaryfunc
)0, /*nb_multiply*/
1574 (binaryfunc
)0, /*nb_divide*/
1575 (binaryfunc
)0, /*nb_remainder*/
1576 (binaryfunc
)0, /*nb_divmod*/
1577 (ternaryfunc
)0,/*nb_power*/
1578 (unaryfunc
)0, /*nb_negative*/
1579 (unaryfunc
)0, /*nb_positive*/
1580 (unaryfunc
)0, /*nb_absolute*/
1581 (inquiry
)0, /*nb_nonzero*/
1588 (coercion
)0, /*nb_coerce*/
1589 (unaryfunc
)PySwigObject_long
, /*nb_int*/
1590 (unaryfunc
)PySwigObject_long
, /*nb_long*/
1591 (unaryfunc
)0, /*nb_float*/
1592 (unaryfunc
)PySwigObject_oct
, /*nb_oct*/
1593 (unaryfunc
)PySwigObject_hex
, /*nb_hex*/
1594 #if PY_VERSION_HEX >= 0x02020000
1595 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1596 #elif PY_VERSION_HEX >= 0x02000000
1597 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1601 static PyTypeObject pyswigobject_type
;
1602 static int type_init
= 0;
1604 const PyTypeObject tmp
1606 PyObject_HEAD_INIT(NULL
)
1608 (char *)"PySwigObject", /* tp_name */
1609 sizeof(PySwigObject
), /* tp_basicsize */
1610 0, /* tp_itemsize */
1611 (destructor
)PySwigObject_dealloc
, /* tp_dealloc */
1612 (printfunc
)PySwigObject_print
, /* tp_print */
1613 #if PY_VERSION_HEX < 0x02020000
1614 (getattrfunc
)PySwigObject_getattr
, /* tp_getattr */
1616 (getattrfunc
)0, /* tp_getattr */
1618 (setattrfunc
)0, /* tp_setattr */
1619 (cmpfunc
)PySwigObject_compare
, /* tp_compare */
1620 (reprfunc
)PySwigObject_repr
, /* tp_repr */
1621 &PySwigObject_as_number
, /* tp_as_number */
1622 0, /* tp_as_sequence */
1623 0, /* tp_as_mapping */
1624 (hashfunc
)0, /* tp_hash */
1625 (ternaryfunc
)0, /* tp_call */
1626 (reprfunc
)PySwigObject_str
, /* tp_str */
1627 PyObject_GenericGetAttr
, /* tp_getattro */
1628 0, /* tp_setattro */
1629 0, /* tp_as_buffer */
1630 Py_TPFLAGS_DEFAULT
, /* tp_flags */
1631 swigobject_doc
, /* tp_doc */
1632 0, /* tp_traverse */
1634 0, /* tp_richcompare */
1635 0, /* tp_weaklistoffset */
1636 #if PY_VERSION_HEX >= 0x02020000
1638 0, /* tp_iternext */
1639 swigobject_methods
, /* tp_methods */
1644 0, /* tp_descr_get */
1645 0, /* tp_descr_set */
1646 0, /* tp_dictoffset */
1655 0, /* tp_subclasses */
1656 0, /* tp_weaklist */
1658 #if PY_VERSION_HEX >= 0x02030000
1662 0,0,0,0 /* tp_alloc -> tp_next */
1665 pyswigobject_type
= tmp
;
1666 pyswigobject_type
.ob_type
= &PyType_Type
;
1669 return &pyswigobject_type
;
1672 SWIGRUNTIME PyObject
*
1673 PySwigObject_New(void *ptr
, swig_type_info
*ty
, int own
)
1675 PySwigObject
*sobj
= PyObject_NEW(PySwigObject
, PySwigObject_type());
1682 return (PyObject
*)sobj
;
1685 /* -----------------------------------------------------------------------------
1686 * Implements a simple Swig Packed type, and use it instead of string
1687 * ----------------------------------------------------------------------------- */
1697 PySwigPacked_print(PySwigPacked
*v
, FILE *fp
, int SWIGUNUSEDPARM(flags
))
1699 char result
[SWIG_BUFFER_SIZE
];
1700 fputs("<Swig Packed ", fp
);
1701 if (SWIG_PackDataName(result
, v
->pack
, v
->size
, 0, sizeof(result
))) {
1705 fputs(v
->ty
->name
,fp
);
1710 SWIGRUNTIME PyObject
*
1711 PySwigPacked_repr(PySwigPacked
*v
)
1713 char result
[SWIG_BUFFER_SIZE
];
1714 if (SWIG_PackDataName(result
, v
->pack
, v
->size
, 0, sizeof(result
))) {
1715 return PyString_FromFormat("<Swig Packed at %s%s>", result
, v
->ty
->name
);
1717 return PyString_FromFormat("<Swig Packed %s>", v
->ty
->name
);
1721 SWIGRUNTIME PyObject
*
1722 PySwigPacked_str(PySwigPacked
*v
)
1724 char result
[SWIG_BUFFER_SIZE
];
1725 if (SWIG_PackDataName(result
, v
->pack
, v
->size
, 0, sizeof(result
))){
1726 return PyString_FromFormat("%s%s", result
, v
->ty
->name
);
1728 return PyString_FromString(v
->ty
->name
);
1733 PySwigPacked_compare(PySwigPacked
*v
, PySwigPacked
*w
)
1737 int s
= (i
< j
) ? -1 : ((i
> j
) ? 1 : 0);
1738 return s
? s
: strncmp((char *)v
->pack
, (char *)w
->pack
, 2*v
->size
);
1741 SWIGRUNTIME PyTypeObject
* _PySwigPacked_type(void);
1743 SWIGRUNTIME PyTypeObject
*
1744 PySwigPacked_type(void) {
1745 static PyTypeObject
*SWIG_STATIC_POINTER(type
) = _PySwigPacked_type();
1749 SWIGRUNTIMEINLINE
int
1750 PySwigPacked_Check(PyObject
*op
) {
1751 return ((op
)->ob_type
== _PySwigPacked_type())
1752 || (strcmp((op
)->ob_type
->tp_name
,"PySwigPacked") == 0);
1756 PySwigPacked_dealloc(PyObject
*v
)
1758 if (PySwigPacked_Check(v
)) {
1759 PySwigPacked
*sobj
= (PySwigPacked
*) v
;
1765 SWIGRUNTIME PyTypeObject
*
1766 _PySwigPacked_type(void) {
1767 static char swigpacked_doc
[] = "Swig object carries a C/C++ instance pointer";
1768 static PyTypeObject pyswigpacked_type
;
1769 static int type_init
= 0;
1771 const PyTypeObject tmp
1773 PyObject_HEAD_INIT(NULL
)
1775 (char *)"PySwigPacked", /* tp_name */
1776 sizeof(PySwigPacked
), /* tp_basicsize */
1777 0, /* tp_itemsize */
1778 (destructor
)PySwigPacked_dealloc
, /* tp_dealloc */
1779 (printfunc
)PySwigPacked_print
, /* tp_print */
1780 (getattrfunc
)0, /* tp_getattr */
1781 (setattrfunc
)0, /* tp_setattr */
1782 (cmpfunc
)PySwigPacked_compare
, /* tp_compare */
1783 (reprfunc
)PySwigPacked_repr
, /* tp_repr */
1784 0, /* tp_as_number */
1785 0, /* tp_as_sequence */
1786 0, /* tp_as_mapping */
1787 (hashfunc
)0, /* tp_hash */
1788 (ternaryfunc
)0, /* tp_call */
1789 (reprfunc
)PySwigPacked_str
, /* tp_str */
1790 PyObject_GenericGetAttr
, /* tp_getattro */
1791 0, /* tp_setattro */
1792 0, /* tp_as_buffer */
1793 Py_TPFLAGS_DEFAULT
, /* tp_flags */
1794 swigpacked_doc
, /* tp_doc */
1795 0, /* tp_traverse */
1797 0, /* tp_richcompare */
1798 0, /* tp_weaklistoffset */
1799 #if PY_VERSION_HEX >= 0x02020000
1801 0, /* tp_iternext */
1807 0, /* tp_descr_get */
1808 0, /* tp_descr_set */
1809 0, /* tp_dictoffset */
1818 0, /* tp_subclasses */
1819 0, /* tp_weaklist */
1821 #if PY_VERSION_HEX >= 0x02030000
1825 0,0,0,0 /* tp_alloc -> tp_next */
1828 pyswigpacked_type
= tmp
;
1829 pyswigpacked_type
.ob_type
= &PyType_Type
;
1832 return &pyswigpacked_type
;
1835 SWIGRUNTIME PyObject
*
1836 PySwigPacked_New(void *ptr
, size_t size
, swig_type_info
*ty
)
1838 PySwigPacked
*sobj
= PyObject_NEW(PySwigPacked
, PySwigPacked_type());
1840 void *pack
= malloc(size
);
1842 memcpy(pack
, ptr
, size
);
1847 PyObject_DEL((PyObject
*) sobj
);
1851 return (PyObject
*) sobj
;
1854 SWIGRUNTIME swig_type_info
*
1855 PySwigPacked_UnpackData(PyObject
*obj
, void *ptr
, size_t size
)
1857 if (PySwigPacked_Check(obj
)) {
1858 PySwigPacked
*sobj
= (PySwigPacked
*)obj
;
1859 if (sobj
->size
!= size
) return 0;
1860 memcpy(ptr
, sobj
->pack
, size
);
1867 /* -----------------------------------------------------------------------------
1868 * pointers/data manipulation
1869 * ----------------------------------------------------------------------------- */
1871 SWIGRUNTIMEINLINE PyObject
*
1874 return PyString_FromString("this");
1877 SWIGRUNTIME PyObject
*
1880 static PyObject
*SWIG_STATIC_POINTER(swig_this
) = _SWIG_This();
1884 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1886 SWIGRUNTIME PySwigObject
*
1887 SWIG_Python_GetSwigThis(PyObject
*pyobj
)
1889 if (PySwigObject_Check(pyobj
)) {
1890 return (PySwigObject
*) pyobj
;
1893 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
1894 if (PyInstance_Check(pyobj
)) {
1895 obj
= _PyInstance_Lookup(pyobj
, SWIG_This());
1897 PyObject
**dictptr
= _PyObject_GetDictPtr(pyobj
);
1898 if (dictptr
!= NULL
) {
1899 PyObject
*dict
= *dictptr
;
1900 obj
= dict
? PyDict_GetItem(dict
, SWIG_This()) : 0;
1902 #ifdef PyWeakref_CheckProxy
1903 if (PyWeakref_CheckProxy(pyobj
)) {
1904 PyObject
*wobj
= PyWeakref_GET_OBJECT(pyobj
);
1905 return wobj
? SWIG_Python_GetSwigThis(wobj
) : 0;
1908 obj
= PyObject_GetAttr(pyobj
,SWIG_This());
1912 if (PyErr_Occurred()) PyErr_Clear();
1918 obj
= PyObject_GetAttr(pyobj
,SWIG_This());
1922 if (PyErr_Occurred()) PyErr_Clear();
1926 if (obj
&& !PySwigObject_Check(obj
)) {
1927 /* a PyObject is called 'this', try to get the 'real this'
1928 PySwigObject from it */
1929 return SWIG_Python_GetSwigThis(obj
);
1931 return (PySwigObject
*)obj
;
1935 /* Acquire a pointer value */
1938 SWIG_Python_AcquirePtr(PyObject
*obj
, int own
) {
1940 PySwigObject
*sobj
= SWIG_Python_GetSwigThis(obj
);
1942 int oldown
= sobj
->own
;
1950 /* Convert a pointer value */
1953 SWIG_Python_ConvertPtrAndOwn(PyObject
*obj
, void **ptr
, swig_type_info
*ty
, int flags
, int *own
) {
1954 if (!obj
) return SWIG_ERROR
;
1955 if (obj
== Py_None
) {
1959 PySwigObject
*sobj
= SWIG_Python_GetSwigThis(obj
);
1961 void *vptr
= sobj
->ptr
;
1963 swig_type_info
*to
= sobj
->ty
;
1965 /* no type cast needed */
1966 if (ptr
) *ptr
= vptr
;
1969 swig_cast_info
*tc
= SWIG_TypeCheck(to
->name
,ty
);
1971 sobj
= (PySwigObject
*)sobj
->next
;
1973 if (ptr
) *ptr
= SWIG_TypeCast(tc
,vptr
);
1978 if (ptr
) *ptr
= vptr
;
1983 if (own
) *own
= sobj
->own
;
1984 if (flags
& SWIG_POINTER_DISOWN
) {
1989 int res
= SWIG_ERROR
;
1990 if (flags
& SWIG_POINTER_IMPLICIT_CONV
) {
1991 PySwigClientData
*data
= ty
? (PySwigClientData
*) ty
->clientdata
: 0;
1992 if (data
&& !data
->implicitconv
) {
1993 PyObject
*klass
= data
->klass
;
1996 data
->implicitconv
= 1; /* avoid recursion and call 'explicit' constructors*/
1997 impconv
= SWIG_Python_CallFunctor(klass
, obj
);
1998 data
->implicitconv
= 0;
1999 if (PyErr_Occurred()) {
2004 PySwigObject
*iobj
= SWIG_Python_GetSwigThis(impconv
);
2007 res
= SWIG_Python_ConvertPtrAndOwn((PyObject
*)iobj
, &vptr
, ty
, 0, 0);
2008 if (SWIG_IsOK(res
)) {
2011 /* transfer the ownership to 'ptr' */
2013 res
= SWIG_AddCast(res
);
2014 res
= SWIG_AddNewMask(res
);
2016 res
= SWIG_AddCast(res
);
2030 /* Convert a function ptr value */
2033 SWIG_Python_ConvertFunctionPtr(PyObject
*obj
, void **ptr
, swig_type_info
*ty
) {
2034 if (!PyCFunction_Check(obj
)) {
2035 return SWIG_ConvertPtr(obj
, ptr
, ty
, 0);
2039 /* here we get the method pointer for callbacks */
2040 const char *doc
= (((PyCFunctionObject
*)obj
) -> m_ml
-> ml_doc
);
2041 const char *desc
= doc
? strstr(doc
, "swig_ptr: ") : 0;
2043 desc
= ty
? SWIG_UnpackVoidPtr(desc
+ 10, &vptr
, ty
->name
) : 0;
2044 if (!desc
) return SWIG_ERROR
;
2047 swig_cast_info
*tc
= SWIG_TypeCheck(desc
,ty
);
2048 if (!tc
) return SWIG_ERROR
;
2049 *ptr
= SWIG_TypeCast(tc
,vptr
);
2057 /* Convert a packed value value */
2060 SWIG_Python_ConvertPacked(PyObject
*obj
, void *ptr
, size_t sz
, swig_type_info
*ty
) {
2061 swig_type_info
*to
= PySwigPacked_UnpackData(obj
, ptr
, sz
);
2062 if (!to
) return SWIG_ERROR
;
2065 /* check type cast? */
2066 swig_cast_info
*tc
= SWIG_TypeCheck(to
->name
,ty
);
2067 if (!tc
) return SWIG_ERROR
;
2073 /* -----------------------------------------------------------------------------
2074 * Create a new pointer object
2075 * ----------------------------------------------------------------------------- */
2078 Create a new instance object, whitout calling __init__, and set the
2082 SWIGRUNTIME PyObject
*
2083 SWIG_Python_NewShadowInstance(PySwigClientData
*data
, PyObject
*swig_this
)
2085 #if (PY_VERSION_HEX >= 0x02020000)
2087 PyObject
*newraw
= data
->newraw
;
2089 inst
= PyObject_Call(newraw
, data
->newargs
, NULL
);
2091 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2092 PyObject
**dictptr
= _PyObject_GetDictPtr(inst
);
2093 if (dictptr
!= NULL
) {
2094 PyObject
*dict
= *dictptr
;
2096 dict
= PyDict_New();
2098 PyDict_SetItem(dict
, SWIG_This(), swig_this
);
2102 PyObject
*key
= SWIG_This();
2103 PyObject_SetAttr(inst
, key
, swig_this
);
2107 PyObject
*dict
= PyDict_New();
2108 PyDict_SetItem(dict
, SWIG_This(), swig_this
);
2109 inst
= PyInstance_NewRaw(data
->newargs
, dict
);
2114 #if (PY_VERSION_HEX >= 0x02010000)
2116 PyObject
*dict
= PyDict_New();
2117 PyDict_SetItem(dict
, SWIG_This(), swig_this
);
2118 inst
= PyInstance_NewRaw(data
->newargs
, dict
);
2120 return (PyObject
*) inst
;
2122 PyInstanceObject
*inst
= PyObject_NEW(PyInstanceObject
, &PyInstance_Type
);
2126 inst
->in_class
= (PyClassObject
*)data
->newargs
;
2127 Py_INCREF(inst
->in_class
);
2128 inst
->in_dict
= PyDict_New();
2129 if (inst
->in_dict
== NULL
) {
2133 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2134 inst
->in_weakreflist
= NULL
;
2136 #ifdef Py_TPFLAGS_GC
2137 PyObject_GC_Init(inst
);
2139 PyDict_SetItem(inst
->in_dict
, SWIG_This(), swig_this
);
2140 return (PyObject
*) inst
;
2146 SWIG_Python_SetSwigThis(PyObject
*inst
, PyObject
*swig_this
)
2149 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2150 PyObject
**dictptr
= _PyObject_GetDictPtr(inst
);
2151 if (dictptr
!= NULL
) {
2154 dict
= PyDict_New();
2157 PyDict_SetItem(dict
, SWIG_This(), swig_this
);
2161 dict
= PyObject_GetAttrString(inst
, (char*)"__dict__");
2162 PyDict_SetItem(dict
, SWIG_This(), swig_this
);
2167 SWIGINTERN PyObject
*
2168 SWIG_Python_InitShadowInstance(PyObject
*args
) {
2170 if (!SWIG_Python_UnpackTuple(args
,(char*)"swiginit", 2, 2, obj
)) {
2173 PySwigObject
*sthis
= SWIG_Python_GetSwigThis(obj
[0]);
2175 PySwigObject_append((PyObject
*) sthis
, obj
[1]);
2177 SWIG_Python_SetSwigThis(obj
[0], obj
[1]);
2179 return SWIG_Py_Void();
2183 /* Create a new pointer object */
2185 SWIGRUNTIME PyObject
*
2186 SWIG_Python_NewPointerObj(void *ptr
, swig_type_info
*type
, int flags
) {
2188 return SWIG_Py_Void();
2190 int own
= (flags
& SWIG_POINTER_OWN
) ? SWIG_POINTER_OWN
: 0;
2191 PyObject
*robj
= PySwigObject_New(ptr
, type
, own
);
2192 PySwigClientData
*clientdata
= type
? (PySwigClientData
*)(type
->clientdata
) : 0;
2193 if (clientdata
&& !(flags
& SWIG_POINTER_NOSHADOW
)) {
2194 PyObject
*inst
= SWIG_Python_NewShadowInstance(clientdata
, robj
);
2204 /* Create a new packed object */
2206 SWIGRUNTIMEINLINE PyObject
*
2207 SWIG_Python_NewPackedObj(void *ptr
, size_t sz
, swig_type_info
*type
) {
2208 return ptr
? PySwigPacked_New((void *) ptr
, sz
, type
) : SWIG_Py_Void();
2211 /* -----------------------------------------------------------------------------*
2213 * -----------------------------------------------------------------------------*/
2215 #ifdef SWIG_LINK_RUNTIME
2216 void *SWIG_ReturnGlobalTypeList(void *);
2219 SWIGRUNTIME swig_module_info
*
2220 SWIG_Python_GetModule(void) {
2221 static void *type_pointer
= (void *)0;
2222 /* first check if module already created */
2223 if (!type_pointer
) {
2224 #ifdef SWIG_LINK_RUNTIME
2225 type_pointer
= SWIG_ReturnGlobalTypeList((void *)0);
2227 type_pointer
= PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION
,
2228 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME
);
2229 if (PyErr_Occurred()) {
2231 type_pointer
= (void *)0;
2235 return (swig_module_info
*) type_pointer
;
2238 #if PY_MAJOR_VERSION < 2
2239 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2240 is copied out of Python/modsupport.c in python version 2.3.4 */
2242 PyModule_AddObject(PyObject
*m
, char *name
, PyObject
*o
)
2245 if (!PyModule_Check(m
)) {
2246 PyErr_SetString(PyExc_TypeError
,
2247 "PyModule_AddObject() needs module as first arg");
2251 PyErr_SetString(PyExc_TypeError
,
2252 "PyModule_AddObject() needs non-NULL value");
2256 dict
= PyModule_GetDict(m
);
2258 /* Internal error -- modules must have a dict! */
2259 PyErr_Format(PyExc_SystemError
, "module '%s' has no __dict__",
2260 PyModule_GetName(m
));
2263 if (PyDict_SetItemString(dict
, name
, o
))
2271 SWIG_Python_DestroyModule(void *vptr
)
2273 swig_module_info
*swig_module
= (swig_module_info
*) vptr
;
2274 swig_type_info
**types
= swig_module
->types
;
2276 for (i
=0; i
< swig_module
->size
; ++i
) {
2277 swig_type_info
*ty
= types
[i
];
2279 PySwigClientData
*data
= (PySwigClientData
*) ty
->clientdata
;
2280 if (data
) PySwigClientData_Del(data
);
2283 Py_DECREF(SWIG_This());
2287 SWIG_Python_SetModule(swig_module_info
*swig_module
) {
2288 static PyMethodDef swig_empty_runtime_method_table
[] = { {NULL
, NULL
, 0, NULL
} };/* Sentinel */
2290 PyObject
*module
= Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION
,
2291 swig_empty_runtime_method_table
);
2292 PyObject
*pointer
= PyCObject_FromVoidPtr((void *) swig_module
, SWIG_Python_DestroyModule
);
2293 if (pointer
&& module
) {
2294 PyModule_AddObject(module
, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME
, pointer
);
2296 Py_XDECREF(pointer
);
2300 /* The python cached type query */
2301 SWIGRUNTIME PyObject
*
2302 SWIG_Python_TypeCache(void) {
2303 static PyObject
*SWIG_STATIC_POINTER(cache
) = PyDict_New();
2307 SWIGRUNTIME swig_type_info
*
2308 SWIG_Python_TypeQuery(const char *type
)
2310 PyObject
*cache
= SWIG_Python_TypeCache();
2311 PyObject
*key
= PyString_FromString(type
);
2312 PyObject
*obj
= PyDict_GetItem(cache
, key
);
2313 swig_type_info
*descriptor
;
2315 descriptor
= (swig_type_info
*) PyCObject_AsVoidPtr(obj
);
2317 swig_module_info
*swig_module
= SWIG_Python_GetModule();
2318 descriptor
= SWIG_TypeQueryModule(swig_module
, swig_module
, type
);
2320 obj
= PyCObject_FromVoidPtr(descriptor
, NULL
);
2321 PyDict_SetItem(cache
, key
, obj
);
2330 For backward compatibility only
2332 #define SWIG_POINTER_EXCEPTION 0
2333 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2334 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2337 SWIG_Python_AddErrMesg(const char* mesg
, int infront
)
2339 if (PyErr_Occurred()) {
2341 PyObject
*value
= 0;
2342 PyObject
*traceback
= 0;
2343 PyErr_Fetch(&type
, &value
, &traceback
);
2345 PyObject
*old_str
= PyObject_Str(value
);
2349 PyErr_Format(type
, "%s %s", mesg
, PyString_AsString(old_str
));
2351 PyErr_Format(type
, "%s %s", PyString_AsString(old_str
), mesg
);
2362 SWIG_Python_ArgFail(int argnum
)
2364 if (PyErr_Occurred()) {
2365 /* add information about failing argument */
2367 PyOS_snprintf(mesg
, sizeof(mesg
), "argument number %d:", argnum
);
2368 return SWIG_Python_AddErrMesg(mesg
, 1);
2374 SWIGRUNTIMEINLINE
const char *
2375 PySwigObject_GetDesc(PyObject
*self
)
2377 PySwigObject
*v
= (PySwigObject
*)self
;
2378 swig_type_info
*ty
= v
? v
->ty
: 0;
2379 return ty
? ty
->str
: (char*)"";
2383 SWIG_Python_TypeError(const char *type
, PyObject
*obj
)
2386 #if defined(SWIG_COBJECT_TYPES)
2387 if (obj
&& PySwigObject_Check(obj
)) {
2388 const char *otype
= (const char *) PySwigObject_GetDesc(obj
);
2390 PyErr_Format(PyExc_TypeError
, "a '%s' is expected, 'PySwigObject(%s)' is received",
2397 const char *otype
= (obj
? obj
->ob_type
->tp_name
: 0);
2399 PyObject
*str
= PyObject_Str(obj
);
2400 const char *cstr
= str
? PyString_AsString(str
) : 0;
2402 PyErr_Format(PyExc_TypeError
, "a '%s' is expected, '%s(%s)' is received",
2405 PyErr_Format(PyExc_TypeError
, "a '%s' is expected, '%s' is received",
2412 PyErr_Format(PyExc_TypeError
, "a '%s' is expected", type
);
2414 PyErr_Format(PyExc_TypeError
, "unexpected type is received");
2419 /* Convert a pointer value, signal an exception on a type mismatch */
2421 SWIG_Python_MustGetPtr(PyObject
*obj
, swig_type_info
*ty
, int argnum
, int flags
) {
2423 if (SWIG_Python_ConvertPtr(obj
, &result
, ty
, flags
) == -1) {
2425 if (flags
& SWIG_POINTER_EXCEPTION
) {
2426 SWIG_Python_TypeError(SWIG_TypePrettyName(ty
), obj
);
2427 SWIG_Python_ArgFail(argnum
);
2443 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2445 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2449 /* -------- TYPES TABLE (BEGIN) -------- */
2451 #define SWIGTYPE_p_char swig_types[0]
2452 #define SWIGTYPE_p_netpgp_t swig_types[1]
2453 #define SWIGTYPE_p_p_char swig_types[2]
2454 #define SWIGTYPE_p_void swig_types[3]
2455 static swig_type_info
*swig_types
[5];
2456 static swig_module_info swig_module
= {swig_types
, 4, 0, 0, 0, 0};
2457 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2458 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2460 /* -------- TYPES TABLE (END) -------- */
2462 #if (PY_VERSION_HEX <= 0x02000000)
2463 # if !defined(SWIG_PYTHON_CLASSIC)
2464 # error "This python version requires swig to be run with the '-classic' option"
2468 /*-----------------------------------------------
2469 @(target):= _netpgppython.so
2470 ------------------------------------------------*/
2471 #define SWIG_init init_netpgppython
2473 #define SWIG_name "_netpgppython"
2475 #define SWIGVERSION 0x010331
2476 #define SWIG_VERSION SWIGVERSION
2479 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
2480 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
2490 # define LLONG_MIN LONG_LONG_MIN
2493 # define LLONG_MAX LONG_LONG_MAX
2496 # define ULLONG_MAX ULONG_LONG_MAX
2501 SWIG_AsVal_double (PyObject
*obj
, double *val
)
2503 int res
= SWIG_TypeError
;
2504 if (PyFloat_Check(obj
)) {
2505 if (val
) *val
= PyFloat_AsDouble(obj
);
2507 } else if (PyInt_Check(obj
)) {
2508 if (val
) *val
= PyInt_AsLong(obj
);
2510 } else if (PyLong_Check(obj
)) {
2511 double v
= PyLong_AsDouble(obj
);
2512 if (!PyErr_Occurred()) {
2519 #ifdef SWIG_PYTHON_CAST_MODE
2522 double d
= PyFloat_AsDouble(obj
);
2523 if (!PyErr_Occurred()) {
2525 return SWIG_AddCast(SWIG_OK
);
2530 long v
= PyLong_AsLong(obj
);
2531 if (!PyErr_Occurred()) {
2533 return SWIG_AddCast(SWIG_AddCast(SWIG_OK
));
2550 SWIGINTERNINLINE
int
2551 SWIG_CanCastAsInteger(double *d
, double min
, double max
) {
2553 if ((min
<= x
&& x
<= max
)) {
2554 double fx
= floor(x
);
2555 double cx
= ceil(x
);
2556 double rd
= ((x
- fx
) < 0.5) ? fx
: cx
; /* simple rint */
2557 if ((errno
== EDOM
) || (errno
== ERANGE
)) {
2560 double summ
, reps
, diff
;
2563 } else if (rd
> x
) {
2570 if (reps
< 8*DBL_EPSILON
) {
2581 SWIG_AsVal_unsigned_SS_long (PyObject
*obj
, unsigned long *val
)
2583 if (PyInt_Check(obj
)) {
2584 long v
= PyInt_AsLong(obj
);
2589 return SWIG_OverflowError
;
2591 } else if (PyLong_Check(obj
)) {
2592 unsigned long v
= PyLong_AsUnsignedLong(obj
);
2593 if (!PyErr_Occurred()) {
2600 #ifdef SWIG_PYTHON_CAST_MODE
2603 unsigned long v
= PyLong_AsUnsignedLong(obj
);
2604 if (!PyErr_Occurred()) {
2606 return SWIG_AddCast(SWIG_OK
);
2612 int res
= SWIG_AddCast(SWIG_AsVal_double (obj
,&d
));
2613 if (SWIG_IsOK(res
) && SWIG_CanCastAsInteger(&d
, 0, ULONG_MAX
)) {
2614 if (val
) *val
= (unsigned long)(d
);
2620 return SWIG_TypeError
;
2625 SWIG_AsVal_unsigned_SS_int (PyObject
* obj
, unsigned int *val
)
2628 int res
= SWIG_AsVal_unsigned_SS_long (obj
, &v
);
2629 if (SWIG_IsOK(res
)) {
2630 if ((v
> UINT_MAX
)) {
2631 return SWIG_OverflowError
;
2633 if (val
) *val
= (unsigned int)(v
);
2640 #define SWIG_From_long PyInt_FromLong
2643 SWIGINTERNINLINE PyObject
*
2644 SWIG_From_unsigned_SS_long (unsigned long value
)
2646 return (value
> LONG_MAX
) ?
2647 PyLong_FromUnsignedLong(value
) : PyInt_FromLong((long)(value
));
2651 SWIGINTERNINLINE PyObject
*
2652 SWIG_From_unsigned_SS_int (unsigned int value
)
2654 return SWIG_From_unsigned_SS_long (value
);
2658 SWIGINTERNINLINE PyObject
*
2659 SWIG_From_int (int value
)
2661 return SWIG_From_long (value
);
2665 SWIGINTERN swig_type_info
*
2666 SWIG_pchar_descriptor(void)
2668 static int init
= 0;
2669 static swig_type_info
* info
= 0;
2671 info
= SWIG_TypeQuery("_p_char");
2679 SWIG_AsCharPtrAndSize(PyObject
*obj
, char** cptr
, size_t* psize
, int *alloc
)
2681 if (PyString_Check(obj
)) {
2682 char *cstr
; Py_ssize_t len
;
2683 PyString_AsStringAndSize(obj
, &cstr
, &len
);
2687 In python the user should not be able to modify the inner
2688 string representation. To warranty that, if you define
2689 SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
2690 buffer is always returned.
2692 The default behavior is just to return the pointer value,
2695 #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
2696 if (*alloc
!= SWIG_OLDOBJ
)
2698 if (*alloc
== SWIG_NEWOBJ
)
2701 *cptr
= (char *)memcpy((char *)malloc((len
+ 1)*sizeof(char)), cstr
, sizeof(char)*(len
+ 1));
2702 *alloc
= SWIG_NEWOBJ
;
2706 *alloc
= SWIG_OLDOBJ
;
2709 *cptr
= PyString_AsString(obj
);
2712 if (psize
) *psize
= len
+ 1;
2715 swig_type_info
* pchar_descriptor
= SWIG_pchar_descriptor();
2716 if (pchar_descriptor
) {
2718 if (SWIG_ConvertPtr(obj
, &vptr
, pchar_descriptor
, 0) == SWIG_OK
) {
2719 if (cptr
) *cptr
= (char *) vptr
;
2720 if (psize
) *psize
= vptr
? (strlen((char *)vptr
) + 1) : 0;
2721 if (alloc
) *alloc
= SWIG_OLDOBJ
;
2726 return SWIG_TypeError
;
2733 SWIGINTERNINLINE PyObject
*
2734 SWIG_FromCharPtrAndSize(const char* carray
, size_t size
)
2737 if (size
> INT_MAX
) {
2738 swig_type_info
* pchar_descriptor
= SWIG_pchar_descriptor();
2739 return pchar_descriptor
?
2740 SWIG_NewPointerObj((char *)(carray
), pchar_descriptor
, 0) : SWIG_Py_Void();
2742 return PyString_FromStringAndSize(carray
, (int)(size
));
2745 return SWIG_Py_Void();
2750 SWIGINTERNINLINE PyObject
*
2751 SWIG_FromCharPtr(const char *cptr
)
2753 return SWIG_FromCharPtrAndSize(cptr
, (cptr
? strlen(cptr
) : 0));
2758 SWIG_AsVal_long (PyObject
*obj
, long* val
)
2760 if (PyInt_Check(obj
)) {
2761 if (val
) *val
= PyInt_AsLong(obj
);
2763 } else if (PyLong_Check(obj
)) {
2764 long v
= PyLong_AsLong(obj
);
2765 if (!PyErr_Occurred()) {
2772 #ifdef SWIG_PYTHON_CAST_MODE
2775 long v
= PyInt_AsLong(obj
);
2776 if (!PyErr_Occurred()) {
2778 return SWIG_AddCast(SWIG_OK
);
2784 int res
= SWIG_AddCast(SWIG_AsVal_double (obj
,&d
));
2785 if (SWIG_IsOK(res
) && SWIG_CanCastAsInteger(&d
, LONG_MIN
, LONG_MAX
)) {
2786 if (val
) *val
= (long)(d
);
2792 return SWIG_TypeError
;
2797 SWIG_AsVal_int (PyObject
* obj
, int *val
)
2800 int res
= SWIG_AsVal_long (obj
, &v
);
2801 if (SWIG_IsOK(res
)) {
2802 if ((v
< INT_MIN
|| v
> INT_MAX
)) {
2803 return SWIG_OverflowError
;
2805 if (val
) *val
= (int)(v
);
2812 SWIGINTERNINLINE
int
2813 SWIG_AsVal_size_t (PyObject
* obj
, size_t *val
)
2816 int res
= SWIG_AsVal_unsigned_SS_long (obj
, val
? &v
: 0);
2817 if (SWIG_IsOK(res
) && val
) *val
= (size_t)(v
);
2824 SWIGINTERN PyObject
*_wrap_netpgp_t_c_set(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
2825 PyObject
*resultobj
= 0;
2826 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2832 PyObject
* obj0
= 0 ;
2833 PyObject
* obj1
= 0 ;
2835 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_t_c_set",&obj0
,&obj1
)) SWIG_fail
;
2836 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2837 if (!SWIG_IsOK(res1
)) {
2838 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_c_set" "', argument " "1"" of type '" "netpgp_t *""'");
2840 arg1
= (netpgp_t
*)(argp1
);
2841 ecode2
= SWIG_AsVal_unsigned_SS_int(obj1
, &val2
);
2842 if (!SWIG_IsOK(ecode2
)) {
2843 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "netpgp_t_c_set" "', argument " "2"" of type '" "unsigned int""'");
2845 arg2
= (unsigned int)(val2
);
2846 if (arg1
) (arg1
)->c
= arg2
;
2848 resultobj
= SWIG_Py_Void();
2855 SWIGINTERN PyObject
*_wrap_netpgp_t_c_get(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
2856 PyObject
*resultobj
= 0;
2857 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2858 unsigned int result
;
2861 PyObject
* obj0
= 0 ;
2863 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_t_c_get",&obj0
)) SWIG_fail
;
2864 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2865 if (!SWIG_IsOK(res1
)) {
2866 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_c_get" "', argument " "1"" of type '" "netpgp_t *""'");
2868 arg1
= (netpgp_t
*)(argp1
);
2869 result
= (unsigned int) ((arg1
)->c
);
2870 resultobj
= SWIG_From_unsigned_SS_int((unsigned int)(result
));
2877 SWIGINTERN PyObject
*_wrap_netpgp_t_size_set(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
2878 PyObject
*resultobj
= 0;
2879 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2885 PyObject
* obj0
= 0 ;
2886 PyObject
* obj1
= 0 ;
2888 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_t_size_set",&obj0
,&obj1
)) SWIG_fail
;
2889 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2890 if (!SWIG_IsOK(res1
)) {
2891 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_size_set" "', argument " "1"" of type '" "netpgp_t *""'");
2893 arg1
= (netpgp_t
*)(argp1
);
2894 ecode2
= SWIG_AsVal_unsigned_SS_int(obj1
, &val2
);
2895 if (!SWIG_IsOK(ecode2
)) {
2896 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "netpgp_t_size_set" "', argument " "2"" of type '" "unsigned int""'");
2898 arg2
= (unsigned int)(val2
);
2899 if (arg1
) (arg1
)->size
= arg2
;
2901 resultobj
= SWIG_Py_Void();
2908 SWIGINTERN PyObject
*_wrap_netpgp_t_size_get(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
2909 PyObject
*resultobj
= 0;
2910 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2911 unsigned int result
;
2914 PyObject
* obj0
= 0 ;
2916 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_t_size_get",&obj0
)) SWIG_fail
;
2917 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2918 if (!SWIG_IsOK(res1
)) {
2919 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_size_get" "', argument " "1"" of type '" "netpgp_t *""'");
2921 arg1
= (netpgp_t
*)(argp1
);
2922 result
= (unsigned int) ((arg1
)->size
);
2923 resultobj
= SWIG_From_unsigned_SS_int((unsigned int)(result
));
2930 SWIGINTERN PyObject
*_wrap_netpgp_t_name_set(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
2931 PyObject
*resultobj
= 0;
2932 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2933 char **arg2
= (char **) 0 ;
2938 PyObject
* obj0
= 0 ;
2939 PyObject
* obj1
= 0 ;
2941 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_t_name_set",&obj0
,&obj1
)) SWIG_fail
;
2942 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2943 if (!SWIG_IsOK(res1
)) {
2944 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_name_set" "', argument " "1"" of type '" "netpgp_t *""'");
2946 arg1
= (netpgp_t
*)(argp1
);
2947 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_p_char
, 0 | 0 );
2948 if (!SWIG_IsOK(res2
)) {
2949 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_name_set" "', argument " "2"" of type '" "char **""'");
2951 arg2
= (char **)(argp2
);
2952 if (arg1
) (arg1
)->name
= arg2
;
2954 resultobj
= SWIG_Py_Void();
2961 SWIGINTERN PyObject
*_wrap_netpgp_t_name_get(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
2962 PyObject
*resultobj
= 0;
2963 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2967 PyObject
* obj0
= 0 ;
2969 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_t_name_get",&obj0
)) SWIG_fail
;
2970 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2971 if (!SWIG_IsOK(res1
)) {
2972 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_name_get" "', argument " "1"" of type '" "netpgp_t *""'");
2974 arg1
= (netpgp_t
*)(argp1
);
2975 result
= (char **) ((arg1
)->name
);
2976 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_p_char
, 0 | 0 );
2983 SWIGINTERN PyObject
*_wrap_netpgp_t_value_set(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
2984 PyObject
*resultobj
= 0;
2985 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2986 char **arg2
= (char **) 0 ;
2991 PyObject
* obj0
= 0 ;
2992 PyObject
* obj1
= 0 ;
2994 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_t_value_set",&obj0
,&obj1
)) SWIG_fail
;
2995 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2996 if (!SWIG_IsOK(res1
)) {
2997 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_value_set" "', argument " "1"" of type '" "netpgp_t *""'");
2999 arg1
= (netpgp_t
*)(argp1
);
3000 res2
= SWIG_ConvertPtr(obj1
, &argp2
,SWIGTYPE_p_p_char
, 0 | 0 );
3001 if (!SWIG_IsOK(res2
)) {
3002 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_value_set" "', argument " "2"" of type '" "char **""'");
3004 arg2
= (char **)(argp2
);
3005 if (arg1
) (arg1
)->value
= arg2
;
3007 resultobj
= SWIG_Py_Void();
3014 SWIGINTERN PyObject
*_wrap_netpgp_t_value_get(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3015 PyObject
*resultobj
= 0;
3016 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3020 PyObject
* obj0
= 0 ;
3022 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_t_value_get",&obj0
)) SWIG_fail
;
3023 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3024 if (!SWIG_IsOK(res1
)) {
3025 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_value_get" "', argument " "1"" of type '" "netpgp_t *""'");
3027 arg1
= (netpgp_t
*)(argp1
);
3028 result
= (char **) ((arg1
)->value
);
3029 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_p_char
, 0 | 0 );
3036 SWIGINTERN PyObject
*_wrap_netpgp_t_pubring_set(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3037 PyObject
*resultobj
= 0;
3038 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3039 void *arg2
= (void *) 0 ;
3043 PyObject
* obj0
= 0 ;
3044 PyObject
* obj1
= 0 ;
3046 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_t_pubring_set",&obj0
,&obj1
)) SWIG_fail
;
3047 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3048 if (!SWIG_IsOK(res1
)) {
3049 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_pubring_set" "', argument " "1"" of type '" "netpgp_t *""'");
3051 arg1
= (netpgp_t
*)(argp1
);
3052 res2
= SWIG_ConvertPtr(obj1
,SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
3053 if (!SWIG_IsOK(res2
)) {
3054 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_pubring_set" "', argument " "2"" of type '" "void *""'");
3056 if (arg1
) (arg1
)->pubring
= arg2
;
3058 resultobj
= SWIG_Py_Void();
3065 SWIGINTERN PyObject
*_wrap_netpgp_t_pubring_get(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3066 PyObject
*resultobj
= 0;
3067 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3071 PyObject
* obj0
= 0 ;
3073 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_t_pubring_get",&obj0
)) SWIG_fail
;
3074 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3075 if (!SWIG_IsOK(res1
)) {
3076 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_pubring_get" "', argument " "1"" of type '" "netpgp_t *""'");
3078 arg1
= (netpgp_t
*)(argp1
);
3079 result
= (void *) ((arg1
)->pubring
);
3080 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_void
, 0 | 0 );
3087 SWIGINTERN PyObject
*_wrap_netpgp_t_secring_set(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3088 PyObject
*resultobj
= 0;
3089 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3090 void *arg2
= (void *) 0 ;
3094 PyObject
* obj0
= 0 ;
3095 PyObject
* obj1
= 0 ;
3097 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_t_secring_set",&obj0
,&obj1
)) SWIG_fail
;
3098 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3099 if (!SWIG_IsOK(res1
)) {
3100 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_secring_set" "', argument " "1"" of type '" "netpgp_t *""'");
3102 arg1
= (netpgp_t
*)(argp1
);
3103 res2
= SWIG_ConvertPtr(obj1
,SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
3104 if (!SWIG_IsOK(res2
)) {
3105 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_secring_set" "', argument " "2"" of type '" "void *""'");
3107 if (arg1
) (arg1
)->secring
= arg2
;
3109 resultobj
= SWIG_Py_Void();
3116 SWIGINTERN PyObject
*_wrap_netpgp_t_secring_get(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3117 PyObject
*resultobj
= 0;
3118 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3122 PyObject
* obj0
= 0 ;
3124 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_t_secring_get",&obj0
)) SWIG_fail
;
3125 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3126 if (!SWIG_IsOK(res1
)) {
3127 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_secring_get" "', argument " "1"" of type '" "netpgp_t *""'");
3129 arg1
= (netpgp_t
*)(argp1
);
3130 result
= (void *) ((arg1
)->secring
);
3131 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_void
, 0 | 0 );
3138 SWIGINTERN PyObject
*_wrap_netpgp_t_io_set(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3139 PyObject
*resultobj
= 0;
3140 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3141 void *arg2
= (void *) 0 ;
3145 PyObject
* obj0
= 0 ;
3146 PyObject
* obj1
= 0 ;
3148 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_t_io_set",&obj0
,&obj1
)) SWIG_fail
;
3149 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3150 if (!SWIG_IsOK(res1
)) {
3151 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_io_set" "', argument " "1"" of type '" "netpgp_t *""'");
3153 arg1
= (netpgp_t
*)(argp1
);
3154 res2
= SWIG_ConvertPtr(obj1
,SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
3155 if (!SWIG_IsOK(res2
)) {
3156 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_io_set" "', argument " "2"" of type '" "void *""'");
3158 if (arg1
) (arg1
)->io
= arg2
;
3160 resultobj
= SWIG_Py_Void();
3167 SWIGINTERN PyObject
*_wrap_netpgp_t_io_get(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3168 PyObject
*resultobj
= 0;
3169 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3173 PyObject
* obj0
= 0 ;
3175 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_t_io_get",&obj0
)) SWIG_fail
;
3176 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3177 if (!SWIG_IsOK(res1
)) {
3178 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_io_get" "', argument " "1"" of type '" "netpgp_t *""'");
3180 arg1
= (netpgp_t
*)(argp1
);
3181 result
= (void *) ((arg1
)->io
);
3182 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_void
, 0 | 0 );
3189 SWIGINTERN PyObject
*_wrap_netpgp_t_passfp_set(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3190 PyObject
*resultobj
= 0;
3191 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3192 void *arg2
= (void *) 0 ;
3196 PyObject
* obj0
= 0 ;
3197 PyObject
* obj1
= 0 ;
3199 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_t_passfp_set",&obj0
,&obj1
)) SWIG_fail
;
3200 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3201 if (!SWIG_IsOK(res1
)) {
3202 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_passfp_set" "', argument " "1"" of type '" "netpgp_t *""'");
3204 arg1
= (netpgp_t
*)(argp1
);
3205 res2
= SWIG_ConvertPtr(obj1
,SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
3206 if (!SWIG_IsOK(res2
)) {
3207 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_passfp_set" "', argument " "2"" of type '" "void *""'");
3209 if (arg1
) (arg1
)->passfp
= arg2
;
3211 resultobj
= SWIG_Py_Void();
3218 SWIGINTERN PyObject
*_wrap_netpgp_t_passfp_get(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3219 PyObject
*resultobj
= 0;
3220 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3224 PyObject
* obj0
= 0 ;
3226 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_t_passfp_get",&obj0
)) SWIG_fail
;
3227 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3228 if (!SWIG_IsOK(res1
)) {
3229 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_passfp_get" "', argument " "1"" of type '" "netpgp_t *""'");
3231 arg1
= (netpgp_t
*)(argp1
);
3232 result
= (void *) ((arg1
)->passfp
);
3233 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_void
, 0 | 0 );
3240 SWIGINTERN PyObject
*_wrap_new_netpgp_t(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3241 PyObject
*resultobj
= 0;
3242 netpgp_t
*result
= 0 ;
3244 if (!PyArg_ParseTuple(args
,(char *)":new_netpgp_t")) SWIG_fail
;
3245 result
= (netpgp_t
*)(netpgp_t
*) calloc(1, sizeof(netpgp_t
));
3246 resultobj
= SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_netpgp_t
, SWIG_POINTER_NEW
| 0 );
3253 SWIGINTERN PyObject
*_wrap_delete_netpgp_t(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3254 PyObject
*resultobj
= 0;
3255 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3258 PyObject
* obj0
= 0 ;
3260 if (!PyArg_ParseTuple(args
,(char *)"O:delete_netpgp_t",&obj0
)) SWIG_fail
;
3261 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, SWIG_POINTER_DISOWN
| 0 );
3262 if (!SWIG_IsOK(res1
)) {
3263 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_netpgp_t" "', argument " "1"" of type '" "netpgp_t *""'");
3265 arg1
= (netpgp_t
*)(argp1
);
3266 free((char *) arg1
);
3268 resultobj
= SWIG_Py_Void();
3275 SWIGINTERN PyObject
*netpgp_t_swigregister(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3277 if (!PyArg_ParseTuple(args
,(char*)"O|swigregister", &obj
)) return NULL
;
3278 SWIG_TypeNewClientData(SWIGTYPE_p_netpgp_t
, SWIG_NewClientData(obj
));
3279 return SWIG_Py_Void();
3282 SWIGINTERN PyObject
*_wrap_netpgp_init(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3283 PyObject
*resultobj
= 0;
3284 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3288 PyObject
* obj0
= 0 ;
3290 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_init",&obj0
)) SWIG_fail
;
3291 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3292 if (!SWIG_IsOK(res1
)) {
3293 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_init" "', argument " "1"" of type '" "netpgp_t *""'");
3295 arg1
= (netpgp_t
*)(argp1
);
3296 result
= (int)netpgp_init(arg1
);
3297 resultobj
= SWIG_From_int((int)(result
));
3304 SWIGINTERN PyObject
*_wrap_netpgp_end(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3305 PyObject
*resultobj
= 0;
3306 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3310 PyObject
* obj0
= 0 ;
3312 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_end",&obj0
)) SWIG_fail
;
3313 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3314 if (!SWIG_IsOK(res1
)) {
3315 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_end" "', argument " "1"" of type '" "netpgp_t *""'");
3317 arg1
= (netpgp_t
*)(argp1
);
3318 result
= (int)netpgp_end(arg1
);
3319 resultobj
= SWIG_From_int((int)(result
));
3326 SWIGINTERN PyObject
*_wrap_netpgp_set_debug(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3327 PyObject
*resultobj
= 0;
3328 char *arg1
= (char *) 0 ;
3333 PyObject
* obj0
= 0 ;
3335 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_set_debug",&obj0
)) SWIG_fail
;
3336 res1
= SWIG_AsCharPtrAndSize(obj0
, &buf1
, NULL
, &alloc1
);
3337 if (!SWIG_IsOK(res1
)) {
3338 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_set_debug" "', argument " "1"" of type '" "char const *""'");
3340 arg1
= (char *)(buf1
);
3341 result
= (int)netpgp_set_debug((char const *)arg1
);
3342 resultobj
= SWIG_From_int((int)(result
));
3343 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
3346 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
3351 SWIGINTERN PyObject
*_wrap_netpgp_get_debug(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3352 PyObject
*resultobj
= 0;
3353 char *arg1
= (char *) 0 ;
3358 PyObject
* obj0
= 0 ;
3360 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_get_debug",&obj0
)) SWIG_fail
;
3361 res1
= SWIG_AsCharPtrAndSize(obj0
, &buf1
, NULL
, &alloc1
);
3362 if (!SWIG_IsOK(res1
)) {
3363 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_get_debug" "', argument " "1"" of type '" "char const *""'");
3365 arg1
= (char *)(buf1
);
3366 result
= (int)netpgp_get_debug((char const *)arg1
);
3367 resultobj
= SWIG_From_int((int)(result
));
3368 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
3371 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
3376 SWIGINTERN PyObject
*_wrap_netpgp_get_info(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3377 PyObject
*resultobj
= 0;
3378 char *arg1
= (char *) 0 ;
3383 PyObject
* obj0
= 0 ;
3385 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_get_info",&obj0
)) SWIG_fail
;
3386 res1
= SWIG_AsCharPtrAndSize(obj0
, &buf1
, NULL
, &alloc1
);
3387 if (!SWIG_IsOK(res1
)) {
3388 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_get_info" "', argument " "1"" of type '" "char const *""'");
3390 arg1
= (char *)(buf1
);
3391 result
= (char *)netpgp_get_info((char const *)arg1
);
3392 resultobj
= SWIG_FromCharPtr((const char *)result
);
3393 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
3396 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
3401 SWIGINTERN PyObject
*_wrap_netpgp_list_packets(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3402 PyObject
*resultobj
= 0;
3403 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3404 char *arg2
= (char *) 0 ;
3406 char *arg4
= (char *) 0 ;
3418 PyObject
* obj0
= 0 ;
3419 PyObject
* obj1
= 0 ;
3420 PyObject
* obj2
= 0 ;
3421 PyObject
* obj3
= 0 ;
3423 if (!PyArg_ParseTuple(args
,(char *)"OOOO:netpgp_list_packets",&obj0
,&obj1
,&obj2
,&obj3
)) SWIG_fail
;
3424 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3425 if (!SWIG_IsOK(res1
)) {
3426 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_list_packets" "', argument " "1"" of type '" "netpgp_t *""'");
3428 arg1
= (netpgp_t
*)(argp1
);
3429 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3430 if (!SWIG_IsOK(res2
)) {
3431 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_list_packets" "', argument " "2"" of type '" "char *""'");
3433 arg2
= (char *)(buf2
);
3434 ecode3
= SWIG_AsVal_int(obj2
, &val3
);
3435 if (!SWIG_IsOK(ecode3
)) {
3436 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "netpgp_list_packets" "', argument " "3"" of type '" "int""'");
3439 res4
= SWIG_AsCharPtrAndSize(obj3
, &buf4
, NULL
, &alloc4
);
3440 if (!SWIG_IsOK(res4
)) {
3441 SWIG_exception_fail(SWIG_ArgError(res4
), "in method '" "netpgp_list_packets" "', argument " "4"" of type '" "char *""'");
3443 arg4
= (char *)(buf4
);
3444 result
= (int)netpgp_list_packets(arg1
,arg2
,arg3
,arg4
);
3445 resultobj
= SWIG_From_int((int)(result
));
3446 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3447 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
3450 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3451 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
3456 SWIGINTERN PyObject
*_wrap_netpgp_setvar(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3457 PyObject
*resultobj
= 0;
3458 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3459 char *arg2
= (char *) 0 ;
3460 char *arg3
= (char *) 0 ;
3470 PyObject
* obj0
= 0 ;
3471 PyObject
* obj1
= 0 ;
3472 PyObject
* obj2
= 0 ;
3474 if (!PyArg_ParseTuple(args
,(char *)"OOO:netpgp_setvar",&obj0
,&obj1
,&obj2
)) SWIG_fail
;
3475 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3476 if (!SWIG_IsOK(res1
)) {
3477 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_setvar" "', argument " "1"" of type '" "netpgp_t *""'");
3479 arg1
= (netpgp_t
*)(argp1
);
3480 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3481 if (!SWIG_IsOK(res2
)) {
3482 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_setvar" "', argument " "2"" of type '" "char const *""'");
3484 arg2
= (char *)(buf2
);
3485 res3
= SWIG_AsCharPtrAndSize(obj2
, &buf3
, NULL
, &alloc3
);
3486 if (!SWIG_IsOK(res3
)) {
3487 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_setvar" "', argument " "3"" of type '" "char const *""'");
3489 arg3
= (char *)(buf3
);
3490 result
= (int)netpgp_setvar(arg1
,(char const *)arg2
,(char const *)arg3
);
3491 resultobj
= SWIG_From_int((int)(result
));
3492 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3493 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3496 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3497 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3502 SWIGINTERN PyObject
*_wrap_netpgp_getvar(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3503 PyObject
*resultobj
= 0;
3504 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3505 char *arg2
= (char *) 0 ;
3512 PyObject
* obj0
= 0 ;
3513 PyObject
* obj1
= 0 ;
3515 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_getvar",&obj0
,&obj1
)) SWIG_fail
;
3516 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3517 if (!SWIG_IsOK(res1
)) {
3518 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_getvar" "', argument " "1"" of type '" "netpgp_t *""'");
3520 arg1
= (netpgp_t
*)(argp1
);
3521 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3522 if (!SWIG_IsOK(res2
)) {
3523 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_getvar" "', argument " "2"" of type '" "char const *""'");
3525 arg2
= (char *)(buf2
);
3526 result
= (char *)netpgp_getvar(arg1
,(char const *)arg2
);
3527 resultobj
= SWIG_FromCharPtr((const char *)result
);
3528 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3531 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3536 SWIGINTERN PyObject
*_wrap_netpgp_list_keys(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3537 PyObject
*resultobj
= 0;
3538 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3542 PyObject
* obj0
= 0 ;
3544 if (!PyArg_ParseTuple(args
,(char *)"O:netpgp_list_keys",&obj0
)) SWIG_fail
;
3545 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3546 if (!SWIG_IsOK(res1
)) {
3547 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_list_keys" "', argument " "1"" of type '" "netpgp_t *""'");
3549 arg1
= (netpgp_t
*)(argp1
);
3550 result
= (int)netpgp_list_keys(arg1
);
3551 resultobj
= SWIG_From_int((int)(result
));
3558 SWIGINTERN PyObject
*_wrap_netpgp_list_sigs(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3559 PyObject
*resultobj
= 0;
3560 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3561 char *arg2
= (char *) 0 ;
3568 PyObject
* obj0
= 0 ;
3569 PyObject
* obj1
= 0 ;
3571 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_list_sigs",&obj0
,&obj1
)) SWIG_fail
;
3572 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3573 if (!SWIG_IsOK(res1
)) {
3574 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_list_sigs" "', argument " "1"" of type '" "netpgp_t *""'");
3576 arg1
= (netpgp_t
*)(argp1
);
3577 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3578 if (!SWIG_IsOK(res2
)) {
3579 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_list_sigs" "', argument " "2"" of type '" "char const *""'");
3581 arg2
= (char *)(buf2
);
3582 result
= (int)netpgp_list_sigs(arg1
,(char const *)arg2
);
3583 resultobj
= SWIG_From_int((int)(result
));
3584 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3587 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3592 SWIGINTERN PyObject
*_wrap_netpgp_find_key(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3593 PyObject
*resultobj
= 0;
3594 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3595 char *arg2
= (char *) 0 ;
3602 PyObject
* obj0
= 0 ;
3603 PyObject
* obj1
= 0 ;
3605 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_find_key",&obj0
,&obj1
)) SWIG_fail
;
3606 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3607 if (!SWIG_IsOK(res1
)) {
3608 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_find_key" "', argument " "1"" of type '" "netpgp_t *""'");
3610 arg1
= (netpgp_t
*)(argp1
);
3611 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3612 if (!SWIG_IsOK(res2
)) {
3613 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_find_key" "', argument " "2"" of type '" "char *""'");
3615 arg2
= (char *)(buf2
);
3616 result
= (int)netpgp_find_key(arg1
,arg2
);
3617 resultobj
= SWIG_From_int((int)(result
));
3618 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3621 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3626 SWIGINTERN PyObject
*_wrap_netpgp_get_key(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3627 PyObject
*resultobj
= 0;
3628 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3629 char *arg2
= (char *) 0 ;
3636 PyObject
* obj0
= 0 ;
3637 PyObject
* obj1
= 0 ;
3639 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_get_key",&obj0
,&obj1
)) SWIG_fail
;
3640 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3641 if (!SWIG_IsOK(res1
)) {
3642 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_get_key" "', argument " "1"" of type '" "netpgp_t *""'");
3644 arg1
= (netpgp_t
*)(argp1
);
3645 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3646 if (!SWIG_IsOK(res2
)) {
3647 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_get_key" "', argument " "2"" of type '" "char const *""'");
3649 arg2
= (char *)(buf2
);
3650 result
= (char *)netpgp_get_key(arg1
,(char const *)arg2
);
3651 resultobj
= SWIG_FromCharPtr((const char *)result
);
3652 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3655 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3660 SWIGINTERN PyObject
*_wrap_netpgp_export_key(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3661 PyObject
*resultobj
= 0;
3662 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3663 char *arg2
= (char *) 0 ;
3670 PyObject
* obj0
= 0 ;
3671 PyObject
* obj1
= 0 ;
3673 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_export_key",&obj0
,&obj1
)) SWIG_fail
;
3674 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3675 if (!SWIG_IsOK(res1
)) {
3676 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_export_key" "', argument " "1"" of type '" "netpgp_t *""'");
3678 arg1
= (netpgp_t
*)(argp1
);
3679 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3680 if (!SWIG_IsOK(res2
)) {
3681 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_export_key" "', argument " "2"" of type '" "char *""'");
3683 arg2
= (char *)(buf2
);
3684 result
= (int)netpgp_export_key(arg1
,arg2
);
3685 resultobj
= SWIG_From_int((int)(result
));
3686 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3689 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3694 SWIGINTERN PyObject
*_wrap_netpgp_import_key(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3695 PyObject
*resultobj
= 0;
3696 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3697 char *arg2
= (char *) 0 ;
3704 PyObject
* obj0
= 0 ;
3705 PyObject
* obj1
= 0 ;
3707 if (!PyArg_ParseTuple(args
,(char *)"OO:netpgp_import_key",&obj0
,&obj1
)) SWIG_fail
;
3708 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3709 if (!SWIG_IsOK(res1
)) {
3710 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_import_key" "', argument " "1"" of type '" "netpgp_t *""'");
3712 arg1
= (netpgp_t
*)(argp1
);
3713 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3714 if (!SWIG_IsOK(res2
)) {
3715 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_import_key" "', argument " "2"" of type '" "char *""'");
3717 arg2
= (char *)(buf2
);
3718 result
= (int)netpgp_import_key(arg1
,arg2
);
3719 resultobj
= SWIG_From_int((int)(result
));
3720 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3723 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3728 SWIGINTERN PyObject
*_wrap_netpgp_generate_key(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3729 PyObject
*resultobj
= 0;
3730 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3731 char *arg2
= (char *) 0 ;
3741 PyObject
* obj0
= 0 ;
3742 PyObject
* obj1
= 0 ;
3743 PyObject
* obj2
= 0 ;
3745 if (!PyArg_ParseTuple(args
,(char *)"OOO:netpgp_generate_key",&obj0
,&obj1
,&obj2
)) SWIG_fail
;
3746 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3747 if (!SWIG_IsOK(res1
)) {
3748 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_generate_key" "', argument " "1"" of type '" "netpgp_t *""'");
3750 arg1
= (netpgp_t
*)(argp1
);
3751 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3752 if (!SWIG_IsOK(res2
)) {
3753 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_generate_key" "', argument " "2"" of type '" "char *""'");
3755 arg2
= (char *)(buf2
);
3756 ecode3
= SWIG_AsVal_int(obj2
, &val3
);
3757 if (!SWIG_IsOK(ecode3
)) {
3758 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "netpgp_generate_key" "', argument " "3"" of type '" "int""'");
3761 result
= (int)netpgp_generate_key(arg1
,arg2
,arg3
);
3762 resultobj
= SWIG_From_int((int)(result
));
3763 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3766 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3771 SWIGINTERN PyObject
*_wrap_netpgp_encrypt_file(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3772 PyObject
*resultobj
= 0;
3773 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3774 char *arg2
= (char *) 0 ;
3775 char *arg3
= (char *) 0 ;
3776 char *arg4
= (char *) 0 ;
3792 PyObject
* obj0
= 0 ;
3793 PyObject
* obj1
= 0 ;
3794 PyObject
* obj2
= 0 ;
3795 PyObject
* obj3
= 0 ;
3796 PyObject
* obj4
= 0 ;
3798 if (!PyArg_ParseTuple(args
,(char *)"OOOOO:netpgp_encrypt_file",&obj0
,&obj1
,&obj2
,&obj3
,&obj4
)) SWIG_fail
;
3799 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3800 if (!SWIG_IsOK(res1
)) {
3801 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_encrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
3803 arg1
= (netpgp_t
*)(argp1
);
3804 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3805 if (!SWIG_IsOK(res2
)) {
3806 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_encrypt_file" "', argument " "2"" of type '" "char const *""'");
3808 arg2
= (char *)(buf2
);
3809 res3
= SWIG_AsCharPtrAndSize(obj2
, &buf3
, NULL
, &alloc3
);
3810 if (!SWIG_IsOK(res3
)) {
3811 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_encrypt_file" "', argument " "3"" of type '" "char const *""'");
3813 arg3
= (char *)(buf3
);
3814 res4
= SWIG_AsCharPtrAndSize(obj3
, &buf4
, NULL
, &alloc4
);
3815 if (!SWIG_IsOK(res4
)) {
3816 SWIG_exception_fail(SWIG_ArgError(res4
), "in method '" "netpgp_encrypt_file" "', argument " "4"" of type '" "char *""'");
3818 arg4
= (char *)(buf4
);
3819 ecode5
= SWIG_AsVal_int(obj4
, &val5
);
3820 if (!SWIG_IsOK(ecode5
)) {
3821 SWIG_exception_fail(SWIG_ArgError(ecode5
), "in method '" "netpgp_encrypt_file" "', argument " "5"" of type '" "int""'");
3824 result
= (int)netpgp_encrypt_file(arg1
,(char const *)arg2
,(char const *)arg3
,arg4
,arg5
);
3825 resultobj
= SWIG_From_int((int)(result
));
3826 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3827 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3828 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
3831 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3832 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3833 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
3838 SWIGINTERN PyObject
*_wrap_netpgp_decrypt_file(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3839 PyObject
*resultobj
= 0;
3840 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3841 char *arg2
= (char *) 0 ;
3842 char *arg3
= (char *) 0 ;
3855 PyObject
* obj0
= 0 ;
3856 PyObject
* obj1
= 0 ;
3857 PyObject
* obj2
= 0 ;
3858 PyObject
* obj3
= 0 ;
3860 if (!PyArg_ParseTuple(args
,(char *)"OOOO:netpgp_decrypt_file",&obj0
,&obj1
,&obj2
,&obj3
)) SWIG_fail
;
3861 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3862 if (!SWIG_IsOK(res1
)) {
3863 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_decrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
3865 arg1
= (netpgp_t
*)(argp1
);
3866 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3867 if (!SWIG_IsOK(res2
)) {
3868 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_decrypt_file" "', argument " "2"" of type '" "char const *""'");
3870 arg2
= (char *)(buf2
);
3871 res3
= SWIG_AsCharPtrAndSize(obj2
, &buf3
, NULL
, &alloc3
);
3872 if (!SWIG_IsOK(res3
)) {
3873 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_decrypt_file" "', argument " "3"" of type '" "char *""'");
3875 arg3
= (char *)(buf3
);
3876 ecode4
= SWIG_AsVal_int(obj3
, &val4
);
3877 if (!SWIG_IsOK(ecode4
)) {
3878 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_decrypt_file" "', argument " "4"" of type '" "int""'");
3881 result
= (int)netpgp_decrypt_file(arg1
,(char const *)arg2
,arg3
,arg4
);
3882 resultobj
= SWIG_From_int((int)(result
));
3883 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3884 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3887 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3888 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3893 SWIGINTERN PyObject
*_wrap_netpgp_sign_file(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3894 PyObject
*resultobj
= 0;
3895 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3896 char *arg2
= (char *) 0 ;
3897 char *arg3
= (char *) 0 ;
3898 char *arg4
= (char *) 0 ;
3920 PyObject
* obj0
= 0 ;
3921 PyObject
* obj1
= 0 ;
3922 PyObject
* obj2
= 0 ;
3923 PyObject
* obj3
= 0 ;
3924 PyObject
* obj4
= 0 ;
3925 PyObject
* obj5
= 0 ;
3926 PyObject
* obj6
= 0 ;
3928 if (!PyArg_ParseTuple(args
,(char *)"OOOOOOO:netpgp_sign_file",&obj0
,&obj1
,&obj2
,&obj3
,&obj4
,&obj5
,&obj6
)) SWIG_fail
;
3929 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3930 if (!SWIG_IsOK(res1
)) {
3931 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_sign_file" "', argument " "1"" of type '" "netpgp_t *""'");
3933 arg1
= (netpgp_t
*)(argp1
);
3934 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
3935 if (!SWIG_IsOK(res2
)) {
3936 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_sign_file" "', argument " "2"" of type '" "char const *""'");
3938 arg2
= (char *)(buf2
);
3939 res3
= SWIG_AsCharPtrAndSize(obj2
, &buf3
, NULL
, &alloc3
);
3940 if (!SWIG_IsOK(res3
)) {
3941 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_sign_file" "', argument " "3"" of type '" "char const *""'");
3943 arg3
= (char *)(buf3
);
3944 res4
= SWIG_AsCharPtrAndSize(obj3
, &buf4
, NULL
, &alloc4
);
3945 if (!SWIG_IsOK(res4
)) {
3946 SWIG_exception_fail(SWIG_ArgError(res4
), "in method '" "netpgp_sign_file" "', argument " "4"" of type '" "char *""'");
3948 arg4
= (char *)(buf4
);
3949 ecode5
= SWIG_AsVal_int(obj4
, &val5
);
3950 if (!SWIG_IsOK(ecode5
)) {
3951 SWIG_exception_fail(SWIG_ArgError(ecode5
), "in method '" "netpgp_sign_file" "', argument " "5"" of type '" "int""'");
3954 ecode6
= SWIG_AsVal_int(obj5
, &val6
);
3955 if (!SWIG_IsOK(ecode6
)) {
3956 SWIG_exception_fail(SWIG_ArgError(ecode6
), "in method '" "netpgp_sign_file" "', argument " "6"" of type '" "int""'");
3959 ecode7
= SWIG_AsVal_int(obj6
, &val7
);
3960 if (!SWIG_IsOK(ecode7
)) {
3961 SWIG_exception_fail(SWIG_ArgError(ecode7
), "in method '" "netpgp_sign_file" "', argument " "7"" of type '" "int""'");
3964 result
= (int)netpgp_sign_file(arg1
,(char const *)arg2
,(char const *)arg3
,arg4
,arg5
,arg6
,arg7
);
3965 resultobj
= SWIG_From_int((int)(result
));
3966 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3967 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3968 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
3971 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3972 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3973 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
3978 SWIGINTERN PyObject
*_wrap_netpgp_verify_file(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
3979 PyObject
*resultobj
= 0;
3980 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3981 char *arg2
= (char *) 0 ;
3982 char *arg3
= (char *) 0 ;
3995 PyObject
* obj0
= 0 ;
3996 PyObject
* obj1
= 0 ;
3997 PyObject
* obj2
= 0 ;
3998 PyObject
* obj3
= 0 ;
4000 if (!PyArg_ParseTuple(args
,(char *)"OOOO:netpgp_verify_file",&obj0
,&obj1
,&obj2
,&obj3
)) SWIG_fail
;
4001 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
4002 if (!SWIG_IsOK(res1
)) {
4003 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_verify_file" "', argument " "1"" of type '" "netpgp_t *""'");
4005 arg1
= (netpgp_t
*)(argp1
);
4006 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
4007 if (!SWIG_IsOK(res2
)) {
4008 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_verify_file" "', argument " "2"" of type '" "char const *""'");
4010 arg2
= (char *)(buf2
);
4011 res3
= SWIG_AsCharPtrAndSize(obj2
, &buf3
, NULL
, &alloc3
);
4012 if (!SWIG_IsOK(res3
)) {
4013 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_verify_file" "', argument " "3"" of type '" "char const *""'");
4015 arg3
= (char *)(buf3
);
4016 ecode4
= SWIG_AsVal_int(obj3
, &val4
);
4017 if (!SWIG_IsOK(ecode4
)) {
4018 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_verify_file" "', argument " "4"" of type '" "int""'");
4021 result
= (int)netpgp_verify_file(arg1
,(char const *)arg2
,(char const *)arg3
,arg4
);
4022 resultobj
= SWIG_From_int((int)(result
));
4023 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
4024 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
4027 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
4028 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
4033 SWIGINTERN PyObject
*_wrap_netpgp_sign_memory(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4034 PyObject
*resultobj
= 0;
4035 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
4036 char *arg2
= (char *) 0 ;
4037 char *arg3
= (char *) 0 ;
4039 char *arg5
= (char *) 0 ;
4063 PyObject
* obj0
= 0 ;
4064 PyObject
* obj1
= 0 ;
4065 PyObject
* obj2
= 0 ;
4066 PyObject
* obj3
= 0 ;
4067 PyObject
* obj4
= 0 ;
4068 PyObject
* obj5
= 0 ;
4069 PyObject
* obj6
= 0 ;
4070 PyObject
* obj7
= 0 ;
4072 if (!PyArg_ParseTuple(args
,(char *)"OOOOOOOO:netpgp_sign_memory",&obj0
,&obj1
,&obj2
,&obj3
,&obj4
,&obj5
,&obj6
,&obj7
)) SWIG_fail
;
4073 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
4074 if (!SWIG_IsOK(res1
)) {
4075 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_sign_memory" "', argument " "1"" of type '" "netpgp_t *""'");
4077 arg1
= (netpgp_t
*)(argp1
);
4078 res2
= SWIG_AsCharPtrAndSize(obj1
, &buf2
, NULL
, &alloc2
);
4079 if (!SWIG_IsOK(res2
)) {
4080 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_sign_memory" "', argument " "2"" of type '" "char const *""'");
4082 arg2
= (char *)(buf2
);
4083 res3
= SWIG_AsCharPtrAndSize(obj2
, &buf3
, NULL
, &alloc3
);
4084 if (!SWIG_IsOK(res3
)) {
4085 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_sign_memory" "', argument " "3"" of type '" "char *""'");
4087 arg3
= (char *)(buf3
);
4088 ecode4
= SWIG_AsVal_size_t(obj3
, &val4
);
4089 if (!SWIG_IsOK(ecode4
)) {
4090 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_sign_memory" "', argument " "4"" of type '" "size_t""'");
4092 arg4
= (size_t)(val4
);
4093 res5
= SWIG_AsCharPtrAndSize(obj4
, &buf5
, NULL
, &alloc5
);
4094 if (!SWIG_IsOK(res5
)) {
4095 SWIG_exception_fail(SWIG_ArgError(res5
), "in method '" "netpgp_sign_memory" "', argument " "5"" of type '" "char *""'");
4097 arg5
= (char *)(buf5
);
4098 ecode6
= SWIG_AsVal_size_t(obj5
, &val6
);
4099 if (!SWIG_IsOK(ecode6
)) {
4100 SWIG_exception_fail(SWIG_ArgError(ecode6
), "in method '" "netpgp_sign_memory" "', argument " "6"" of type '" "size_t""'");
4102 arg6
= (size_t)(val6
);
4103 ecode7
= SWIG_AsVal_unsigned_SS_int(obj6
, &val7
);
4104 if (!SWIG_IsOK(ecode7
)) {
4105 SWIG_exception_fail(SWIG_ArgError(ecode7
), "in method '" "netpgp_sign_memory" "', argument " "7"" of type '" "unsigned int""'");
4107 arg7
= (unsigned int)(val7
);
4108 ecode8
= SWIG_AsVal_unsigned_SS_int(obj7
, &val8
);
4109 if (!SWIG_IsOK(ecode8
)) {
4110 SWIG_exception_fail(SWIG_ArgError(ecode8
), "in method '" "netpgp_sign_memory" "', argument " "8"" of type '" "unsigned int""'");
4112 arg8
= (unsigned int)(val8
);
4113 result
= (int)netpgp_sign_memory(arg1
,(char const *)arg2
,arg3
,arg4
,arg5
,arg6
,arg7
,arg8
);
4114 resultobj
= SWIG_From_int((int)(result
));
4115 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
4116 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
4117 if (alloc5
== SWIG_NEWOBJ
) free((char*)buf5
);
4120 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
4121 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
4122 if (alloc5
== SWIG_NEWOBJ
) free((char*)buf5
);
4127 SWIGINTERN PyObject
*_wrap_netpgp_verify_memory(PyObject
*SWIGUNUSEDPARM(self
), PyObject
*args
) {
4128 PyObject
*resultobj
= 0;
4129 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
4130 void *arg2
= (void *) 0 ;
4141 PyObject
* obj0
= 0 ;
4142 PyObject
* obj1
= 0 ;
4143 PyObject
* obj2
= 0 ;
4144 PyObject
* obj3
= 0 ;
4146 if (!PyArg_ParseTuple(args
,(char *)"OOOO:netpgp_verify_memory",&obj0
,&obj1
,&obj2
,&obj3
)) SWIG_fail
;
4147 res1
= SWIG_ConvertPtr(obj0
, &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
4148 if (!SWIG_IsOK(res1
)) {
4149 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_verify_memory" "', argument " "1"" of type '" "netpgp_t *""'");
4151 arg1
= (netpgp_t
*)(argp1
);
4152 res2
= SWIG_ConvertPtr(obj1
,SWIG_as_voidptrptr(&arg2
), 0, 0);
4153 if (!SWIG_IsOK(res2
)) {
4154 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_verify_memory" "', argument " "2"" of type '" "void const *""'");
4156 ecode3
= SWIG_AsVal_size_t(obj2
, &val3
);
4157 if (!SWIG_IsOK(ecode3
)) {
4158 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "netpgp_verify_memory" "', argument " "3"" of type '" "size_t""'");
4160 arg3
= (size_t)(val3
);
4161 ecode4
= SWIG_AsVal_int(obj3
, &val4
);
4162 if (!SWIG_IsOK(ecode4
)) {
4163 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_verify_memory" "', argument " "4"" of type '" "int""'");
4166 result
= (int)netpgp_verify_memory(arg1
,(void const *)arg2
,arg3
,arg4
);
4167 resultobj
= SWIG_From_int((int)(result
));
4174 static PyMethodDef SwigMethods
[] = {
4175 { (char *)"netpgp_t_c_set", _wrap_netpgp_t_c_set
, METH_VARARGS
, NULL
},
4176 { (char *)"netpgp_t_c_get", _wrap_netpgp_t_c_get
, METH_VARARGS
, NULL
},
4177 { (char *)"netpgp_t_size_set", _wrap_netpgp_t_size_set
, METH_VARARGS
, NULL
},
4178 { (char *)"netpgp_t_size_get", _wrap_netpgp_t_size_get
, METH_VARARGS
, NULL
},
4179 { (char *)"netpgp_t_name_set", _wrap_netpgp_t_name_set
, METH_VARARGS
, NULL
},
4180 { (char *)"netpgp_t_name_get", _wrap_netpgp_t_name_get
, METH_VARARGS
, NULL
},
4181 { (char *)"netpgp_t_value_set", _wrap_netpgp_t_value_set
, METH_VARARGS
, NULL
},
4182 { (char *)"netpgp_t_value_get", _wrap_netpgp_t_value_get
, METH_VARARGS
, NULL
},
4183 { (char *)"netpgp_t_pubring_set", _wrap_netpgp_t_pubring_set
, METH_VARARGS
, NULL
},
4184 { (char *)"netpgp_t_pubring_get", _wrap_netpgp_t_pubring_get
, METH_VARARGS
, NULL
},
4185 { (char *)"netpgp_t_secring_set", _wrap_netpgp_t_secring_set
, METH_VARARGS
, NULL
},
4186 { (char *)"netpgp_t_secring_get", _wrap_netpgp_t_secring_get
, METH_VARARGS
, NULL
},
4187 { (char *)"netpgp_t_io_set", _wrap_netpgp_t_io_set
, METH_VARARGS
, NULL
},
4188 { (char *)"netpgp_t_io_get", _wrap_netpgp_t_io_get
, METH_VARARGS
, NULL
},
4189 { (char *)"netpgp_t_passfp_set", _wrap_netpgp_t_passfp_set
, METH_VARARGS
, NULL
},
4190 { (char *)"netpgp_t_passfp_get", _wrap_netpgp_t_passfp_get
, METH_VARARGS
, NULL
},
4191 { (char *)"new_netpgp_t", _wrap_new_netpgp_t
, METH_VARARGS
, NULL
},
4192 { (char *)"delete_netpgp_t", _wrap_delete_netpgp_t
, METH_VARARGS
, NULL
},
4193 { (char *)"netpgp_t_swigregister", netpgp_t_swigregister
, METH_VARARGS
, NULL
},
4194 { (char *)"netpgp_init", _wrap_netpgp_init
, METH_VARARGS
, NULL
},
4195 { (char *)"netpgp_end", _wrap_netpgp_end
, METH_VARARGS
, NULL
},
4196 { (char *)"netpgp_set_debug", _wrap_netpgp_set_debug
, METH_VARARGS
, NULL
},
4197 { (char *)"netpgp_get_debug", _wrap_netpgp_get_debug
, METH_VARARGS
, NULL
},
4198 { (char *)"netpgp_get_info", _wrap_netpgp_get_info
, METH_VARARGS
, NULL
},
4199 { (char *)"netpgp_list_packets", _wrap_netpgp_list_packets
, METH_VARARGS
, NULL
},
4200 { (char *)"netpgp_setvar", _wrap_netpgp_setvar
, METH_VARARGS
, NULL
},
4201 { (char *)"netpgp_getvar", _wrap_netpgp_getvar
, METH_VARARGS
, NULL
},
4202 { (char *)"netpgp_list_keys", _wrap_netpgp_list_keys
, METH_VARARGS
, NULL
},
4203 { (char *)"netpgp_list_sigs", _wrap_netpgp_list_sigs
, METH_VARARGS
, NULL
},
4204 { (char *)"netpgp_find_key", _wrap_netpgp_find_key
, METH_VARARGS
, NULL
},
4205 { (char *)"netpgp_get_key", _wrap_netpgp_get_key
, METH_VARARGS
, NULL
},
4206 { (char *)"netpgp_export_key", _wrap_netpgp_export_key
, METH_VARARGS
, NULL
},
4207 { (char *)"netpgp_import_key", _wrap_netpgp_import_key
, METH_VARARGS
, NULL
},
4208 { (char *)"netpgp_generate_key", _wrap_netpgp_generate_key
, METH_VARARGS
, NULL
},
4209 { (char *)"netpgp_encrypt_file", _wrap_netpgp_encrypt_file
, METH_VARARGS
, NULL
},
4210 { (char *)"netpgp_decrypt_file", _wrap_netpgp_decrypt_file
, METH_VARARGS
, NULL
},
4211 { (char *)"netpgp_sign_file", _wrap_netpgp_sign_file
, METH_VARARGS
, NULL
},
4212 { (char *)"netpgp_verify_file", _wrap_netpgp_verify_file
, METH_VARARGS
, NULL
},
4213 { (char *)"netpgp_sign_memory", _wrap_netpgp_sign_memory
, METH_VARARGS
, NULL
},
4214 { (char *)"netpgp_verify_memory", _wrap_netpgp_verify_memory
, METH_VARARGS
, NULL
},
4215 { NULL
, NULL
, 0, NULL
}
4219 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
4221 static swig_type_info _swigt__p_char
= {"_p_char", "char *", 0, 0, (void*)0, 0};
4222 static swig_type_info _swigt__p_netpgp_t
= {"_p_netpgp_t", "struct netpgp_t *|netpgp_t *", 0, 0, (void*)0, 0};
4223 static swig_type_info _swigt__p_p_char
= {"_p_p_char", "char **", 0, 0, (void*)0, 0};
4224 static swig_type_info _swigt__p_void
= {"_p_void", "void *", 0, 0, (void*)0, 0};
4226 static swig_type_info
*swig_type_initial
[] = {
4228 &_swigt__p_netpgp_t
,
4233 static swig_cast_info _swigc__p_char
[] = { {&_swigt__p_char
, 0, 0, 0},{0, 0, 0, 0}};
4234 static swig_cast_info _swigc__p_netpgp_t
[] = { {&_swigt__p_netpgp_t
, 0, 0, 0},{0, 0, 0, 0}};
4235 static swig_cast_info _swigc__p_p_char
[] = { {&_swigt__p_p_char
, 0, 0, 0},{0, 0, 0, 0}};
4236 static swig_cast_info _swigc__p_void
[] = { {&_swigt__p_void
, 0, 0, 0},{0, 0, 0, 0}};
4238 static swig_cast_info
*swig_cast_initial
[] = {
4246 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
4248 static swig_const_info swig_const_table
[] = {
4249 {0, 0, 0, 0.0, 0, 0}};
4254 /* -----------------------------------------------------------------------------
4255 * Type initialization:
4256 * This problem is tough by the requirement that no dynamic
4257 * memory is used. Also, since swig_type_info structures store pointers to
4258 * swig_cast_info structures and swig_cast_info structures store pointers back
4259 * to swig_type_info structures, we need some lookup code at initialization.
4260 * The idea is that swig generates all the structures that are needed.
4261 * The runtime then collects these partially filled structures.
4262 * The SWIG_InitializeModule function takes these initial arrays out of
4263 * swig_module, and does all the lookup, filling in the swig_module.types
4264 * array with the correct data and linking the correct swig_cast_info
4265 * structures together.
4267 * The generated swig_type_info structures are assigned staticly to an initial
4268 * array. We just loop through that array, and handle each type individually.
4269 * First we lookup if this type has been already loaded, and if so, use the
4270 * loaded structure instead of the generated one. Then we have to fill in the
4271 * cast linked list. The cast data is initially stored in something like a
4272 * two-dimensional array. Each row corresponds to a type (there are the same
4273 * number of rows as there are in the swig_type_initial array). Each entry in
4274 * a column is one of the swig_cast_info structures for that type.
4275 * The cast_initial array is actually an array of arrays, because each row has
4276 * a variable number of columns. So to actually build the cast linked list,
4277 * we find the array of casts associated with the type, and loop through it
4278 * adding the casts to the list. The one last trick we need to do is making
4279 * sure the type pointer in the swig_cast_info struct is correct.
4281 * First off, we lookup the cast->type name to see if it is already loaded.
4282 * There are three cases to handle:
4283 * 1) If the cast->type has already been loaded AND the type we are adding
4284 * casting info to has not been loaded (it is in this module), THEN we
4285 * replace the cast->type pointer with the type pointer that has already
4287 * 2) If BOTH types (the one we are adding casting info to, and the
4288 * cast->type) are loaded, THEN the cast info has already been loaded by
4289 * the previous module so we just ignore it.
4290 * 3) Finally, if cast->type has not already been loaded, then we add that
4291 * swig_cast_info to the linked list (because the cast->type) pointer will
4293 * ----------------------------------------------------------------------------- */
4303 #define SWIGRUNTIME_DEBUG
4308 SWIG_InitializeModule(void *clientdata
) {
4310 swig_module_info
*module_head
, *iter
;
4313 clientdata
= clientdata
;
4315 /* check to see if the circular list has been setup, if not, set it up */
4316 if (swig_module
.next
==0) {
4317 /* Initialize the swig_module */
4318 swig_module
.type_initial
= swig_type_initial
;
4319 swig_module
.cast_initial
= swig_cast_initial
;
4320 swig_module
.next
= &swig_module
;
4323 /* Try and load any already created modules */
4324 module_head
= SWIG_GetModule(clientdata
);
4326 /* This is the first module loaded for this interpreter */
4327 /* so set the swig module into the interpreter */
4328 SWIG_SetModule(clientdata
, &swig_module
);
4329 module_head
= &swig_module
;
4331 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
4335 if (iter
==&swig_module
) {
4340 } while (iter
!= module_head
);
4342 /* if the is found in the list, then all is done and we may leave */
4344 /* otherwise we must add out module into the list */
4345 swig_module
.next
= module_head
->next
;
4346 module_head
->next
= &swig_module
;
4349 /* Now work on filling in swig_module.types */
4350 #ifdef SWIGRUNTIME_DEBUG
4351 printf("SWIG_InitializeModule: size %d\n", swig_module
.size
);
4353 for (i
= 0; i
< swig_module
.size
; ++i
) {
4354 swig_type_info
*type
= 0;
4355 swig_type_info
*ret
;
4356 swig_cast_info
*cast
;
4358 #ifdef SWIGRUNTIME_DEBUG
4359 printf("SWIG_InitializeModule: type %d %s\n", i
, swig_module
.type_initial
[i
]->name
);
4362 /* if there is another module already loaded */
4363 if (swig_module
.next
!= &swig_module
) {
4364 type
= SWIG_MangledTypeQueryModule(swig_module
.next
, &swig_module
, swig_module
.type_initial
[i
]->name
);
4367 /* Overwrite clientdata field */
4368 #ifdef SWIGRUNTIME_DEBUG
4369 printf("SWIG_InitializeModule: found type %s\n", type
->name
);
4371 if (swig_module
.type_initial
[i
]->clientdata
) {
4372 type
->clientdata
= swig_module
.type_initial
[i
]->clientdata
;
4373 #ifdef SWIGRUNTIME_DEBUG
4374 printf("SWIG_InitializeModule: found and overwrite type %s \n", type
->name
);
4378 type
= swig_module
.type_initial
[i
];
4381 /* Insert casting types */
4382 cast
= swig_module
.cast_initial
[i
];
4383 while (cast
->type
) {
4384 /* Don't need to add information already in the list */
4386 #ifdef SWIGRUNTIME_DEBUG
4387 printf("SWIG_InitializeModule: look cast %s\n", cast
->type
->name
);
4389 if (swig_module
.next
!= &swig_module
) {
4390 ret
= SWIG_MangledTypeQueryModule(swig_module
.next
, &swig_module
, cast
->type
->name
);
4391 #ifdef SWIGRUNTIME_DEBUG
4392 if (ret
) printf("SWIG_InitializeModule: found cast %s\n", ret
->name
);
4396 if (type
== swig_module
.type_initial
[i
]) {
4397 #ifdef SWIGRUNTIME_DEBUG
4398 printf("SWIG_InitializeModule: skip old type %s\n", ret
->name
);
4403 /* Check for casting already in the list */
4404 swig_cast_info
*ocast
= SWIG_TypeCheck(ret
->name
, type
);
4405 #ifdef SWIGRUNTIME_DEBUG
4406 if (ocast
) printf("SWIG_InitializeModule: skip old cast %s\n", ret
->name
);
4408 if (!ocast
) ret
= 0;
4413 #ifdef SWIGRUNTIME_DEBUG
4414 printf("SWIG_InitializeModule: adding cast %s\n", cast
->type
->name
);
4417 type
->cast
->prev
= cast
;
4418 cast
->next
= type
->cast
;
4424 /* Set entry in modules->types array equal to the type */
4425 swig_module
.types
[i
] = type
;
4427 swig_module
.types
[i
] = 0;
4429 #ifdef SWIGRUNTIME_DEBUG
4430 printf("**** SWIG_InitializeModule: Cast List ******\n");
4431 for (i
= 0; i
< swig_module
.size
; ++i
) {
4433 swig_cast_info
*cast
= swig_module
.cast_initial
[i
];
4434 printf("SWIG_InitializeModule: type %d %s\n", i
, swig_module
.type_initial
[i
]->name
);
4435 while (cast
->type
) {
4436 printf("SWIG_InitializeModule: cast type %s\n", cast
->type
->name
);
4440 printf("---- Total casts: %d\n",j
);
4442 printf("**** SWIG_InitializeModule: Cast List ******\n");
4446 /* This function will propagate the clientdata field of type to
4447 * any new swig_type_info structures that have been added into the list
4448 * of equivalent types. It is like calling
4449 * SWIG_TypeClientData(type, clientdata) a second time.
4452 SWIG_PropagateClientData(void) {
4454 swig_cast_info
*equiv
;
4455 static int init_run
= 0;
4457 if (init_run
) return;
4460 for (i
= 0; i
< swig_module
.size
; i
++) {
4461 if (swig_module
.types
[i
]->clientdata
) {
4462 equiv
= swig_module
.types
[i
]->cast
;
4464 if (!equiv
->converter
) {
4465 if (equiv
->type
&& !equiv
->type
->clientdata
)
4466 SWIG_TypeClientData(equiv
->type
, swig_module
.types
[i
]->clientdata
);
4468 equiv
= equiv
->next
;
4488 /* Python-specific SWIG API */
4489 #define SWIG_newvarlink() SWIG_Python_newvarlink()
4490 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
4491 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
4493 /* -----------------------------------------------------------------------------
4494 * global variable support code.
4495 * ----------------------------------------------------------------------------- */
4497 typedef struct swig_globalvar
{
4498 char *name
; /* Name of global variable */
4499 PyObject
*(*get_attr
)(void); /* Return the current value */
4500 int (*set_attr
)(PyObject
*); /* Set the value */
4501 struct swig_globalvar
*next
;
4504 typedef struct swig_varlinkobject
{
4506 swig_globalvar
*vars
;
4507 } swig_varlinkobject
;
4509 SWIGINTERN PyObject
*
4510 swig_varlink_repr(swig_varlinkobject
*SWIGUNUSEDPARM(v
)) {
4511 return PyString_FromString("<Swig global variables>");
4514 SWIGINTERN PyObject
*
4515 swig_varlink_str(swig_varlinkobject
*v
) {
4516 PyObject
*str
= PyString_FromString("(");
4517 swig_globalvar
*var
;
4518 for (var
= v
->vars
; var
; var
=var
->next
) {
4519 PyString_ConcatAndDel(&str
,PyString_FromString(var
->name
));
4520 if (var
->next
) PyString_ConcatAndDel(&str
,PyString_FromString(", "));
4522 PyString_ConcatAndDel(&str
,PyString_FromString(")"));
4527 swig_varlink_print(swig_varlinkobject
*v
, FILE *fp
, int SWIGUNUSEDPARM(flags
)) {
4528 PyObject
*str
= swig_varlink_str(v
);
4529 fprintf(fp
,"Swig global variables ");
4530 fprintf(fp
,"%s\n", PyString_AsString(str
));
4536 swig_varlink_dealloc(swig_varlinkobject
*v
) {
4537 swig_globalvar
*var
= v
->vars
;
4539 swig_globalvar
*n
= var
->next
;
4546 SWIGINTERN PyObject
*
4547 swig_varlink_getattr(swig_varlinkobject
*v
, char *n
) {
4548 PyObject
*res
= NULL
;
4549 swig_globalvar
*var
= v
->vars
;
4551 if (strcmp(var
->name
,n
) == 0) {
4552 res
= (*var
->get_attr
)();
4557 if (res
== NULL
&& !PyErr_Occurred()) {
4558 PyErr_SetString(PyExc_NameError
,"Unknown C global variable");
4564 swig_varlink_setattr(swig_varlinkobject
*v
, char *n
, PyObject
*p
) {
4566 swig_globalvar
*var
= v
->vars
;
4568 if (strcmp(var
->name
,n
) == 0) {
4569 res
= (*var
->set_attr
)(p
);
4574 if (res
== 1 && !PyErr_Occurred()) {
4575 PyErr_SetString(PyExc_NameError
,"Unknown C global variable");
4580 SWIGINTERN PyTypeObject
*
4581 swig_varlink_type(void) {
4582 static char varlink__doc__
[] = "Swig var link object";
4583 static PyTypeObject varlink_type
;
4584 static int type_init
= 0;
4586 const PyTypeObject tmp
4588 PyObject_HEAD_INIT(NULL
)
4589 0, /* Number of items in variable part (ob_size) */
4590 (char *)"swigvarlink", /* Type name (tp_name) */
4591 sizeof(swig_varlinkobject
), /* Basic size (tp_basicsize) */
4592 0, /* Itemsize (tp_itemsize) */
4593 (destructor
) swig_varlink_dealloc
, /* Deallocator (tp_dealloc) */
4594 (printfunc
) swig_varlink_print
, /* Print (tp_print) */
4595 (getattrfunc
) swig_varlink_getattr
, /* get attr (tp_getattr) */
4596 (setattrfunc
) swig_varlink_setattr
, /* Set attr (tp_setattr) */
4598 (reprfunc
) swig_varlink_repr
, /* tp_repr */
4599 0, /* tp_as_number */
4600 0, /* tp_as_sequence */
4601 0, /* tp_as_mapping */
4604 (reprfunc
)swig_varlink_str
, /* tp_str */
4605 0, /* tp_getattro */
4606 0, /* tp_setattro */
4607 0, /* tp_as_buffer */
4609 varlink__doc__
, /* tp_doc */
4610 0, /* tp_traverse */
4612 0, /* tp_richcompare */
4613 0, /* tp_weaklistoffset */
4614 #if PY_VERSION_HEX >= 0x02020000
4615 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
4617 #if PY_VERSION_HEX >= 0x02030000
4621 0,0,0,0 /* tp_alloc -> tp_next */
4625 varlink_type
.ob_type
= &PyType_Type
;
4628 return &varlink_type
;
4631 /* Create a variable linking object for use later */
4632 SWIGINTERN PyObject
*
4633 SWIG_Python_newvarlink(void) {
4634 swig_varlinkobject
*result
= PyObject_NEW(swig_varlinkobject
, swig_varlink_type());
4638 return ((PyObject
*) result
);
4642 SWIG_Python_addvarlink(PyObject
*p
, char *name
, PyObject
*(*get_attr
)(void), int (*set_attr
)(PyObject
*p
)) {
4643 swig_varlinkobject
*v
= (swig_varlinkobject
*) p
;
4644 swig_globalvar
*gv
= (swig_globalvar
*) malloc(sizeof(swig_globalvar
));
4646 size_t size
= strlen(name
)+1;
4647 gv
->name
= (char *)malloc(size
);
4649 strncpy(gv
->name
,name
,size
);
4650 gv
->get_attr
= get_attr
;
4651 gv
->set_attr
= set_attr
;
4658 SWIGINTERN PyObject
*
4659 SWIG_globals(void) {
4660 static PyObject
*_SWIG_globals
= 0;
4661 if (!_SWIG_globals
) _SWIG_globals
= SWIG_newvarlink();
4662 return _SWIG_globals
;
4665 /* -----------------------------------------------------------------------------
4666 * constants/methods manipulation
4667 * ----------------------------------------------------------------------------- */
4669 /* Install Constants */
4671 SWIG_Python_InstallConstants(PyObject
*d
, swig_const_info constants
[]) {
4674 for (i
= 0; constants
[i
].type
; ++i
) {
4675 switch(constants
[i
].type
) {
4676 case SWIG_PY_POINTER
:
4677 obj
= SWIG_NewPointerObj(constants
[i
].pvalue
, *(constants
[i
]).ptype
,0);
4679 case SWIG_PY_BINARY
:
4680 obj
= SWIG_NewPackedObj(constants
[i
].pvalue
, constants
[i
].lvalue
, *(constants
[i
].ptype
));
4687 PyDict_SetItemString(d
, constants
[i
].name
, obj
);
4693 /* -----------------------------------------------------------------------------*/
4694 /* Fix SwigMethods to carry the callback ptrs when needed */
4695 /* -----------------------------------------------------------------------------*/
4698 SWIG_Python_FixMethods(PyMethodDef
*methods
,
4699 swig_const_info
*const_table
,
4700 swig_type_info
**types
,
4701 swig_type_info
**types_initial
) {
4703 for (i
= 0; methods
[i
].ml_name
; ++i
) {
4704 const char *c
= methods
[i
].ml_doc
;
4705 if (c
&& (c
= strstr(c
, "swig_ptr: "))) {
4707 swig_const_info
*ci
= 0;
4708 const char *name
= c
+ 10;
4709 for (j
= 0; const_table
[j
].type
; ++j
) {
4710 if (strncmp(const_table
[j
].name
, name
,
4711 strlen(const_table
[j
].name
)) == 0) {
4712 ci
= &(const_table
[j
]);
4717 size_t shift
= (ci
->ptype
) - types
;
4718 swig_type_info
*ty
= types_initial
[shift
];
4719 size_t ldoc
= (c
- methods
[i
].ml_doc
);
4720 size_t lptr
= strlen(ty
->name
)+2*sizeof(void*)+2;
4721 char *ndoc
= (char*)malloc(ldoc
+ lptr
+ 10);
4724 void *ptr
= (ci
->type
== SWIG_PY_POINTER
) ? ci
->pvalue
: 0;
4726 strncpy(buff
, methods
[i
].ml_doc
, ldoc
);
4728 strncpy(buff
, "swig_ptr: ", 10);
4730 SWIG_PackVoidPtr(buff
, ptr
, ty
->name
, lptr
);
4731 methods
[i
].ml_doc
= ndoc
;
4743 /* -----------------------------------------------------------------------------*
4744 * Partial Init method
4745 * -----------------------------------------------------------------------------*/
4750 SWIGEXPORT
void SWIG_init(void) {
4753 /* Fix SwigMethods to carry the callback ptrs when needed */
4754 SWIG_Python_FixMethods(SwigMethods
, swig_const_table
, swig_types
, swig_type_initial
);
4756 m
= Py_InitModule((char *) SWIG_name
, SwigMethods
);
4757 d
= PyModule_GetDict(m
);
4759 SWIG_InitializeModule(0);
4760 SWIG_InstallConstants(d
,swig_const_table
);