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