1251881Speter/* ----------------------------------------------------------------------------
2251881Speter * This file was automatically generated by SWIG (http://www.swig.org).
3251881Speter * Version 1.3.31
4251881Speter *
5251881Speter * This file is not intended to be easily readable and contains a number of
6251881Speter * coding conventions designed to improve portability and efficiency. Do not make
7251881Speter * changes to this file unless you know what you are doing--modify the SWIG
8251881Speter * interface file instead.
9251881Speter * ----------------------------------------------------------------------------- */
10251881Speter
11251881Speter#define SWIGPYTHON
12251881Speter#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
13251881Speter/* -----------------------------------------------------------------------------
14251881Speter *  This section contains generic SWIG labels for method/variable
15251881Speter *  declarations/attributes, and other compiler dependent labels.
16251881Speter * ----------------------------------------------------------------------------- */
17251881Speter
18251881Speter/* template workaround for compilers that cannot correctly implement the C++ standard */
19251881Speter#ifndef SWIGTEMPLATEDISAMBIGUATOR
20251881Speter# if defined(__SUNPRO_CC)
21251881Speter#   if (__SUNPRO_CC <= 0x560)
22251881Speter#     define SWIGTEMPLATEDISAMBIGUATOR template
23251881Speter#   else
24251881Speter#     define SWIGTEMPLATEDISAMBIGUATOR
25251881Speter#   endif
26251881Speter# else
27251881Speter#   define SWIGTEMPLATEDISAMBIGUATOR
28251881Speter# endif
29251881Speter#endif
30251881Speter
31251881Speter/* inline attribute */
32251881Speter#ifndef SWIGINLINE
33251881Speter# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
34251881Speter#   define SWIGINLINE inline
35251881Speter# else
36251881Speter#   define SWIGINLINE
37251881Speter# endif
38251881Speter#endif
39251881Speter
40251881Speter/* attribute recognised by some compilers to avoid 'unused' warnings */
41251881Speter#ifndef SWIGUNUSED
42251881Speter# if defined(__GNUC__)
43251881Speter#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
44251881Speter#     define SWIGUNUSED __attribute__ ((__unused__))
45251881Speter#   else
46251881Speter#     define SWIGUNUSED
47251881Speter#   endif
48251881Speter# elif defined(__ICC)
49251881Speter#   define SWIGUNUSED __attribute__ ((__unused__))
50251881Speter# else
51251881Speter#   define SWIGUNUSED
52251881Speter# endif
53251881Speter#endif
54251881Speter
55251881Speter#ifndef SWIGUNUSEDPARM
56251881Speter# ifdef __cplusplus
57251881Speter#   define SWIGUNUSEDPARM(p)
58251881Speter# else
59251881Speter#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
60251881Speter# endif
61251881Speter#endif
62251881Speter
63251881Speter/* internal SWIG method */
64251881Speter#ifndef SWIGINTERN
65251881Speter# define SWIGINTERN static SWIGUNUSED
66251881Speter#endif
67251881Speter
68251881Speter/* internal inline SWIG method */
69251881Speter#ifndef SWIGINTERNINLINE
70251881Speter# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
71251881Speter#endif
72251881Speter
73251881Speter/* exporting methods */
74251881Speter#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
75251881Speter#  ifndef GCC_HASCLASSVISIBILITY
76251881Speter#    define GCC_HASCLASSVISIBILITY
77251881Speter#  endif
78251881Speter#endif
79251881Speter
80251881Speter#ifndef SWIGEXPORT
81251881Speter# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
82251881Speter#   if defined(STATIC_LINKED)
83251881Speter#     define SWIGEXPORT
84251881Speter#   else
85251881Speter#     define SWIGEXPORT __declspec(dllexport)
86251881Speter#   endif
87251881Speter# else
88251881Speter#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
89251881Speter#     define SWIGEXPORT __attribute__ ((visibility("default")))
90251881Speter#   else
91251881Speter#     define SWIGEXPORT
92251881Speter#   endif
93251881Speter# endif
94251881Speter#endif
95251881Speter
96251881Speter/* calling conventions for Windows */
97251881Speter#ifndef SWIGSTDCALL
98251881Speter# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
99251881Speter#   define SWIGSTDCALL __stdcall
100251881Speter# else
101251881Speter#   define SWIGSTDCALL
102251881Speter# endif
103251881Speter#endif
104251881Speter
105251881Speter/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
106251881Speter#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
107251881Speter# define _CRT_SECURE_NO_DEPRECATE
108251881Speter#endif
109251881Speter
110251881Speter
111251881Speter/* Python.h has to appear first */
112251881Speter#include <Python.h>
113251881Speter
114251881Speter/* -----------------------------------------------------------------------------
115251881Speter * swigrun.swg
116251881Speter *
117251881Speter * This file contains generic CAPI SWIG runtime support for pointer
118251881Speter * type checking.
119251881Speter * ----------------------------------------------------------------------------- */
120251881Speter
121251881Speter/* This should only be incremented when either the layout of swig_type_info changes,
122251881Speter   or for whatever reason, the runtime changes incompatibly */
123251881Speter#define SWIG_RUNTIME_VERSION "3"
124251881Speter
125251881Speter/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
126251881Speter#ifdef SWIG_TYPE_TABLE
127251881Speter# define SWIG_QUOTE_STRING(x) #x
128251881Speter# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
129251881Speter# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
130251881Speter#else
131251881Speter# define SWIG_TYPE_TABLE_NAME
132251881Speter#endif
133251881Speter
134251881Speter/*
135251881Speter  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
136251881Speter  creating a static or dynamic library from the swig runtime code.
137251881Speter  In 99.9% of the cases, swig just needs to declare them as 'static'.
138251881Speter
139251881Speter  But only do this if is strictly necessary, ie, if you have problems
140251881Speter  with your compiler or so.
141251881Speter*/
142251881Speter
143251881Speter#ifndef SWIGRUNTIME
144251881Speter# define SWIGRUNTIME SWIGINTERN
145251881Speter#endif
146251881Speter
147251881Speter#ifndef SWIGRUNTIMEINLINE
148251881Speter# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
149251881Speter#endif
150251881Speter
151251881Speter/*  Generic buffer size */
152251881Speter#ifndef SWIG_BUFFER_SIZE
153251881Speter# define SWIG_BUFFER_SIZE 1024
154251881Speter#endif
155251881Speter
156251881Speter/* Flags for pointer conversions */
157251881Speter#define SWIG_POINTER_DISOWN        0x1
158251881Speter
159251881Speter/* Flags for new pointer objects */
160251881Speter#define SWIG_POINTER_OWN           0x1
161251881Speter
162251881Speter
163251881Speter/*
164251881Speter   Flags/methods for returning states.
165251881Speter
166251881Speter   The swig conversion methods, as ConvertPtr, return and integer
167251881Speter   that tells if the conversion was successful or not. And if not,
168251881Speter   an error code can be returned (see swigerrors.swg for the codes).
169251881Speter
170251881Speter   Use the following macros/flags to set or process the returning
171251881Speter   states.
172251881Speter
173251881Speter   In old swig versions, you usually write code as:
174251881Speter
175251881Speter     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
176251881Speter       // success code
177251881Speter     } else {
178251881Speter       //fail code
179251881Speter     }
180251881Speter
181251881Speter   Now you can be more explicit as:
182251881Speter
183251881Speter    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
184251881Speter    if (SWIG_IsOK(res)) {
185251881Speter      // success code
186251881Speter    } else {
187251881Speter      // fail code
188251881Speter    }
189251881Speter
190251881Speter   that seems to be the same, but now you can also do
191251881Speter
192251881Speter    Type *ptr;
193251881Speter    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
194251881Speter    if (SWIG_IsOK(res)) {
195251881Speter      // success code
196251881Speter      if (SWIG_IsNewObj(res) {
197251881Speter        ...
198251881Speter	delete *ptr;
199251881Speter      } else {
200251881Speter        ...
201251881Speter      }
202251881Speter    } else {
203251881Speter      // fail code
204251881Speter    }
205251881Speter
206251881Speter   I.e., now SWIG_ConvertPtr can return new objects and you can
207251881Speter   identify the case and take care of the deallocation. Of course that
208251881Speter   requires also to SWIG_ConvertPtr to return new result values, as
209251881Speter
210251881Speter      int SWIG_ConvertPtr(obj, ptr,...) {
211251881Speter        if (<obj is ok>) {
212251881Speter          if (<need new object>) {
213251881Speter            *ptr = <ptr to new allocated object>;
214251881Speter            return SWIG_NEWOBJ;
215251881Speter          } else {
216251881Speter            *ptr = <ptr to old object>;
217251881Speter            return SWIG_OLDOBJ;
218251881Speter          }
219251881Speter        } else {
220251881Speter          return SWIG_BADOBJ;
221251881Speter        }
222251881Speter      }
223251881Speter
224251881Speter   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
225251881Speter   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
226251881Speter   swig errors code.
227251881Speter
228251881Speter   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
229251881Speter   allows to return the 'cast rank', for example, if you have this
230251881Speter
231251881Speter       int food(double)
232251881Speter       int fooi(int);
233251881Speter
234251881Speter   and you call
235251881Speter
236251881Speter      food(1)   // cast rank '1'  (1 -> 1.0)
237251881Speter      fooi(1)   // cast rank '0'
238251881Speter
239251881Speter   just use the SWIG_AddCast()/SWIG_CheckState()
240251881Speter
241251881Speter
242251881Speter */
243251881Speter#define SWIG_OK                    (0)
244251881Speter#define SWIG_ERROR                 (-1)
245251881Speter#define SWIG_IsOK(r)               (r >= 0)
246251881Speter#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
247251881Speter
248251881Speter/* The CastRankLimit says how many bits are used for the cast rank */
249251881Speter#define SWIG_CASTRANKLIMIT         (1 << 8)
250251881Speter/* The NewMask denotes the object was created (using new/malloc) */
251251881Speter#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
252251881Speter/* The TmpMask is for in/out typemaps that use temporal objects */
253251881Speter#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
254251881Speter/* Simple returning values */
255251881Speter#define SWIG_BADOBJ                (SWIG_ERROR)
256251881Speter#define SWIG_OLDOBJ                (SWIG_OK)
257251881Speter#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
258251881Speter#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
259251881Speter/* Check, add and del mask methods */
260251881Speter#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
261251881Speter#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
262251881Speter#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
263251881Speter#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
264251881Speter#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
265251881Speter#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
266251881Speter
267251881Speter
268251881Speter/* Cast-Rank Mode */
269251881Speter#if defined(SWIG_CASTRANK_MODE)
270251881Speter#  ifndef SWIG_TypeRank
271251881Speter#    define SWIG_TypeRank             unsigned long
272251881Speter#  endif
273251881Speter#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
274251881Speter#    define SWIG_MAXCASTRANK          (2)
275251881Speter#  endif
276251881Speter#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
277251881Speter#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
278251881SpeterSWIGINTERNINLINE int SWIG_AddCast(int r) {
279251881Speter  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
280251881Speter}
281251881SpeterSWIGINTERNINLINE int SWIG_CheckState(int r) {
282251881Speter  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
283251881Speter}
284251881Speter#else /* no cast-rank mode */
285251881Speter#  define SWIG_AddCast
286251881Speter#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
287251881Speter#endif
288251881Speter
289251881Speter
290251881Speter
291251881Speter
292251881Speter#include <string.h>
293251881Speter
294251881Speter#ifdef __cplusplus
295251881Speterextern "C" {
296251881Speter#endif
297251881Speter
298251881Spetertypedef void *(*swig_converter_func)(void *);
299251881Spetertypedef struct swig_type_info *(*swig_dycast_func)(void **);
300251881Speter
301251881Speter/* Structure to store inforomation on one type */
302251881Spetertypedef struct swig_type_info {
303251881Speter  const char             *name;			/* mangled name of this type */
304251881Speter  const char             *str;			/* human readable name of this type */
305251881Speter  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
306251881Speter  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
307251881Speter  void                   *clientdata;		/* language specific type data */
308251881Speter  int                    owndata;		/* flag if the structure owns the clientdata */
309251881Speter} swig_type_info;
310251881Speter
311251881Speter/* Structure to store a type and conversion function used for casting */
312251881Spetertypedef struct swig_cast_info {
313251881Speter  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
314251881Speter  swig_converter_func     converter;		/* function to cast the void pointers */
315251881Speter  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
316251881Speter  struct swig_cast_info  *prev;			/* pointer to the previous cast */
317251881Speter} swig_cast_info;
318251881Speter
319251881Speter/* Structure used to store module information
320251881Speter * Each module generates one structure like this, and the runtime collects
321251881Speter * all of these structures and stores them in a circularly linked list.*/
322251881Spetertypedef struct swig_module_info {
323251881Speter  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
324251881Speter  size_t                 size;		        /* Number of types in this module */
325251881Speter  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
326251881Speter  swig_type_info         **type_initial;	/* Array of initially generated type structures */
327251881Speter  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
328251881Speter  void                    *clientdata;		/* Language specific module data */
329251881Speter} swig_module_info;
330251881Speter
331251881Speter/*
332251881Speter  Compare two type names skipping the space characters, therefore
333251881Speter  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
334251881Speter
335251881Speter  Return 0 when the two name types are equivalent, as in
336251881Speter  strncmp, but skipping ' '.
337251881Speter*/
338251881SpeterSWIGRUNTIME int
339251881SpeterSWIG_TypeNameComp(const char *f1, const char *l1,
340251881Speter		  const char *f2, const char *l2) {
341251881Speter  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
342251881Speter    while ((*f1 == ' ') && (f1 != l1)) ++f1;
343251881Speter    while ((*f2 == ' ') && (f2 != l2)) ++f2;
344251881Speter    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
345251881Speter  }
346251881Speter  return (l1 - f1) - (l2 - f2);
347251881Speter}
348251881Speter
349251881Speter/*
350251881Speter  Check type equivalence in a name list like <name1>|<name2>|...
351251881Speter  Return 0 if not equal, 1 if equal
352251881Speter*/
353251881SpeterSWIGRUNTIME int
354251881SpeterSWIG_TypeEquiv(const char *nb, const char *tb) {
355251881Speter  int equiv = 0;
356251881Speter  const char* te = tb + strlen(tb);
357251881Speter  const char* ne = nb;
358251881Speter  while (!equiv && *ne) {
359251881Speter    for (nb = ne; *ne; ++ne) {
360251881Speter      if (*ne == '|') break;
361251881Speter    }
362251881Speter    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
363251881Speter    if (*ne) ++ne;
364251881Speter  }
365251881Speter  return equiv;
366251881Speter}
367251881Speter
368251881Speter/*
369251881Speter  Check type equivalence in a name list like <name1>|<name2>|...
370251881Speter  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
371251881Speter*/
372251881SpeterSWIGRUNTIME int
373251881SpeterSWIG_TypeCompare(const char *nb, const char *tb) {
374251881Speter  int equiv = 0;
375251881Speter  const char* te = tb + strlen(tb);
376251881Speter  const char* ne = nb;
377251881Speter  while (!equiv && *ne) {
378251881Speter    for (nb = ne; *ne; ++ne) {
379251881Speter      if (*ne == '|') break;
380251881Speter    }
381251881Speter    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
382251881Speter    if (*ne) ++ne;
383251881Speter  }
384251881Speter  return equiv;
385251881Speter}
386251881Speter
387251881Speter
388251881Speter/* think of this as a c++ template<> or a scheme macro */
389251881Speter#define SWIG_TypeCheck_Template(comparison, ty)         \
390251881Speter  if (ty) {                                             \
391251881Speter    swig_cast_info *iter = ty->cast;                    \
392251881Speter    while (iter) {                                      \
393251881Speter      if (comparison) {                                 \
394251881Speter        if (iter == ty->cast) return iter;              \
395251881Speter        /* Move iter to the top of the linked list */   \
396251881Speter        iter->prev->next = iter->next;                  \
397251881Speter        if (iter->next)                                 \
398251881Speter          iter->next->prev = iter->prev;                \
399251881Speter        iter->next = ty->cast;                          \
400251881Speter        iter->prev = 0;                                 \
401251881Speter        if (ty->cast) ty->cast->prev = iter;            \
402251881Speter        ty->cast = iter;                                \
403251881Speter        return iter;                                    \
404251881Speter      }                                                 \
405251881Speter      iter = iter->next;                                \
406251881Speter    }                                                   \
407251881Speter  }                                                     \
408251881Speter  return 0
409251881Speter
410251881Speter/*
411251881Speter  Check the typename
412251881Speter*/
413251881SpeterSWIGRUNTIME swig_cast_info *
414251881SpeterSWIG_TypeCheck(const char *c, swig_type_info *ty) {
415251881Speter  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
416251881Speter}
417251881Speter
418251881Speter/* Same as previous function, except strcmp is replaced with a pointer comparison */
419251881SpeterSWIGRUNTIME swig_cast_info *
420251881SpeterSWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
421251881Speter  SWIG_TypeCheck_Template(iter->type == from, into);
422251881Speter}
423251881Speter
424251881Speter/*
425251881Speter  Cast a pointer up an inheritance hierarchy
426251881Speter*/
427251881SpeterSWIGRUNTIMEINLINE void *
428251881SpeterSWIG_TypeCast(swig_cast_info *ty, void *ptr) {
429251881Speter  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
430251881Speter}
431251881Speter
432251881Speter/*
433251881Speter   Dynamic pointer casting. Down an inheritance hierarchy
434251881Speter*/
435251881SpeterSWIGRUNTIME swig_type_info *
436251881SpeterSWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
437251881Speter  swig_type_info *lastty = ty;
438251881Speter  if (!ty || !ty->dcast) return ty;
439251881Speter  while (ty && (ty->dcast)) {
440251881Speter    ty = (*ty->dcast)(ptr);
441251881Speter    if (ty) lastty = ty;
442251881Speter  }
443251881Speter  return lastty;
444251881Speter}
445251881Speter
446251881Speter/*
447251881Speter  Return the name associated with this type
448251881Speter*/
449251881SpeterSWIGRUNTIMEINLINE const char *
450251881SpeterSWIG_TypeName(const swig_type_info *ty) {
451251881Speter  return ty->name;
452251881Speter}
453251881Speter
454251881Speter/*
455251881Speter  Return the pretty name associated with this type,
456251881Speter  that is an unmangled type name in a form presentable to the user.
457251881Speter*/
458251881SpeterSWIGRUNTIME const char *
459251881SpeterSWIG_TypePrettyName(const swig_type_info *type) {
460251881Speter  /* The "str" field contains the equivalent pretty names of the
461251881Speter     type, separated by vertical-bar characters.  We choose
462251881Speter     to print the last name, as it is often (?) the most
463251881Speter     specific. */
464251881Speter  if (!type) return NULL;
465251881Speter  if (type->str != NULL) {
466251881Speter    const char *last_name = type->str;
467251881Speter    const char *s;
468251881Speter    for (s = type->str; *s; s++)
469251881Speter      if (*s == '|') last_name = s+1;
470251881Speter    return last_name;
471251881Speter  }
472251881Speter  else
473251881Speter    return type->name;
474251881Speter}
475251881Speter
476251881Speter/*
477251881Speter   Set the clientdata field for a type
478251881Speter*/
479251881SpeterSWIGRUNTIME void
480251881SpeterSWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
481251881Speter  swig_cast_info *cast = ti->cast;
482251881Speter  /* if (ti->clientdata == clientdata) return; */
483251881Speter  ti->clientdata = clientdata;
484251881Speter
485251881Speter  while (cast) {
486251881Speter    if (!cast->converter) {
487251881Speter      swig_type_info *tc = cast->type;
488251881Speter      if (!tc->clientdata) {
489251881Speter	SWIG_TypeClientData(tc, clientdata);
490251881Speter      }
491251881Speter    }
492251881Speter    cast = cast->next;
493251881Speter  }
494251881Speter}
495251881SpeterSWIGRUNTIME void
496251881SpeterSWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
497251881Speter  SWIG_TypeClientData(ti, clientdata);
498251881Speter  ti->owndata = 1;
499251881Speter}
500251881Speter
501251881Speter/*
502251881Speter  Search for a swig_type_info structure only by mangled name
503251881Speter  Search is a O(log #types)
504251881Speter
505251881Speter  We start searching at module start, and finish searching when start == end.
506251881Speter  Note: if start == end at the beginning of the function, we go all the way around
507251881Speter  the circular list.
508251881Speter*/
509251881SpeterSWIGRUNTIME swig_type_info *
510251881SpeterSWIG_MangledTypeQueryModule(swig_module_info *start,
511251881Speter                            swig_module_info *end,
512251881Speter		            const char *name) {
513251881Speter  swig_module_info *iter = start;
514251881Speter  do {
515251881Speter    if (iter->size) {
516251881Speter      register size_t l = 0;
517251881Speter      register size_t r = iter->size - 1;
518251881Speter      do {
519251881Speter	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
520251881Speter	register size_t i = (l + r) >> 1;
521251881Speter	const char *iname = iter->types[i]->name;
522251881Speter	if (iname) {
523251881Speter	  register int compare = strcmp(name, iname);
524251881Speter	  if (compare == 0) {
525251881Speter	    return iter->types[i];
526251881Speter	  } else if (compare < 0) {
527251881Speter	    if (i) {
528251881Speter	      r = i - 1;
529251881Speter	    } else {
530251881Speter	      break;
531251881Speter	    }
532251881Speter	  } else if (compare > 0) {
533251881Speter	    l = i + 1;
534251881Speter	  }
535251881Speter	} else {
536251881Speter	  break; /* should never happen */
537251881Speter	}
538251881Speter      } while (l <= r);
539251881Speter    }
540251881Speter    iter = iter->next;
541251881Speter  } while (iter != end);
542251881Speter  return 0;
543251881Speter}
544251881Speter
545251881Speter/*
546251881Speter  Search for a swig_type_info structure for either a mangled name or a human readable name.
547251881Speter  It first searches the mangled names of the types, which is a O(log #types)
548251881Speter  If a type is not found it then searches the human readable names, which is O(#types).
549251881Speter
550251881Speter  We start searching at module start, and finish searching when start == end.
551251881Speter  Note: if start == end at the beginning of the function, we go all the way around
552251881Speter  the circular list.
553251881Speter*/
554251881SpeterSWIGRUNTIME swig_type_info *
555251881SpeterSWIG_TypeQueryModule(swig_module_info *start,
556251881Speter                     swig_module_info *end,
557251881Speter		     const char *name) {
558251881Speter  /* STEP 1: Search the name field using binary search */
559251881Speter  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
560251881Speter  if (ret) {
561251881Speter    return ret;
562251881Speter  } else {
563251881Speter    /* STEP 2: If the type hasn't been found, do a complete search
564251881Speter       of the str field (the human readable name) */
565251881Speter    swig_module_info *iter = start;
566251881Speter    do {
567251881Speter      register size_t i = 0;
568251881Speter      for (; i < iter->size; ++i) {
569251881Speter	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
570251881Speter	  return iter->types[i];
571251881Speter      }
572251881Speter      iter = iter->next;
573251881Speter    } while (iter != end);
574251881Speter  }
575251881Speter
576251881Speter  /* neither found a match */
577251881Speter  return 0;
578251881Speter}
579251881Speter
580251881Speter/*
581251881Speter   Pack binary data into a string
582251881Speter*/
583251881SpeterSWIGRUNTIME char *
584251881SpeterSWIG_PackData(char *c, void *ptr, size_t sz) {
585251881Speter  static const char hex[17] = "0123456789abcdef";
586251881Speter  register const unsigned char *u = (unsigned char *) ptr;
587251881Speter  register const unsigned char *eu =  u + sz;
588251881Speter  for (; u != eu; ++u) {
589251881Speter    register unsigned char uu = *u;
590251881Speter    *(c++) = hex[(uu & 0xf0) >> 4];
591251881Speter    *(c++) = hex[uu & 0xf];
592251881Speter  }
593251881Speter  return c;
594251881Speter}
595251881Speter
596251881Speter/*
597251881Speter   Unpack binary data from a string
598251881Speter*/
599251881SpeterSWIGRUNTIME const char *
600251881SpeterSWIG_UnpackData(const char *c, void *ptr, size_t sz) {
601251881Speter  register unsigned char *u = (unsigned char *) ptr;
602251881Speter  register const unsigned char *eu = u + sz;
603251881Speter  for (; u != eu; ++u) {
604251881Speter    register char d = *(c++);
605251881Speter    register unsigned char uu;
606251881Speter    if ((d >= '0') && (d <= '9'))
607251881Speter      uu = ((d - '0') << 4);
608251881Speter    else if ((d >= 'a') && (d <= 'f'))
609251881Speter      uu = ((d - ('a'-10)) << 4);
610251881Speter    else
611251881Speter      return (char *) 0;
612251881Speter    d = *(c++);
613251881Speter    if ((d >= '0') && (d <= '9'))
614251881Speter      uu |= (d - '0');
615251881Speter    else if ((d >= 'a') && (d <= 'f'))
616251881Speter      uu |= (d - ('a'-10));
617251881Speter    else
618251881Speter      return (char *) 0;
619251881Speter    *u = uu;
620251881Speter  }
621251881Speter  return c;
622251881Speter}
623251881Speter
624251881Speter/*
625251881Speter   Pack 'void *' into a string buffer.
626251881Speter*/
627251881SpeterSWIGRUNTIME char *
628251881SpeterSWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
629251881Speter  char *r = buff;
630251881Speter  if ((2*sizeof(void *) + 2) > bsz) return 0;
631251881Speter  *(r++) = '_';
632251881Speter  r = SWIG_PackData(r,&ptr,sizeof(void *));
633251881Speter  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
634251881Speter  strcpy(r,name);
635251881Speter  return buff;
636251881Speter}
637251881Speter
638251881SpeterSWIGRUNTIME const char *
639251881SpeterSWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
640251881Speter  if (*c != '_') {
641251881Speter    if (strcmp(c,"NULL") == 0) {
642251881Speter      *ptr = (void *) 0;
643251881Speter      return name;
644251881Speter    } else {
645251881Speter      return 0;
646251881Speter    }
647251881Speter  }
648251881Speter  return SWIG_UnpackData(++c,ptr,sizeof(void *));
649251881Speter}
650251881Speter
651251881SpeterSWIGRUNTIME char *
652251881SpeterSWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
653251881Speter  char *r = buff;
654251881Speter  size_t lname = (name ? strlen(name) : 0);
655251881Speter  if ((2*sz + 2 + lname) > bsz) return 0;
656251881Speter  *(r++) = '_';
657251881Speter  r = SWIG_PackData(r,ptr,sz);
658251881Speter  if (lname) {
659251881Speter    strncpy(r,name,lname+1);
660251881Speter  } else {
661251881Speter    *r = 0;
662251881Speter  }
663251881Speter  return buff;
664251881Speter}
665251881Speter
666251881SpeterSWIGRUNTIME const char *
667251881SpeterSWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
668251881Speter  if (*c != '_') {
669251881Speter    if (strcmp(c,"NULL") == 0) {
670251881Speter      memset(ptr,0,sz);
671251881Speter      return name;
672251881Speter    } else {
673251881Speter      return 0;
674251881Speter    }
675251881Speter  }
676251881Speter  return SWIG_UnpackData(++c,ptr,sz);
677251881Speter}
678251881Speter
679251881Speter#ifdef __cplusplus
680251881Speter}
681251881Speter#endif
682251881Speter
683251881Speter/*  Errors in SWIG */
684251881Speter#define  SWIG_UnknownError    	   -1
685251881Speter#define  SWIG_IOError        	   -2
686251881Speter#define  SWIG_RuntimeError   	   -3
687251881Speter#define  SWIG_IndexError     	   -4
688251881Speter#define  SWIG_TypeError      	   -5
689251881Speter#define  SWIG_DivisionByZero 	   -6
690251881Speter#define  SWIG_OverflowError  	   -7
691251881Speter#define  SWIG_SyntaxError    	   -8
692251881Speter#define  SWIG_ValueError     	   -9
693251881Speter#define  SWIG_SystemError    	   -10
694251881Speter#define  SWIG_AttributeError 	   -11
695251881Speter#define  SWIG_MemoryError    	   -12
696251881Speter#define  SWIG_NullReferenceError   -13
697251881Speter
698251881Speter
699251881Speter
700251881Speter
701251881Speter/* Add PyOS_snprintf for old Pythons */
702251881Speter#if PY_VERSION_HEX < 0x02020000
703251881Speter# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
704251881Speter#  define PyOS_snprintf _snprintf
705251881Speter# else
706251881Speter#  define PyOS_snprintf snprintf
707251881Speter# endif
708251881Speter#endif
709251881Speter
710251881Speter/* A crude PyString_FromFormat implementation for old Pythons */
711251881Speter#if PY_VERSION_HEX < 0x02020000
712251881Speter
713251881Speter#ifndef SWIG_PYBUFFER_SIZE
714251881Speter# define SWIG_PYBUFFER_SIZE 1024
715251881Speter#endif
716
717static PyObject *
718PyString_FromFormat(const char *fmt, ...) {
719  va_list ap;
720  char buf[SWIG_PYBUFFER_SIZE * 2];
721  int res;
722  va_start(ap, fmt);
723  res = vsnprintf(buf, sizeof(buf), fmt, ap);
724  va_end(ap);
725  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
726}
727#endif
728
729/* Add PyObject_Del for old Pythons */
730#if PY_VERSION_HEX < 0x01060000
731# define PyObject_Del(op) PyMem_DEL((op))
732#endif
733#ifndef PyObject_DEL
734# define PyObject_DEL PyObject_Del
735#endif
736
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
741# endif
742# ifndef PyObject_GenericGetAttr
743#  define PyObject_GenericGetAttr 0
744# endif
745#endif
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
750# endif
751#endif
752
753
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;}
758# endif
759#endif
760
761/* PySequence_Size for old Pythons */
762#if PY_VERSION_HEX < 0x02000000
763# ifndef PySequence_Size
764#  define PySequence_Size PySequence_Length
765# endif
766#endif
767
768
769/* PyBool_FromLong for old Pythons */
770#if PY_VERSION_HEX < 0x02030000
771static
772PyObject *PyBool_FromLong(long ok)
773{
774  PyObject *result = ok ? Py_True : Py_False;
775  Py_INCREF(result);
776  return result;
777}
778#endif
779
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)
784typedef int Py_ssize_t;
785# define PY_SSIZE_T_MAX INT_MAX
786# define PY_SSIZE_T_MIN INT_MIN
787#endif
788
789/* -----------------------------------------------------------------------------
790 * error manipulation
791 * ----------------------------------------------------------------------------- */
792
793SWIGRUNTIME PyObject*
794SWIG_Python_ErrorType(int code) {
795  PyObject* type = 0;
796  switch(code) {
797  case SWIG_MemoryError:
798    type = PyExc_MemoryError;
799    break;
800  case SWIG_IOError:
801    type = PyExc_IOError;
802    break;
803  case SWIG_RuntimeError:
804    type = PyExc_RuntimeError;
805    break;
806  case SWIG_IndexError:
807    type = PyExc_IndexError;
808    break;
809  case SWIG_TypeError:
810    type = PyExc_TypeError;
811    break;
812  case SWIG_DivisionByZero:
813    type = PyExc_ZeroDivisionError;
814    break;
815  case SWIG_OverflowError:
816    type = PyExc_OverflowError;
817    break;
818  case SWIG_SyntaxError:
819    type = PyExc_SyntaxError;
820    break;
821  case SWIG_ValueError:
822    type = PyExc_ValueError;
823    break;
824  case SWIG_SystemError:
825    type = PyExc_SystemError;
826    break;
827  case SWIG_AttributeError:
828    type = PyExc_AttributeError;
829    break;
830  default:
831    type = PyExc_RuntimeError;
832  }
833  return type;
834}
835
836
837SWIGRUNTIME void
838SWIG_Python_AddErrorMsg(const char* mesg)
839{
840  PyObject *type = 0;
841  PyObject *value = 0;
842  PyObject *traceback = 0;
843
844  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
845  if (value) {
846    PyObject *old_str = PyObject_Str(value);
847    PyErr_Clear();
848    Py_XINCREF(type);
849    PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
850    Py_DECREF(old_str);
851    Py_DECREF(value);
852  } else {
853    PyErr_Format(PyExc_RuntimeError, mesg);
854  }
855}
856
857
858
859#if defined(SWIG_PYTHON_NO_THREADS)
860#  if defined(SWIG_PYTHON_THREADS)
861#    undef SWIG_PYTHON_THREADS
862#  endif
863#endif
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
868#    endif
869#  endif
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()
873#    endif
874#    ifdef __cplusplus /* C++ code */
875       class SWIG_Python_Thread_Block {
876         bool status;
877         PyGILState_STATE state;
878       public:
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(); }
882       };
883       class SWIG_Python_Thread_Allow {
884         bool status;
885         PyThreadState *save;
886       public:
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(); }
890       };
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()
895#    else /* C code */
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)
900#    endif
901#  else /* Old thread way, not implemented, user must provide it */
902#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
903#      define SWIG_PYTHON_INITIALIZE_THREADS
904#    endif
905#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
906#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
907#    endif
908#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
909#      define SWIG_PYTHON_THREAD_END_BLOCK
910#    endif
911#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
912#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
913#    endif
914#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
915#      define SWIG_PYTHON_THREAD_END_ALLOW
916#    endif
917#  endif
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
924#endif
925
926/* -----------------------------------------------------------------------------
927 * Python API portion that goes into the runtime
928 * ----------------------------------------------------------------------------- */
929
930#ifdef __cplusplus
931extern "C" {
932#if 0
933} /* cc-mode */
934#endif
935#endif
936
937/* -----------------------------------------------------------------------------
938 * Constant declarations
939 * ----------------------------------------------------------------------------- */
940
941/* Constant Types */
942#define SWIG_PY_POINTER 4
943#define SWIG_PY_BINARY  5
944
945/* Constant information structure */
946typedef struct swig_const_info {
947  int type;
948  char *name;
949  long lvalue;
950  double dvalue;
951  void   *pvalue;
952  swig_type_info **ptype;
953} swig_const_info;
954
955#ifdef __cplusplus
956#if 0
957{ /* cc-mode */
958#endif
959}
960#endif
961
962
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.
966 *
967 * pyrun.swg
968 *
969 * This file contains the runtime support for Python modules
970 * and includes code for managing global variables and pointer
971 * type checking.
972 *
973 * ----------------------------------------------------------------------------- */
974
975/* Common SWIG API */
976
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
985
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)
989
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)
993
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)
997
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)
1001
1002
1003/* Runtime API */
1004
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)
1008
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
1014
1015
1016/* Runtime API implementation */
1017
1018/* Error manipulation */
1019
1020SWIGINTERN void
1021SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1022  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1023  PyErr_SetObject(errtype, obj);
1024  Py_DECREF(obj);
1025  SWIG_PYTHON_THREAD_END_BLOCK;
1026}
1027
1028SWIGINTERN void
1029SWIG_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;
1033}
1034
1035#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1036
1037/* Set a constant value */
1038
1039SWIGINTERN void
1040SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1041  PyDict_SetItemString(d, (char*) name, obj);
1042  Py_DECREF(obj);
1043}
1044
1045/* Append a value to the result obj */
1046
1047SWIGINTERN PyObject*
1048SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1049#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1050  if (!result) {
1051    result = obj;
1052  } else if (result == Py_None) {
1053    Py_DECREF(result);
1054    result = obj;
1055  } else {
1056    if (!PyList_Check(result)) {
1057      PyObject *o2 = result;
1058      result = PyList_New(1);
1059      PyList_SetItem(result, 0, o2);
1060    }
1061    PyList_Append(result,obj);
1062    Py_DECREF(obj);
1063  }
1064  return result;
1065#else
1066  PyObject*   o2;
1067  PyObject*   o3;
1068  if (!result) {
1069    result = obj;
1070  } else if (result == Py_None) {
1071    Py_DECREF(result);
1072    result = obj;
1073  } else {
1074    if (!PyTuple_Check(result)) {
1075      o2 = result;
1076      result = PyTuple_New(1);
1077      PyTuple_SET_ITEM(result, 0, o2);
1078    }
1079    o3 = PyTuple_New(1);
1080    PyTuple_SET_ITEM(o3, 0, obj);
1081    o2 = result;
1082    result = PySequence_Concat(o2, o3);
1083    Py_DECREF(o2);
1084    Py_DECREF(o3);
1085  }
1086  return result;
1087#endif
1088}
1089
1090/* Unpack the argument tuple */
1091
1092SWIGINTERN int
1093SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
1094{
1095  if (!args) {
1096    if (!min && !max) {
1097      return 1;
1098    } else {
1099      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1100		   name, (min == max ? "" : "at least "), min);
1101      return 0;
1102    }
1103  }
1104  if (!PyTuple_Check(args)) {
1105    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1106    return 0;
1107  } else {
1108    register int l = PyTuple_GET_SIZE(args);
1109    if (l < min) {
1110      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1111		   name, (min == max ? "" : "at least "), min, l);
1112      return 0;
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);
1116      return 0;
1117    } else {
1118      register int i;
1119      for (i = 0; i < l; ++i) {
1120	objs[i] = PyTuple_GET_ITEM(args, i);
1121      }
1122      for (; l < max; ++l) {
1123	objs[l] = 0;
1124      }
1125      return i + 1;
1126    }
1127  }
1128}
1129
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);
1133#else
1134#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
1135#endif
1136
1137/*
1138  Helper for static pointer initialization for both C and C++ code, for example
1139  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1140*/
1141#ifdef __cplusplus
1142#define SWIG_STATIC_POINTER(var)  var
1143#else
1144#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
1145#endif
1146
1147/* -----------------------------------------------------------------------------
1148 * Pointer declarations
1149 * ----------------------------------------------------------------------------- */
1150
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)
1154
1155#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
1156
1157#ifdef __cplusplus
1158extern "C" {
1159#if 0
1160} /* cc-mode */
1161#endif
1162#endif
1163
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
1169#    endif
1170#  endif
1171#endif
1172
1173#ifdef SWIG_PYTHON_BUILD_NONE
1174#  ifdef Py_None
1175#   undef Py_None
1176#   define Py_None SWIG_Py_None()
1177#  endif
1178SWIGRUNTIMEINLINE PyObject *
1179_SWIG_Py_None(void)
1180{
1181  PyObject *none = Py_BuildValue((char*)"");
1182  Py_DECREF(none);
1183  return none;
1184}
1185SWIGRUNTIME PyObject *
1186SWIG_Py_None(void)
1187{
1188  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1189  return none;
1190}
1191#endif
1192
1193/* The python void return value */
1194
1195SWIGRUNTIMEINLINE PyObject *
1196SWIG_Py_Void(void)
1197{
1198  PyObject *none = Py_None;
1199  Py_INCREF(none);
1200  return none;
1201}
1202
1203/* PySwigClientData */
1204
1205typedef struct {
1206  PyObject *klass;
1207  PyObject *newraw;
1208  PyObject *newargs;
1209  PyObject *destroy;
1210  int delargs;
1211  int implicitconv;
1212} PySwigClientData;
1213
1214SWIGRUNTIMEINLINE int
1215SWIG_Python_CheckImplicit(swig_type_info *ty)
1216{
1217  PySwigClientData *data = (PySwigClientData *)ty->clientdata;
1218  return data ? data->implicitconv : 0;
1219}
1220
1221SWIGRUNTIMEINLINE PyObject *
1222SWIG_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);
1226}
1227
1228
1229SWIGRUNTIME PySwigClientData *
1230PySwigClientData_New(PyObject* obj)
1231{
1232  if (!obj) {
1233    return 0;
1234  } else {
1235    PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData));
1236    /* the klass element */
1237    data->klass = obj;
1238    Py_INCREF(data->klass);
1239    /* the newraw method and newargs arguments used to create a new raw instance */
1240    if (PyClass_Check(obj)) {
1241      data->newraw = 0;
1242      data->newargs = obj;
1243      Py_INCREF(obj);
1244    } else {
1245#if (PY_VERSION_HEX < 0x02020000)
1246      data->newraw = 0;
1247#else
1248      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1249#endif
1250      if (data->newraw) {
1251	Py_INCREF(data->newraw);
1252	data->newargs = PyTuple_New(1);
1253	PyTuple_SetItem(data->newargs, 0, obj);
1254      } else {
1255	data->newargs = obj;
1256      }
1257      Py_INCREF(data->newargs);
1258    }
1259    /* the destroy method, aka as the C++ delete method */
1260    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1261    if (PyErr_Occurred()) {
1262      PyErr_Clear();
1263      data->destroy = 0;
1264    }
1265    if (data->destroy) {
1266      int flags;
1267      Py_INCREF(data->destroy);
1268      flags = PyCFunction_GET_FLAGS(data->destroy);
1269#ifdef METH_O
1270      data->delargs = !(flags & (METH_O));
1271#else
1272      data->delargs = 0;
1273#endif
1274    } else {
1275      data->delargs = 0;
1276    }
1277    data->implicitconv = 0;
1278    return data;
1279  }
1280}
1281
1282SWIGRUNTIME void
1283PySwigClientData_Del(PySwigClientData* data)
1284{
1285  Py_XDECREF(data->newraw);
1286  Py_XDECREF(data->newargs);
1287  Py_XDECREF(data->destroy);
1288}
1289
1290/* =============== PySwigObject =====================*/
1291
1292typedef struct {
1293  PyObject_HEAD
1294  void *ptr;
1295  swig_type_info *ty;
1296  int own;
1297  PyObject *next;
1298} PySwigObject;
1299
1300SWIGRUNTIME PyObject *
1301PySwigObject_long(PySwigObject *v)
1302{
1303  return PyLong_FromVoidPtr(v->ptr);
1304}
1305
1306SWIGRUNTIME PyObject *
1307PySwigObject_format(const char* fmt, PySwigObject *v)
1308{
1309  PyObject *res = NULL;
1310  PyObject *args = PyTuple_New(1);
1311  if (args) {
1312    if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) {
1313      PyObject *ofmt = PyString_FromString(fmt);
1314      if (ofmt) {
1315	res = PyString_Format(ofmt,args);
1316	Py_DECREF(ofmt);
1317      }
1318      Py_DECREF(args);
1319    }
1320  }
1321  return res;
1322}
1323
1324SWIGRUNTIME PyObject *
1325PySwigObject_oct(PySwigObject *v)
1326{
1327  return PySwigObject_format("%o",v);
1328}
1329
1330SWIGRUNTIME PyObject *
1331PySwigObject_hex(PySwigObject *v)
1332{
1333  return PySwigObject_format("%x",v);
1334}
1335
1336SWIGRUNTIME PyObject *
1337#ifdef METH_NOARGS
1338PySwigObject_repr(PySwigObject *v)
1339#else
1340PySwigObject_repr(PySwigObject *v, PyObject *args)
1341#endif
1342{
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));
1346  Py_DECREF(hex);
1347  if (v->next) {
1348#ifdef METH_NOARGS
1349    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next);
1350#else
1351    PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args);
1352#endif
1353    PyString_ConcatAndDel(&repr,nrep);
1354  }
1355  return repr;
1356}
1357
1358SWIGRUNTIME int
1359PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1360{
1361#ifdef METH_NOARGS
1362  PyObject *repr = PySwigObject_repr(v);
1363#else
1364  PyObject *repr = PySwigObject_repr(v, NULL);
1365#endif
1366  if (repr) {
1367    fputs(PyString_AsString(repr), fp);
1368    Py_DECREF(repr);
1369    return 0;
1370  } else {
1371    return 1;
1372  }
1373}
1374
1375SWIGRUNTIME PyObject *
1376PySwigObject_str(PySwigObject *v)
1377{
1378  char result[SWIG_BUFFER_SIZE];
1379  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
1380    PyString_FromString(result) : 0;
1381}
1382
1383SWIGRUNTIME int
1384PySwigObject_compare(PySwigObject *v, PySwigObject *w)
1385{
1386  void *i = v->ptr;
1387  void *j = w->ptr;
1388  return (i < j) ? -1 : ((i > j) ? 1 : 0);
1389}
1390
1391SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
1392
1393SWIGRUNTIME PyTypeObject*
1394PySwigObject_type(void) {
1395  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
1396  return type;
1397}
1398
1399SWIGRUNTIMEINLINE int
1400PySwigObject_Check(PyObject *op) {
1401  return ((op)->ob_type == PySwigObject_type())
1402    || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0);
1403}
1404
1405SWIGRUNTIME PyObject *
1406PySwigObject_New(void *ptr, swig_type_info *ty, int own);
1407
1408SWIGRUNTIME void
1409PySwigObject_dealloc(PyObject *v)
1410{
1411  PySwigObject *sobj = (PySwigObject *) v;
1412  PyObject *next = sobj->next;
1413  if (sobj->own) {
1414    swig_type_info *ty = sobj->ty;
1415    PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
1416    PyObject *destroy = data ? data->destroy : 0;
1417    if (destroy) {
1418      /* destroy is always a VARARGS method */
1419      PyObject *res;
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);
1424	Py_DECREF(tmp);
1425      } else {
1426	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1427	PyObject *mself = PyCFunction_GET_SELF(destroy);
1428	res = ((*meth)(mself, v));
1429      }
1430      Py_XDECREF(res);
1431    } else {
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);
1435#endif
1436    }
1437  }
1438  Py_XDECREF(next);
1439  PyObject_DEL(v);
1440}
1441
1442SWIGRUNTIME PyObject*
1443PySwigObject_append(PyObject* v, PyObject* next)
1444{
1445  PySwigObject *sobj = (PySwigObject *) v;
1446#ifndef METH_O
1447  PyObject *tmp = 0;
1448  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1449  next = tmp;
1450#endif
1451  if (!PySwigObject_Check(next)) {
1452    return NULL;
1453  }
1454  sobj->next = next;
1455  Py_INCREF(next);
1456  return SWIG_Py_Void();
1457}
1458
1459SWIGRUNTIME PyObject*
1460#ifdef METH_NOARGS
1461PySwigObject_next(PyObject* v)
1462#else
1463PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1464#endif
1465{
1466  PySwigObject *sobj = (PySwigObject *) v;
1467  if (sobj->next) {
1468    Py_INCREF(sobj->next);
1469    return sobj->next;
1470  } else {
1471    return SWIG_Py_Void();
1472  }
1473}
1474
1475SWIGINTERN PyObject*
1476#ifdef METH_NOARGS
1477PySwigObject_disown(PyObject *v)
1478#else
1479PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1480#endif
1481{
1482  PySwigObject *sobj = (PySwigObject *)v;
1483  sobj->own = 0;
1484  return SWIG_Py_Void();
1485}
1486
1487SWIGINTERN PyObject*
1488#ifdef METH_NOARGS
1489PySwigObject_acquire(PyObject *v)
1490#else
1491PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1492#endif
1493{
1494  PySwigObject *sobj = (PySwigObject *)v;
1495  sobj->own = SWIG_POINTER_OWN;
1496  return SWIG_Py_Void();
1497}
1498
1499SWIGINTERN PyObject*
1500PySwigObject_own(PyObject *v, PyObject *args)
1501{
1502  PyObject *val = 0;
1503#if (PY_VERSION_HEX < 0x02020000)
1504  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1505#else
1506  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1507#endif
1508    {
1509      return NULL;
1510    }
1511  else
1512    {
1513      PySwigObject *sobj = (PySwigObject *)v;
1514      PyObject *obj = PyBool_FromLong(sobj->own);
1515      if (val) {
1516#ifdef METH_NOARGS
1517	if (PyObject_IsTrue(val)) {
1518	  PySwigObject_acquire(v);
1519	} else {
1520	  PySwigObject_disown(v);
1521	}
1522#else
1523	if (PyObject_IsTrue(val)) {
1524	  PySwigObject_acquire(v,args);
1525	} else {
1526	  PySwigObject_disown(v,args);
1527	}
1528#endif
1529      }
1530      return obj;
1531    }
1532}
1533
1534#ifdef METH_O
1535static PyMethodDef
1536swigobject_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"},
1543  {0, 0, 0, 0}
1544};
1545#else
1546static PyMethodDef
1547swigobject_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"},
1554  {0, 0, 0, 0}
1555};
1556#endif
1557
1558#if PY_VERSION_HEX < 0x02020000
1559SWIGINTERN PyObject *
1560PySwigObject_getattr(PySwigObject *sobj,char *name)
1561{
1562  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1563}
1564#endif
1565
1566SWIGRUNTIME PyTypeObject*
1567_PySwigObject_type(void) {
1568  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1569
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*/
1582    0,		   /*nb_invert*/
1583    0,		   /*nb_lshift*/
1584    0,		   /*nb_rshift*/
1585    0,		   /*nb_and*/
1586    0,		   /*nb_xor*/
1587    0,		   /*nb_or*/
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 */
1598#endif
1599  };
1600
1601  static PyTypeObject pyswigobject_type;
1602  static int type_init = 0;
1603  if (!type_init) {
1604    const PyTypeObject tmp
1605      = {
1606	PyObject_HEAD_INIT(NULL)
1607	0,				    /* ob_size */
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 */
1615#else
1616	(getattrfunc)0,			    /* tp_getattr */
1617#endif
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 */
1633	0,                                  /* tp_clear */
1634	0,                                  /* tp_richcompare */
1635	0,                                  /* tp_weaklistoffset */
1636#if PY_VERSION_HEX >= 0x02020000
1637	0,                                  /* tp_iter */
1638	0,                                  /* tp_iternext */
1639	swigobject_methods,		    /* tp_methods */
1640	0,			            /* tp_members */
1641	0,				    /* tp_getset */
1642	0,			            /* tp_base */
1643	0,				    /* tp_dict */
1644	0,				    /* tp_descr_get */
1645	0,				    /* tp_descr_set */
1646	0,				    /* tp_dictoffset */
1647	0,				    /* tp_init */
1648	0,				    /* tp_alloc */
1649	0,			            /* tp_new */
1650	0,	                            /* tp_free */
1651        0,                                  /* tp_is_gc */
1652	0,				    /* tp_bases */
1653	0,				    /* tp_mro */
1654	0,				    /* tp_cache */
1655 	0,				    /* tp_subclasses */
1656	0,				    /* tp_weaklist */
1657#endif
1658#if PY_VERSION_HEX >= 0x02030000
1659	0,                                  /* tp_del */
1660#endif
1661#ifdef COUNT_ALLOCS
1662	0,0,0,0                             /* tp_alloc -> tp_next */
1663#endif
1664      };
1665    pyswigobject_type = tmp;
1666    pyswigobject_type.ob_type = &PyType_Type;
1667    type_init = 1;
1668  }
1669  return &pyswigobject_type;
1670}
1671
1672SWIGRUNTIME PyObject *
1673PySwigObject_New(void *ptr, swig_type_info *ty, int own)
1674{
1675  PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type());
1676  if (sobj) {
1677    sobj->ptr  = ptr;
1678    sobj->ty   = ty;
1679    sobj->own  = own;
1680    sobj->next = 0;
1681  }
1682  return (PyObject *)sobj;
1683}
1684
1685/* -----------------------------------------------------------------------------
1686 * Implements a simple Swig Packed type, and use it instead of string
1687 * ----------------------------------------------------------------------------- */
1688
1689typedef struct {
1690  PyObject_HEAD
1691  void *pack;
1692  swig_type_info *ty;
1693  size_t size;
1694} PySwigPacked;
1695
1696SWIGRUNTIME int
1697PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1698{
1699  char result[SWIG_BUFFER_SIZE];
1700  fputs("<Swig Packed ", fp);
1701  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1702    fputs("at ", fp);
1703    fputs(result, fp);
1704  }
1705  fputs(v->ty->name,fp);
1706  fputs(">", fp);
1707  return 0;
1708}
1709
1710SWIGRUNTIME PyObject *
1711PySwigPacked_repr(PySwigPacked *v)
1712{
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);
1716  } else {
1717    return PyString_FromFormat("<Swig Packed %s>", v->ty->name);
1718  }
1719}
1720
1721SWIGRUNTIME PyObject *
1722PySwigPacked_str(PySwigPacked *v)
1723{
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);
1727  } else {
1728    return PyString_FromString(v->ty->name);
1729  }
1730}
1731
1732SWIGRUNTIME int
1733PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w)
1734{
1735  size_t i = v->size;
1736  size_t j = w->size;
1737  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1738  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
1739}
1740
1741SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
1742
1743SWIGRUNTIME PyTypeObject*
1744PySwigPacked_type(void) {
1745  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
1746  return type;
1747}
1748
1749SWIGRUNTIMEINLINE int
1750PySwigPacked_Check(PyObject *op) {
1751  return ((op)->ob_type == _PySwigPacked_type())
1752    || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0);
1753}
1754
1755SWIGRUNTIME void
1756PySwigPacked_dealloc(PyObject *v)
1757{
1758  if (PySwigPacked_Check(v)) {
1759    PySwigPacked *sobj = (PySwigPacked *) v;
1760    free(sobj->pack);
1761  }
1762  PyObject_DEL(v);
1763}
1764
1765SWIGRUNTIME 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;
1770  if (!type_init) {
1771    const PyTypeObject tmp
1772      = {
1773	PyObject_HEAD_INIT(NULL)
1774	0,				    /* ob_size */
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 */
1796	0,                                  /* tp_clear */
1797	0,                                  /* tp_richcompare */
1798	0,                                  /* tp_weaklistoffset */
1799#if PY_VERSION_HEX >= 0x02020000
1800	0,                                  /* tp_iter */
1801	0,                                  /* tp_iternext */
1802	0,		                    /* tp_methods */
1803	0,			            /* tp_members */
1804	0,				    /* tp_getset */
1805	0,			            /* tp_base */
1806	0,				    /* tp_dict */
1807	0,				    /* tp_descr_get */
1808	0,				    /* tp_descr_set */
1809	0,				    /* tp_dictoffset */
1810	0,				    /* tp_init */
1811	0,				    /* tp_alloc */
1812	0,			            /* tp_new */
1813	0, 	                            /* tp_free */
1814        0,                                  /* tp_is_gc */
1815	0,				    /* tp_bases */
1816	0,				    /* tp_mro */
1817	0,				    /* tp_cache */
1818 	0,				    /* tp_subclasses */
1819	0,				    /* tp_weaklist */
1820#endif
1821#if PY_VERSION_HEX >= 0x02030000
1822	0,                                  /* tp_del */
1823#endif
1824#ifdef COUNT_ALLOCS
1825	0,0,0,0                             /* tp_alloc -> tp_next */
1826#endif
1827      };
1828    pyswigpacked_type = tmp;
1829    pyswigpacked_type.ob_type = &PyType_Type;
1830    type_init = 1;
1831  }
1832  return &pyswigpacked_type;
1833}
1834
1835SWIGRUNTIME PyObject *
1836PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty)
1837{
1838  PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type());
1839  if (sobj) {
1840    void *pack = malloc(size);
1841    if (pack) {
1842      memcpy(pack, ptr, size);
1843      sobj->pack = pack;
1844      sobj->ty   = ty;
1845      sobj->size = size;
1846    } else {
1847      PyObject_DEL((PyObject *) sobj);
1848      sobj = 0;
1849    }
1850  }
1851  return (PyObject *) sobj;
1852}
1853
1854SWIGRUNTIME swig_type_info *
1855PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1856{
1857  if (PySwigPacked_Check(obj)) {
1858    PySwigPacked *sobj = (PySwigPacked *)obj;
1859    if (sobj->size != size) return 0;
1860    memcpy(ptr, sobj->pack, size);
1861    return sobj->ty;
1862  } else {
1863    return 0;
1864  }
1865}
1866
1867/* -----------------------------------------------------------------------------
1868 * pointers/data manipulation
1869 * ----------------------------------------------------------------------------- */
1870
1871SWIGRUNTIMEINLINE PyObject *
1872_SWIG_This(void)
1873{
1874  return PyString_FromString("this");
1875}
1876
1877SWIGRUNTIME PyObject *
1878SWIG_This(void)
1879{
1880  static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
1881  return swig_this;
1882}
1883
1884/* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1885
1886SWIGRUNTIME PySwigObject *
1887SWIG_Python_GetSwigThis(PyObject *pyobj)
1888{
1889  if (PySwigObject_Check(pyobj)) {
1890    return (PySwigObject *) pyobj;
1891  } else {
1892    PyObject *obj = 0;
1893#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
1894    if (PyInstance_Check(pyobj)) {
1895      obj = _PyInstance_Lookup(pyobj, SWIG_This());
1896    } else {
1897      PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
1898      if (dictptr != NULL) {
1899	PyObject *dict = *dictptr;
1900	obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
1901      } else {
1902#ifdef PyWeakref_CheckProxy
1903	if (PyWeakref_CheckProxy(pyobj)) {
1904	  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
1905	  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
1906	}
1907#endif
1908	obj = PyObject_GetAttr(pyobj,SWIG_This());
1909	if (obj) {
1910	  Py_DECREF(obj);
1911	} else {
1912	  if (PyErr_Occurred()) PyErr_Clear();
1913	  return 0;
1914	}
1915      }
1916    }
1917#else
1918    obj = PyObject_GetAttr(pyobj,SWIG_This());
1919    if (obj) {
1920      Py_DECREF(obj);
1921    } else {
1922      if (PyErr_Occurred()) PyErr_Clear();
1923      return 0;
1924    }
1925#endif
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);
1930    }
1931    return (PySwigObject *)obj;
1932  }
1933}
1934
1935/* Acquire a pointer value */
1936
1937SWIGRUNTIME int
1938SWIG_Python_AcquirePtr(PyObject *obj, int own) {
1939  if (own) {
1940    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1941    if (sobj) {
1942      int oldown = sobj->own;
1943      sobj->own = own;
1944      return oldown;
1945    }
1946  }
1947  return 0;
1948}
1949
1950/* Convert a pointer value */
1951
1952SWIGRUNTIME int
1953SWIG_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) {
1956    if (ptr) *ptr = 0;
1957    return SWIG_OK;
1958  } else {
1959    PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
1960    while (sobj) {
1961      void *vptr = sobj->ptr;
1962      if (ty) {
1963	swig_type_info *to = sobj->ty;
1964	if (to == ty) {
1965	  /* no type cast needed */
1966	  if (ptr) *ptr = vptr;
1967	  break;
1968	} else {
1969	  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
1970	  if (!tc) {
1971	    sobj = (PySwigObject *)sobj->next;
1972	  } else {
1973	    if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
1974	    break;
1975	  }
1976	}
1977      } else {
1978	if (ptr) *ptr = vptr;
1979	break;
1980      }
1981    }
1982    if (sobj) {
1983      if (own) *own = sobj->own;
1984      if (flags & SWIG_POINTER_DISOWN) {
1985	sobj->own = 0;
1986      }
1987      return SWIG_OK;
1988    } else {
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;
1994	  if (klass) {
1995	    PyObject *impconv;
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()) {
2000	      PyErr_Clear();
2001	      impconv = 0;
2002	    }
2003	    if (impconv) {
2004	      PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv);
2005	      if (iobj) {
2006		void *vptr;
2007		res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2008		if (SWIG_IsOK(res)) {
2009		  if (ptr) {
2010		    *ptr = vptr;
2011		    /* transfer the ownership to 'ptr' */
2012		    iobj->own = 0;
2013		    res = SWIG_AddCast(res);
2014		    res = SWIG_AddNewMask(res);
2015		  } else {
2016		    res = SWIG_AddCast(res);
2017		  }
2018		}
2019	      }
2020	      Py_DECREF(impconv);
2021	    }
2022	  }
2023	}
2024      }
2025      return res;
2026    }
2027  }
2028}
2029
2030/* Convert a function ptr value */
2031
2032SWIGRUNTIME int
2033SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2034  if (!PyCFunction_Check(obj)) {
2035    return SWIG_ConvertPtr(obj, ptr, ty, 0);
2036  } else {
2037    void *vptr = 0;
2038
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;
2042    if (desc) {
2043      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2044      if (!desc) return SWIG_ERROR;
2045    }
2046    if (ty) {
2047      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2048      if (!tc) return SWIG_ERROR;
2049      *ptr = SWIG_TypeCast(tc,vptr);
2050    } else {
2051      *ptr = vptr;
2052    }
2053    return SWIG_OK;
2054  }
2055}
2056
2057/* Convert a packed value value */
2058
2059SWIGRUNTIME int
2060SWIG_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;
2063  if (ty) {
2064    if (to != ty) {
2065      /* check type cast? */
2066      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2067      if (!tc) return SWIG_ERROR;
2068    }
2069  }
2070  return SWIG_OK;
2071}
2072
2073/* -----------------------------------------------------------------------------
2074 * Create a new pointer object
2075 * ----------------------------------------------------------------------------- */
2076
2077/*
2078  Create a new instance object, whitout calling __init__, and set the
2079  'this' attribute.
2080*/
2081
2082SWIGRUNTIME PyObject*
2083SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this)
2084{
2085#if (PY_VERSION_HEX >= 0x02020000)
2086  PyObject *inst = 0;
2087  PyObject *newraw = data->newraw;
2088  if (newraw) {
2089    inst = PyObject_Call(newraw, data->newargs, NULL);
2090    if (inst) {
2091#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2092      PyObject **dictptr = _PyObject_GetDictPtr(inst);
2093      if (dictptr != NULL) {
2094	PyObject *dict = *dictptr;
2095	if (dict == NULL) {
2096	  dict = PyDict_New();
2097	  *dictptr = dict;
2098	  PyDict_SetItem(dict, SWIG_This(), swig_this);
2099	}
2100      }
2101#else
2102      PyObject *key = SWIG_This();
2103      PyObject_SetAttr(inst, key, swig_this);
2104#endif
2105    }
2106  } else {
2107    PyObject *dict = PyDict_New();
2108    PyDict_SetItem(dict, SWIG_This(), swig_this);
2109    inst = PyInstance_NewRaw(data->newargs, dict);
2110    Py_DECREF(dict);
2111  }
2112  return inst;
2113#else
2114#if (PY_VERSION_HEX >= 0x02010000)
2115  PyObject *inst;
2116  PyObject *dict = PyDict_New();
2117  PyDict_SetItem(dict, SWIG_This(), swig_this);
2118  inst = PyInstance_NewRaw(data->newargs, dict);
2119  Py_DECREF(dict);
2120  return (PyObject *) inst;
2121#else
2122  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2123  if (inst == NULL) {
2124    return NULL;
2125  }
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) {
2130    Py_DECREF(inst);
2131    return NULL;
2132  }
2133#ifdef Py_TPFLAGS_HAVE_WEAKREFS
2134  inst->in_weakreflist = NULL;
2135#endif
2136#ifdef Py_TPFLAGS_GC
2137  PyObject_GC_Init(inst);
2138#endif
2139  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2140  return (PyObject *) inst;
2141#endif
2142#endif
2143}
2144
2145SWIGRUNTIME void
2146SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2147{
2148 PyObject *dict;
2149#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2150 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2151 if (dictptr != NULL) {
2152   dict = *dictptr;
2153   if (dict == NULL) {
2154     dict = PyDict_New();
2155     *dictptr = dict;
2156   }
2157   PyDict_SetItem(dict, SWIG_This(), swig_this);
2158   return;
2159 }
2160#endif
2161 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2162 PyDict_SetItem(dict, SWIG_This(), swig_this);
2163 Py_DECREF(dict);
2164}
2165
2166
2167SWIGINTERN PyObject *
2168SWIG_Python_InitShadowInstance(PyObject *args) {
2169  PyObject *obj[2];
2170  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
2171    return NULL;
2172  } else {
2173    PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2174    if (sthis) {
2175      PySwigObject_append((PyObject*) sthis, obj[1]);
2176    } else {
2177      SWIG_Python_SetSwigThis(obj[0], obj[1]);
2178    }
2179    return SWIG_Py_Void();
2180  }
2181}
2182
2183/* Create a new pointer object */
2184
2185SWIGRUNTIME PyObject *
2186SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
2187  if (!ptr) {
2188    return SWIG_Py_Void();
2189  } else {
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);
2195      if (inst) {
2196	Py_DECREF(robj);
2197	robj = inst;
2198      }
2199    }
2200    return robj;
2201  }
2202}
2203
2204/* Create a new packed object */
2205
2206SWIGRUNTIMEINLINE PyObject *
2207SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2208  return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2209}
2210
2211/* -----------------------------------------------------------------------------*
2212 *  Get type list
2213 * -----------------------------------------------------------------------------*/
2214
2215#ifdef SWIG_LINK_RUNTIME
2216void *SWIG_ReturnGlobalTypeList(void *);
2217#endif
2218
2219SWIGRUNTIME swig_module_info *
2220SWIG_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);
2226#else
2227    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2228				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2229    if (PyErr_Occurred()) {
2230      PyErr_Clear();
2231      type_pointer = (void *)0;
2232    }
2233#endif
2234  }
2235  return (swig_module_info *) type_pointer;
2236}
2237
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 */
2241SWIGINTERN int
2242PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2243{
2244  PyObject *dict;
2245  if (!PyModule_Check(m)) {
2246    PyErr_SetString(PyExc_TypeError,
2247		    "PyModule_AddObject() needs module as first arg");
2248    return SWIG_ERROR;
2249  }
2250  if (!o) {
2251    PyErr_SetString(PyExc_TypeError,
2252		    "PyModule_AddObject() needs non-NULL value");
2253    return SWIG_ERROR;
2254  }
2255
2256  dict = PyModule_GetDict(m);
2257  if (dict == NULL) {
2258    /* Internal error -- modules must have a dict! */
2259    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2260		 PyModule_GetName(m));
2261    return SWIG_ERROR;
2262  }
2263  if (PyDict_SetItemString(dict, name, o))
2264    return SWIG_ERROR;
2265  Py_DECREF(o);
2266  return SWIG_OK;
2267}
2268#endif
2269
2270SWIGRUNTIME void
2271SWIG_Python_DestroyModule(void *vptr)
2272{
2273  swig_module_info *swig_module = (swig_module_info *) vptr;
2274  swig_type_info **types = swig_module->types;
2275  size_t i;
2276  for (i =0; i < swig_module->size; ++i) {
2277    swig_type_info *ty = types[i];
2278    if (ty->owndata) {
2279      PySwigClientData *data = (PySwigClientData *) ty->clientdata;
2280      if (data) PySwigClientData_Del(data);
2281    }
2282  }
2283  Py_DECREF(SWIG_This());
2284}
2285
2286SWIGRUNTIME void
2287SWIG_Python_SetModule(swig_module_info *swig_module) {
2288  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
2289
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);
2295  } else {
2296    Py_XDECREF(pointer);
2297  }
2298}
2299
2300/* The python cached type query */
2301SWIGRUNTIME PyObject *
2302SWIG_Python_TypeCache(void) {
2303  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2304  return cache;
2305}
2306
2307SWIGRUNTIME swig_type_info *
2308SWIG_Python_TypeQuery(const char *type)
2309{
2310  PyObject *cache = SWIG_Python_TypeCache();
2311  PyObject *key = PyString_FromString(type);
2312  PyObject *obj = PyDict_GetItem(cache, key);
2313  swig_type_info *descriptor;
2314  if (obj) {
2315    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2316  } else {
2317    swig_module_info *swig_module = SWIG_Python_GetModule();
2318    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2319    if (descriptor) {
2320      obj = PyCObject_FromVoidPtr(descriptor, NULL);
2321      PyDict_SetItem(cache, key, obj);
2322      Py_DECREF(obj);
2323    }
2324  }
2325  Py_DECREF(key);
2326  return descriptor;
2327}
2328
2329/*
2330   For backward compatibility only
2331*/
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)
2335
2336SWIGRUNTIME int
2337SWIG_Python_AddErrMesg(const char* mesg, int infront)
2338{
2339  if (PyErr_Occurred()) {
2340    PyObject *type = 0;
2341    PyObject *value = 0;
2342    PyObject *traceback = 0;
2343    PyErr_Fetch(&type, &value, &traceback);
2344    if (value) {
2345      PyObject *old_str = PyObject_Str(value);
2346      Py_XINCREF(type);
2347      PyErr_Clear();
2348      if (infront) {
2349	PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str));
2350      } else {
2351	PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg);
2352      }
2353      Py_DECREF(old_str);
2354    }
2355    return 1;
2356  } else {
2357    return 0;
2358  }
2359}
2360
2361SWIGRUNTIME int
2362SWIG_Python_ArgFail(int argnum)
2363{
2364  if (PyErr_Occurred()) {
2365    /* add information about failing argument */
2366    char mesg[256];
2367    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2368    return SWIG_Python_AddErrMesg(mesg, 1);
2369  } else {
2370    return 0;
2371  }
2372}
2373
2374SWIGRUNTIMEINLINE const char *
2375PySwigObject_GetDesc(PyObject *self)
2376{
2377  PySwigObject *v = (PySwigObject *)self;
2378  swig_type_info *ty = v ? v->ty : 0;
2379  return ty ? ty->str : (char*)"";
2380}
2381
2382SWIGRUNTIME void
2383SWIG_Python_TypeError(const char *type, PyObject *obj)
2384{
2385  if (type) {
2386#if defined(SWIG_COBJECT_TYPES)
2387    if (obj && PySwigObject_Check(obj)) {
2388      const char *otype = (const char *) PySwigObject_GetDesc(obj);
2389      if (otype) {
2390	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received",
2391		     type, otype);
2392	return;
2393      }
2394    } else
2395#endif
2396    {
2397      const char *otype = (obj ? obj->ob_type->tp_name : 0);
2398      if (otype) {
2399	PyObject *str = PyObject_Str(obj);
2400	const char *cstr = str ? PyString_AsString(str) : 0;
2401	if (cstr) {
2402	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2403		       type, otype, cstr);
2404	} else {
2405	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2406		       type, otype);
2407	}
2408	Py_XDECREF(str);
2409	return;
2410      }
2411    }
2412    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2413  } else {
2414    PyErr_Format(PyExc_TypeError, "unexpected type is received");
2415  }
2416}
2417
2418
2419/* Convert a pointer value, signal an exception on a type mismatch */
2420SWIGRUNTIME void *
2421SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
2422  void *result;
2423  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2424    PyErr_Clear();
2425    if (flags & SWIG_POINTER_EXCEPTION) {
2426      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2427      SWIG_Python_ArgFail(argnum);
2428    }
2429  }
2430  return result;
2431}
2432
2433
2434#ifdef __cplusplus
2435#if 0
2436{ /* cc-mode */
2437#endif
2438}
2439#endif
2440
2441
2442
2443#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2444
2445#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2446
2447
2448
2449/* -------- TYPES TABLE (BEGIN) -------- */
2450
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]
2455static swig_type_info *swig_types[5];
2456static 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)
2459
2460/* -------- TYPES TABLE (END) -------- */
2461
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"
2465# endif
2466#endif
2467
2468/*-----------------------------------------------
2469              @(target):= _netpgppython.so
2470  ------------------------------------------------*/
2471#define SWIG_init    init_netpgppython
2472
2473#define SWIG_name    "_netpgppython"
2474
2475#define SWIGVERSION 0x010331
2476#define SWIG_VERSION SWIGVERSION
2477
2478
2479#define SWIG_as_voidptr(a) (void *)((const void *)(a))
2480#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
2481
2482
2483#include <netpgp.h>
2484
2485
2486
2487
2488#include <limits.h>
2489#ifndef LLONG_MIN
2490# define LLONG_MIN	LONG_LONG_MIN
2491#endif
2492#ifndef LLONG_MAX
2493# define LLONG_MAX	LONG_LONG_MAX
2494#endif
2495#ifndef ULLONG_MAX
2496# define ULLONG_MAX	ULONG_LONG_MAX
2497#endif
2498
2499
2500SWIGINTERN int
2501SWIG_AsVal_double (PyObject *obj, double *val)
2502{
2503  int res = SWIG_TypeError;
2504  if (PyFloat_Check(obj)) {
2505    if (val) *val = PyFloat_AsDouble(obj);
2506    return SWIG_OK;
2507  } else if (PyInt_Check(obj)) {
2508    if (val) *val = PyInt_AsLong(obj);
2509    return SWIG_OK;
2510  } else if (PyLong_Check(obj)) {
2511    double v = PyLong_AsDouble(obj);
2512    if (!PyErr_Occurred()) {
2513      if (val) *val = v;
2514      return SWIG_OK;
2515    } else {
2516      PyErr_Clear();
2517    }
2518  }
2519#ifdef SWIG_PYTHON_CAST_MODE
2520  {
2521    int dispatch = 0;
2522    double d = PyFloat_AsDouble(obj);
2523    if (!PyErr_Occurred()) {
2524      if (val) *val = d;
2525      return SWIG_AddCast(SWIG_OK);
2526    } else {
2527      PyErr_Clear();
2528    }
2529    if (!dispatch) {
2530      long v = PyLong_AsLong(obj);
2531      if (!PyErr_Occurred()) {
2532	if (val) *val = v;
2533	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
2534      } else {
2535	PyErr_Clear();
2536      }
2537    }
2538  }
2539#endif
2540  return res;
2541}
2542
2543
2544#include <float.h>
2545
2546
2547#include <math.h>
2548
2549
2550SWIGINTERNINLINE int
2551SWIG_CanCastAsInteger(double *d, double min, double max) {
2552  double x = *d;
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)) {
2558     errno = 0;
2559   } else {
2560     double summ, reps, diff;
2561     if (rd < x) {
2562       diff = x - rd;
2563     } else if (rd > x) {
2564       diff = rd - x;
2565     } else {
2566       return 1;
2567     }
2568     summ = rd + x;
2569     reps = diff/summ;
2570     if (reps < 8*DBL_EPSILON) {
2571       *d = rd;
2572       return 1;
2573     }
2574   }
2575  }
2576  return 0;
2577}
2578
2579
2580SWIGINTERN int
2581SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
2582{
2583  if (PyInt_Check(obj)) {
2584    long v = PyInt_AsLong(obj);
2585    if (v >= 0) {
2586      if (val) *val = v;
2587      return SWIG_OK;
2588    } else {
2589      return SWIG_OverflowError;
2590    }
2591  } else if (PyLong_Check(obj)) {
2592    unsigned long v = PyLong_AsUnsignedLong(obj);
2593    if (!PyErr_Occurred()) {
2594      if (val) *val = v;
2595      return SWIG_OK;
2596    } else {
2597      PyErr_Clear();
2598    }
2599  }
2600#ifdef SWIG_PYTHON_CAST_MODE
2601  {
2602    int dispatch = 0;
2603    unsigned long v = PyLong_AsUnsignedLong(obj);
2604    if (!PyErr_Occurred()) {
2605      if (val) *val = v;
2606      return SWIG_AddCast(SWIG_OK);
2607    } else {
2608      PyErr_Clear();
2609    }
2610    if (!dispatch) {
2611      double d;
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);
2615	return res;
2616      }
2617    }
2618  }
2619#endif
2620  return SWIG_TypeError;
2621}
2622
2623
2624SWIGINTERN int
2625SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
2626{
2627  unsigned long v;
2628  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
2629  if (SWIG_IsOK(res)) {
2630    if ((v > UINT_MAX)) {
2631      return SWIG_OverflowError;
2632    } else {
2633      if (val) *val = (unsigned int)(v);
2634    }
2635  }
2636  return res;
2637}
2638
2639
2640  #define SWIG_From_long   PyInt_FromLong
2641
2642
2643SWIGINTERNINLINE PyObject*
2644SWIG_From_unsigned_SS_long  (unsigned long value)
2645{
2646  return (value > LONG_MAX) ?
2647    PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value));
2648}
2649
2650
2651SWIGINTERNINLINE PyObject *
2652SWIG_From_unsigned_SS_int  (unsigned int value)
2653{
2654  return SWIG_From_unsigned_SS_long  (value);
2655}
2656
2657
2658SWIGINTERNINLINE PyObject *
2659SWIG_From_int  (int value)
2660{
2661  return SWIG_From_long  (value);
2662}
2663
2664
2665SWIGINTERN swig_type_info*
2666SWIG_pchar_descriptor(void)
2667{
2668  static int init = 0;
2669  static swig_type_info* info = 0;
2670  if (!init) {
2671    info = SWIG_TypeQuery("_p_char");
2672    init = 1;
2673  }
2674  return info;
2675}
2676
2677
2678SWIGINTERN int
2679SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
2680{
2681  if (PyString_Check(obj)) {
2682    char *cstr; Py_ssize_t len;
2683    PyString_AsStringAndSize(obj, &cstr, &len);
2684    if (cptr)  {
2685      if (alloc) {
2686	/*
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.
2691
2692	   The default behavior is just to return the pointer value,
2693	   so, be careful.
2694	*/
2695#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
2696	if (*alloc != SWIG_OLDOBJ)
2697#else
2698	if (*alloc == SWIG_NEWOBJ)
2699#endif
2700	  {
2701	    *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
2702	    *alloc = SWIG_NEWOBJ;
2703	  }
2704	else {
2705	  *cptr = cstr;
2706	  *alloc = SWIG_OLDOBJ;
2707	}
2708      } else {
2709	*cptr = PyString_AsString(obj);
2710      }
2711    }
2712    if (psize) *psize = len + 1;
2713    return SWIG_OK;
2714  } else {
2715    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2716    if (pchar_descriptor) {
2717      void* vptr = 0;
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;
2722	return SWIG_OK;
2723      }
2724    }
2725  }
2726  return SWIG_TypeError;
2727}
2728
2729
2730
2731
2732
2733SWIGINTERNINLINE PyObject *
2734SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2735{
2736  if (carray) {
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();
2741    } else {
2742      return PyString_FromStringAndSize(carray, (int)(size));
2743    }
2744  } else {
2745    return SWIG_Py_Void();
2746  }
2747}
2748
2749
2750SWIGINTERNINLINE PyObject *
2751SWIG_FromCharPtr(const char *cptr)
2752{
2753  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2754}
2755
2756
2757SWIGINTERN int
2758SWIG_AsVal_long (PyObject *obj, long* val)
2759{
2760  if (PyInt_Check(obj)) {
2761    if (val) *val = PyInt_AsLong(obj);
2762    return SWIG_OK;
2763  } else if (PyLong_Check(obj)) {
2764    long v = PyLong_AsLong(obj);
2765    if (!PyErr_Occurred()) {
2766      if (val) *val = v;
2767      return SWIG_OK;
2768    } else {
2769      PyErr_Clear();
2770    }
2771  }
2772#ifdef SWIG_PYTHON_CAST_MODE
2773  {
2774    int dispatch = 0;
2775    long v = PyInt_AsLong(obj);
2776    if (!PyErr_Occurred()) {
2777      if (val) *val = v;
2778      return SWIG_AddCast(SWIG_OK);
2779    } else {
2780      PyErr_Clear();
2781    }
2782    if (!dispatch) {
2783      double d;
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);
2787	return res;
2788      }
2789    }
2790  }
2791#endif
2792  return SWIG_TypeError;
2793}
2794
2795
2796SWIGINTERN int
2797SWIG_AsVal_int (PyObject * obj, int *val)
2798{
2799  long v;
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;
2804    } else {
2805      if (val) *val = (int)(v);
2806    }
2807  }
2808  return res;
2809}
2810
2811
2812SWIGINTERNINLINE int
2813SWIG_AsVal_size_t (PyObject * obj, size_t *val)
2814{
2815  unsigned long v;
2816  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
2817  if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2818  return res;
2819}
2820
2821#ifdef __cplusplus
2822extern "C" {
2823#endif
2824SWIGINTERN PyObject *_wrap_netpgp_t_c_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2825  PyObject *resultobj = 0;
2826  netpgp_t *arg1 = (netpgp_t *) 0 ;
2827  unsigned int arg2 ;
2828  void *argp1 = 0 ;
2829  int res1 = 0 ;
2830  unsigned int val2 ;
2831  int ecode2 = 0 ;
2832  PyObject * obj0 = 0 ;
2833  PyObject * obj1 = 0 ;
2834
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 *""'");
2839  }
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""'");
2844  }
2845  arg2 = (unsigned int)(val2);
2846  if (arg1) (arg1)->c = arg2;
2847
2848  resultobj = SWIG_Py_Void();
2849  return resultobj;
2850fail:
2851  return NULL;
2852}
2853
2854
2855SWIGINTERN 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;
2859  void *argp1 = 0 ;
2860  int res1 = 0 ;
2861  PyObject * obj0 = 0 ;
2862
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 *""'");
2867  }
2868  arg1 = (netpgp_t *)(argp1);
2869  result = (unsigned int) ((arg1)->c);
2870  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
2871  return resultobj;
2872fail:
2873  return NULL;
2874}
2875
2876
2877SWIGINTERN PyObject *_wrap_netpgp_t_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2878  PyObject *resultobj = 0;
2879  netpgp_t *arg1 = (netpgp_t *) 0 ;
2880  unsigned int arg2 ;
2881  void *argp1 = 0 ;
2882  int res1 = 0 ;
2883  unsigned int val2 ;
2884  int ecode2 = 0 ;
2885  PyObject * obj0 = 0 ;
2886  PyObject * obj1 = 0 ;
2887
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 *""'");
2892  }
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""'");
2897  }
2898  arg2 = (unsigned int)(val2);
2899  if (arg1) (arg1)->size = arg2;
2900
2901  resultobj = SWIG_Py_Void();
2902  return resultobj;
2903fail:
2904  return NULL;
2905}
2906
2907
2908SWIGINTERN 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;
2912  void *argp1 = 0 ;
2913  int res1 = 0 ;
2914  PyObject * obj0 = 0 ;
2915
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 *""'");
2920  }
2921  arg1 = (netpgp_t *)(argp1);
2922  result = (unsigned int) ((arg1)->size);
2923  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
2924  return resultobj;
2925fail:
2926  return NULL;
2927}
2928
2929
2930SWIGINTERN 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 ;
2934  void *argp1 = 0 ;
2935  int res1 = 0 ;
2936  void *argp2 = 0 ;
2937  int res2 = 0 ;
2938  PyObject * obj0 = 0 ;
2939  PyObject * obj1 = 0 ;
2940
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 *""'");
2945  }
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 **""'");
2950  }
2951  arg2 = (char **)(argp2);
2952  if (arg1) (arg1)->name = arg2;
2953
2954  resultobj = SWIG_Py_Void();
2955  return resultobj;
2956fail:
2957  return NULL;
2958}
2959
2960
2961SWIGINTERN PyObject *_wrap_netpgp_t_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2962  PyObject *resultobj = 0;
2963  netpgp_t *arg1 = (netpgp_t *) 0 ;
2964  char **result = 0 ;
2965  void *argp1 = 0 ;
2966  int res1 = 0 ;
2967  PyObject * obj0 = 0 ;
2968
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 *""'");
2973  }
2974  arg1 = (netpgp_t *)(argp1);
2975  result = (char **) ((arg1)->name);
2976  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 |  0 );
2977  return resultobj;
2978fail:
2979  return NULL;
2980}
2981
2982
2983SWIGINTERN 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 ;
2987  void *argp1 = 0 ;
2988  int res1 = 0 ;
2989  void *argp2 = 0 ;
2990  int res2 = 0 ;
2991  PyObject * obj0 = 0 ;
2992  PyObject * obj1 = 0 ;
2993
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 *""'");
2998  }
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 **""'");
3003  }
3004  arg2 = (char **)(argp2);
3005  if (arg1) (arg1)->value = arg2;
3006
3007  resultobj = SWIG_Py_Void();
3008  return resultobj;
3009fail:
3010  return NULL;
3011}
3012
3013
3014SWIGINTERN PyObject *_wrap_netpgp_t_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3015  PyObject *resultobj = 0;
3016  netpgp_t *arg1 = (netpgp_t *) 0 ;
3017  char **result = 0 ;
3018  void *argp1 = 0 ;
3019  int res1 = 0 ;
3020  PyObject * obj0 = 0 ;
3021
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 *""'");
3026  }
3027  arg1 = (netpgp_t *)(argp1);
3028  result = (char **) ((arg1)->value);
3029  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 |  0 );
3030  return resultobj;
3031fail:
3032  return NULL;
3033}
3034
3035
3036SWIGINTERN 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 ;
3040  void *argp1 = 0 ;
3041  int res1 = 0 ;
3042  int res2 ;
3043  PyObject * obj0 = 0 ;
3044  PyObject * obj1 = 0 ;
3045
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 *""'");
3050  }
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 *""'");
3055  }
3056  if (arg1) (arg1)->pubring = arg2;
3057
3058  resultobj = SWIG_Py_Void();
3059  return resultobj;
3060fail:
3061  return NULL;
3062}
3063
3064
3065SWIGINTERN PyObject *_wrap_netpgp_t_pubring_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3066  PyObject *resultobj = 0;
3067  netpgp_t *arg1 = (netpgp_t *) 0 ;
3068  void *result = 0 ;
3069  void *argp1 = 0 ;
3070  int res1 = 0 ;
3071  PyObject * obj0 = 0 ;
3072
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 *""'");
3077  }
3078  arg1 = (netpgp_t *)(argp1);
3079  result = (void *) ((arg1)->pubring);
3080  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
3081  return resultobj;
3082fail:
3083  return NULL;
3084}
3085
3086
3087SWIGINTERN 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 ;
3091  void *argp1 = 0 ;
3092  int res1 = 0 ;
3093  int res2 ;
3094  PyObject * obj0 = 0 ;
3095  PyObject * obj1 = 0 ;
3096
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 *""'");
3101  }
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 *""'");
3106  }
3107  if (arg1) (arg1)->secring = arg2;
3108
3109  resultobj = SWIG_Py_Void();
3110  return resultobj;
3111fail:
3112  return NULL;
3113}
3114
3115
3116SWIGINTERN PyObject *_wrap_netpgp_t_secring_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3117  PyObject *resultobj = 0;
3118  netpgp_t *arg1 = (netpgp_t *) 0 ;
3119  void *result = 0 ;
3120  void *argp1 = 0 ;
3121  int res1 = 0 ;
3122  PyObject * obj0 = 0 ;
3123
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 *""'");
3128  }
3129  arg1 = (netpgp_t *)(argp1);
3130  result = (void *) ((arg1)->secring);
3131  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
3132  return resultobj;
3133fail:
3134  return NULL;
3135}
3136
3137
3138SWIGINTERN 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 ;
3142  void *argp1 = 0 ;
3143  int res1 = 0 ;
3144  int res2 ;
3145  PyObject * obj0 = 0 ;
3146  PyObject * obj1 = 0 ;
3147
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 *""'");
3152  }
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 *""'");
3157  }
3158  if (arg1) (arg1)->io = arg2;
3159
3160  resultobj = SWIG_Py_Void();
3161  return resultobj;
3162fail:
3163  return NULL;
3164}
3165
3166
3167SWIGINTERN PyObject *_wrap_netpgp_t_io_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3168  PyObject *resultobj = 0;
3169  netpgp_t *arg1 = (netpgp_t *) 0 ;
3170  void *result = 0 ;
3171  void *argp1 = 0 ;
3172  int res1 = 0 ;
3173  PyObject * obj0 = 0 ;
3174
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 *""'");
3179  }
3180  arg1 = (netpgp_t *)(argp1);
3181  result = (void *) ((arg1)->io);
3182  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
3183  return resultobj;
3184fail:
3185  return NULL;
3186}
3187
3188
3189SWIGINTERN 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 ;
3193  void *argp1 = 0 ;
3194  int res1 = 0 ;
3195  int res2 ;
3196  PyObject * obj0 = 0 ;
3197  PyObject * obj1 = 0 ;
3198
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 *""'");
3203  }
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 *""'");
3208  }
3209  if (arg1) (arg1)->passfp = arg2;
3210
3211  resultobj = SWIG_Py_Void();
3212  return resultobj;
3213fail:
3214  return NULL;
3215}
3216
3217
3218SWIGINTERN PyObject *_wrap_netpgp_t_passfp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3219  PyObject *resultobj = 0;
3220  netpgp_t *arg1 = (netpgp_t *) 0 ;
3221  void *result = 0 ;
3222  void *argp1 = 0 ;
3223  int res1 = 0 ;
3224  PyObject * obj0 = 0 ;
3225
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 *""'");
3230  }
3231  arg1 = (netpgp_t *)(argp1);
3232  result = (void *) ((arg1)->passfp);
3233  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
3234  return resultobj;
3235fail:
3236  return NULL;
3237}
3238
3239
3240SWIGINTERN PyObject *_wrap_new_netpgp_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3241  PyObject *resultobj = 0;
3242  netpgp_t *result = 0 ;
3243
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 );
3247  return resultobj;
3248fail:
3249  return NULL;
3250}
3251
3252
3253SWIGINTERN PyObject *_wrap_delete_netpgp_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3254  PyObject *resultobj = 0;
3255  netpgp_t *arg1 = (netpgp_t *) 0 ;
3256  void *argp1 = 0 ;
3257  int res1 = 0 ;
3258  PyObject * obj0 = 0 ;
3259
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 *""'");
3264  }
3265  arg1 = (netpgp_t *)(argp1);
3266  free((char *) arg1);
3267
3268  resultobj = SWIG_Py_Void();
3269  return resultobj;
3270fail:
3271  return NULL;
3272}
3273
3274
3275SWIGINTERN PyObject *netpgp_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3276  PyObject *obj;
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();
3280}
3281
3282SWIGINTERN PyObject *_wrap_netpgp_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3283  PyObject *resultobj = 0;
3284  netpgp_t *arg1 = (netpgp_t *) 0 ;
3285  int result;
3286  void *argp1 = 0 ;
3287  int res1 = 0 ;
3288  PyObject * obj0 = 0 ;
3289
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 *""'");
3294  }
3295  arg1 = (netpgp_t *)(argp1);
3296  result = (int)netpgp_init(arg1);
3297  resultobj = SWIG_From_int((int)(result));
3298  return resultobj;
3299fail:
3300  return NULL;
3301}
3302
3303
3304SWIGINTERN PyObject *_wrap_netpgp_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3305  PyObject *resultobj = 0;
3306  netpgp_t *arg1 = (netpgp_t *) 0 ;
3307  int result;
3308  void *argp1 = 0 ;
3309  int res1 = 0 ;
3310  PyObject * obj0 = 0 ;
3311
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 *""'");
3316  }
3317  arg1 = (netpgp_t *)(argp1);
3318  result = (int)netpgp_end(arg1);
3319  resultobj = SWIG_From_int((int)(result));
3320  return resultobj;
3321fail:
3322  return NULL;
3323}
3324
3325
3326SWIGINTERN PyObject *_wrap_netpgp_set_debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3327  PyObject *resultobj = 0;
3328  char *arg1 = (char *) 0 ;
3329  int result;
3330  int res1 ;
3331  char *buf1 = 0 ;
3332  int alloc1 = 0 ;
3333  PyObject * obj0 = 0 ;
3334
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 *""'");
3339  }
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);
3344  return resultobj;
3345fail:
3346  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3347  return NULL;
3348}
3349
3350
3351SWIGINTERN PyObject *_wrap_netpgp_get_debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3352  PyObject *resultobj = 0;
3353  char *arg1 = (char *) 0 ;
3354  int result;
3355  int res1 ;
3356  char *buf1 = 0 ;
3357  int alloc1 = 0 ;
3358  PyObject * obj0 = 0 ;
3359
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 *""'");
3364  }
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);
3369  return resultobj;
3370fail:
3371  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3372  return NULL;
3373}
3374
3375
3376SWIGINTERN PyObject *_wrap_netpgp_get_info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3377  PyObject *resultobj = 0;
3378  char *arg1 = (char *) 0 ;
3379  char *result = 0 ;
3380  int res1 ;
3381  char *buf1 = 0 ;
3382  int alloc1 = 0 ;
3383  PyObject * obj0 = 0 ;
3384
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 *""'");
3389  }
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);
3394  return resultobj;
3395fail:
3396  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
3397  return NULL;
3398}
3399
3400
3401SWIGINTERN 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 ;
3405  int arg3 ;
3406  char *arg4 = (char *) 0 ;
3407  int result;
3408  void *argp1 = 0 ;
3409  int res1 = 0 ;
3410  int res2 ;
3411  char *buf2 = 0 ;
3412  int alloc2 = 0 ;
3413  int val3 ;
3414  int ecode3 = 0 ;
3415  int res4 ;
3416  char *buf4 = 0 ;
3417  int alloc4 = 0 ;
3418  PyObject * obj0 = 0 ;
3419  PyObject * obj1 = 0 ;
3420  PyObject * obj2 = 0 ;
3421  PyObject * obj3 = 0 ;
3422
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 *""'");
3427  }
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 *""'");
3432  }
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""'");
3437  }
3438  arg3 = (int)(val3);
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 *""'");
3442  }
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);
3448  return resultobj;
3449fail:
3450  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3451  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
3452  return NULL;
3453}
3454
3455
3456SWIGINTERN 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 ;
3461  int result;
3462  void *argp1 = 0 ;
3463  int res1 = 0 ;
3464  int res2 ;
3465  char *buf2 = 0 ;
3466  int alloc2 = 0 ;
3467  int res3 ;
3468  char *buf3 = 0 ;
3469  int alloc3 = 0 ;
3470  PyObject * obj0 = 0 ;
3471  PyObject * obj1 = 0 ;
3472  PyObject * obj2 = 0 ;
3473
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 *""'");
3478  }
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 *""'");
3483  }
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 *""'");
3488  }
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);
3494  return resultobj;
3495fail:
3496  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3497  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3498  return NULL;
3499}
3500
3501
3502SWIGINTERN 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 ;
3506  char *result = 0 ;
3507  void *argp1 = 0 ;
3508  int res1 = 0 ;
3509  int res2 ;
3510  char *buf2 = 0 ;
3511  int alloc2 = 0 ;
3512  PyObject * obj0 = 0 ;
3513  PyObject * obj1 = 0 ;
3514
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 *""'");
3519  }
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 *""'");
3524  }
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);
3529  return resultobj;
3530fail:
3531  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3532  return NULL;
3533}
3534
3535
3536SWIGINTERN PyObject *_wrap_netpgp_incvar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3537  PyObject *resultobj = 0;
3538  netpgp_t *arg1 = (netpgp_t *) 0 ;
3539  char *arg2 = (char *) 0 ;
3540  int arg3 ;
3541  int result;
3542  void *argp1 = 0 ;
3543  int res1 = 0 ;
3544  int res2 ;
3545  char *buf2 = 0 ;
3546  int alloc2 = 0 ;
3547  int val3 ;
3548  int ecode3 = 0 ;
3549  PyObject * obj0 = 0 ;
3550  PyObject * obj1 = 0 ;
3551  PyObject * obj2 = 0 ;
3552
3553  if (!PyArg_ParseTuple(args,(char *)"OOO:netpgp_incvar",&obj0,&obj1,&obj2)) SWIG_fail;
3554  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3555  if (!SWIG_IsOK(res1)) {
3556    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_incvar" "', argument " "1"" of type '" "netpgp_t *""'");
3557  }
3558  arg1 = (netpgp_t *)(argp1);
3559  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3560  if (!SWIG_IsOK(res2)) {
3561    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_incvar" "', argument " "2"" of type '" "char const *""'");
3562  }
3563  arg2 = (char *)(buf2);
3564  ecode3 = SWIG_AsVal_int(obj2, &val3);
3565  if (!SWIG_IsOK(ecode3)) {
3566    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_incvar" "', argument " "3"" of type '" "int""'");
3567  }
3568  arg3 = (int)(val3);
3569  result = (int)netpgp_incvar(arg1,(char const *)arg2,arg3);
3570  resultobj = SWIG_From_int((int)(result));
3571  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3572  return resultobj;
3573fail:
3574  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3575  return NULL;
3576}
3577
3578
3579SWIGINTERN PyObject *_wrap_netpgp_unsetvar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3580  PyObject *resultobj = 0;
3581  netpgp_t *arg1 = (netpgp_t *) 0 ;
3582  char *arg2 = (char *) 0 ;
3583  int result;
3584  void *argp1 = 0 ;
3585  int res1 = 0 ;
3586  int res2 ;
3587  char *buf2 = 0 ;
3588  int alloc2 = 0 ;
3589  PyObject * obj0 = 0 ;
3590  PyObject * obj1 = 0 ;
3591
3592  if (!PyArg_ParseTuple(args,(char *)"OO:netpgp_unsetvar",&obj0,&obj1)) SWIG_fail;
3593  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3594  if (!SWIG_IsOK(res1)) {
3595    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_unsetvar" "', argument " "1"" of type '" "netpgp_t *""'");
3596  }
3597  arg1 = (netpgp_t *)(argp1);
3598  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3599  if (!SWIG_IsOK(res2)) {
3600    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_unsetvar" "', argument " "2"" of type '" "char const *""'");
3601  }
3602  arg2 = (char *)(buf2);
3603  result = (int)netpgp_unsetvar(arg1,(char const *)arg2);
3604  resultobj = SWIG_From_int((int)(result));
3605  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3606  return resultobj;
3607fail:
3608  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3609  return NULL;
3610}
3611
3612
3613SWIGINTERN PyObject *_wrap_netpgp_set_homedir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3614  PyObject *resultobj = 0;
3615  netpgp_t *arg1 = (netpgp_t *) 0 ;
3616  char *arg2 = (char *) 0 ;
3617  char *arg3 = (char *) 0 ;
3618  int arg4 ;
3619  int result;
3620  void *argp1 = 0 ;
3621  int res1 = 0 ;
3622  int res2 ;
3623  char *buf2 = 0 ;
3624  int alloc2 = 0 ;
3625  int res3 ;
3626  char *buf3 = 0 ;
3627  int alloc3 = 0 ;
3628  int val4 ;
3629  int ecode4 = 0 ;
3630  PyObject * obj0 = 0 ;
3631  PyObject * obj1 = 0 ;
3632  PyObject * obj2 = 0 ;
3633  PyObject * obj3 = 0 ;
3634
3635  if (!PyArg_ParseTuple(args,(char *)"OOOO:netpgp_set_homedir",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
3636  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3637  if (!SWIG_IsOK(res1)) {
3638    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_set_homedir" "', argument " "1"" of type '" "netpgp_t *""'");
3639  }
3640  arg1 = (netpgp_t *)(argp1);
3641  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3642  if (!SWIG_IsOK(res2)) {
3643    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_set_homedir" "', argument " "2"" of type '" "char *""'");
3644  }
3645  arg2 = (char *)(buf2);
3646  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
3647  if (!SWIG_IsOK(res3)) {
3648    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_set_homedir" "', argument " "3"" of type '" "char const *""'");
3649  }
3650  arg3 = (char *)(buf3);
3651  ecode4 = SWIG_AsVal_int(obj3, &val4);
3652  if (!SWIG_IsOK(ecode4)) {
3653    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_set_homedir" "', argument " "4"" of type '" "int""'");
3654  }
3655  arg4 = (int)(val4);
3656  result = (int)netpgp_set_homedir(arg1,arg2,(char const *)arg3,arg4);
3657  resultobj = SWIG_From_int((int)(result));
3658  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3659  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3660  return resultobj;
3661fail:
3662  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3663  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3664  return NULL;
3665}
3666
3667
3668SWIGINTERN PyObject *_wrap_netpgp_list_keys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3669  PyObject *resultobj = 0;
3670  netpgp_t *arg1 = (netpgp_t *) 0 ;
3671  int arg2 ;
3672  int result;
3673  void *argp1 = 0 ;
3674  int res1 = 0 ;
3675  int val2 ;
3676  int ecode2 = 0 ;
3677  PyObject * obj0 = 0 ;
3678  PyObject * obj1 = 0 ;
3679
3680  if (!PyArg_ParseTuple(args,(char *)"OO:netpgp_list_keys",&obj0,&obj1)) SWIG_fail;
3681  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3682  if (!SWIG_IsOK(res1)) {
3683    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_list_keys" "', argument " "1"" of type '" "netpgp_t *""'");
3684  }
3685  arg1 = (netpgp_t *)(argp1);
3686  ecode2 = SWIG_AsVal_int(obj1, &val2);
3687  if (!SWIG_IsOK(ecode2)) {
3688    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "netpgp_list_keys" "', argument " "2"" of type '" "int""'");
3689  }
3690  arg2 = (int)(val2);
3691  result = (int)netpgp_list_keys(arg1,arg2);
3692  resultobj = SWIG_From_int((int)(result));
3693  return resultobj;
3694fail:
3695  return NULL;
3696}
3697
3698
3699SWIGINTERN PyObject *_wrap_netpgp_find_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3700  PyObject *resultobj = 0;
3701  netpgp_t *arg1 = (netpgp_t *) 0 ;
3702  char *arg2 = (char *) 0 ;
3703  int result;
3704  void *argp1 = 0 ;
3705  int res1 = 0 ;
3706  int res2 ;
3707  char *buf2 = 0 ;
3708  int alloc2 = 0 ;
3709  PyObject * obj0 = 0 ;
3710  PyObject * obj1 = 0 ;
3711
3712  if (!PyArg_ParseTuple(args,(char *)"OO:netpgp_find_key",&obj0,&obj1)) SWIG_fail;
3713  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3714  if (!SWIG_IsOK(res1)) {
3715    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_find_key" "', argument " "1"" of type '" "netpgp_t *""'");
3716  }
3717  arg1 = (netpgp_t *)(argp1);
3718  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3719  if (!SWIG_IsOK(res2)) {
3720    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_find_key" "', argument " "2"" of type '" "char *""'");
3721  }
3722  arg2 = (char *)(buf2);
3723  result = (int)netpgp_find_key(arg1,arg2);
3724  resultobj = SWIG_From_int((int)(result));
3725  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3726  return resultobj;
3727fail:
3728  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3729  return NULL;
3730}
3731
3732
3733SWIGINTERN PyObject *_wrap_netpgp_get_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3734  PyObject *resultobj = 0;
3735  netpgp_t *arg1 = (netpgp_t *) 0 ;
3736  char *arg2 = (char *) 0 ;
3737  char *arg3 = (char *) 0 ;
3738  char *result = 0 ;
3739  void *argp1 = 0 ;
3740  int res1 = 0 ;
3741  int res2 ;
3742  char *buf2 = 0 ;
3743  int alloc2 = 0 ;
3744  int res3 ;
3745  char *buf3 = 0 ;
3746  int alloc3 = 0 ;
3747  PyObject * obj0 = 0 ;
3748  PyObject * obj1 = 0 ;
3749  PyObject * obj2 = 0 ;
3750
3751  if (!PyArg_ParseTuple(args,(char *)"OOO:netpgp_get_key",&obj0,&obj1,&obj2)) SWIG_fail;
3752  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3753  if (!SWIG_IsOK(res1)) {
3754    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_get_key" "', argument " "1"" of type '" "netpgp_t *""'");
3755  }
3756  arg1 = (netpgp_t *)(argp1);
3757  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3758  if (!SWIG_IsOK(res2)) {
3759    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_get_key" "', argument " "2"" of type '" "char const *""'");
3760  }
3761  arg2 = (char *)(buf2);
3762  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
3763  if (!SWIG_IsOK(res3)) {
3764    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_get_key" "', argument " "3"" of type '" "char const *""'");
3765  }
3766  arg3 = (char *)(buf3);
3767  result = (char *)netpgp_get_key(arg1,(char const *)arg2,(char const *)arg3);
3768  resultobj = SWIG_FromCharPtr((const char *)result);
3769  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3770  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3771  return resultobj;
3772fail:
3773  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3774  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3775  return NULL;
3776}
3777
3778
3779SWIGINTERN PyObject *_wrap_netpgp_export_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3780  PyObject *resultobj = 0;
3781  netpgp_t *arg1 = (netpgp_t *) 0 ;
3782  char *arg2 = (char *) 0 ;
3783  char *result = 0 ;
3784  void *argp1 = 0 ;
3785  int res1 = 0 ;
3786  int res2 ;
3787  char *buf2 = 0 ;
3788  int alloc2 = 0 ;
3789  PyObject * obj0 = 0 ;
3790  PyObject * obj1 = 0 ;
3791
3792  if (!PyArg_ParseTuple(args,(char *)"OO:netpgp_export_key",&obj0,&obj1)) SWIG_fail;
3793  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3794  if (!SWIG_IsOK(res1)) {
3795    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_export_key" "', argument " "1"" of type '" "netpgp_t *""'");
3796  }
3797  arg1 = (netpgp_t *)(argp1);
3798  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3799  if (!SWIG_IsOK(res2)) {
3800    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_export_key" "', argument " "2"" of type '" "char *""'");
3801  }
3802  arg2 = (char *)(buf2);
3803  result = (char *)netpgp_export_key(arg1,arg2);
3804  resultobj = SWIG_FromCharPtr((const char *)result);
3805  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3806  return resultobj;
3807fail:
3808  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3809  return NULL;
3810}
3811
3812
3813SWIGINTERN PyObject *_wrap_netpgp_import_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3814  PyObject *resultobj = 0;
3815  netpgp_t *arg1 = (netpgp_t *) 0 ;
3816  char *arg2 = (char *) 0 ;
3817  int result;
3818  void *argp1 = 0 ;
3819  int res1 = 0 ;
3820  int res2 ;
3821  char *buf2 = 0 ;
3822  int alloc2 = 0 ;
3823  PyObject * obj0 = 0 ;
3824  PyObject * obj1 = 0 ;
3825
3826  if (!PyArg_ParseTuple(args,(char *)"OO:netpgp_import_key",&obj0,&obj1)) SWIG_fail;
3827  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3828  if (!SWIG_IsOK(res1)) {
3829    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_import_key" "', argument " "1"" of type '" "netpgp_t *""'");
3830  }
3831  arg1 = (netpgp_t *)(argp1);
3832  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3833  if (!SWIG_IsOK(res2)) {
3834    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_import_key" "', argument " "2"" of type '" "char *""'");
3835  }
3836  arg2 = (char *)(buf2);
3837  result = (int)netpgp_import_key(arg1,arg2);
3838  resultobj = SWIG_From_int((int)(result));
3839  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3840  return resultobj;
3841fail:
3842  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3843  return NULL;
3844}
3845
3846
3847SWIGINTERN PyObject *_wrap_netpgp_generate_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3848  PyObject *resultobj = 0;
3849  netpgp_t *arg1 = (netpgp_t *) 0 ;
3850  char *arg2 = (char *) 0 ;
3851  int arg3 ;
3852  int result;
3853  void *argp1 = 0 ;
3854  int res1 = 0 ;
3855  int res2 ;
3856  char *buf2 = 0 ;
3857  int alloc2 = 0 ;
3858  int val3 ;
3859  int ecode3 = 0 ;
3860  PyObject * obj0 = 0 ;
3861  PyObject * obj1 = 0 ;
3862  PyObject * obj2 = 0 ;
3863
3864  if (!PyArg_ParseTuple(args,(char *)"OOO:netpgp_generate_key",&obj0,&obj1,&obj2)) SWIG_fail;
3865  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3866  if (!SWIG_IsOK(res1)) {
3867    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_generate_key" "', argument " "1"" of type '" "netpgp_t *""'");
3868  }
3869  arg1 = (netpgp_t *)(argp1);
3870  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3871  if (!SWIG_IsOK(res2)) {
3872    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_generate_key" "', argument " "2"" of type '" "char *""'");
3873  }
3874  arg2 = (char *)(buf2);
3875  ecode3 = SWIG_AsVal_int(obj2, &val3);
3876  if (!SWIG_IsOK(ecode3)) {
3877    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_generate_key" "', argument " "3"" of type '" "int""'");
3878  }
3879  arg3 = (int)(val3);
3880  result = (int)netpgp_generate_key(arg1,arg2,arg3);
3881  resultobj = SWIG_From_int((int)(result));
3882  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3883  return resultobj;
3884fail:
3885  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3886  return NULL;
3887}
3888
3889
3890SWIGINTERN PyObject *_wrap_netpgp_encrypt_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3891  PyObject *resultobj = 0;
3892  netpgp_t *arg1 = (netpgp_t *) 0 ;
3893  char *arg2 = (char *) 0 ;
3894  char *arg3 = (char *) 0 ;
3895  char *arg4 = (char *) 0 ;
3896  int arg5 ;
3897  int result;
3898  void *argp1 = 0 ;
3899  int res1 = 0 ;
3900  int res2 ;
3901  char *buf2 = 0 ;
3902  int alloc2 = 0 ;
3903  int res3 ;
3904  char *buf3 = 0 ;
3905  int alloc3 = 0 ;
3906  int res4 ;
3907  char *buf4 = 0 ;
3908  int alloc4 = 0 ;
3909  int val5 ;
3910  int ecode5 = 0 ;
3911  PyObject * obj0 = 0 ;
3912  PyObject * obj1 = 0 ;
3913  PyObject * obj2 = 0 ;
3914  PyObject * obj3 = 0 ;
3915  PyObject * obj4 = 0 ;
3916
3917  if (!PyArg_ParseTuple(args,(char *)"OOOOO:netpgp_encrypt_file",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
3918  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3919  if (!SWIG_IsOK(res1)) {
3920    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_encrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
3921  }
3922  arg1 = (netpgp_t *)(argp1);
3923  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3924  if (!SWIG_IsOK(res2)) {
3925    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_encrypt_file" "', argument " "2"" of type '" "char const *""'");
3926  }
3927  arg2 = (char *)(buf2);
3928  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
3929  if (!SWIG_IsOK(res3)) {
3930    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_encrypt_file" "', argument " "3"" of type '" "char const *""'");
3931  }
3932  arg3 = (char *)(buf3);
3933  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
3934  if (!SWIG_IsOK(res4)) {
3935    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_encrypt_file" "', argument " "4"" of type '" "char *""'");
3936  }
3937  arg4 = (char *)(buf4);
3938  ecode5 = SWIG_AsVal_int(obj4, &val5);
3939  if (!SWIG_IsOK(ecode5)) {
3940    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_encrypt_file" "', argument " "5"" of type '" "int""'");
3941  }
3942  arg5 = (int)(val5);
3943  result = (int)netpgp_encrypt_file(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
3944  resultobj = SWIG_From_int((int)(result));
3945  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3946  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3947  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
3948  return resultobj;
3949fail:
3950  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3951  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3952  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
3953  return NULL;
3954}
3955
3956
3957SWIGINTERN PyObject *_wrap_netpgp_decrypt_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3958  PyObject *resultobj = 0;
3959  netpgp_t *arg1 = (netpgp_t *) 0 ;
3960  char *arg2 = (char *) 0 ;
3961  char *arg3 = (char *) 0 ;
3962  int arg4 ;
3963  int result;
3964  void *argp1 = 0 ;
3965  int res1 = 0 ;
3966  int res2 ;
3967  char *buf2 = 0 ;
3968  int alloc2 = 0 ;
3969  int res3 ;
3970  char *buf3 = 0 ;
3971  int alloc3 = 0 ;
3972  int val4 ;
3973  int ecode4 = 0 ;
3974  PyObject * obj0 = 0 ;
3975  PyObject * obj1 = 0 ;
3976  PyObject * obj2 = 0 ;
3977  PyObject * obj3 = 0 ;
3978
3979  if (!PyArg_ParseTuple(args,(char *)"OOOO:netpgp_decrypt_file",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
3980  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3981  if (!SWIG_IsOK(res1)) {
3982    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_decrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
3983  }
3984  arg1 = (netpgp_t *)(argp1);
3985  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
3986  if (!SWIG_IsOK(res2)) {
3987    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_decrypt_file" "', argument " "2"" of type '" "char const *""'");
3988  }
3989  arg2 = (char *)(buf2);
3990  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
3991  if (!SWIG_IsOK(res3)) {
3992    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_decrypt_file" "', argument " "3"" of type '" "char *""'");
3993  }
3994  arg3 = (char *)(buf3);
3995  ecode4 = SWIG_AsVal_int(obj3, &val4);
3996  if (!SWIG_IsOK(ecode4)) {
3997    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_decrypt_file" "', argument " "4"" of type '" "int""'");
3998  }
3999  arg4 = (int)(val4);
4000  result = (int)netpgp_decrypt_file(arg1,(char const *)arg2,arg3,arg4);
4001  resultobj = SWIG_From_int((int)(result));
4002  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4003  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4004  return resultobj;
4005fail:
4006  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4007  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4008  return NULL;
4009}
4010
4011
4012SWIGINTERN PyObject *_wrap_netpgp_sign_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4013  PyObject *resultobj = 0;
4014  netpgp_t *arg1 = (netpgp_t *) 0 ;
4015  char *arg2 = (char *) 0 ;
4016  char *arg3 = (char *) 0 ;
4017  char *arg4 = (char *) 0 ;
4018  int arg5 ;
4019  int arg6 ;
4020  int arg7 ;
4021  int result;
4022  void *argp1 = 0 ;
4023  int res1 = 0 ;
4024  int res2 ;
4025  char *buf2 = 0 ;
4026  int alloc2 = 0 ;
4027  int res3 ;
4028  char *buf3 = 0 ;
4029  int alloc3 = 0 ;
4030  int res4 ;
4031  char *buf4 = 0 ;
4032  int alloc4 = 0 ;
4033  int val5 ;
4034  int ecode5 = 0 ;
4035  int val6 ;
4036  int ecode6 = 0 ;
4037  int val7 ;
4038  int ecode7 = 0 ;
4039  PyObject * obj0 = 0 ;
4040  PyObject * obj1 = 0 ;
4041  PyObject * obj2 = 0 ;
4042  PyObject * obj3 = 0 ;
4043  PyObject * obj4 = 0 ;
4044  PyObject * obj5 = 0 ;
4045  PyObject * obj6 = 0 ;
4046
4047  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:netpgp_sign_file",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
4048  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
4049  if (!SWIG_IsOK(res1)) {
4050    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_sign_file" "', argument " "1"" of type '" "netpgp_t *""'");
4051  }
4052  arg1 = (netpgp_t *)(argp1);
4053  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4054  if (!SWIG_IsOK(res2)) {
4055    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_sign_file" "', argument " "2"" of type '" "char const *""'");
4056  }
4057  arg2 = (char *)(buf2);
4058  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4059  if (!SWIG_IsOK(res3)) {
4060    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_sign_file" "', argument " "3"" of type '" "char const *""'");
4061  }
4062  arg3 = (char *)(buf3);
4063  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
4064  if (!SWIG_IsOK(res4)) {
4065    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_sign_file" "', argument " "4"" of type '" "char *""'");
4066  }
4067  arg4 = (char *)(buf4);
4068  ecode5 = SWIG_AsVal_int(obj4, &val5);
4069  if (!SWIG_IsOK(ecode5)) {
4070    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_sign_file" "', argument " "5"" of type '" "int""'");
4071  }
4072  arg5 = (int)(val5);
4073  ecode6 = SWIG_AsVal_int(obj5, &val6);
4074  if (!SWIG_IsOK(ecode6)) {
4075    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_sign_file" "', argument " "6"" of type '" "int""'");
4076  }
4077  arg6 = (int)(val6);
4078  ecode7 = SWIG_AsVal_int(obj6, &val7);
4079  if (!SWIG_IsOK(ecode7)) {
4080    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "netpgp_sign_file" "', argument " "7"" of type '" "int""'");
4081  }
4082  arg7 = (int)(val7);
4083  result = (int)netpgp_sign_file(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7);
4084  resultobj = SWIG_From_int((int)(result));
4085  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4086  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4087  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4088  return resultobj;
4089fail:
4090  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4091  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4092  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4093  return NULL;
4094}
4095
4096
4097SWIGINTERN PyObject *_wrap_netpgp_verify_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4098  PyObject *resultobj = 0;
4099  netpgp_t *arg1 = (netpgp_t *) 0 ;
4100  char *arg2 = (char *) 0 ;
4101  char *arg3 = (char *) 0 ;
4102  int arg4 ;
4103  int result;
4104  void *argp1 = 0 ;
4105  int res1 = 0 ;
4106  int res2 ;
4107  char *buf2 = 0 ;
4108  int alloc2 = 0 ;
4109  int res3 ;
4110  char *buf3 = 0 ;
4111  int alloc3 = 0 ;
4112  int val4 ;
4113  int ecode4 = 0 ;
4114  PyObject * obj0 = 0 ;
4115  PyObject * obj1 = 0 ;
4116  PyObject * obj2 = 0 ;
4117  PyObject * obj3 = 0 ;
4118
4119  if (!PyArg_ParseTuple(args,(char *)"OOOO:netpgp_verify_file",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
4120  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
4121  if (!SWIG_IsOK(res1)) {
4122    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_verify_file" "', argument " "1"" of type '" "netpgp_t *""'");
4123  }
4124  arg1 = (netpgp_t *)(argp1);
4125  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4126  if (!SWIG_IsOK(res2)) {
4127    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_verify_file" "', argument " "2"" of type '" "char const *""'");
4128  }
4129  arg2 = (char *)(buf2);
4130  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4131  if (!SWIG_IsOK(res3)) {
4132    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_verify_file" "', argument " "3"" of type '" "char const *""'");
4133  }
4134  arg3 = (char *)(buf3);
4135  ecode4 = SWIG_AsVal_int(obj3, &val4);
4136  if (!SWIG_IsOK(ecode4)) {
4137    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_verify_file" "', argument " "4"" of type '" "int""'");
4138  }
4139  arg4 = (int)(val4);
4140  result = (int)netpgp_verify_file(arg1,(char const *)arg2,(char const *)arg3,arg4);
4141  resultobj = SWIG_From_int((int)(result));
4142  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4143  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4144  return resultobj;
4145fail:
4146  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4147  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4148  return NULL;
4149}
4150
4151
4152SWIGINTERN PyObject *_wrap_netpgp_sign_memory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4153  PyObject *resultobj = 0;
4154  netpgp_t *arg1 = (netpgp_t *) 0 ;
4155  char *arg2 = (char *) 0 ;
4156  char *arg3 = (char *) 0 ;
4157  size_t arg4 ;
4158  char *arg5 = (char *) 0 ;
4159  size_t arg6 ;
4160  unsigned int arg7 ;
4161  unsigned int arg8 ;
4162  int result;
4163  void *argp1 = 0 ;
4164  int res1 = 0 ;
4165  int res2 ;
4166  char *buf2 = 0 ;
4167  int alloc2 = 0 ;
4168  int res3 ;
4169  char *buf3 = 0 ;
4170  int alloc3 = 0 ;
4171  size_t val4 ;
4172  int ecode4 = 0 ;
4173  int res5 ;
4174  char *buf5 = 0 ;
4175  int alloc5 = 0 ;
4176  size_t val6 ;
4177  int ecode6 = 0 ;
4178  unsigned int val7 ;
4179  int ecode7 = 0 ;
4180  unsigned int val8 ;
4181  int ecode8 = 0 ;
4182  PyObject * obj0 = 0 ;
4183  PyObject * obj1 = 0 ;
4184  PyObject * obj2 = 0 ;
4185  PyObject * obj3 = 0 ;
4186  PyObject * obj4 = 0 ;
4187  PyObject * obj5 = 0 ;
4188  PyObject * obj6 = 0 ;
4189  PyObject * obj7 = 0 ;
4190
4191  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:netpgp_sign_memory",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
4192  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
4193  if (!SWIG_IsOK(res1)) {
4194    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_sign_memory" "', argument " "1"" of type '" "netpgp_t *""'");
4195  }
4196  arg1 = (netpgp_t *)(argp1);
4197  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4198  if (!SWIG_IsOK(res2)) {
4199    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_sign_memory" "', argument " "2"" of type '" "char const *""'");
4200  }
4201  arg2 = (char *)(buf2);
4202  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4203  if (!SWIG_IsOK(res3)) {
4204    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_sign_memory" "', argument " "3"" of type '" "char *""'");
4205  }
4206  arg3 = (char *)(buf3);
4207  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
4208  if (!SWIG_IsOK(ecode4)) {
4209    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_sign_memory" "', argument " "4"" of type '" "size_t""'");
4210  }
4211  arg4 = (size_t)(val4);
4212  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
4213  if (!SWIG_IsOK(res5)) {
4214    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "netpgp_sign_memory" "', argument " "5"" of type '" "char *""'");
4215  }
4216  arg5 = (char *)(buf5);
4217  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
4218  if (!SWIG_IsOK(ecode6)) {
4219    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_sign_memory" "', argument " "6"" of type '" "size_t""'");
4220  }
4221  arg6 = (size_t)(val6);
4222  ecode7 = SWIG_AsVal_unsigned_SS_int(obj6, &val7);
4223  if (!SWIG_IsOK(ecode7)) {
4224    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "netpgp_sign_memory" "', argument " "7"" of type '" "unsigned int""'");
4225  }
4226  arg7 = (unsigned int)(val7);
4227  ecode8 = SWIG_AsVal_unsigned_SS_int(obj7, &val8);
4228  if (!SWIG_IsOK(ecode8)) {
4229    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "netpgp_sign_memory" "', argument " "8"" of type '" "unsigned int""'");
4230  }
4231  arg8 = (unsigned int)(val8);
4232  result = (int)netpgp_sign_memory(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
4233  resultobj = SWIG_From_int((int)(result));
4234  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4235  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4236  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
4237  return resultobj;
4238fail:
4239  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4240  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4241  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
4242  return NULL;
4243}
4244
4245
4246SWIGINTERN PyObject *_wrap_netpgp_verify_memory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4247  PyObject *resultobj = 0;
4248  netpgp_t *arg1 = (netpgp_t *) 0 ;
4249  void *arg2 = (void *) 0 ;
4250  size_t arg3 ;
4251  void *arg4 = (void *) 0 ;
4252  size_t arg5 ;
4253  int arg6 ;
4254  int result;
4255  void *argp1 = 0 ;
4256  int res1 = 0 ;
4257  int res2 ;
4258  size_t val3 ;
4259  int ecode3 = 0 ;
4260  int res4 ;
4261  size_t val5 ;
4262  int ecode5 = 0 ;
4263  int val6 ;
4264  int ecode6 = 0 ;
4265  PyObject * obj0 = 0 ;
4266  PyObject * obj1 = 0 ;
4267  PyObject * obj2 = 0 ;
4268  PyObject * obj3 = 0 ;
4269  PyObject * obj4 = 0 ;
4270  PyObject * obj5 = 0 ;
4271
4272  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:netpgp_verify_memory",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
4273  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
4274  if (!SWIG_IsOK(res1)) {
4275    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_verify_memory" "', argument " "1"" of type '" "netpgp_t *""'");
4276  }
4277  arg1 = (netpgp_t *)(argp1);
4278  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
4279  if (!SWIG_IsOK(res2)) {
4280    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_verify_memory" "', argument " "2"" of type '" "void const *""'");
4281  }
4282  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
4283  if (!SWIG_IsOK(ecode3)) {
4284    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_verify_memory" "', argument " "3"" of type '" "size_t""'");
4285  }
4286  arg3 = (size_t)(val3);
4287  res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0);
4288  if (!SWIG_IsOK(res4)) {
4289    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_verify_memory" "', argument " "4"" of type '" "void *""'");
4290  }
4291  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
4292  if (!SWIG_IsOK(ecode5)) {
4293    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_verify_memory" "', argument " "5"" of type '" "size_t""'");
4294  }
4295  arg5 = (size_t)(val5);
4296  ecode6 = SWIG_AsVal_int(obj5, &val6);
4297  if (!SWIG_IsOK(ecode6)) {
4298    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_verify_memory" "', argument " "6"" of type '" "int""'");
4299  }
4300  arg6 = (int)(val6);
4301  result = (int)netpgp_verify_memory(arg1,(void const *)arg2,arg3,arg4,arg5,arg6);
4302  resultobj = SWIG_From_int((int)(result));
4303  return resultobj;
4304fail:
4305  return NULL;
4306}
4307
4308
4309SWIGINTERN PyObject *_wrap_netpgp_encrypt_memory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4310  PyObject *resultobj = 0;
4311  netpgp_t *arg1 = (netpgp_t *) 0 ;
4312  char *arg2 = (char *) 0 ;
4313  void *arg3 = (void *) 0 ;
4314  size_t arg4 ;
4315  char *arg5 = (char *) 0 ;
4316  size_t arg6 ;
4317  int arg7 ;
4318  int result;
4319  void *argp1 = 0 ;
4320  int res1 = 0 ;
4321  int res2 ;
4322  char *buf2 = 0 ;
4323  int alloc2 = 0 ;
4324  int res3 ;
4325  size_t val4 ;
4326  int ecode4 = 0 ;
4327  int res5 ;
4328  char *buf5 = 0 ;
4329  int alloc5 = 0 ;
4330  size_t val6 ;
4331  int ecode6 = 0 ;
4332  int val7 ;
4333  int ecode7 = 0 ;
4334  PyObject * obj0 = 0 ;
4335  PyObject * obj1 = 0 ;
4336  PyObject * obj2 = 0 ;
4337  PyObject * obj3 = 0 ;
4338  PyObject * obj4 = 0 ;
4339  PyObject * obj5 = 0 ;
4340  PyObject * obj6 = 0 ;
4341
4342  if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:netpgp_encrypt_memory",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
4343  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
4344  if (!SWIG_IsOK(res1)) {
4345    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_encrypt_memory" "', argument " "1"" of type '" "netpgp_t *""'");
4346  }
4347  arg1 = (netpgp_t *)(argp1);
4348  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4349  if (!SWIG_IsOK(res2)) {
4350    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_encrypt_memory" "', argument " "2"" of type '" "char const *""'");
4351  }
4352  arg2 = (char *)(buf2);
4353  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
4354  if (!SWIG_IsOK(res3)) {
4355    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_encrypt_memory" "', argument " "3"" of type '" "void *""'");
4356  }
4357  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
4358  if (!SWIG_IsOK(ecode4)) {
4359    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_encrypt_memory" "', argument " "4"" of type '" "size_t""'");
4360  }
4361  arg4 = (size_t)(val4);
4362  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
4363  if (!SWIG_IsOK(res5)) {
4364    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "netpgp_encrypt_memory" "', argument " "5"" of type '" "char *""'");
4365  }
4366  arg5 = (char *)(buf5);
4367  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
4368  if (!SWIG_IsOK(ecode6)) {
4369    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_encrypt_memory" "', argument " "6"" of type '" "size_t""'");
4370  }
4371  arg6 = (size_t)(val6);
4372  ecode7 = SWIG_AsVal_int(obj6, &val7);
4373  if (!SWIG_IsOK(ecode7)) {
4374    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "netpgp_encrypt_memory" "', argument " "7"" of type '" "int""'");
4375  }
4376  arg7 = (int)(val7);
4377  result = (int)netpgp_encrypt_memory(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
4378  resultobj = SWIG_From_int((int)(result));
4379  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4380  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
4381  return resultobj;
4382fail:
4383  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4384  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
4385  return NULL;
4386}
4387
4388
4389SWIGINTERN PyObject *_wrap_netpgp_decrypt_memory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4390  PyObject *resultobj = 0;
4391  netpgp_t *arg1 = (netpgp_t *) 0 ;
4392  void *arg2 = (void *) 0 ;
4393  size_t arg3 ;
4394  char *arg4 = (char *) 0 ;
4395  size_t arg5 ;
4396  int arg6 ;
4397  int result;
4398  void *argp1 = 0 ;
4399  int res1 = 0 ;
4400  int res2 ;
4401  size_t val3 ;
4402  int ecode3 = 0 ;
4403  int res4 ;
4404  char *buf4 = 0 ;
4405  int alloc4 = 0 ;
4406  size_t val5 ;
4407  int ecode5 = 0 ;
4408  int val6 ;
4409  int ecode6 = 0 ;
4410  PyObject * obj0 = 0 ;
4411  PyObject * obj1 = 0 ;
4412  PyObject * obj2 = 0 ;
4413  PyObject * obj3 = 0 ;
4414  PyObject * obj4 = 0 ;
4415  PyObject * obj5 = 0 ;
4416
4417  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:netpgp_decrypt_memory",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
4418  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
4419  if (!SWIG_IsOK(res1)) {
4420    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_decrypt_memory" "', argument " "1"" of type '" "netpgp_t *""'");
4421  }
4422  arg1 = (netpgp_t *)(argp1);
4423  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
4424  if (!SWIG_IsOK(res2)) {
4425    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_decrypt_memory" "', argument " "2"" of type '" "void const *""'");
4426  }
4427  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
4428  if (!SWIG_IsOK(ecode3)) {
4429    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_decrypt_memory" "', argument " "3"" of type '" "size_t""'");
4430  }
4431  arg3 = (size_t)(val3);
4432  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
4433  if (!SWIG_IsOK(res4)) {
4434    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_decrypt_memory" "', argument " "4"" of type '" "char *""'");
4435  }
4436  arg4 = (char *)(buf4);
4437  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
4438  if (!SWIG_IsOK(ecode5)) {
4439    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_decrypt_memory" "', argument " "5"" of type '" "size_t""'");
4440  }
4441  arg5 = (size_t)(val5);
4442  ecode6 = SWIG_AsVal_int(obj5, &val6);
4443  if (!SWIG_IsOK(ecode6)) {
4444    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_decrypt_memory" "', argument " "6"" of type '" "int""'");
4445  }
4446  arg6 = (int)(val6);
4447  result = (int)netpgp_decrypt_memory(arg1,(void const *)arg2,arg3,arg4,arg5,arg6);
4448  resultobj = SWIG_From_int((int)(result));
4449  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4450  return resultobj;
4451fail:
4452  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
4453  return NULL;
4454}
4455
4456
4457SWIGINTERN PyObject *_wrap_netpgp_match_keys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4458  PyObject *resultobj = 0;
4459  netpgp_t *arg1 = (netpgp_t *) 0 ;
4460  char *arg2 = (char *) 0 ;
4461  char *arg3 = (char *) 0 ;
4462  void *arg4 = (void *) 0 ;
4463  int arg5 ;
4464  int result;
4465  void *argp1 = 0 ;
4466  int res1 = 0 ;
4467  int res2 ;
4468  char *buf2 = 0 ;
4469  int alloc2 = 0 ;
4470  int res3 ;
4471  char *buf3 = 0 ;
4472  int alloc3 = 0 ;
4473  int res4 ;
4474  int val5 ;
4475  int ecode5 = 0 ;
4476  PyObject * obj0 = 0 ;
4477  PyObject * obj1 = 0 ;
4478  PyObject * obj2 = 0 ;
4479  PyObject * obj3 = 0 ;
4480  PyObject * obj4 = 0 ;
4481
4482  if (!PyArg_ParseTuple(args,(char *)"OOOOO:netpgp_match_keys",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
4483  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
4484  if (!SWIG_IsOK(res1)) {
4485    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_match_keys" "', argument " "1"" of type '" "netpgp_t *""'");
4486  }
4487  arg1 = (netpgp_t *)(argp1);
4488  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4489  if (!SWIG_IsOK(res2)) {
4490    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_match_keys" "', argument " "2"" of type '" "char *""'");
4491  }
4492  arg2 = (char *)(buf2);
4493  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4494  if (!SWIG_IsOK(res3)) {
4495    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_match_keys" "', argument " "3"" of type '" "char const *""'");
4496  }
4497  arg3 = (char *)(buf3);
4498  res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0);
4499  if (!SWIG_IsOK(res4)) {
4500    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_match_keys" "', argument " "4"" of type '" "void *""'");
4501  }
4502  ecode5 = SWIG_AsVal_int(obj4, &val5);
4503  if (!SWIG_IsOK(ecode5)) {
4504    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_match_keys" "', argument " "5"" of type '" "int""'");
4505  }
4506  arg5 = (int)(val5);
4507  result = (int)netpgp_match_keys(arg1,arg2,(char const *)arg3,arg4,arg5);
4508  resultobj = SWIG_From_int((int)(result));
4509  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4510  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4511  return resultobj;
4512fail:
4513  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4514  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4515  return NULL;
4516}
4517
4518
4519SWIGINTERN PyObject *_wrap_netpgp_match_pubkeys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4520  PyObject *resultobj = 0;
4521  netpgp_t *arg1 = (netpgp_t *) 0 ;
4522  char *arg2 = (char *) 0 ;
4523  void *arg3 = (void *) 0 ;
4524  int result;
4525  void *argp1 = 0 ;
4526  int res1 = 0 ;
4527  int res2 ;
4528  char *buf2 = 0 ;
4529  int alloc2 = 0 ;
4530  int res3 ;
4531  PyObject * obj0 = 0 ;
4532  PyObject * obj1 = 0 ;
4533  PyObject * obj2 = 0 ;
4534
4535  if (!PyArg_ParseTuple(args,(char *)"OOO:netpgp_match_pubkeys",&obj0,&obj1,&obj2)) SWIG_fail;
4536  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
4537  if (!SWIG_IsOK(res1)) {
4538    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_match_pubkeys" "', argument " "1"" of type '" "netpgp_t *""'");
4539  }
4540  arg1 = (netpgp_t *)(argp1);
4541  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4542  if (!SWIG_IsOK(res2)) {
4543    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_match_pubkeys" "', argument " "2"" of type '" "char *""'");
4544  }
4545  arg2 = (char *)(buf2);
4546  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
4547  if (!SWIG_IsOK(res3)) {
4548    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_match_pubkeys" "', argument " "3"" of type '" "void *""'");
4549  }
4550  result = (int)netpgp_match_pubkeys(arg1,arg2,arg3);
4551  resultobj = SWIG_From_int((int)(result));
4552  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4553  return resultobj;
4554fail:
4555  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
4556  return NULL;
4557}
4558
4559
4560SWIGINTERN PyObject *_wrap_netpgp_validate_sigs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4561  PyObject *resultobj = 0;
4562  netpgp_t *arg1 = (netpgp_t *) 0 ;
4563  int result;
4564  void *argp1 = 0 ;
4565  int res1 = 0 ;
4566  PyObject * obj0 = 0 ;
4567
4568  if (!PyArg_ParseTuple(args,(char *)"O:netpgp_validate_sigs",&obj0)) SWIG_fail;
4569  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
4570  if (!SWIG_IsOK(res1)) {
4571    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_validate_sigs" "', argument " "1"" of type '" "netpgp_t *""'");
4572  }
4573  arg1 = (netpgp_t *)(argp1);
4574  result = (int)netpgp_validate_sigs(arg1);
4575  resultobj = SWIG_From_int((int)(result));
4576  return resultobj;
4577fail:
4578  return NULL;
4579}
4580
4581
4582static PyMethodDef SwigMethods[] = {
4583	 { (char *)"netpgp_t_c_set", _wrap_netpgp_t_c_set, METH_VARARGS, NULL},
4584	 { (char *)"netpgp_t_c_get", _wrap_netpgp_t_c_get, METH_VARARGS, NULL},
4585	 { (char *)"netpgp_t_size_set", _wrap_netpgp_t_size_set, METH_VARARGS, NULL},
4586	 { (char *)"netpgp_t_size_get", _wrap_netpgp_t_size_get, METH_VARARGS, NULL},
4587	 { (char *)"netpgp_t_name_set", _wrap_netpgp_t_name_set, METH_VARARGS, NULL},
4588	 { (char *)"netpgp_t_name_get", _wrap_netpgp_t_name_get, METH_VARARGS, NULL},
4589	 { (char *)"netpgp_t_value_set", _wrap_netpgp_t_value_set, METH_VARARGS, NULL},
4590	 { (char *)"netpgp_t_value_get", _wrap_netpgp_t_value_get, METH_VARARGS, NULL},
4591	 { (char *)"netpgp_t_pubring_set", _wrap_netpgp_t_pubring_set, METH_VARARGS, NULL},
4592	 { (char *)"netpgp_t_pubring_get", _wrap_netpgp_t_pubring_get, METH_VARARGS, NULL},
4593	 { (char *)"netpgp_t_secring_set", _wrap_netpgp_t_secring_set, METH_VARARGS, NULL},
4594	 { (char *)"netpgp_t_secring_get", _wrap_netpgp_t_secring_get, METH_VARARGS, NULL},
4595	 { (char *)"netpgp_t_io_set", _wrap_netpgp_t_io_set, METH_VARARGS, NULL},
4596	 { (char *)"netpgp_t_io_get", _wrap_netpgp_t_io_get, METH_VARARGS, NULL},
4597	 { (char *)"netpgp_t_passfp_set", _wrap_netpgp_t_passfp_set, METH_VARARGS, NULL},
4598	 { (char *)"netpgp_t_passfp_get", _wrap_netpgp_t_passfp_get, METH_VARARGS, NULL},
4599	 { (char *)"new_netpgp_t", _wrap_new_netpgp_t, METH_VARARGS, NULL},
4600	 { (char *)"delete_netpgp_t", _wrap_delete_netpgp_t, METH_VARARGS, NULL},
4601	 { (char *)"netpgp_t_swigregister", netpgp_t_swigregister, METH_VARARGS, NULL},
4602	 { (char *)"netpgp_init", _wrap_netpgp_init, METH_VARARGS, NULL},
4603	 { (char *)"netpgp_end", _wrap_netpgp_end, METH_VARARGS, NULL},
4604	 { (char *)"netpgp_set_debug", _wrap_netpgp_set_debug, METH_VARARGS, NULL},
4605	 { (char *)"netpgp_get_debug", _wrap_netpgp_get_debug, METH_VARARGS, NULL},
4606	 { (char *)"netpgp_get_info", _wrap_netpgp_get_info, METH_VARARGS, NULL},
4607	 { (char *)"netpgp_list_packets", _wrap_netpgp_list_packets, METH_VARARGS, NULL},
4608	 { (char *)"netpgp_setvar", _wrap_netpgp_setvar, METH_VARARGS, NULL},
4609	 { (char *)"netpgp_getvar", _wrap_netpgp_getvar, METH_VARARGS, NULL},
4610	 { (char *)"netpgp_incvar", _wrap_netpgp_incvar, METH_VARARGS, NULL},
4611	 { (char *)"netpgp_unsetvar", _wrap_netpgp_unsetvar, METH_VARARGS, NULL},
4612	 { (char *)"netpgp_set_homedir", _wrap_netpgp_set_homedir, METH_VARARGS, NULL},
4613	 { (char *)"netpgp_list_keys", _wrap_netpgp_list_keys, METH_VARARGS, NULL},
4614	 { (char *)"netpgp_find_key", _wrap_netpgp_find_key, METH_VARARGS, NULL},
4615	 { (char *)"netpgp_get_key", _wrap_netpgp_get_key, METH_VARARGS, NULL},
4616	 { (char *)"netpgp_export_key", _wrap_netpgp_export_key, METH_VARARGS, NULL},
4617	 { (char *)"netpgp_import_key", _wrap_netpgp_import_key, METH_VARARGS, NULL},
4618	 { (char *)"netpgp_generate_key", _wrap_netpgp_generate_key, METH_VARARGS, NULL},
4619	 { (char *)"netpgp_encrypt_file", _wrap_netpgp_encrypt_file, METH_VARARGS, NULL},
4620	 { (char *)"netpgp_decrypt_file", _wrap_netpgp_decrypt_file, METH_VARARGS, NULL},
4621	 { (char *)"netpgp_sign_file", _wrap_netpgp_sign_file, METH_VARARGS, NULL},
4622	 { (char *)"netpgp_verify_file", _wrap_netpgp_verify_file, METH_VARARGS, NULL},
4623	 { (char *)"netpgp_sign_memory", _wrap_netpgp_sign_memory, METH_VARARGS, NULL},
4624	 { (char *)"netpgp_verify_memory", _wrap_netpgp_verify_memory, METH_VARARGS, NULL},
4625	 { (char *)"netpgp_encrypt_memory", _wrap_netpgp_encrypt_memory, METH_VARARGS, NULL},
4626	 { (char *)"netpgp_decrypt_memory", _wrap_netpgp_decrypt_memory, METH_VARARGS, NULL},
4627	 { (char *)"netpgp_match_keys", _wrap_netpgp_match_keys, METH_VARARGS, NULL},
4628	 { (char *)"netpgp_match_pubkeys", _wrap_netpgp_match_pubkeys, METH_VARARGS, NULL},
4629	 { (char *)"netpgp_validate_sigs", _wrap_netpgp_validate_sigs, METH_VARARGS, NULL},
4630	 { NULL, NULL, 0, NULL }
4631};
4632
4633
4634/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
4635
4636static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
4637static swig_type_info _swigt__p_netpgp_t = {"_p_netpgp_t", "struct netpgp_t *|netpgp_t *", 0, 0, (void*)0, 0};
4638static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
4639static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
4640
4641static swig_type_info *swig_type_initial[] = {
4642  &_swigt__p_char,
4643  &_swigt__p_netpgp_t,
4644  &_swigt__p_p_char,
4645  &_swigt__p_void,
4646};
4647
4648static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4649static swig_cast_info _swigc__p_netpgp_t[] = {  {&_swigt__p_netpgp_t, 0, 0, 0},{0, 0, 0, 0}};
4650static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
4651static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
4652
4653static swig_cast_info *swig_cast_initial[] = {
4654  _swigc__p_char,
4655  _swigc__p_netpgp_t,
4656  _swigc__p_p_char,
4657  _swigc__p_void,
4658};
4659
4660
4661/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
4662
4663static swig_const_info swig_const_table[] = {
4664{0, 0, 0, 0.0, 0, 0}};
4665
4666#ifdef __cplusplus
4667}
4668#endif
4669/* -----------------------------------------------------------------------------
4670 * Type initialization:
4671 * This problem is tough by the requirement that no dynamic
4672 * memory is used. Also, since swig_type_info structures store pointers to
4673 * swig_cast_info structures and swig_cast_info structures store pointers back
4674 * to swig_type_info structures, we need some lookup code at initialization.
4675 * The idea is that swig generates all the structures that are needed.
4676 * The runtime then collects these partially filled structures.
4677 * The SWIG_InitializeModule function takes these initial arrays out of
4678 * swig_module, and does all the lookup, filling in the swig_module.types
4679 * array with the correct data and linking the correct swig_cast_info
4680 * structures together.
4681 *
4682 * The generated swig_type_info structures are assigned staticly to an initial
4683 * array. We just loop through that array, and handle each type individually.
4684 * First we lookup if this type has been already loaded, and if so, use the
4685 * loaded structure instead of the generated one. Then we have to fill in the
4686 * cast linked list. The cast data is initially stored in something like a
4687 * two-dimensional array. Each row corresponds to a type (there are the same
4688 * number of rows as there are in the swig_type_initial array). Each entry in
4689 * a column is one of the swig_cast_info structures for that type.
4690 * The cast_initial array is actually an array of arrays, because each row has
4691 * a variable number of columns. So to actually build the cast linked list,
4692 * we find the array of casts associated with the type, and loop through it
4693 * adding the casts to the list. The one last trick we need to do is making
4694 * sure the type pointer in the swig_cast_info struct is correct.
4695 *
4696 * First off, we lookup the cast->type name to see if it is already loaded.
4697 * There are three cases to handle:
4698 *  1) If the cast->type has already been loaded AND the type we are adding
4699 *     casting info to has not been loaded (it is in this module), THEN we
4700 *     replace the cast->type pointer with the type pointer that has already
4701 *     been loaded.
4702 *  2) If BOTH types (the one we are adding casting info to, and the
4703 *     cast->type) are loaded, THEN the cast info has already been loaded by
4704 *     the previous module so we just ignore it.
4705 *  3) Finally, if cast->type has not already been loaded, then we add that
4706 *     swig_cast_info to the linked list (because the cast->type) pointer will
4707 *     be correct.
4708 * ----------------------------------------------------------------------------- */
4709
4710#ifdef __cplusplus
4711extern "C" {
4712#if 0
4713} /* c-mode */
4714#endif
4715#endif
4716
4717#if 0
4718#define SWIGRUNTIME_DEBUG
4719#endif
4720
4721
4722SWIGRUNTIME void
4723SWIG_InitializeModule(void *clientdata) {
4724  size_t i;
4725  swig_module_info *module_head, *iter;
4726  int found;
4727
4728  clientdata = clientdata;
4729
4730  /* check to see if the circular list has been setup, if not, set it up */
4731  if (swig_module.next==0) {
4732    /* Initialize the swig_module */
4733    swig_module.type_initial = swig_type_initial;
4734    swig_module.cast_initial = swig_cast_initial;
4735    swig_module.next = &swig_module;
4736  }
4737
4738  /* Try and load any already created modules */
4739  module_head = SWIG_GetModule(clientdata);
4740  if (!module_head) {
4741    /* This is the first module loaded for this interpreter */
4742    /* so set the swig module into the interpreter */
4743    SWIG_SetModule(clientdata, &swig_module);
4744    module_head = &swig_module;
4745  } else {
4746    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
4747    found=0;
4748    iter=module_head;
4749    do {
4750      if (iter==&swig_module) {
4751        found=1;
4752        break;
4753      }
4754      iter=iter->next;
4755    } while (iter!= module_head);
4756
4757    /* if the is found in the list, then all is done and we may leave */
4758    if (found) return;
4759    /* otherwise we must add out module into the list */
4760    swig_module.next = module_head->next;
4761    module_head->next = &swig_module;
4762  }
4763
4764  /* Now work on filling in swig_module.types */
4765#ifdef SWIGRUNTIME_DEBUG
4766  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
4767#endif
4768  for (i = 0; i < swig_module.size; ++i) {
4769    swig_type_info *type = 0;
4770    swig_type_info *ret;
4771    swig_cast_info *cast;
4772
4773#ifdef SWIGRUNTIME_DEBUG
4774    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4775#endif
4776
4777    /* if there is another module already loaded */
4778    if (swig_module.next != &swig_module) {
4779      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
4780    }
4781    if (type) {
4782      /* Overwrite clientdata field */
4783#ifdef SWIGRUNTIME_DEBUG
4784      printf("SWIG_InitializeModule: found type %s\n", type->name);
4785#endif
4786      if (swig_module.type_initial[i]->clientdata) {
4787        type->clientdata = swig_module.type_initial[i]->clientdata;
4788#ifdef SWIGRUNTIME_DEBUG
4789        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4790#endif
4791      }
4792    } else {
4793      type = swig_module.type_initial[i];
4794    }
4795
4796    /* Insert casting types */
4797    cast = swig_module.cast_initial[i];
4798    while (cast->type) {
4799      /* Don't need to add information already in the list */
4800      ret = 0;
4801#ifdef SWIGRUNTIME_DEBUG
4802      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
4803#endif
4804      if (swig_module.next != &swig_module) {
4805        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
4806#ifdef SWIGRUNTIME_DEBUG
4807        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
4808#endif
4809      }
4810      if (ret) {
4811        if (type == swig_module.type_initial[i]) {
4812#ifdef SWIGRUNTIME_DEBUG
4813          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
4814#endif
4815          cast->type = ret;
4816          ret = 0;
4817        } else {
4818          /* Check for casting already in the list */
4819          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
4820#ifdef SWIGRUNTIME_DEBUG
4821          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
4822#endif
4823          if (!ocast) ret = 0;
4824        }
4825      }
4826
4827      if (!ret) {
4828#ifdef SWIGRUNTIME_DEBUG
4829        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4830#endif
4831        if (type->cast) {
4832          type->cast->prev = cast;
4833          cast->next = type->cast;
4834        }
4835        type->cast = cast;
4836      }
4837      cast++;
4838    }
4839    /* Set entry in modules->types array equal to the type */
4840    swig_module.types[i] = type;
4841  }
4842  swig_module.types[i] = 0;
4843
4844#ifdef SWIGRUNTIME_DEBUG
4845  printf("**** SWIG_InitializeModule: Cast List ******\n");
4846  for (i = 0; i < swig_module.size; ++i) {
4847    int j = 0;
4848    swig_cast_info *cast = swig_module.cast_initial[i];
4849    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4850    while (cast->type) {
4851      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4852      cast++;
4853      ++j;
4854    }
4855    printf("---- Total casts: %d\n",j);
4856  }
4857  printf("**** SWIG_InitializeModule: Cast List ******\n");
4858#endif
4859}
4860
4861/* This function will propagate the clientdata field of type to
4862* any new swig_type_info structures that have been added into the list
4863* of equivalent types.  It is like calling
4864* SWIG_TypeClientData(type, clientdata) a second time.
4865*/
4866SWIGRUNTIME void
4867SWIG_PropagateClientData(void) {
4868  size_t i;
4869  swig_cast_info *equiv;
4870  static int init_run = 0;
4871
4872  if (init_run) return;
4873  init_run = 1;
4874
4875  for (i = 0; i < swig_module.size; i++) {
4876    if (swig_module.types[i]->clientdata) {
4877      equiv = swig_module.types[i]->cast;
4878      while (equiv) {
4879        if (!equiv->converter) {
4880          if (equiv->type && !equiv->type->clientdata)
4881          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
4882        }
4883        equiv = equiv->next;
4884      }
4885    }
4886  }
4887}
4888
4889#ifdef __cplusplus
4890#if 0
4891{
4892  /* c-mode */
4893#endif
4894}
4895#endif
4896
4897
4898
4899#ifdef __cplusplus
4900extern "C" {
4901#endif
4902
4903  /* Python-specific SWIG API */
4904#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
4905#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
4906#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
4907
4908  /* -----------------------------------------------------------------------------
4909   * global variable support code.
4910   * ----------------------------------------------------------------------------- */
4911
4912  typedef struct swig_globalvar {
4913    char       *name;                  /* Name of global variable */
4914    PyObject *(*get_attr)(void);       /* Return the current value */
4915    int       (*set_attr)(PyObject *); /* Set the value */
4916    struct swig_globalvar *next;
4917  } swig_globalvar;
4918
4919  typedef struct swig_varlinkobject {
4920    PyObject_HEAD
4921    swig_globalvar *vars;
4922  } swig_varlinkobject;
4923
4924  SWIGINTERN PyObject *
4925  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
4926    return PyString_FromString("<Swig global variables>");
4927  }
4928
4929  SWIGINTERN PyObject *
4930  swig_varlink_str(swig_varlinkobject *v) {
4931    PyObject *str = PyString_FromString("(");
4932    swig_globalvar  *var;
4933    for (var = v->vars; var; var=var->next) {
4934      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
4935      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
4936    }
4937    PyString_ConcatAndDel(&str,PyString_FromString(")"));
4938    return str;
4939  }
4940
4941  SWIGINTERN int
4942  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
4943    PyObject *str = swig_varlink_str(v);
4944    fprintf(fp,"Swig global variables ");
4945    fprintf(fp,"%s\n", PyString_AsString(str));
4946    Py_DECREF(str);
4947    return 0;
4948  }
4949
4950  SWIGINTERN void
4951  swig_varlink_dealloc(swig_varlinkobject *v) {
4952    swig_globalvar *var = v->vars;
4953    while (var) {
4954      swig_globalvar *n = var->next;
4955      free(var->name);
4956      free(var);
4957      var = n;
4958    }
4959  }
4960
4961  SWIGINTERN PyObject *
4962  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
4963    PyObject *res = NULL;
4964    swig_globalvar *var = v->vars;
4965    while (var) {
4966      if (strcmp(var->name,n) == 0) {
4967        res = (*var->get_attr)();
4968        break;
4969      }
4970      var = var->next;
4971    }
4972    if (res == NULL && !PyErr_Occurred()) {
4973      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
4974    }
4975    return res;
4976  }
4977
4978  SWIGINTERN int
4979  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
4980    int res = 1;
4981    swig_globalvar *var = v->vars;
4982    while (var) {
4983      if (strcmp(var->name,n) == 0) {
4984        res = (*var->set_attr)(p);
4985        break;
4986      }
4987      var = var->next;
4988    }
4989    if (res == 1 && !PyErr_Occurred()) {
4990      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
4991    }
4992    return res;
4993  }
4994
4995  SWIGINTERN PyTypeObject*
4996  swig_varlink_type(void) {
4997    static char varlink__doc__[] = "Swig var link object";
4998    static PyTypeObject varlink_type;
4999    static int type_init = 0;
5000    if (!type_init) {
5001      const PyTypeObject tmp
5002      = {
5003        PyObject_HEAD_INIT(NULL)
5004        0,                                  /* Number of items in variable part (ob_size) */
5005        (char *)"swigvarlink",              /* Type name (tp_name) */
5006        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
5007        0,                                  /* Itemsize (tp_itemsize) */
5008        (destructor) swig_varlink_dealloc,   /* Deallocator (tp_dealloc) */
5009        (printfunc) swig_varlink_print,     /* Print (tp_print) */
5010        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
5011        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
5012        0,                                  /* tp_compare */
5013        (reprfunc) swig_varlink_repr,       /* tp_repr */
5014        0,                                  /* tp_as_number */
5015        0,                                  /* tp_as_sequence */
5016        0,                                  /* tp_as_mapping */
5017        0,                                  /* tp_hash */
5018        0,                                  /* tp_call */
5019        (reprfunc)swig_varlink_str,        /* tp_str */
5020        0,                                  /* tp_getattro */
5021        0,                                  /* tp_setattro */
5022        0,                                  /* tp_as_buffer */
5023        0,                                  /* tp_flags */
5024        varlink__doc__,                     /* tp_doc */
5025        0,                                  /* tp_traverse */
5026        0,                                  /* tp_clear */
5027        0,                                  /* tp_richcompare */
5028        0,                                  /* tp_weaklistoffset */
5029#if PY_VERSION_HEX >= 0x02020000
5030        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
5031#endif
5032#if PY_VERSION_HEX >= 0x02030000
5033        0,                                  /* tp_del */
5034#endif
5035#ifdef COUNT_ALLOCS
5036        0,0,0,0                             /* tp_alloc -> tp_next */
5037#endif
5038      };
5039      varlink_type = tmp;
5040      varlink_type.ob_type = &PyType_Type;
5041      type_init = 1;
5042    }
5043    return &varlink_type;
5044  }
5045
5046  /* Create a variable linking object for use later */
5047  SWIGINTERN PyObject *
5048  SWIG_Python_newvarlink(void) {
5049    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
5050    if (result) {
5051      result->vars = 0;
5052    }
5053    return ((PyObject*) result);
5054  }
5055
5056  SWIGINTERN void
5057  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
5058    swig_varlinkobject *v = (swig_varlinkobject *) p;
5059    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
5060    if (gv) {
5061      size_t size = strlen(name)+1;
5062      gv->name = (char *)malloc(size);
5063      if (gv->name) {
5064        strncpy(gv->name,name,size);
5065        gv->get_attr = get_attr;
5066        gv->set_attr = set_attr;
5067        gv->next = v->vars;
5068      }
5069    }
5070    v->vars = gv;
5071  }
5072
5073  SWIGINTERN PyObject *
5074  SWIG_globals(void) {
5075    static PyObject *_SWIG_globals = 0;
5076    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
5077    return _SWIG_globals;
5078  }
5079
5080  /* -----------------------------------------------------------------------------
5081   * constants/methods manipulation
5082   * ----------------------------------------------------------------------------- */
5083
5084  /* Install Constants */
5085  SWIGINTERN void
5086  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
5087    PyObject *obj = 0;
5088    size_t i;
5089    for (i = 0; constants[i].type; ++i) {
5090      switch(constants[i].type) {
5091      case SWIG_PY_POINTER:
5092        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
5093        break;
5094      case SWIG_PY_BINARY:
5095        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
5096        break;
5097      default:
5098        obj = 0;
5099        break;
5100      }
5101      if (obj) {
5102        PyDict_SetItemString(d, constants[i].name, obj);
5103        Py_DECREF(obj);
5104      }
5105    }
5106  }
5107
5108  /* -----------------------------------------------------------------------------*/
5109  /* Fix SwigMethods to carry the callback ptrs when needed */
5110  /* -----------------------------------------------------------------------------*/
5111
5112  SWIGINTERN void
5113  SWIG_Python_FixMethods(PyMethodDef *methods,
5114    swig_const_info *const_table,
5115    swig_type_info **types,
5116    swig_type_info **types_initial) {
5117    size_t i;
5118    for (i = 0; methods[i].ml_name; ++i) {
5119      const char *c = methods[i].ml_doc;
5120      if (c && (c = strstr(c, "swig_ptr: "))) {
5121        int j;
5122        swig_const_info *ci = 0;
5123        const char *name = c + 10;
5124        for (j = 0; const_table[j].type; ++j) {
5125          if (strncmp(const_table[j].name, name,
5126              strlen(const_table[j].name)) == 0) {
5127            ci = &(const_table[j]);
5128            break;
5129          }
5130        }
5131        if (ci) {
5132          size_t shift = (ci->ptype) - types;
5133          swig_type_info *ty = types_initial[shift];
5134          size_t ldoc = (c - methods[i].ml_doc);
5135          size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
5136          char *ndoc = (char*)malloc(ldoc + lptr + 10);
5137          if (ndoc) {
5138            char *buff = ndoc;
5139            void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
5140            if (ptr) {
5141              strncpy(buff, methods[i].ml_doc, ldoc);
5142              buff += ldoc;
5143              strncpy(buff, "swig_ptr: ", 10);
5144              buff += 10;
5145              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
5146              methods[i].ml_doc = ndoc;
5147            }
5148          }
5149        }
5150      }
5151    }
5152  }
5153
5154#ifdef __cplusplus
5155}
5156#endif
5157
5158/* -----------------------------------------------------------------------------*
5159 *  Partial Init method
5160 * -----------------------------------------------------------------------------*/
5161
5162#ifdef __cplusplus
5163extern "C"
5164#endif
5165SWIGEXPORT void SWIG_init(void) {
5166  PyObject *m, *d;
5167
5168  /* Fix SwigMethods to carry the callback ptrs when needed */
5169  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
5170
5171  m = Py_InitModule((char *) SWIG_name, SwigMethods);
5172  d = PyModule_GetDict(m);
5173
5174  SWIG_InitializeModule(0);
5175  SWIG_InstallConstants(d,swig_const_table);
5176
5177
5178}
5179
5180