Added tlspool_configvar() to libtlspool
[tlspool] / lib / python / tlspool.c
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.10
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10
11
12 #ifndef SWIGPYTHON
13 #define SWIGPYTHON
14 #endif
15
16 #define SWIG_PYTHON_THREADS
17 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
18
19 /* -----------------------------------------------------------------------------
20  *  This section contains generic SWIG labels for method/variable
21  *  declarations/attributes, and other compiler dependent labels.
22  * ----------------------------------------------------------------------------- */
23
24 /* template workaround for compilers that cannot correctly implement the C++ standard */
25 #ifndef SWIGTEMPLATEDISAMBIGUATOR
26 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
27 #  define SWIGTEMPLATEDISAMBIGUATOR template
28 # elif defined(__HP_aCC)
29 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
30 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
31 #  define SWIGTEMPLATEDISAMBIGUATOR template
32 # else
33 #  define SWIGTEMPLATEDISAMBIGUATOR
34 # endif
35 #endif
36
37 /* inline attribute */
38 #ifndef SWIGINLINE
39 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
40 #   define SWIGINLINE inline
41 # else
42 #   define SWIGINLINE
43 # endif
44 #endif
45
46 /* attribute recognised by some compilers to avoid 'unused' warnings */
47 #ifndef SWIGUNUSED
48 # if defined(__GNUC__)
49 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
50 #     define SWIGUNUSED __attribute__ ((__unused__))
51 #   else
52 #     define SWIGUNUSED
53 #   endif
54 # elif defined(__ICC)
55 #   define SWIGUNUSED __attribute__ ((__unused__))
56 # else
57 #   define SWIGUNUSED
58 # endif
59 #endif
60
61 #ifndef SWIG_MSC_UNSUPPRESS_4505
62 # if defined(_MSC_VER)
63 #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
64 # endif
65 #endif
66
67 #ifndef SWIGUNUSEDPARM
68 # ifdef __cplusplus
69 #   define SWIGUNUSEDPARM(p)
70 # else
71 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
72 # endif
73 #endif
74
75 /* internal SWIG method */
76 #ifndef SWIGINTERN
77 # define SWIGINTERN static SWIGUNUSED
78 #endif
79
80 /* internal inline SWIG method */
81 #ifndef SWIGINTERNINLINE
82 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
83 #endif
84
85 /* exporting methods */
86 #if defined(__GNUC__)
87 #  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
88 #    ifndef GCC_HASCLASSVISIBILITY
89 #      define GCC_HASCLASSVISIBILITY
90 #    endif
91 #  endif
92 #endif
93
94 #ifndef SWIGEXPORT
95 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
96 #   if defined(STATIC_LINKED)
97 #     define SWIGEXPORT
98 #   else
99 #     define SWIGEXPORT __declspec(dllexport)
100 #   endif
101 # else
102 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
103 #     define SWIGEXPORT __attribute__ ((visibility("default")))
104 #   else
105 #     define SWIGEXPORT
106 #   endif
107 # endif
108 #endif
109
110 /* calling conventions for Windows */
111 #ifndef SWIGSTDCALL
112 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
113 #   define SWIGSTDCALL __stdcall
114 # else
115 #   define SWIGSTDCALL
116 # endif
117 #endif
118
119 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
120 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
121 # define _CRT_SECURE_NO_DEPRECATE
122 #endif
123
124 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
125 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
126 # define _SCL_SECURE_NO_DEPRECATE
127 #endif
128
129 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
130 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
131 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
132 #endif
133
134 /* Intel's compiler complains if a variable which was never initialised is
135  * cast to void, which is a common idiom which we use to indicate that we
136  * are aware a variable isn't used.  So we just silence that warning.
137  * See: https://github.com/swig/swig/issues/192 for more discussion.
138  */
139 #ifdef __INTEL_COMPILER
140 # pragma warning disable 592
141 #endif
142
143
144 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
145 /* Use debug wrappers with the Python release dll */
146 # undef _DEBUG
147 # include <Python.h>
148 # define _DEBUG
149 #else
150 # include <Python.h>
151 #endif
152
153 /* -----------------------------------------------------------------------------
154  * swigrun.swg
155  *
156  * This file contains generic C API SWIG runtime support for pointer
157  * type checking.
158  * ----------------------------------------------------------------------------- */
159
160 /* This should only be incremented when either the layout of swig_type_info changes,
161    or for whatever reason, the runtime changes incompatibly */
162 #define SWIG_RUNTIME_VERSION "4"
163
164 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
165 #ifdef SWIG_TYPE_TABLE
166 # define SWIG_QUOTE_STRING(x) #x
167 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
168 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
169 #else
170 # define SWIG_TYPE_TABLE_NAME
171 #endif
172
173 /*
174   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
175   creating a static or dynamic library from the SWIG runtime code.
176   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
177
178   But only do this if strictly necessary, ie, if you have problems
179   with your compiler or suchlike.
180 */
181
182 #ifndef SWIGRUNTIME
183 # define SWIGRUNTIME SWIGINTERN
184 #endif
185
186 #ifndef SWIGRUNTIMEINLINE
187 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
188 #endif
189
190 /*  Generic buffer size */
191 #ifndef SWIG_BUFFER_SIZE
192 # define SWIG_BUFFER_SIZE 1024
193 #endif
194
195 /* Flags for pointer conversions */
196 #define SWIG_POINTER_DISOWN        0x1
197 #define SWIG_CAST_NEW_MEMORY       0x2
198
199 /* Flags for new pointer objects */
200 #define SWIG_POINTER_OWN           0x1
201
202
203 /*
204    Flags/methods for returning states.
205
206    The SWIG conversion methods, as ConvertPtr, return an integer
207    that tells if the conversion was successful or not. And if not,
208    an error code can be returned (see swigerrors.swg for the codes).
209
210    Use the following macros/flags to set or process the returning
211    states.
212
213    In old versions of SWIG, code such as the following was usually written:
214
215      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
216        // success code
217      } else {
218        //fail code
219      }
220
221    Now you can be more explicit:
222
223     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
224     if (SWIG_IsOK(res)) {
225       // success code
226     } else {
227       // fail code
228     }
229
230    which is the same really, but now you can also do
231
232     Type *ptr;
233     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
234     if (SWIG_IsOK(res)) {
235       // success code
236       if (SWIG_IsNewObj(res) {
237         ...
238         delete *ptr;
239       } else {
240         ...
241       }
242     } else {
243       // fail code
244     }
245
246    I.e., now SWIG_ConvertPtr can return new objects and you can
247    identify the case and take care of the deallocation. Of course that
248    also requires SWIG_ConvertPtr to return new result values, such as
249
250       int SWIG_ConvertPtr(obj, ptr,...) {
251         if (<obj is ok>) {
252           if (<need new object>) {
253             *ptr = <ptr to new allocated object>;
254             return SWIG_NEWOBJ;
255           } else {
256             *ptr = <ptr to old object>;
257             return SWIG_OLDOBJ;
258           }
259         } else {
260           return SWIG_BADOBJ;
261         }
262       }
263
264    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
265    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
266    SWIG errors code.
267
268    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
269    allows to return the 'cast rank', for example, if you have this
270
271        int food(double)
272        int fooi(int);
273
274    and you call
275
276       food(1)   // cast rank '1'  (1 -> 1.0)
277       fooi(1)   // cast rank '0'
278
279    just use the SWIG_AddCast()/SWIG_CheckState()
280 */
281
282 #define SWIG_OK                    (0)
283 #define SWIG_ERROR                 (-1)
284 #define SWIG_IsOK(r)               (r >= 0)
285 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
286
287 /* The CastRankLimit says how many bits are used for the cast rank */
288 #define SWIG_CASTRANKLIMIT         (1 << 8)
289 /* The NewMask denotes the object was created (using new/malloc) */
290 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
291 /* The TmpMask is for in/out typemaps that use temporal objects */
292 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
293 /* Simple returning values */
294 #define SWIG_BADOBJ                (SWIG_ERROR)
295 #define SWIG_OLDOBJ                (SWIG_OK)
296 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
297 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
298 /* Check, add and del mask methods */
299 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
300 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
301 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
302 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
303 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
304 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
305
306 /* Cast-Rank Mode */
307 #if defined(SWIG_CASTRANK_MODE)
308 #  ifndef SWIG_TypeRank
309 #    define SWIG_TypeRank             unsigned long
310 #  endif
311 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
312 #    define SWIG_MAXCASTRANK          (2)
313 #  endif
314 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
315 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
316 SWIGINTERNINLINE int SWIG_AddCast(int r) {
317   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
318 }
319 SWIGINTERNINLINE int SWIG_CheckState(int r) {
320   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
321 }
322 #else /* no cast-rank mode */
323 #  define SWIG_AddCast(r) (r)
324 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
325 #endif
326
327
328 #include <string.h>
329
330 #ifdef __cplusplus
331 extern "C" {
332 #endif
333
334 typedef void *(*swig_converter_func)(void *, int *);
335 typedef struct swig_type_info *(*swig_dycast_func)(void **);
336
337 /* Structure to store information on one type */
338 typedef struct swig_type_info {
339   const char             *name;                 /* mangled name of this type */
340   const char             *str;                  /* human readable name of this type */
341   swig_dycast_func        dcast;                /* dynamic cast function down a hierarchy */
342   struct swig_cast_info  *cast;                 /* linked list of types that can cast into this type */
343   void                   *clientdata;           /* language specific type data */
344   int                    owndata;               /* flag if the structure owns the clientdata */
345 } swig_type_info;
346
347 /* Structure to store a type and conversion function used for casting */
348 typedef struct swig_cast_info {
349   swig_type_info         *type;                 /* pointer to type that is equivalent to this type */
350   swig_converter_func     converter;            /* function to cast the void pointers */
351   struct swig_cast_info  *next;                 /* pointer to next cast in linked list */
352   struct swig_cast_info  *prev;                 /* pointer to the previous cast */
353 } swig_cast_info;
354
355 /* Structure used to store module information
356  * Each module generates one structure like this, and the runtime collects
357  * all of these structures and stores them in a circularly linked list.*/
358 typedef struct swig_module_info {
359   swig_type_info         **types;               /* Array of pointers to swig_type_info structures that are in this module */
360   size_t                 size;                  /* Number of types in this module */
361   struct swig_module_info *next;                /* Pointer to next element in circularly linked list */
362   swig_type_info         **type_initial;        /* Array of initially generated type structures */
363   swig_cast_info         **cast_initial;        /* Array of initially generated casting structures */
364   void                    *clientdata;          /* Language specific module data */
365 } swig_module_info;
366
367 /*
368   Compare two type names skipping the space characters, therefore
369   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
370
371   Return 0 when the two name types are equivalent, as in
372   strncmp, but skipping ' '.
373 */
374 SWIGRUNTIME int
375 SWIG_TypeNameComp(const char *f1, const char *l1,
376                   const char *f2, const char *l2) {
377   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
378     while ((*f1 == ' ') && (f1 != l1)) ++f1;
379     while ((*f2 == ' ') && (f2 != l2)) ++f2;
380     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
381   }
382   return (int)((l1 - f1) - (l2 - f2));
383 }
384
385 /*
386   Check type equivalence in a name list like <name1>|<name2>|...
387   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
388 */
389 SWIGRUNTIME int
390 SWIG_TypeCmp(const char *nb, const char *tb) {
391   int equiv = 1;
392   const char* te = tb + strlen(tb);
393   const char* ne = nb;
394   while (equiv != 0 && *ne) {
395     for (nb = ne; *ne; ++ne) {
396       if (*ne == '|') break;
397     }
398     equiv = SWIG_TypeNameComp(nb, ne, tb, te);
399     if (*ne) ++ne;
400   }
401   return equiv;
402 }
403
404 /*
405   Check type equivalence in a name list like <name1>|<name2>|...
406   Return 0 if not equal, 1 if equal
407 */
408 SWIGRUNTIME int
409 SWIG_TypeEquiv(const char *nb, const char *tb) {
410   return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
411 }
412
413 /*
414   Check the typename
415 */
416 SWIGRUNTIME swig_cast_info *
417 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
418   if (ty) {
419     swig_cast_info *iter = ty->cast;
420     while (iter) {
421       if (strcmp(iter->type->name, c) == 0) {
422         if (iter == ty->cast)
423           return iter;
424         /* Move iter to the top of the linked list */
425         iter->prev->next = iter->next;
426         if (iter->next)
427           iter->next->prev = iter->prev;
428         iter->next = ty->cast;
429         iter->prev = 0;
430         if (ty->cast) ty->cast->prev = iter;
431         ty->cast = iter;
432         return iter;
433       }
434       iter = iter->next;
435     }
436   }
437   return 0;
438 }
439
440 /*
441   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
442 */
443 SWIGRUNTIME swig_cast_info *
444 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
445   if (ty) {
446     swig_cast_info *iter = ty->cast;
447     while (iter) {
448       if (iter->type == from) {
449         if (iter == ty->cast)
450           return iter;
451         /* Move iter to the top of the linked list */
452         iter->prev->next = iter->next;
453         if (iter->next)
454           iter->next->prev = iter->prev;
455         iter->next = ty->cast;
456         iter->prev = 0;
457         if (ty->cast) ty->cast->prev = iter;
458         ty->cast = iter;
459         return iter;
460       }
461       iter = iter->next;
462     }
463   }
464   return 0;
465 }
466
467 /*
468   Cast a pointer up an inheritance hierarchy
469 */
470 SWIGRUNTIMEINLINE void *
471 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
472   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
473 }
474
475 /*
476    Dynamic pointer casting. Down an inheritance hierarchy
477 */
478 SWIGRUNTIME swig_type_info *
479 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
480   swig_type_info *lastty = ty;
481   if (!ty || !ty->dcast) return ty;
482   while (ty && (ty->dcast)) {
483     ty = (*ty->dcast)(ptr);
484     if (ty) lastty = ty;
485   }
486   return lastty;
487 }
488
489 /*
490   Return the name associated with this type
491 */
492 SWIGRUNTIMEINLINE const char *
493 SWIG_TypeName(const swig_type_info *ty) {
494   return ty->name;
495 }
496
497 /*
498   Return the pretty name associated with this type,
499   that is an unmangled type name in a form presentable to the user.
500 */
501 SWIGRUNTIME const char *
502 SWIG_TypePrettyName(const swig_type_info *type) {
503   /* The "str" field contains the equivalent pretty names of the
504      type, separated by vertical-bar characters.  We choose
505      to print the last name, as it is often (?) the most
506      specific. */
507   if (!type) return NULL;
508   if (type->str != NULL) {
509     const char *last_name = type->str;
510     const char *s;
511     for (s = type->str; *s; s++)
512       if (*s == '|') last_name = s+1;
513     return last_name;
514   }
515   else
516     return type->name;
517 }
518
519 /*
520    Set the clientdata field for a type
521 */
522 SWIGRUNTIME void
523 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
524   swig_cast_info *cast = ti->cast;
525   /* if (ti->clientdata == clientdata) return; */
526   ti->clientdata = clientdata;
527
528   while (cast) {
529     if (!cast->converter) {
530       swig_type_info *tc = cast->type;
531       if (!tc->clientdata) {
532         SWIG_TypeClientData(tc, clientdata);
533       }
534     }
535     cast = cast->next;
536   }
537 }
538 SWIGRUNTIME void
539 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
540   SWIG_TypeClientData(ti, clientdata);
541   ti->owndata = 1;
542 }
543
544 /*
545   Search for a swig_type_info structure only by mangled name
546   Search is a O(log #types)
547
548   We start searching at module start, and finish searching when start == end.
549   Note: if start == end at the beginning of the function, we go all the way around
550   the circular list.
551 */
552 SWIGRUNTIME swig_type_info *
553 SWIG_MangledTypeQueryModule(swig_module_info *start,
554                             swig_module_info *end,
555                             const char *name) {
556   swig_module_info *iter = start;
557   do {
558     if (iter->size) {
559       size_t l = 0;
560       size_t r = iter->size - 1;
561       do {
562         /* since l+r >= 0, we can (>> 1) instead (/ 2) */
563         size_t i = (l + r) >> 1;
564         const char *iname = iter->types[i]->name;
565         if (iname) {
566           int compare = strcmp(name, iname);
567           if (compare == 0) {
568             return iter->types[i];
569           } else if (compare < 0) {
570             if (i) {
571               r = i - 1;
572             } else {
573               break;
574             }
575           } else if (compare > 0) {
576             l = i + 1;
577           }
578         } else {
579           break; /* should never happen */
580         }
581       } while (l <= r);
582     }
583     iter = iter->next;
584   } while (iter != end);
585   return 0;
586 }
587
588 /*
589   Search for a swig_type_info structure for either a mangled name or a human readable name.
590   It first searches the mangled names of the types, which is a O(log #types)
591   If a type is not found it then searches the human readable names, which is O(#types).
592
593   We start searching at module start, and finish searching when start == end.
594   Note: if start == end at the beginning of the function, we go all the way around
595   the circular list.
596 */
597 SWIGRUNTIME swig_type_info *
598 SWIG_TypeQueryModule(swig_module_info *start,
599                      swig_module_info *end,
600                      const char *name) {
601   /* STEP 1: Search the name field using binary search */
602   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
603   if (ret) {
604     return ret;
605   } else {
606     /* STEP 2: If the type hasn't been found, do a complete search
607        of the str field (the human readable name) */
608     swig_module_info *iter = start;
609     do {
610       size_t i = 0;
611       for (; i < iter->size; ++i) {
612         if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
613           return iter->types[i];
614       }
615       iter = iter->next;
616     } while (iter != end);
617   }
618
619   /* neither found a match */
620   return 0;
621 }
622
623 /*
624    Pack binary data into a string
625 */
626 SWIGRUNTIME char *
627 SWIG_PackData(char *c, void *ptr, size_t sz) {
628   static const char hex[17] = "0123456789abcdef";
629   const unsigned char *u = (unsigned char *) ptr;
630   const unsigned char *eu =  u + sz;
631   for (; u != eu; ++u) {
632     unsigned char uu = *u;
633     *(c++) = hex[(uu & 0xf0) >> 4];
634     *(c++) = hex[uu & 0xf];
635   }
636   return c;
637 }
638
639 /*
640    Unpack binary data from a string
641 */
642 SWIGRUNTIME const char *
643 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
644   unsigned char *u = (unsigned char *) ptr;
645   const unsigned char *eu = u + sz;
646   for (; u != eu; ++u) {
647     char d = *(c++);
648     unsigned char uu;
649     if ((d >= '0') && (d <= '9'))
650       uu = (unsigned char)((d - '0') << 4);
651     else if ((d >= 'a') && (d <= 'f'))
652       uu = (unsigned char)((d - ('a'-10)) << 4);
653     else
654       return (char *) 0;
655     d = *(c++);
656     if ((d >= '0') && (d <= '9'))
657       uu |= (unsigned char)(d - '0');
658     else if ((d >= 'a') && (d <= 'f'))
659       uu |= (unsigned char)(d - ('a'-10));
660     else
661       return (char *) 0;
662     *u = uu;
663   }
664   return c;
665 }
666
667 /*
668    Pack 'void *' into a string buffer.
669 */
670 SWIGRUNTIME char *
671 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
672   char *r = buff;
673   if ((2*sizeof(void *) + 2) > bsz) return 0;
674   *(r++) = '_';
675   r = SWIG_PackData(r,&ptr,sizeof(void *));
676   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
677   strcpy(r,name);
678   return buff;
679 }
680
681 SWIGRUNTIME const char *
682 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
683   if (*c != '_') {
684     if (strcmp(c,"NULL") == 0) {
685       *ptr = (void *) 0;
686       return name;
687     } else {
688       return 0;
689     }
690   }
691   return SWIG_UnpackData(++c,ptr,sizeof(void *));
692 }
693
694 SWIGRUNTIME char *
695 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
696   char *r = buff;
697   size_t lname = (name ? strlen(name) : 0);
698   if ((2*sz + 2 + lname) > bsz) return 0;
699   *(r++) = '_';
700   r = SWIG_PackData(r,ptr,sz);
701   if (lname) {
702     strncpy(r,name,lname+1);
703   } else {
704     *r = 0;
705   }
706   return buff;
707 }
708
709 SWIGRUNTIME const char *
710 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
711   if (*c != '_') {
712     if (strcmp(c,"NULL") == 0) {
713       memset(ptr,0,sz);
714       return name;
715     } else {
716       return 0;
717     }
718   }
719   return SWIG_UnpackData(++c,ptr,sz);
720 }
721
722 #ifdef __cplusplus
723 }
724 #endif
725
726 /*  Errors in SWIG */
727 #define  SWIG_UnknownError         -1
728 #define  SWIG_IOError              -2
729 #define  SWIG_RuntimeError         -3
730 #define  SWIG_IndexError           -4
731 #define  SWIG_TypeError            -5
732 #define  SWIG_DivisionByZero       -6
733 #define  SWIG_OverflowError        -7
734 #define  SWIG_SyntaxError          -8
735 #define  SWIG_ValueError           -9
736 #define  SWIG_SystemError          -10
737 #define  SWIG_AttributeError       -11
738 #define  SWIG_MemoryError          -12
739 #define  SWIG_NullReferenceError   -13
740
741
742
743 /* Compatibility macros for Python 3 */
744 #if PY_VERSION_HEX >= 0x03000000
745
746 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
747 #define PyInt_Check(x) PyLong_Check(x)
748 #define PyInt_AsLong(x) PyLong_AsLong(x)
749 #define PyInt_FromLong(x) PyLong_FromLong(x)
750 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
751 #define PyString_Check(name) PyBytes_Check(name)
752 #define PyString_FromString(x) PyUnicode_FromString(x)
753 #define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
754 #define PyString_AsString(str) PyBytes_AsString(str)
755 #define PyString_Size(str) PyBytes_Size(str)    
756 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
757 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
758 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
759 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
760
761 #endif
762
763 #ifndef Py_TYPE
764 #  define Py_TYPE(op) ((op)->ob_type)
765 #endif
766
767 /* SWIG APIs for compatibility of both Python 2 & 3 */
768
769 #if PY_VERSION_HEX >= 0x03000000
770 #  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
771 #else
772 #  define SWIG_Python_str_FromFormat PyString_FromFormat
773 #endif
774
775
776 /* Warning: This function will allocate a new string in Python 3,
777  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
778  */
779 SWIGINTERN char*
780 SWIG_Python_str_AsChar(PyObject *str)
781 {
782 #if PY_VERSION_HEX >= 0x03000000
783   char *cstr;
784   char *newstr;
785   Py_ssize_t len;
786   str = PyUnicode_AsUTF8String(str);
787   PyBytes_AsStringAndSize(str, &cstr, &len);
788   newstr = (char *) malloc(len+1);
789   memcpy(newstr, cstr, len+1);
790   Py_XDECREF(str);
791   return newstr;
792 #else
793   return PyString_AsString(str);
794 #endif
795 }
796
797 #if PY_VERSION_HEX >= 0x03000000
798 #  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
799 #else
800 #  define SWIG_Python_str_DelForPy3(x) 
801 #endif
802
803
804 SWIGINTERN PyObject*
805 SWIG_Python_str_FromChar(const char *c)
806 {
807 #if PY_VERSION_HEX >= 0x03000000
808   return PyUnicode_FromString(c); 
809 #else
810   return PyString_FromString(c);
811 #endif
812 }
813
814 /* Add PyOS_snprintf for old Pythons */
815 #if PY_VERSION_HEX < 0x02020000
816 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
817 #  define PyOS_snprintf _snprintf
818 # else
819 #  define PyOS_snprintf snprintf
820 # endif
821 #endif
822
823 /* A crude PyString_FromFormat implementation for old Pythons */
824 #if PY_VERSION_HEX < 0x02020000
825
826 #ifndef SWIG_PYBUFFER_SIZE
827 # define SWIG_PYBUFFER_SIZE 1024
828 #endif
829
830 static PyObject *
831 PyString_FromFormat(const char *fmt, ...) {
832   va_list ap;
833   char buf[SWIG_PYBUFFER_SIZE * 2];
834   int res;
835   va_start(ap, fmt);
836   res = vsnprintf(buf, sizeof(buf), fmt, ap);
837   va_end(ap);
838   return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
839 }
840 #endif
841
842 #ifndef PyObject_DEL
843 # define PyObject_DEL PyObject_Del
844 #endif
845
846 /* A crude PyExc_StopIteration exception for old Pythons */
847 #if PY_VERSION_HEX < 0x02020000
848 # ifndef PyExc_StopIteration
849 #  define PyExc_StopIteration PyExc_RuntimeError
850 # endif
851 # ifndef PyObject_GenericGetAttr
852 #  define PyObject_GenericGetAttr 0
853 # endif
854 #endif
855
856 /* Py_NotImplemented is defined in 2.1 and up. */
857 #if PY_VERSION_HEX < 0x02010000
858 # ifndef Py_NotImplemented
859 #  define Py_NotImplemented PyExc_RuntimeError
860 # endif
861 #endif
862
863 /* A crude PyString_AsStringAndSize implementation for old Pythons */
864 #if PY_VERSION_HEX < 0x02010000
865 # ifndef PyString_AsStringAndSize
866 #  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
867 # endif
868 #endif
869
870 /* PySequence_Size for old Pythons */
871 #if PY_VERSION_HEX < 0x02000000
872 # ifndef PySequence_Size
873 #  define PySequence_Size PySequence_Length
874 # endif
875 #endif
876
877 /* PyBool_FromLong for old Pythons */
878 #if PY_VERSION_HEX < 0x02030000
879 static
880 PyObject *PyBool_FromLong(long ok)
881 {
882   PyObject *result = ok ? Py_True : Py_False;
883   Py_INCREF(result);
884   return result;
885 }
886 #endif
887
888 /* Py_ssize_t for old Pythons */
889 /* This code is as recommended by: */
890 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
891 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
892 typedef int Py_ssize_t;
893 # define PY_SSIZE_T_MAX INT_MAX
894 # define PY_SSIZE_T_MIN INT_MIN
895 typedef inquiry lenfunc;
896 typedef intargfunc ssizeargfunc;
897 typedef intintargfunc ssizessizeargfunc;
898 typedef intobjargproc ssizeobjargproc;
899 typedef intintobjargproc ssizessizeobjargproc;
900 typedef getreadbufferproc readbufferproc;
901 typedef getwritebufferproc writebufferproc;
902 typedef getsegcountproc segcountproc;
903 typedef getcharbufferproc charbufferproc;
904 static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
905 {
906   long result = 0;
907   PyObject *i = PyNumber_Int(x);
908   if (i) {
909     result = PyInt_AsLong(i);
910     Py_DECREF(i);
911   }
912   return result;
913 }
914 #endif
915
916 #if PY_VERSION_HEX < 0x02050000
917 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
918 #endif
919
920 #if PY_VERSION_HEX < 0x02040000
921 #define Py_VISIT(op)                            \
922   do {                                          \
923     if (op) {                                   \
924       int vret = visit((op), arg);              \
925       if (vret)                                 \
926         return vret;                            \
927     }                                           \
928   } while (0)
929 #endif
930
931 #if PY_VERSION_HEX < 0x02030000
932 typedef struct {
933   PyTypeObject type;
934   PyNumberMethods as_number;
935   PyMappingMethods as_mapping;
936   PySequenceMethods as_sequence;
937   PyBufferProcs as_buffer;
938   PyObject *name, *slots;
939 } PyHeapTypeObject;
940 #endif
941
942 #if PY_VERSION_HEX < 0x02030000
943 typedef destructor freefunc;
944 #endif
945
946 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
947      (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
948      (PY_MAJOR_VERSION > 3))
949 # define SWIGPY_USE_CAPSULE
950 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
951 #endif
952
953 #if PY_VERSION_HEX < 0x03020000
954 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
955 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
956 #endif
957
958 /* -----------------------------------------------------------------------------
959  * error manipulation
960  * ----------------------------------------------------------------------------- */
961
962 SWIGRUNTIME PyObject*
963 SWIG_Python_ErrorType(int code) {
964   PyObject* type = 0;
965   switch(code) {
966   case SWIG_MemoryError:
967     type = PyExc_MemoryError;
968     break;
969   case SWIG_IOError:
970     type = PyExc_IOError;
971     break;
972   case SWIG_RuntimeError:
973     type = PyExc_RuntimeError;
974     break;
975   case SWIG_IndexError:
976     type = PyExc_IndexError;
977     break;
978   case SWIG_TypeError:
979     type = PyExc_TypeError;
980     break;
981   case SWIG_DivisionByZero:
982     type = PyExc_ZeroDivisionError;
983     break;
984   case SWIG_OverflowError:
985     type = PyExc_OverflowError;
986     break;
987   case SWIG_SyntaxError:
988     type = PyExc_SyntaxError;
989     break;
990   case SWIG_ValueError:
991     type = PyExc_ValueError;
992     break;
993   case SWIG_SystemError:
994     type = PyExc_SystemError;
995     break;
996   case SWIG_AttributeError:
997     type = PyExc_AttributeError;
998     break;
999   default:
1000     type = PyExc_RuntimeError;
1001   }
1002   return type;
1003 }
1004
1005
1006 SWIGRUNTIME void
1007 SWIG_Python_AddErrorMsg(const char* mesg)
1008 {
1009   PyObject *type = 0;
1010   PyObject *value = 0;
1011   PyObject *traceback = 0;
1012
1013   if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
1014   if (value) {
1015     char *tmp;
1016     PyObject *old_str = PyObject_Str(value);
1017     PyErr_Clear();
1018     Py_XINCREF(type);
1019
1020     PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
1021     SWIG_Python_str_DelForPy3(tmp);
1022     Py_DECREF(old_str);
1023     Py_DECREF(value);
1024   } else {
1025     PyErr_SetString(PyExc_RuntimeError, mesg);
1026   }
1027 }
1028
1029 #if defined(SWIG_PYTHON_NO_THREADS)
1030 #  if defined(SWIG_PYTHON_THREADS)
1031 #    undef SWIG_PYTHON_THREADS
1032 #  endif
1033 #endif
1034 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
1035 #  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1036 #    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
1037 #      define SWIG_PYTHON_USE_GIL
1038 #    endif
1039 #  endif
1040 #  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
1041 #    ifndef SWIG_PYTHON_INITIALIZE_THREADS
1042 #     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
1043 #    endif
1044 #    ifdef __cplusplus /* C++ code */
1045        class SWIG_Python_Thread_Block {
1046          bool status;
1047          PyGILState_STATE state;
1048        public:
1049          void end() { if (status) { PyGILState_Release(state); status = false;} }
1050          SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1051          ~SWIG_Python_Thread_Block() { end(); }
1052        };
1053        class SWIG_Python_Thread_Allow {
1054          bool status;
1055          PyThreadState *save;
1056        public:
1057          void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
1058          SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1059          ~SWIG_Python_Thread_Allow() { end(); }
1060        };
1061 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
1062 #      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
1063 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
1064 #      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
1065 #    else /* C code */
1066 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1067 #      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
1068 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1069 #      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
1070 #    endif
1071 #  else /* Old thread way, not implemented, user must provide it */
1072 #    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1073 #      define SWIG_PYTHON_INITIALIZE_THREADS
1074 #    endif
1075 #    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1076 #      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1077 #    endif
1078 #    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1079 #      define SWIG_PYTHON_THREAD_END_BLOCK
1080 #    endif
1081 #    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1082 #      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1083 #    endif
1084 #    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1085 #      define SWIG_PYTHON_THREAD_END_ALLOW
1086 #    endif
1087 #  endif
1088 #else /* No thread support */
1089 #  define SWIG_PYTHON_INITIALIZE_THREADS
1090 #  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1091 #  define SWIG_PYTHON_THREAD_END_BLOCK
1092 #  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1093 #  define SWIG_PYTHON_THREAD_END_ALLOW
1094 #endif
1095
1096 /* -----------------------------------------------------------------------------
1097  * Python API portion that goes into the runtime
1098  * ----------------------------------------------------------------------------- */
1099
1100 #ifdef __cplusplus
1101 extern "C" {
1102 #endif
1103
1104 /* -----------------------------------------------------------------------------
1105  * Constant declarations
1106  * ----------------------------------------------------------------------------- */
1107
1108 /* Constant Types */
1109 #define SWIG_PY_POINTER 4
1110 #define SWIG_PY_BINARY  5
1111
1112 /* Constant information structure */
1113 typedef struct swig_const_info {
1114   int type;
1115   char *name;
1116   long lvalue;
1117   double dvalue;
1118   void   *pvalue;
1119   swig_type_info **ptype;
1120 } swig_const_info;
1121
1122
1123 /* -----------------------------------------------------------------------------
1124  * Wrapper of PyInstanceMethod_New() used in Python 3
1125  * It is exported to the generated module, used for -fastproxy
1126  * ----------------------------------------------------------------------------- */
1127 #if PY_VERSION_HEX >= 0x03000000
1128 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
1129 {
1130   return PyInstanceMethod_New(func);
1131 }
1132 #else
1133 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
1134 {
1135   return NULL;
1136 }
1137 #endif
1138
1139 #ifdef __cplusplus
1140 }
1141 #endif
1142
1143
1144 /* -----------------------------------------------------------------------------
1145  * pyrun.swg
1146  *
1147  * This file contains the runtime support for Python modules
1148  * and includes code for managing global variables and pointer
1149  * type checking.
1150  *
1151  * ----------------------------------------------------------------------------- */
1152
1153 /* Common SWIG API */
1154
1155 /* for raw pointers */
1156 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1157 #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1158 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1159
1160 #ifdef SWIGPYTHON_BUILTIN
1161 #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
1162 #else
1163 #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1164 #endif
1165
1166 #define SWIG_InternalNewPointerObj(ptr, type, flags)    SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1167
1168 #define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
1169 #define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
1170 #define swig_owntype                                    int
1171
1172 /* for raw packed data */
1173 #define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1174 #define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
1175
1176 /* for class or struct pointers */
1177 #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
1178 #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
1179
1180 /* for C or C++ function pointers */
1181 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1182 #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1183
1184 /* for C++ member pointers, ie, member methods */
1185 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1186 #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)
1187
1188
1189 /* Runtime API */
1190
1191 #define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule(clientdata)
1192 #define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
1193 #define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
1194
1195 #define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
1196 #define SWIG_SetErrorMsg                                SWIG_Python_SetErrorMsg                            
1197 #define SWIG_ErrorType(code)                            SWIG_Python_ErrorType(code)                        
1198 #define SWIG_Error(code, msg)                           SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
1199 #define SWIG_fail                                       goto fail                                          
1200
1201
1202 /* Runtime API implementation */
1203
1204 /* Error manipulation */
1205
1206 SWIGINTERN void 
1207 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1208   SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
1209   PyErr_SetObject(errtype, obj);
1210   Py_DECREF(obj);
1211   SWIG_PYTHON_THREAD_END_BLOCK;
1212 }
1213
1214 SWIGINTERN void 
1215 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1216   SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1217   PyErr_SetString(errtype, msg);
1218   SWIG_PYTHON_THREAD_END_BLOCK;
1219 }
1220
1221 #define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1222
1223 /* Set a constant value */
1224
1225 #if defined(SWIGPYTHON_BUILTIN)
1226
1227 SWIGINTERN void
1228 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1229   PyObject *s = PyString_InternFromString(key);
1230   PyList_Append(seq, s);
1231   Py_DECREF(s);
1232 }
1233
1234 SWIGINTERN void
1235 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
1236 #if PY_VERSION_HEX < 0x02030000
1237   PyDict_SetItemString(d, (char *)name, obj);
1238 #else
1239   PyDict_SetItemString(d, name, obj);
1240 #endif
1241   Py_DECREF(obj);
1242   if (public_interface)
1243     SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1244 }
1245
1246 #else
1247
1248 SWIGINTERN void
1249 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
1250 #if PY_VERSION_HEX < 0x02030000
1251   PyDict_SetItemString(d, (char *)name, obj);
1252 #else
1253   PyDict_SetItemString(d, name, obj);
1254 #endif
1255   Py_DECREF(obj);                            
1256 }
1257
1258 #endif
1259
1260 /* Append a value to the result obj */
1261
1262 SWIGINTERN PyObject*
1263 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1264 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1265   if (!result) {
1266     result = obj;
1267   } else if (result == Py_None) {
1268     Py_DECREF(result);
1269     result = obj;
1270   } else {
1271     if (!PyList_Check(result)) {
1272       PyObject *o2 = result;
1273       result = PyList_New(1);
1274       PyList_SetItem(result, 0, o2);
1275     }
1276     PyList_Append(result,obj);
1277     Py_DECREF(obj);
1278   }
1279   return result;
1280 #else
1281   PyObject*   o2;
1282   PyObject*   o3;
1283   if (!result) {
1284     result = obj;
1285   } else if (result == Py_None) {
1286     Py_DECREF(result);
1287     result = obj;
1288   } else {
1289     if (!PyTuple_Check(result)) {
1290       o2 = result;
1291       result = PyTuple_New(1);
1292       PyTuple_SET_ITEM(result, 0, o2);
1293     }
1294     o3 = PyTuple_New(1);
1295     PyTuple_SET_ITEM(o3, 0, obj);
1296     o2 = result;
1297     result = PySequence_Concat(o2, o3);
1298     Py_DECREF(o2);
1299     Py_DECREF(o3);
1300   }
1301   return result;
1302 #endif
1303 }
1304
1305 /* Unpack the argument tuple */
1306
1307 SWIGINTERN Py_ssize_t
1308 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1309 {
1310   if (!args) {
1311     if (!min && !max) {
1312       return 1;
1313     } else {
1314       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
1315                    name, (min == max ? "" : "at least "), (int)min);
1316       return 0;
1317     }
1318   }  
1319   if (!PyTuple_Check(args)) {
1320     if (min <= 1 && max >= 1) {
1321       Py_ssize_t i;
1322       objs[0] = args;
1323       for (i = 1; i < max; ++i) {
1324         objs[i] = 0;
1325       }
1326       return 2;
1327     }
1328     PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1329     return 0;
1330   } else {
1331     Py_ssize_t l = PyTuple_GET_SIZE(args);
1332     if (l < min) {
1333       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
1334                    name, (min == max ? "" : "at least "), (int)min, (int)l);
1335       return 0;
1336     } else if (l > max) {
1337       PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
1338                    name, (min == max ? "" : "at most "), (int)max, (int)l);
1339       return 0;
1340     } else {
1341       Py_ssize_t i;
1342       for (i = 0; i < l; ++i) {
1343         objs[i] = PyTuple_GET_ITEM(args, i);
1344       }
1345       for (; l < max; ++l) {
1346         objs[l] = 0;
1347       }
1348       return i + 1;
1349     }    
1350   }
1351 }
1352
1353 /* A functor is a function object with one single object argument */
1354 #if PY_VERSION_HEX >= 0x02020000
1355 #define SWIG_Python_CallFunctor(functor, obj)           PyObject_CallFunctionObjArgs(functor, obj, NULL);
1356 #else
1357 #define SWIG_Python_CallFunctor(functor, obj)           PyObject_CallFunction(functor, "O", obj);
1358 #endif
1359
1360 /*
1361   Helper for static pointer initialization for both C and C++ code, for example
1362   static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1363 */
1364 #ifdef __cplusplus
1365 #define SWIG_STATIC_POINTER(var)  var
1366 #else
1367 #define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
1368 #endif
1369
1370 /* -----------------------------------------------------------------------------
1371  * Pointer declarations
1372  * ----------------------------------------------------------------------------- */
1373
1374 /* Flags for new pointer objects */
1375 #define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
1376 #define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1377
1378 #define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)
1379
1380 #define SWIG_BUILTIN_TP_INIT        (SWIG_POINTER_OWN << 2)
1381 #define SWIG_BUILTIN_INIT           (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1382
1383 #ifdef __cplusplus
1384 extern "C" {
1385 #endif
1386
1387 /*  How to access Py_None */
1388 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1389 #  ifndef SWIG_PYTHON_NO_BUILD_NONE
1390 #    ifndef SWIG_PYTHON_BUILD_NONE
1391 #      define SWIG_PYTHON_BUILD_NONE
1392 #    endif
1393 #  endif
1394 #endif
1395
1396 #ifdef SWIG_PYTHON_BUILD_NONE
1397 #  ifdef Py_None
1398 #   undef Py_None
1399 #   define Py_None SWIG_Py_None()
1400 #  endif
1401 SWIGRUNTIMEINLINE PyObject * 
1402 _SWIG_Py_None(void)
1403 {
1404   PyObject *none = Py_BuildValue((char*)"");
1405   Py_DECREF(none);
1406   return none;
1407 }
1408 SWIGRUNTIME PyObject * 
1409 SWIG_Py_None(void)
1410 {
1411   static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1412   return none;
1413 }
1414 #endif
1415
1416 /* The python void return value */
1417
1418 SWIGRUNTIMEINLINE PyObject * 
1419 SWIG_Py_Void(void)
1420 {
1421   PyObject *none = Py_None;
1422   Py_INCREF(none);
1423   return none;
1424 }
1425
1426 /* SwigPyClientData */
1427
1428 typedef struct {
1429   PyObject *klass;
1430   PyObject *newraw;
1431   PyObject *newargs;
1432   PyObject *destroy;
1433   int delargs;
1434   int implicitconv;
1435   PyTypeObject *pytype;
1436 } SwigPyClientData;
1437
1438 SWIGRUNTIMEINLINE int 
1439 SWIG_Python_CheckImplicit(swig_type_info *ty)
1440 {
1441   SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1442   return data ? data->implicitconv : 0;
1443 }
1444
1445 SWIGRUNTIMEINLINE PyObject *
1446 SWIG_Python_ExceptionType(swig_type_info *desc) {
1447   SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1448   PyObject *klass = data ? data->klass : 0;
1449   return (klass ? klass : PyExc_RuntimeError);
1450 }
1451
1452
1453 SWIGRUNTIME SwigPyClientData * 
1454 SwigPyClientData_New(PyObject* obj)
1455 {
1456   if (!obj) {
1457     return 0;
1458   } else {
1459     SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1460     /* the klass element */
1461     data->klass = obj;
1462     Py_INCREF(data->klass);
1463     /* the newraw method and newargs arguments used to create a new raw instance */
1464     if (PyClass_Check(obj)) {
1465       data->newraw = 0;
1466       data->newargs = obj;
1467       Py_INCREF(obj);
1468     } else {
1469 #if (PY_VERSION_HEX < 0x02020000)
1470       data->newraw = 0;
1471 #else
1472       data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1473 #endif
1474       if (data->newraw) {
1475         Py_INCREF(data->newraw);
1476         data->newargs = PyTuple_New(1);
1477         PyTuple_SetItem(data->newargs, 0, obj);
1478       } else {
1479         data->newargs = obj;
1480       }
1481       Py_INCREF(data->newargs);
1482     }
1483     /* the destroy method, aka as the C++ delete method */
1484     data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1485     if (PyErr_Occurred()) {
1486       PyErr_Clear();
1487       data->destroy = 0;
1488     }
1489     if (data->destroy) {
1490       int flags;
1491       Py_INCREF(data->destroy);
1492       flags = PyCFunction_GET_FLAGS(data->destroy);
1493 #ifdef METH_O
1494       data->delargs = !(flags & (METH_O));
1495 #else
1496       data->delargs = 0;
1497 #endif
1498     } else {
1499       data->delargs = 0;
1500     }
1501     data->implicitconv = 0;
1502     data->pytype = 0;
1503     return data;
1504   }
1505 }
1506
1507 SWIGRUNTIME void 
1508 SwigPyClientData_Del(SwigPyClientData *data) {
1509   Py_XDECREF(data->newraw);
1510   Py_XDECREF(data->newargs);
1511   Py_XDECREF(data->destroy);
1512 }
1513
1514 /* =============== SwigPyObject =====================*/
1515
1516 typedef struct {
1517   PyObject_HEAD
1518   void *ptr;
1519   swig_type_info *ty;
1520   int own;
1521   PyObject *next;
1522 #ifdef SWIGPYTHON_BUILTIN
1523   PyObject *dict;
1524 #endif
1525 } SwigPyObject;
1526
1527
1528 #ifdef SWIGPYTHON_BUILTIN
1529
1530 SWIGRUNTIME PyObject *
1531 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1532 {
1533   SwigPyObject *sobj = (SwigPyObject *)v;
1534
1535   if (!sobj->dict)
1536     sobj->dict = PyDict_New();
1537
1538   Py_INCREF(sobj->dict);
1539   return sobj->dict;
1540 }
1541
1542 #endif
1543
1544 SWIGRUNTIME PyObject *
1545 SwigPyObject_long(SwigPyObject *v)
1546 {
1547   return PyLong_FromVoidPtr(v->ptr);
1548 }
1549
1550 SWIGRUNTIME PyObject *
1551 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1552 {
1553   PyObject *res = NULL;
1554   PyObject *args = PyTuple_New(1);
1555   if (args) {
1556     if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1557       PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1558       if (ofmt) {
1559 #if PY_VERSION_HEX >= 0x03000000
1560         res = PyUnicode_Format(ofmt,args);
1561 #else
1562         res = PyString_Format(ofmt,args);
1563 #endif
1564         Py_DECREF(ofmt);
1565       }
1566       Py_DECREF(args);
1567     }
1568   }
1569   return res;
1570 }
1571
1572 SWIGRUNTIME PyObject *
1573 SwigPyObject_oct(SwigPyObject *v)
1574 {
1575   return SwigPyObject_format("%o",v);
1576 }
1577
1578 SWIGRUNTIME PyObject *
1579 SwigPyObject_hex(SwigPyObject *v)
1580 {
1581   return SwigPyObject_format("%x",v);
1582 }
1583
1584 SWIGRUNTIME PyObject *
1585 #ifdef METH_NOARGS
1586 SwigPyObject_repr(SwigPyObject *v)
1587 #else
1588 SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1589 #endif
1590 {
1591   const char *name = SWIG_TypePrettyName(v->ty);
1592   PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1593   if (v->next) {
1594 # ifdef METH_NOARGS
1595     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1596 # else
1597     PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1598 # endif
1599 # if PY_VERSION_HEX >= 0x03000000
1600     PyObject *joined = PyUnicode_Concat(repr, nrep);
1601     Py_DecRef(repr);
1602     Py_DecRef(nrep);
1603     repr = joined;
1604 # else
1605     PyString_ConcatAndDel(&repr,nrep);
1606 # endif
1607   }
1608   return repr;  
1609 }
1610
1611 SWIGRUNTIME int
1612 SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1613 {
1614   void *i = v->ptr;
1615   void *j = w->ptr;
1616   return (i < j) ? -1 : ((i > j) ? 1 : 0);
1617 }
1618
1619 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1620 SWIGRUNTIME PyObject*
1621 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1622 {
1623   PyObject* res;
1624   if( op != Py_EQ && op != Py_NE ) {
1625     Py_INCREF(Py_NotImplemented);
1626     return Py_NotImplemented;
1627   }
1628   res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1629   return res;  
1630 }
1631
1632
1633 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1634
1635 #ifdef SWIGPYTHON_BUILTIN
1636 static swig_type_info *SwigPyObject_stype = 0;
1637 SWIGRUNTIME PyTypeObject*
1638 SwigPyObject_type(void) {
1639     SwigPyClientData *cd;
1640     assert(SwigPyObject_stype);
1641     cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1642     assert(cd);
1643     assert(cd->pytype);
1644     return cd->pytype;
1645 }
1646 #else
1647 SWIGRUNTIME PyTypeObject*
1648 SwigPyObject_type(void) {
1649   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1650   return type;
1651 }
1652 #endif
1653
1654 SWIGRUNTIMEINLINE int
1655 SwigPyObject_Check(PyObject *op) {
1656 #ifdef SWIGPYTHON_BUILTIN
1657   PyTypeObject *target_tp = SwigPyObject_type();
1658   if (PyType_IsSubtype(op->ob_type, target_tp))
1659     return 1;
1660   return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1661 #else
1662   return (Py_TYPE(op) == SwigPyObject_type())
1663     || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1664 #endif
1665 }
1666
1667 SWIGRUNTIME PyObject *
1668 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1669
1670 SWIGRUNTIME void
1671 SwigPyObject_dealloc(PyObject *v)
1672 {
1673   SwigPyObject *sobj = (SwigPyObject *) v;
1674   PyObject *next = sobj->next;
1675   if (sobj->own == SWIG_POINTER_OWN) {
1676     swig_type_info *ty = sobj->ty;
1677     SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1678     PyObject *destroy = data ? data->destroy : 0;
1679     if (destroy) {
1680       /* destroy is always a VARARGS method */
1681       PyObject *res;
1682
1683       /* PyObject_CallFunction() has the potential to silently drop
1684          the active active exception.  In cases of unnamed temporary
1685          variable or where we just finished iterating over a generator
1686          StopIteration will be active right now, and this needs to
1687          remain true upon return from SwigPyObject_dealloc.  So save
1688          and restore. */
1689       
1690       PyObject *val = NULL, *type = NULL, *tb = NULL;
1691       PyErr_Fetch(&val, &type, &tb);
1692
1693       if (data->delargs) {
1694         /* we need to create a temporary object to carry the destroy operation */
1695         PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1696         res = SWIG_Python_CallFunctor(destroy, tmp);
1697         Py_DECREF(tmp);
1698       } else {
1699         PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1700         PyObject *mself = PyCFunction_GET_SELF(destroy);
1701         res = ((*meth)(mself, v));
1702       }
1703       if (!res)
1704         PyErr_WriteUnraisable(destroy);
1705
1706       PyErr_Restore(val, type, tb);
1707
1708       Py_XDECREF(res);
1709     } 
1710 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1711     else {
1712       const char *name = SWIG_TypePrettyName(ty);
1713       printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1714     }
1715 #endif
1716   } 
1717   Py_XDECREF(next);
1718   PyObject_DEL(v);
1719 }
1720
1721 SWIGRUNTIME PyObject* 
1722 SwigPyObject_append(PyObject* v, PyObject* next)
1723 {
1724   SwigPyObject *sobj = (SwigPyObject *) v;
1725 #ifndef METH_O
1726   PyObject *tmp = 0;
1727   if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1728   next = tmp;
1729 #endif
1730   if (!SwigPyObject_Check(next)) {
1731     PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1732     return NULL;
1733   }
1734   sobj->next = next;
1735   Py_INCREF(next);
1736   return SWIG_Py_Void();
1737 }
1738
1739 SWIGRUNTIME PyObject* 
1740 #ifdef METH_NOARGS
1741 SwigPyObject_next(PyObject* v)
1742 #else
1743 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1744 #endif
1745 {
1746   SwigPyObject *sobj = (SwigPyObject *) v;
1747   if (sobj->next) {    
1748     Py_INCREF(sobj->next);
1749     return sobj->next;
1750   } else {
1751     return SWIG_Py_Void();
1752   }
1753 }
1754
1755 SWIGINTERN PyObject*
1756 #ifdef METH_NOARGS
1757 SwigPyObject_disown(PyObject *v)
1758 #else
1759 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1760 #endif
1761 {
1762   SwigPyObject *sobj = (SwigPyObject *)v;
1763   sobj->own = 0;
1764   return SWIG_Py_Void();
1765 }
1766
1767 SWIGINTERN PyObject*
1768 #ifdef METH_NOARGS
1769 SwigPyObject_acquire(PyObject *v)
1770 #else
1771 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1772 #endif
1773 {
1774   SwigPyObject *sobj = (SwigPyObject *)v;
1775   sobj->own = SWIG_POINTER_OWN;
1776   return SWIG_Py_Void();
1777 }
1778
1779 SWIGINTERN PyObject*
1780 SwigPyObject_own(PyObject *v, PyObject *args)
1781 {
1782   PyObject *val = 0;
1783 #if (PY_VERSION_HEX < 0x02020000)
1784   if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1785 #elif (PY_VERSION_HEX < 0x02050000)
1786   if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
1787 #else
1788   if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
1789 #endif
1790     {
1791       return NULL;
1792     } 
1793   else
1794     {
1795       SwigPyObject *sobj = (SwigPyObject *)v;
1796       PyObject *obj = PyBool_FromLong(sobj->own);
1797       if (val) {
1798 #ifdef METH_NOARGS
1799         if (PyObject_IsTrue(val)) {
1800           SwigPyObject_acquire(v);
1801         } else {
1802           SwigPyObject_disown(v);
1803         }
1804 #else
1805         if (PyObject_IsTrue(val)) {
1806           SwigPyObject_acquire(v,args);
1807         } else {
1808           SwigPyObject_disown(v,args);
1809         }
1810 #endif
1811       } 
1812       return obj;
1813     }
1814 }
1815
1816 #ifdef METH_O
1817 static PyMethodDef
1818 swigobject_methods[] = {
1819   {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
1820   {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"acquires ownership of the pointer"},
1821   {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1822   {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
1823   {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
1824   {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
1825   {0, 0, 0, 0}  
1826 };
1827 #else
1828 static PyMethodDef
1829 swigobject_methods[] = {
1830   {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
1831   {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"acquires ownership of the pointer"},
1832   {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
1833   {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
1834   {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
1835   {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
1836   {0, 0, 0, 0}  
1837 };
1838 #endif
1839
1840 #if PY_VERSION_HEX < 0x02020000
1841 SWIGINTERN PyObject *
1842 SwigPyObject_getattr(SwigPyObject *sobj,char *name)
1843 {
1844   return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1845 }
1846 #endif
1847
1848 SWIGRUNTIME PyTypeObject*
1849 SwigPyObject_TypeOnce(void) {
1850   static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1851
1852   static PyNumberMethods SwigPyObject_as_number = {
1853     (binaryfunc)0, /*nb_add*/
1854     (binaryfunc)0, /*nb_subtract*/
1855     (binaryfunc)0, /*nb_multiply*/
1856     /* nb_divide removed in Python 3 */
1857 #if PY_VERSION_HEX < 0x03000000
1858     (binaryfunc)0, /*nb_divide*/
1859 #endif
1860     (binaryfunc)0, /*nb_remainder*/
1861     (binaryfunc)0, /*nb_divmod*/
1862     (ternaryfunc)0,/*nb_power*/
1863     (unaryfunc)0,  /*nb_negative*/
1864     (unaryfunc)0,  /*nb_positive*/
1865     (unaryfunc)0,  /*nb_absolute*/
1866     (inquiry)0,    /*nb_nonzero*/
1867     0,             /*nb_invert*/
1868     0,             /*nb_lshift*/
1869     0,             /*nb_rshift*/
1870     0,             /*nb_and*/
1871     0,             /*nb_xor*/
1872     0,             /*nb_or*/
1873 #if PY_VERSION_HEX < 0x03000000
1874     0,   /*nb_coerce*/
1875 #endif
1876     (unaryfunc)SwigPyObject_long, /*nb_int*/
1877 #if PY_VERSION_HEX < 0x03000000
1878     (unaryfunc)SwigPyObject_long, /*nb_long*/
1879 #else
1880     0, /*nb_reserved*/
1881 #endif
1882     (unaryfunc)0,                 /*nb_float*/
1883 #if PY_VERSION_HEX < 0x03000000
1884     (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
1885     (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
1886 #endif
1887 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1888     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1889 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1890     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1891 #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1892     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1893 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1894     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1895 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1896     0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1897 #endif
1898   };
1899
1900   static PyTypeObject swigpyobject_type;
1901   static int type_init = 0;
1902   if (!type_init) {
1903     const PyTypeObject tmp = {
1904       /* PyObject header changed in Python 3 */
1905 #if PY_VERSION_HEX >= 0x03000000
1906       PyVarObject_HEAD_INIT(NULL, 0)
1907 #else
1908       PyObject_HEAD_INIT(NULL)
1909       0,                                    /* ob_size */
1910 #endif
1911       (char *)"SwigPyObject",               /* tp_name */
1912       sizeof(SwigPyObject),                 /* tp_basicsize */
1913       0,                                    /* tp_itemsize */
1914       (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
1915       0,                                    /* tp_print */
1916 #if PY_VERSION_HEX < 0x02020000
1917       (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
1918 #else
1919       (getattrfunc)0,                       /* tp_getattr */
1920 #endif
1921       (setattrfunc)0,                       /* tp_setattr */
1922 #if PY_VERSION_HEX >= 0x03000000
1923     0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1924 #else
1925       (cmpfunc)SwigPyObject_compare,        /* tp_compare */
1926 #endif
1927       (reprfunc)SwigPyObject_repr,          /* tp_repr */
1928       &SwigPyObject_as_number,              /* tp_as_number */
1929       0,                                    /* tp_as_sequence */
1930       0,                                    /* tp_as_mapping */
1931       (hashfunc)0,                          /* tp_hash */
1932       (ternaryfunc)0,                       /* tp_call */
1933       0,                                    /* tp_str */
1934       PyObject_GenericGetAttr,              /* tp_getattro */
1935       0,                                    /* tp_setattro */
1936       0,                                    /* tp_as_buffer */
1937       Py_TPFLAGS_DEFAULT,                   /* tp_flags */
1938       swigobject_doc,                       /* tp_doc */
1939       0,                                    /* tp_traverse */
1940       0,                                    /* tp_clear */
1941       (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1942       0,                                    /* tp_weaklistoffset */
1943 #if PY_VERSION_HEX >= 0x02020000
1944       0,                                    /* tp_iter */
1945       0,                                    /* tp_iternext */
1946       swigobject_methods,                   /* tp_methods */
1947       0,                                    /* tp_members */
1948       0,                                    /* tp_getset */
1949       0,                                    /* tp_base */
1950       0,                                    /* tp_dict */
1951       0,                                    /* tp_descr_get */
1952       0,                                    /* tp_descr_set */
1953       0,                                    /* tp_dictoffset */
1954       0,                                    /* tp_init */
1955       0,                                    /* tp_alloc */
1956       0,                                    /* tp_new */
1957       0,                                    /* tp_free */
1958       0,                                    /* tp_is_gc */
1959       0,                                    /* tp_bases */
1960       0,                                    /* tp_mro */
1961       0,                                    /* tp_cache */
1962       0,                                    /* tp_subclasses */
1963       0,                                    /* tp_weaklist */
1964 #endif
1965 #if PY_VERSION_HEX >= 0x02030000
1966       0,                                    /* tp_del */
1967 #endif
1968 #if PY_VERSION_HEX >= 0x02060000
1969       0,                                    /* tp_version_tag */
1970 #endif
1971 #if PY_VERSION_HEX >= 0x03040000
1972       0,                                    /* tp_finalize */
1973 #endif
1974 #ifdef COUNT_ALLOCS
1975       0,                                    /* tp_allocs */
1976       0,                                    /* tp_frees */
1977       0,                                    /* tp_maxalloc */
1978 #if PY_VERSION_HEX >= 0x02050000
1979       0,                                    /* tp_prev */
1980 #endif
1981       0                                     /* tp_next */
1982 #endif
1983     };
1984     swigpyobject_type = tmp;
1985     type_init = 1;
1986 #if PY_VERSION_HEX < 0x02020000
1987     swigpyobject_type.ob_type = &PyType_Type;
1988 #else
1989     if (PyType_Ready(&swigpyobject_type) < 0)
1990       return NULL;
1991 #endif
1992   }
1993   return &swigpyobject_type;
1994 }
1995
1996 SWIGRUNTIME PyObject *
1997 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1998 {
1999   SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
2000   if (sobj) {
2001     sobj->ptr  = ptr;
2002     sobj->ty   = ty;
2003     sobj->own  = own;
2004     sobj->next = 0;
2005   }
2006   return (PyObject *)sobj;
2007 }
2008
2009 /* -----------------------------------------------------------------------------
2010  * Implements a simple Swig Packed type, and use it instead of string
2011  * ----------------------------------------------------------------------------- */
2012
2013 typedef struct {
2014   PyObject_HEAD
2015   void *pack;
2016   swig_type_info *ty;
2017   size_t size;
2018 } SwigPyPacked;
2019
2020 SWIGRUNTIME int
2021 SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
2022 {
2023   char result[SWIG_BUFFER_SIZE];
2024   fputs("<Swig Packed ", fp); 
2025   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2026     fputs("at ", fp); 
2027     fputs(result, fp); 
2028   }
2029   fputs(v->ty->name,fp); 
2030   fputs(">", fp);
2031   return 0; 
2032 }
2033   
2034 SWIGRUNTIME PyObject *
2035 SwigPyPacked_repr(SwigPyPacked *v)
2036 {
2037   char result[SWIG_BUFFER_SIZE];
2038   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2039     return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
2040   } else {
2041     return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
2042   }  
2043 }
2044
2045 SWIGRUNTIME PyObject *
2046 SwigPyPacked_str(SwigPyPacked *v)
2047 {
2048   char result[SWIG_BUFFER_SIZE];
2049   if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
2050     return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
2051   } else {
2052     return SWIG_Python_str_FromChar(v->ty->name);
2053   }  
2054 }
2055
2056 SWIGRUNTIME int
2057 SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
2058 {
2059   size_t i = v->size;
2060   size_t j = w->size;
2061   int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2062   return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
2063 }
2064
2065 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
2066
2067 SWIGRUNTIME PyTypeObject*
2068 SwigPyPacked_type(void) {
2069   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2070   return type;
2071 }
2072
2073 SWIGRUNTIMEINLINE int
2074 SwigPyPacked_Check(PyObject *op) {
2075   return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
2076     || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
2077 }
2078
2079 SWIGRUNTIME void
2080 SwigPyPacked_dealloc(PyObject *v)
2081 {
2082   if (SwigPyPacked_Check(v)) {
2083     SwigPyPacked *sobj = (SwigPyPacked *) v;
2084     free(sobj->pack);
2085   }
2086   PyObject_DEL(v);
2087 }
2088
2089 SWIGRUNTIME PyTypeObject*
2090 SwigPyPacked_TypeOnce(void) {
2091   static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
2092   static PyTypeObject swigpypacked_type;
2093   static int type_init = 0;
2094   if (!type_init) {
2095     const PyTypeObject tmp = {
2096       /* PyObject header changed in Python 3 */
2097 #if PY_VERSION_HEX>=0x03000000
2098       PyVarObject_HEAD_INIT(NULL, 0)
2099 #else
2100       PyObject_HEAD_INIT(NULL)
2101       0,                                    /* ob_size */
2102 #endif
2103       (char *)"SwigPyPacked",               /* tp_name */
2104       sizeof(SwigPyPacked),                 /* tp_basicsize */
2105       0,                                    /* tp_itemsize */
2106       (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
2107       (printfunc)SwigPyPacked_print,        /* tp_print */
2108       (getattrfunc)0,                       /* tp_getattr */
2109       (setattrfunc)0,                       /* tp_setattr */
2110 #if PY_VERSION_HEX>=0x03000000
2111       0, /* tp_reserved in 3.0.1 */
2112 #else
2113       (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
2114 #endif
2115       (reprfunc)SwigPyPacked_repr,          /* tp_repr */
2116       0,                                    /* tp_as_number */
2117       0,                                    /* tp_as_sequence */
2118       0,                                    /* tp_as_mapping */
2119       (hashfunc)0,                          /* tp_hash */
2120       (ternaryfunc)0,                       /* tp_call */
2121       (reprfunc)SwigPyPacked_str,           /* tp_str */
2122       PyObject_GenericGetAttr,              /* tp_getattro */
2123       0,                                    /* tp_setattro */
2124       0,                                    /* tp_as_buffer */
2125       Py_TPFLAGS_DEFAULT,                   /* tp_flags */
2126       swigpacked_doc,                       /* tp_doc */
2127       0,                                    /* tp_traverse */
2128       0,                                    /* tp_clear */
2129       0,                                    /* tp_richcompare */
2130       0,                                    /* tp_weaklistoffset */
2131 #if PY_VERSION_HEX >= 0x02020000
2132       0,                                    /* tp_iter */
2133       0,                                    /* tp_iternext */
2134       0,                                    /* tp_methods */
2135       0,                                    /* tp_members */
2136       0,                                    /* tp_getset */
2137       0,                                    /* tp_base */
2138       0,                                    /* tp_dict */
2139       0,                                    /* tp_descr_get */
2140       0,                                    /* tp_descr_set */
2141       0,                                    /* tp_dictoffset */
2142       0,                                    /* tp_init */
2143       0,                                    /* tp_alloc */
2144       0,                                    /* tp_new */
2145       0,                                    /* tp_free */
2146       0,                                    /* tp_is_gc */
2147       0,                                    /* tp_bases */
2148       0,                                    /* tp_mro */
2149       0,                                    /* tp_cache */
2150       0,                                    /* tp_subclasses */
2151       0,                                    /* tp_weaklist */
2152 #endif
2153 #if PY_VERSION_HEX >= 0x02030000
2154       0,                                    /* tp_del */
2155 #endif
2156 #if PY_VERSION_HEX >= 0x02060000
2157       0,                                    /* tp_version_tag */
2158 #endif
2159 #if PY_VERSION_HEX >= 0x03040000
2160       0,                                    /* tp_finalize */
2161 #endif
2162 #ifdef COUNT_ALLOCS
2163       0,                                    /* tp_allocs */
2164       0,                                    /* tp_frees */
2165       0,                                    /* tp_maxalloc */
2166 #if PY_VERSION_HEX >= 0x02050000
2167       0,                                    /* tp_prev */
2168 #endif
2169       0                                     /* tp_next */
2170 #endif
2171     };
2172     swigpypacked_type = tmp;
2173     type_init = 1;
2174 #if PY_VERSION_HEX < 0x02020000
2175     swigpypacked_type.ob_type = &PyType_Type;
2176 #else
2177     if (PyType_Ready(&swigpypacked_type) < 0)
2178       return NULL;
2179 #endif
2180   }
2181   return &swigpypacked_type;
2182 }
2183
2184 SWIGRUNTIME PyObject *
2185 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2186 {
2187   SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
2188   if (sobj) {
2189     void *pack = malloc(size);
2190     if (pack) {
2191       memcpy(pack, ptr, size);
2192       sobj->pack = pack;
2193       sobj->ty   = ty;
2194       sobj->size = size;
2195     } else {
2196       PyObject_DEL((PyObject *) sobj);
2197       sobj = 0;
2198     }
2199   }
2200   return (PyObject *) sobj;
2201 }
2202
2203 SWIGRUNTIME swig_type_info *
2204 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2205 {
2206   if (SwigPyPacked_Check(obj)) {
2207     SwigPyPacked *sobj = (SwigPyPacked *)obj;
2208     if (sobj->size != size) return 0;
2209     memcpy(ptr, sobj->pack, size);
2210     return sobj->ty;
2211   } else {
2212     return 0;
2213   }
2214 }
2215
2216 /* -----------------------------------------------------------------------------
2217  * pointers/data manipulation
2218  * ----------------------------------------------------------------------------- */
2219
2220 SWIGRUNTIMEINLINE PyObject *
2221 _SWIG_This(void)
2222 {
2223     return SWIG_Python_str_FromChar("this");
2224 }
2225
2226 static PyObject *swig_this = NULL;
2227
2228 SWIGRUNTIME PyObject *
2229 SWIG_This(void)
2230 {
2231   if (swig_this == NULL)
2232     swig_this = _SWIG_This();
2233   return swig_this;
2234 }
2235
2236 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2237
2238 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2239 #if PY_VERSION_HEX>=0x03000000
2240 #define SWIG_PYTHON_SLOW_GETSET_THIS 
2241 #endif
2242
2243 SWIGRUNTIME SwigPyObject *
2244 SWIG_Python_GetSwigThis(PyObject *pyobj) 
2245 {
2246   PyObject *obj;
2247
2248   if (SwigPyObject_Check(pyobj))
2249     return (SwigPyObject *) pyobj;
2250
2251 #ifdef SWIGPYTHON_BUILTIN
2252   (void)obj;
2253 # ifdef PyWeakref_CheckProxy
2254   if (PyWeakref_CheckProxy(pyobj)) {
2255     pyobj = PyWeakref_GET_OBJECT(pyobj);
2256     if (pyobj && SwigPyObject_Check(pyobj))
2257       return (SwigPyObject*) pyobj;
2258   }
2259 # endif
2260   return NULL;
2261 #else
2262
2263   obj = 0;
2264
2265 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2266   if (PyInstance_Check(pyobj)) {
2267     obj = _PyInstance_Lookup(pyobj, SWIG_This());      
2268   } else {
2269     PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2270     if (dictptr != NULL) {
2271       PyObject *dict = *dictptr;
2272       obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2273     } else {
2274 #ifdef PyWeakref_CheckProxy
2275       if (PyWeakref_CheckProxy(pyobj)) {
2276         PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2277         return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2278       }
2279 #endif
2280       obj = PyObject_GetAttr(pyobj,SWIG_This());
2281       if (obj) {
2282         Py_DECREF(obj);
2283       } else {
2284         if (PyErr_Occurred()) PyErr_Clear();
2285         return 0;
2286       }
2287     }
2288   }
2289 #else
2290   obj = PyObject_GetAttr(pyobj,SWIG_This());
2291   if (obj) {
2292     Py_DECREF(obj);
2293   } else {
2294     if (PyErr_Occurred()) PyErr_Clear();
2295     return 0;
2296   }
2297 #endif
2298   if (obj && !SwigPyObject_Check(obj)) {
2299     /* a PyObject is called 'this', try to get the 'real this'
2300        SwigPyObject from it */ 
2301     return SWIG_Python_GetSwigThis(obj);
2302   }
2303   return (SwigPyObject *)obj;
2304 #endif
2305 }
2306
2307 /* Acquire a pointer value */
2308
2309 SWIGRUNTIME int
2310 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2311   if (own == SWIG_POINTER_OWN) {
2312     SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2313     if (sobj) {
2314       int oldown = sobj->own;
2315       sobj->own = own;
2316       return oldown;
2317     }
2318   }
2319   return 0;
2320 }
2321
2322 /* Convert a pointer value */
2323
2324 SWIGRUNTIME int
2325 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2326   int res;
2327   SwigPyObject *sobj;
2328   int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2329
2330   if (!obj)
2331     return SWIG_ERROR;
2332   if (obj == Py_None && !implicit_conv) {
2333     if (ptr)
2334       *ptr = 0;
2335     return SWIG_OK;
2336   }
2337
2338   res = SWIG_ERROR;
2339
2340   sobj = SWIG_Python_GetSwigThis(obj);
2341   if (own)
2342     *own = 0;
2343   while (sobj) {
2344     void *vptr = sobj->ptr;
2345     if (ty) {
2346       swig_type_info *to = sobj->ty;
2347       if (to == ty) {
2348         /* no type cast needed */
2349         if (ptr) *ptr = vptr;
2350         break;
2351       } else {
2352         swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2353         if (!tc) {
2354           sobj = (SwigPyObject *)sobj->next;
2355         } else {
2356           if (ptr) {
2357             int newmemory = 0;
2358             *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2359             if (newmemory == SWIG_CAST_NEW_MEMORY) {
2360               assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2361               if (own)
2362                 *own = *own | SWIG_CAST_NEW_MEMORY;
2363             }
2364           }
2365           break;
2366         }
2367       }
2368     } else {
2369       if (ptr) *ptr = vptr;
2370       break;
2371     }
2372   }
2373   if (sobj) {
2374     if (own)
2375       *own = *own | sobj->own;
2376     if (flags & SWIG_POINTER_DISOWN) {
2377       sobj->own = 0;
2378     }
2379     res = SWIG_OK;
2380   } else {
2381     if (implicit_conv) {
2382       SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2383       if (data && !data->implicitconv) {
2384         PyObject *klass = data->klass;
2385         if (klass) {
2386           PyObject *impconv;
2387           data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2388           impconv = SWIG_Python_CallFunctor(klass, obj);
2389           data->implicitconv = 0;
2390           if (PyErr_Occurred()) {
2391             PyErr_Clear();
2392             impconv = 0;
2393           }
2394           if (impconv) {
2395             SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2396             if (iobj) {
2397               void *vptr;
2398               res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2399               if (SWIG_IsOK(res)) {
2400                 if (ptr) {
2401                   *ptr = vptr;
2402                   /* transfer the ownership to 'ptr' */
2403                   iobj->own = 0;
2404                   res = SWIG_AddCast(res);
2405                   res = SWIG_AddNewMask(res);
2406                 } else {
2407                   res = SWIG_AddCast(res);                  
2408                 }
2409               }
2410             }
2411             Py_DECREF(impconv);
2412           }
2413         }
2414       }
2415     }
2416     if (!SWIG_IsOK(res) && obj == Py_None) {
2417       if (ptr)
2418         *ptr = 0;
2419       if (PyErr_Occurred())
2420         PyErr_Clear();
2421       res = SWIG_OK;
2422     }
2423   }
2424   return res;
2425 }
2426
2427 /* Convert a function ptr value */
2428
2429 SWIGRUNTIME int
2430 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2431   if (!PyCFunction_Check(obj)) {
2432     return SWIG_ConvertPtr(obj, ptr, ty, 0);
2433   } else {
2434     void *vptr = 0;
2435     
2436     /* here we get the method pointer for callbacks */
2437     const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2438     const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2439     if (desc)
2440       desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2441     if (!desc) 
2442       return SWIG_ERROR;
2443     if (ty) {
2444       swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2445       if (tc) {
2446         int newmemory = 0;
2447         *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2448         assert(!newmemory); /* newmemory handling not yet implemented */
2449       } else {
2450         return SWIG_ERROR;
2451       }
2452     } else {
2453       *ptr = vptr;
2454     }
2455     return SWIG_OK;
2456   }
2457 }
2458
2459 /* Convert a packed value value */
2460
2461 SWIGRUNTIME int
2462 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2463   swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2464   if (!to) return SWIG_ERROR;
2465   if (ty) {
2466     if (to != ty) {
2467       /* check type cast? */
2468       swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2469       if (!tc) return SWIG_ERROR;
2470     }
2471   }
2472   return SWIG_OK;
2473 }  
2474
2475 /* -----------------------------------------------------------------------------
2476  * Create a new pointer object
2477  * ----------------------------------------------------------------------------- */
2478
2479 /*
2480   Create a new instance object, without calling __init__, and set the
2481   'this' attribute.
2482 */
2483
2484 SWIGRUNTIME PyObject* 
2485 SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2486 {
2487 #if (PY_VERSION_HEX >= 0x02020000)
2488   PyObject *inst = 0;
2489   PyObject *newraw = data->newraw;
2490   if (newraw) {
2491     inst = PyObject_Call(newraw, data->newargs, NULL);
2492     if (inst) {
2493 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2494       PyObject **dictptr = _PyObject_GetDictPtr(inst);
2495       if (dictptr != NULL) {
2496         PyObject *dict = *dictptr;
2497         if (dict == NULL) {
2498           dict = PyDict_New();
2499           *dictptr = dict;
2500           PyDict_SetItem(dict, SWIG_This(), swig_this);
2501         }
2502       }
2503 #else
2504       PyObject *key = SWIG_This();
2505       PyObject_SetAttr(inst, key, swig_this);
2506 #endif
2507     }
2508   } else {
2509 #if PY_VERSION_HEX >= 0x03000000
2510     inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2511     if (inst) {
2512       PyObject_SetAttr(inst, SWIG_This(), swig_this);
2513       Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2514     }
2515 #else
2516     PyObject *dict = PyDict_New();
2517     if (dict) {
2518       PyDict_SetItem(dict, SWIG_This(), swig_this);
2519       inst = PyInstance_NewRaw(data->newargs, dict);
2520       Py_DECREF(dict);
2521     }
2522 #endif
2523   }
2524   return inst;
2525 #else
2526 #if (PY_VERSION_HEX >= 0x02010000)
2527   PyObject *inst = 0;
2528   PyObject *dict = PyDict_New();
2529   if (dict) {
2530     PyDict_SetItem(dict, SWIG_This(), swig_this);
2531     inst = PyInstance_NewRaw(data->newargs, dict);
2532     Py_DECREF(dict);
2533   }
2534   return (PyObject *) inst;
2535 #else
2536   PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2537   if (inst == NULL) {
2538     return NULL;
2539   }
2540   inst->in_class = (PyClassObject *)data->newargs;
2541   Py_INCREF(inst->in_class);
2542   inst->in_dict = PyDict_New();
2543   if (inst->in_dict == NULL) {
2544     Py_DECREF(inst);
2545     return NULL;
2546   }
2547 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2548   inst->in_weakreflist = NULL;
2549 #endif
2550 #ifdef Py_TPFLAGS_GC
2551   PyObject_GC_Init(inst);
2552 #endif
2553   PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2554   return (PyObject *) inst;
2555 #endif
2556 #endif
2557 }
2558
2559 SWIGRUNTIME void
2560 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2561 {
2562  PyObject *dict;
2563 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2564  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2565  if (dictptr != NULL) {
2566    dict = *dictptr;
2567    if (dict == NULL) {
2568      dict = PyDict_New();
2569      *dictptr = dict;
2570    }
2571    PyDict_SetItem(dict, SWIG_This(), swig_this);
2572    return;
2573  }
2574 #endif
2575  dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2576  PyDict_SetItem(dict, SWIG_This(), swig_this);
2577  Py_DECREF(dict);
2578
2579
2580
2581 SWIGINTERN PyObject *
2582 SWIG_Python_InitShadowInstance(PyObject *args) {
2583   PyObject *obj[2];
2584   if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2585     return NULL;
2586   } else {
2587     SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2588     if (sthis) {
2589       SwigPyObject_append((PyObject*) sthis, obj[1]);
2590     } else {
2591       SWIG_Python_SetSwigThis(obj[0], obj[1]);
2592     }
2593     return SWIG_Py_Void();
2594   }
2595 }
2596
2597 /* Create a new pointer object */
2598
2599 SWIGRUNTIME PyObject *
2600 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2601   SwigPyClientData *clientdata;
2602   PyObject * robj;
2603   int own;
2604
2605   if (!ptr)
2606     return SWIG_Py_Void();
2607
2608   clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2609   own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2610   if (clientdata && clientdata->pytype) {
2611     SwigPyObject *newobj;
2612     if (flags & SWIG_BUILTIN_TP_INIT) {
2613       newobj = (SwigPyObject*) self;
2614       if (newobj->ptr) {
2615         PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2616         while (newobj->next)
2617           newobj = (SwigPyObject *) newobj->next;
2618         newobj->next = next_self;
2619         newobj = (SwigPyObject *)next_self;
2620 #ifdef SWIGPYTHON_BUILTIN
2621         newobj->dict = 0;
2622 #endif
2623       }
2624     } else {
2625       newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2626 #ifdef SWIGPYTHON_BUILTIN
2627       newobj->dict = 0;
2628 #endif
2629     }
2630     if (newobj) {
2631       newobj->ptr = ptr;
2632       newobj->ty = type;
2633       newobj->own = own;
2634       newobj->next = 0;
2635       return (PyObject*) newobj;
2636     }
2637     return SWIG_Py_Void();
2638   }
2639
2640   assert(!(flags & SWIG_BUILTIN_TP_INIT));
2641
2642   robj = SwigPyObject_New(ptr, type, own);
2643   if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2644     PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2645     Py_DECREF(robj);
2646     robj = inst;
2647   }
2648   return robj;
2649 }
2650
2651 /* Create a new packed object */
2652
2653 SWIGRUNTIMEINLINE PyObject *
2654 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2655   return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2656 }
2657
2658 /* -----------------------------------------------------------------------------*
2659  *  Get type list 
2660  * -----------------------------------------------------------------------------*/
2661
2662 #ifdef SWIG_LINK_RUNTIME
2663 void *SWIG_ReturnGlobalTypeList(void *);
2664 #endif
2665
2666 SWIGRUNTIME swig_module_info *
2667 SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
2668   static void *type_pointer = (void *)0;
2669   /* first check if module already created */
2670   if (!type_pointer) {
2671 #ifdef SWIG_LINK_RUNTIME
2672     type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2673 #else
2674 # ifdef SWIGPY_USE_CAPSULE
2675     type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2676 # else
2677     type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2678                                     (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2679 # endif
2680     if (PyErr_Occurred()) {
2681       PyErr_Clear();
2682       type_pointer = (void *)0;
2683     }
2684 #endif
2685   }
2686   return (swig_module_info *) type_pointer;
2687 }
2688
2689 #if PY_MAJOR_VERSION < 2
2690 /* PyModule_AddObject function was introduced in Python 2.0.  The following function
2691    is copied out of Python/modsupport.c in python version 2.3.4 */
2692 SWIGINTERN int
2693 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2694 {
2695   PyObject *dict;
2696   if (!PyModule_Check(m)) {
2697     PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
2698     return SWIG_ERROR;
2699   }
2700   if (!o) {
2701     PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
2702     return SWIG_ERROR;
2703   }
2704   
2705   dict = PyModule_GetDict(m);
2706   if (dict == NULL) {
2707     /* Internal error -- modules must have a dict! */
2708     PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2709                  PyModule_GetName(m));
2710     return SWIG_ERROR;
2711   }
2712   if (PyDict_SetItemString(dict, name, o))
2713     return SWIG_ERROR;
2714   Py_DECREF(o);
2715   return SWIG_OK;
2716 }
2717 #endif
2718
2719 SWIGRUNTIME void
2720 #ifdef SWIGPY_USE_CAPSULE
2721 SWIG_Python_DestroyModule(PyObject *obj)
2722 #else
2723 SWIG_Python_DestroyModule(void *vptr)
2724 #endif
2725 {
2726 #ifdef SWIGPY_USE_CAPSULE
2727   swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2728 #else
2729   swig_module_info *swig_module = (swig_module_info *) vptr;
2730 #endif
2731   swig_type_info **types = swig_module->types;
2732   size_t i;
2733   for (i =0; i < swig_module->size; ++i) {
2734     swig_type_info *ty = types[i];
2735     if (ty->owndata) {
2736       SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2737       if (data) SwigPyClientData_Del(data);
2738     }
2739   }
2740   Py_DECREF(SWIG_This());
2741   swig_this = NULL;
2742 }
2743
2744 SWIGRUNTIME void
2745 SWIG_Python_SetModule(swig_module_info *swig_module) {
2746 #if PY_VERSION_HEX >= 0x03000000
2747  /* Add a dummy module object into sys.modules */
2748   PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2749 #else
2750   static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2751   PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2752 #endif
2753 #ifdef SWIGPY_USE_CAPSULE
2754   PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2755   if (pointer && module) {
2756     PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2757   } else {
2758     Py_XDECREF(pointer);
2759   }
2760 #else
2761   PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2762   if (pointer && module) {
2763     PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2764   } else {
2765     Py_XDECREF(pointer);
2766   }
2767 #endif
2768 }
2769
2770 /* The python cached type query */
2771 SWIGRUNTIME PyObject *
2772 SWIG_Python_TypeCache(void) {
2773   static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2774   return cache;
2775 }
2776
2777 SWIGRUNTIME swig_type_info *
2778 SWIG_Python_TypeQuery(const char *type)
2779 {
2780   PyObject *cache = SWIG_Python_TypeCache();
2781   PyObject *key = SWIG_Python_str_FromChar(type); 
2782   PyObject *obj = PyDict_GetItem(cache, key);
2783   swig_type_info *descriptor;
2784   if (obj) {
2785 #ifdef SWIGPY_USE_CAPSULE
2786     descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2787 #else
2788     descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2789 #endif
2790   } else {
2791     swig_module_info *swig_module = SWIG_GetModule(0);
2792     descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2793     if (descriptor) {
2794 #ifdef SWIGPY_USE_CAPSULE
2795       obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2796 #else
2797       obj = PyCObject_FromVoidPtr(descriptor, NULL);
2798 #endif
2799       PyDict_SetItem(cache, key, obj);
2800       Py_DECREF(obj);
2801     }
2802   }
2803   Py_DECREF(key);
2804   return descriptor;
2805 }
2806
2807 /* 
2808    For backward compatibility only
2809 */
2810 #define SWIG_POINTER_EXCEPTION  0
2811 #define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
2812 #define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)
2813
2814 SWIGRUNTIME int
2815 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2816 {  
2817   if (PyErr_Occurred()) {
2818     PyObject *type = 0;
2819     PyObject *value = 0;
2820     PyObject *traceback = 0;
2821     PyErr_Fetch(&type, &value, &traceback);
2822     if (value) {
2823       char *tmp;
2824       PyObject *old_str = PyObject_Str(value);
2825       Py_XINCREF(type);
2826       PyErr_Clear();
2827       if (infront) {
2828         PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2829       } else {
2830         PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2831       }
2832       SWIG_Python_str_DelForPy3(tmp);
2833       Py_DECREF(old_str);
2834     }
2835     return 1;
2836   } else {
2837     return 0;
2838   }
2839 }
2840   
2841 SWIGRUNTIME int
2842 SWIG_Python_ArgFail(int argnum)
2843 {
2844   if (PyErr_Occurred()) {
2845     /* add information about failing argument */
2846     char mesg[256];
2847     PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2848     return SWIG_Python_AddErrMesg(mesg, 1);
2849   } else {
2850     return 0;
2851   }
2852 }
2853
2854 SWIGRUNTIMEINLINE const char *
2855 SwigPyObject_GetDesc(PyObject *self)
2856 {
2857   SwigPyObject *v = (SwigPyObject *)self;
2858   swig_type_info *ty = v ? v->ty : 0;
2859   return ty ? ty->str : "";
2860 }
2861
2862 SWIGRUNTIME void
2863 SWIG_Python_TypeError(const char *type, PyObject *obj)
2864 {
2865   if (type) {
2866 #if defined(SWIG_COBJECT_TYPES)
2867     if (obj && SwigPyObject_Check(obj)) {
2868       const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2869       if (otype) {
2870         PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2871                      type, otype);
2872         return;
2873       }
2874     } else 
2875 #endif      
2876     {
2877       const char *otype = (obj ? obj->ob_type->tp_name : 0); 
2878       if (otype) {
2879         PyObject *str = PyObject_Str(obj);
2880         const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2881         if (cstr) {
2882           PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2883                        type, otype, cstr);
2884           SWIG_Python_str_DelForPy3(cstr);
2885         } else {
2886           PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2887                        type, otype);
2888         }
2889         Py_XDECREF(str);
2890         return;
2891       }
2892     }   
2893     PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2894   } else {
2895     PyErr_Format(PyExc_TypeError, "unexpected type is received");
2896   }
2897 }
2898
2899
2900 /* Convert a pointer value, signal an exception on a type mismatch */
2901 SWIGRUNTIME void *
2902 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2903   void *result;
2904   if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2905     PyErr_Clear();
2906 #if SWIG_POINTER_EXCEPTION
2907     if (flags) {
2908       SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2909       SWIG_Python_ArgFail(argnum);
2910     }
2911 #endif
2912   }
2913   return result;
2914 }
2915
2916 #ifdef SWIGPYTHON_BUILTIN
2917 SWIGRUNTIME int
2918 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2919   PyTypeObject *tp = obj->ob_type;
2920   PyObject *descr;
2921   PyObject *encoded_name;
2922   descrsetfunc f;
2923   int res = -1;
2924
2925 # ifdef Py_USING_UNICODE
2926   if (PyString_Check(name)) {
2927     name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2928     if (!name)
2929       return -1;
2930   } else if (!PyUnicode_Check(name))
2931 # else
2932   if (!PyString_Check(name))
2933 # endif
2934   {
2935     PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2936     return -1;
2937   } else {
2938     Py_INCREF(name);
2939   }
2940
2941   if (!tp->tp_dict) {
2942     if (PyType_Ready(tp) < 0)
2943       goto done;
2944   }
2945
2946   descr = _PyType_Lookup(tp, name);
2947   f = NULL;
2948   if (descr != NULL)
2949     f = descr->ob_type->tp_descr_set;
2950   if (!f) {
2951     if (PyString_Check(name)) {
2952       encoded_name = name;
2953       Py_INCREF(name);
2954     } else {
2955       encoded_name = PyUnicode_AsUTF8String(name);
2956     }
2957     PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2958     Py_DECREF(encoded_name);
2959   } else {
2960     res = f(descr, obj, value);
2961   }
2962   
2963   done:
2964   Py_DECREF(name);
2965   return res;
2966 }
2967 #endif
2968
2969
2970 #ifdef __cplusplus
2971 }
2972 #endif
2973
2974
2975
2976 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
2977
2978 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
2979
2980
2981
2982 /* -------- TYPES TABLE (BEGIN) -------- */
2983
2984 #define SWIGTYPE_p_a_128__char swig_types[0]
2985 #define SWIGTYPE_p_a_16__char swig_types[1]
2986 #define SWIGTYPE_p_a_16__uint8_t swig_types[2]
2987 #define SWIGTYPE_p_char swig_types[3]
2988 #define SWIGTYPE_p_control_data swig_types[4]
2989 #define SWIGTYPE_p_error_data swig_types[5]
2990 #define SWIGTYPE_p_int swig_types[6]
2991 #define SWIGTYPE_p_ping_data swig_types[7]
2992 #define SWIGTYPE_p_prng_data swig_types[8]
2993 #define SWIGTYPE_p_socket_data swig_types[9]
2994 #define SWIGTYPE_p_starttls_data swig_types[10]
2995 #define SWIGTYPE_p_uint8_t swig_types[11]
2996 static swig_type_info *swig_types[13];
2997 static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
2998 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2999 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3000
3001 /* -------- TYPES TABLE (END) -------- */
3002
3003 #if (PY_VERSION_HEX <= 0x02000000)
3004 # if !defined(SWIG_PYTHON_CLASSIC)
3005 #  error "This python version requires swig to be run with the '-classic' option"
3006 # endif
3007 #endif
3008
3009 /*-----------------------------------------------
3010               @(target):= _tlspool.so
3011   ------------------------------------------------*/
3012 #if PY_VERSION_HEX >= 0x03000000
3013 #  define SWIG_init    PyInit__tlspool
3014
3015 #else
3016 #  define SWIG_init    init_tlspool
3017
3018 #endif
3019 #define SWIG_name    "_tlspool"
3020
3021 #define SWIGVERSION 0x030010 
3022 #define SWIG_VERSION SWIGVERSION
3023
3024
3025 #define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
3026 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
3027
3028
3029
3030 #include <tlspool/starttls.h>
3031 #include <tlspool/commands.h>
3032
3033
3034
3035
3036         typedef char identity_t [128];
3037
3038         typedef uint8_t ctlkey_t [16];
3039
3040         typedef char service_t [16];
3041
3042         typedef int pool_handle_t;
3043
3044         typedef struct {
3045                 int tlserrno;
3046                 char message [128];
3047         } error_data;
3048
3049         typedef struct {
3050                 char YYYYMMDD_producer [8+128]; // when & who?
3051                 uint32_t facilities;            // PIOF_FACILITY_xxx
3052         } ping_data;
3053
3054         typedef struct {
3055                 uint32_t flags;
3056                 uint32_t local;
3057                 uint8_t ipproto;
3058                 uint16_t streamid;
3059                 identity_t localid;
3060                 identity_t remoteid;
3061                 ctlkey_t ctlkey;
3062                 service_t service;
3063                 uint32_t timeout;
3064         } starttls_data;
3065
3066         typedef struct {
3067                 uint32_t flags;
3068                 ctlkey_t ctlkey;
3069                 identity_t name;
3070         } control_data;
3071
3072         typedef struct {
3073                 int16_t in1_len, in2_len, prng_len;
3074                 uint8_t buffer [350];
3075         } prng_data;
3076
3077         typedef union {
3078                 int unix_socket;
3079         } socket_data;
3080
3081
3082
3083 #include <limits.h>
3084 #if !defined(SWIG_NO_LLONG_MAX)
3085 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3086 #   define LLONG_MAX __LONG_LONG_MAX__
3087 #   define LLONG_MIN (-LLONG_MAX - 1LL)
3088 #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3089 # endif
3090 #endif
3091
3092
3093 SWIGINTERN int
3094 SWIG_AsVal_double (PyObject *obj, double *val)
3095 {
3096   int res = SWIG_TypeError;
3097   if (PyFloat_Check(obj)) {
3098     if (val) *val = PyFloat_AsDouble(obj);
3099     return SWIG_OK;
3100 #if PY_VERSION_HEX < 0x03000000
3101   } else if (PyInt_Check(obj)) {
3102     if (val) *val = PyInt_AsLong(obj);
3103     return SWIG_OK;
3104 #endif
3105   } else if (PyLong_Check(obj)) {
3106     double v = PyLong_AsDouble(obj);
3107     if (!PyErr_Occurred()) {
3108       if (val) *val = v;
3109       return SWIG_OK;
3110     } else {
3111       PyErr_Clear();
3112     }
3113   }
3114 #ifdef SWIG_PYTHON_CAST_MODE
3115   {
3116     int dispatch = 0;
3117     double d = PyFloat_AsDouble(obj);
3118     if (!PyErr_Occurred()) {
3119       if (val) *val = d;
3120       return SWIG_AddCast(SWIG_OK);
3121     } else {
3122       PyErr_Clear();
3123     }
3124     if (!dispatch) {
3125       long v = PyLong_AsLong(obj);
3126       if (!PyErr_Occurred()) {
3127         if (val) *val = v;
3128         return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3129       } else {
3130         PyErr_Clear();
3131       }
3132     }
3133   }
3134 #endif
3135   return res;
3136 }
3137
3138
3139 #include <float.h>
3140
3141
3142 #include <math.h>
3143
3144
3145 SWIGINTERNINLINE int
3146 SWIG_CanCastAsInteger(double *d, double min, double max) {
3147   double x = *d;
3148   if ((min <= x && x <= max)) {
3149    double fx = floor(x);
3150    double cx = ceil(x);
3151    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3152    if ((errno == EDOM) || (errno == ERANGE)) {
3153      errno = 0;
3154    } else {
3155      double summ, reps, diff;
3156      if (rd < x) {
3157        diff = x - rd;
3158      } else if (rd > x) {
3159        diff = rd - x;
3160      } else {
3161        return 1;
3162      }
3163      summ = rd + x;
3164      reps = diff/summ;
3165      if (reps < 8*DBL_EPSILON) {
3166        *d = rd;
3167        return 1;
3168      }
3169    }
3170   }
3171   return 0;
3172 }
3173
3174
3175 SWIGINTERN int
3176 SWIG_AsVal_long (PyObject *obj, long* val)
3177 {
3178 #if PY_VERSION_HEX < 0x03000000
3179   if (PyInt_Check(obj)) {
3180     if (val) *val = PyInt_AsLong(obj);
3181     return SWIG_OK;
3182   } else
3183 #endif
3184   if (PyLong_Check(obj)) {
3185     long v = PyLong_AsLong(obj);
3186     if (!PyErr_Occurred()) {
3187       if (val) *val = v;
3188       return SWIG_OK;
3189     } else {
3190       PyErr_Clear();
3191       return SWIG_OverflowError;
3192     }
3193   }
3194 #ifdef SWIG_PYTHON_CAST_MODE
3195   {
3196     int dispatch = 0;
3197     long v = PyInt_AsLong(obj);
3198     if (!PyErr_Occurred()) {
3199       if (val) *val = v;
3200       return SWIG_AddCast(SWIG_OK);
3201     } else {
3202       PyErr_Clear();
3203     }
3204     if (!dispatch) {
3205       double d;
3206       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3207       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3208         if (val) *val = (long)(d);
3209         return res;
3210       }
3211     }
3212   }
3213 #endif
3214   return SWIG_TypeError;
3215 }
3216
3217
3218 SWIGINTERN int
3219 SWIG_AsVal_int (PyObject * obj, int *val)
3220 {
3221   long v;
3222   int res = SWIG_AsVal_long (obj, &v);
3223   if (SWIG_IsOK(res)) {
3224     if ((v < INT_MIN || v > INT_MAX)) {
3225       return SWIG_OverflowError;
3226     } else {
3227       if (val) *val = (int)(v);
3228     }
3229   }  
3230   return res;
3231 }
3232
3233
3234 SWIGINTERNINLINE PyObject*
3235   SWIG_From_int  (int value)
3236 {
3237   return PyInt_FromLong((long) value);
3238 }
3239
3240
3241 SWIGINTERN swig_type_info*
3242 SWIG_pchar_descriptor(void)
3243 {
3244   static int init = 0;
3245   static swig_type_info* info = 0;
3246   if (!init) {
3247     info = SWIG_TypeQuery("_p_char");
3248     init = 1;
3249   }
3250   return info;
3251 }
3252
3253
3254 SWIGINTERN int
3255 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3256 {
3257 #if PY_VERSION_HEX>=0x03000000
3258 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3259   if (PyBytes_Check(obj))
3260 #else
3261   if (PyUnicode_Check(obj))
3262 #endif
3263 #else  
3264   if (PyString_Check(obj))
3265 #endif
3266   {
3267     char *cstr; Py_ssize_t len;
3268 #if PY_VERSION_HEX>=0x03000000
3269 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3270     if (!alloc && cptr) {
3271         /* We can't allow converting without allocation, since the internal
3272            representation of string in Python 3 is UCS-2/UCS-4 but we require
3273            a UTF-8 representation.
3274            TODO(bhy) More detailed explanation */
3275         return SWIG_RuntimeError;
3276     }
3277     obj = PyUnicode_AsUTF8String(obj);
3278     if(alloc) *alloc = SWIG_NEWOBJ;
3279 #endif
3280     PyBytes_AsStringAndSize(obj, &cstr, &len);
3281 #else
3282     PyString_AsStringAndSize(obj, &cstr, &len);
3283 #endif
3284     if (cptr) {
3285       if (alloc) {
3286         /* 
3287            In python the user should not be able to modify the inner
3288            string representation. To warranty that, if you define
3289            SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
3290            buffer is always returned.
3291
3292            The default behavior is just to return the pointer value,
3293            so, be careful.
3294         */ 
3295 #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3296         if (*alloc != SWIG_OLDOBJ) 
3297 #else
3298         if (*alloc == SWIG_NEWOBJ) 
3299 #endif
3300         {
3301           *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
3302           *alloc = SWIG_NEWOBJ;
3303         } else {
3304           *cptr = cstr;
3305           *alloc = SWIG_OLDOBJ;
3306         }
3307       } else {
3308 #if PY_VERSION_HEX>=0x03000000
3309 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3310         *cptr = PyBytes_AsString(obj);
3311 #else
3312         assert(0); /* Should never reach here with Unicode strings in Python 3 */
3313 #endif
3314 #else
3315         *cptr = SWIG_Python_str_AsChar(obj);
3316 #endif
3317       }
3318     }
3319     if (psize) *psize = len + 1;
3320 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3321     Py_XDECREF(obj);
3322 #endif
3323     return SWIG_OK;
3324   } else {
3325 #if defined(SWIG_PYTHON_2_UNICODE)
3326 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3327 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3328 #endif
3329 #if PY_VERSION_HEX<0x03000000
3330     if (PyUnicode_Check(obj)) {
3331       char *cstr; Py_ssize_t len;
3332       if (!alloc && cptr) {
3333         return SWIG_RuntimeError;
3334       }
3335       obj = PyUnicode_AsUTF8String(obj);
3336       if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3337         if (cptr) {
3338           if (alloc) *alloc = SWIG_NEWOBJ;
3339           *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
3340         }
3341         if (psize) *psize = len + 1;
3342
3343         Py_XDECREF(obj);
3344         return SWIG_OK;
3345       } else {
3346         Py_XDECREF(obj);
3347       }
3348     }
3349 #endif
3350 #endif
3351
3352     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3353     if (pchar_descriptor) {
3354       void* vptr = 0;
3355       if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3356         if (cptr) *cptr = (char *) vptr;
3357         if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3358         if (alloc) *alloc = SWIG_OLDOBJ;
3359         return SWIG_OK;
3360       }
3361     }
3362   }
3363   return SWIG_TypeError;
3364 }
3365
3366
3367 SWIGINTERN int
3368 SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
3369
3370   char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
3371   int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
3372   if (SWIG_IsOK(res)) {
3373     /* special case of single char conversion when we don't need space for NUL */
3374     if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize;
3375     if (csize <= size) {
3376       if (val) {
3377         if (csize) memcpy(val, cptr, csize*sizeof(char));
3378         if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
3379       }
3380       if (alloc == SWIG_NEWOBJ) {
3381         free((char*)cptr);
3382         res = SWIG_DelNewMask(res);
3383       }      
3384       return res;
3385     }
3386     if (alloc == SWIG_NEWOBJ) free((char*)cptr);
3387   }
3388   return SWIG_TypeError;
3389 }
3390
3391
3392 SWIGINTERNINLINE PyObject *
3393 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3394 {
3395   if (carray) {
3396     if (size > INT_MAX) {
3397       swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3398       return pchar_descriptor ? 
3399         SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3400     } else {
3401 #if PY_VERSION_HEX >= 0x03000000
3402 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3403       return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size));
3404 #else
3405 #if PY_VERSION_HEX >= 0x03010000
3406       return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape");
3407 #else
3408       return PyUnicode_FromStringAndSize(carray, (Py_ssize_t)(size));
3409 #endif
3410 #endif
3411 #else
3412       return PyString_FromStringAndSize(carray, (Py_ssize_t)(size));
3413 #endif
3414     }
3415   } else {
3416     return SWIG_Py_Void();
3417   }
3418 }
3419
3420
3421 size_t
3422 SWIG_strnlen(const char* s, size_t maxlen)
3423 {
3424   const char *p;
3425   for (p = s; maxlen-- && *p; p++)
3426     ;
3427   return p - s;
3428 }
3429
3430
3431 SWIGINTERN int
3432 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
3433 {
3434 #if PY_VERSION_HEX < 0x03000000
3435   if (PyInt_Check(obj)) {
3436     long v = PyInt_AsLong(obj);
3437     if (v >= 0) {
3438       if (val) *val = v;
3439       return SWIG_OK;
3440     } else {
3441       return SWIG_OverflowError;
3442     }
3443   } else
3444 #endif
3445   if (PyLong_Check(obj)) {
3446     unsigned long v = PyLong_AsUnsignedLong(obj);
3447     if (!PyErr_Occurred()) {
3448       if (val) *val = v;
3449       return SWIG_OK;
3450     } else {
3451       PyErr_Clear();
3452       return SWIG_OverflowError;
3453     }
3454   }
3455 #ifdef SWIG_PYTHON_CAST_MODE
3456   {
3457     int dispatch = 0;
3458     unsigned long v = PyLong_AsUnsignedLong(obj);
3459     if (!PyErr_Occurred()) {
3460       if (val) *val = v;
3461       return SWIG_AddCast(SWIG_OK);
3462     } else {
3463       PyErr_Clear();
3464     }
3465     if (!dispatch) {
3466       double d;
3467       int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3468       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3469         if (val) *val = (unsigned long)(d);
3470         return res;
3471       }
3472     }
3473   }
3474 #endif
3475   return SWIG_TypeError;
3476 }
3477
3478
3479 SWIGINTERN int
3480 SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
3481 {
3482   unsigned long v;
3483   int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3484   if (SWIG_IsOK(res)) {
3485     if ((v > UINT_MAX)) {
3486       return SWIG_OverflowError;
3487     } else {
3488       if (val) *val = (unsigned int)(v);
3489     }
3490   }  
3491   return res;
3492 }
3493
3494
3495 SWIGINTERNINLINE PyObject*
3496   SWIG_From_unsigned_SS_int  (unsigned int value)
3497 {
3498   return PyInt_FromSize_t((size_t) value);
3499 }
3500
3501
3502 SWIGINTERN int
3503 SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val)
3504 {
3505   unsigned long v;
3506   int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3507   if (SWIG_IsOK(res)) {
3508     if ((v > UCHAR_MAX)) {
3509       return SWIG_OverflowError;
3510     } else {
3511       if (val) *val = (unsigned char)(v);
3512     }
3513   }  
3514   return res;
3515 }
3516
3517
3518   #define SWIG_From_long   PyInt_FromLong 
3519
3520
3521 SWIGINTERNINLINE PyObject* 
3522 SWIG_From_unsigned_SS_long  (unsigned long value)
3523 {
3524   return (value > LONG_MAX) ?
3525     PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value));
3526 }
3527
3528
3529 SWIGINTERNINLINE PyObject *
3530 SWIG_From_unsigned_SS_char  (unsigned char value)
3531 {    
3532   return SWIG_From_unsigned_SS_long  (value);
3533 }
3534
3535
3536 SWIGINTERN int
3537 SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val)
3538 {
3539   unsigned long v;
3540   int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3541   if (SWIG_IsOK(res)) {
3542     if ((v > USHRT_MAX)) {
3543       return SWIG_OverflowError;
3544     } else {
3545       if (val) *val = (unsigned short)(v);
3546     }
3547   }  
3548   return res;
3549 }
3550
3551
3552 SWIGINTERNINLINE PyObject *
3553 SWIG_From_unsigned_SS_short  (unsigned short value)
3554 {    
3555   return SWIG_From_unsigned_SS_long  (value);
3556 }
3557
3558
3559 SWIGINTERN int
3560 SWIG_AsVal_short (PyObject * obj, short *val)
3561 {
3562   long v;
3563   int res = SWIG_AsVal_long (obj, &v);
3564   if (SWIG_IsOK(res)) {
3565     if ((v < SHRT_MIN || v > SHRT_MAX)) {
3566       return SWIG_OverflowError;
3567     } else {
3568       if (val) *val = (short)(v);
3569     }
3570   }  
3571   return res;
3572 }
3573
3574
3575 SWIGINTERNINLINE PyObject *
3576 SWIG_From_short  (short value)
3577 {    
3578   return SWIG_From_long  (value);
3579 }
3580
3581
3582
3583
3584
3585 SWIGINTERNINLINE PyObject * 
3586 SWIG_FromCharPtr(const char *cptr)
3587
3588   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3589 }
3590
3591
3592
3593 PyObject *raise_errno (void) {
3594         return PyErr_SetFromErrno (PyExc_OSError);
3595 }
3596
3597
3598 #ifdef __cplusplus
3599 extern "C" {
3600 #endif
3601 SWIGINTERN PyObject *_wrap_error_data_tlserrno_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3602   PyObject *resultobj = 0;
3603   error_data *arg1 = (error_data *) 0 ;
3604   int arg2 ;
3605   void *argp1 = 0 ;
3606   int res1 = 0 ;
3607   int val2 ;
3608   int ecode2 = 0 ;
3609   PyObject * obj0 = 0 ;
3610   PyObject * obj1 = 0 ;
3611   
3612   if (!PyArg_ParseTuple(args,(char *)"OO:error_data_tlserrno_set",&obj0,&obj1)) SWIG_fail;
3613   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_error_data, 0 |  0 );
3614   if (!SWIG_IsOK(res1)) {
3615     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "error_data_tlserrno_set" "', argument " "1"" of type '" "error_data *""'"); 
3616   }
3617   arg1 = (error_data *)(argp1);
3618   ecode2 = SWIG_AsVal_int(obj1, &val2);
3619   if (!SWIG_IsOK(ecode2)) {
3620     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "error_data_tlserrno_set" "', argument " "2"" of type '" "int""'");
3621   } 
3622   arg2 = (int)(val2);
3623   {
3624     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3625     if (arg1) (arg1)->tlserrno = arg2;
3626     SWIG_PYTHON_THREAD_END_ALLOW;
3627   }
3628   resultobj = SWIG_Py_Void();
3629   return resultobj;
3630 fail:
3631   return NULL;
3632 }
3633
3634
3635 SWIGINTERN PyObject *_wrap_error_data_tlserrno_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3636   PyObject *resultobj = 0;
3637   error_data *arg1 = (error_data *) 0 ;
3638   void *argp1 = 0 ;
3639   int res1 = 0 ;
3640   PyObject * obj0 = 0 ;
3641   int result;
3642   
3643   if (!PyArg_ParseTuple(args,(char *)"O:error_data_tlserrno_get",&obj0)) SWIG_fail;
3644   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_error_data, 0 |  0 );
3645   if (!SWIG_IsOK(res1)) {
3646     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "error_data_tlserrno_get" "', argument " "1"" of type '" "error_data *""'"); 
3647   }
3648   arg1 = (error_data *)(argp1);
3649   {
3650     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3651     result = (int) ((arg1)->tlserrno);
3652     SWIG_PYTHON_THREAD_END_ALLOW;
3653   }
3654   resultobj = SWIG_From_int((int)(result));
3655   return resultobj;
3656 fail:
3657   return NULL;
3658 }
3659
3660
3661 SWIGINTERN PyObject *_wrap_error_data_message_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3662   PyObject *resultobj = 0;
3663   error_data *arg1 = (error_data *) 0 ;
3664   char *arg2 ;
3665   void *argp1 = 0 ;
3666   int res1 = 0 ;
3667   char temp2[128] ;
3668   int res2 ;
3669   PyObject * obj0 = 0 ;
3670   PyObject * obj1 = 0 ;
3671   
3672   if (!PyArg_ParseTuple(args,(char *)"OO:error_data_message_set",&obj0,&obj1)) SWIG_fail;
3673   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_error_data, 0 |  0 );
3674   if (!SWIG_IsOK(res1)) {
3675     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "error_data_message_set" "', argument " "1"" of type '" "error_data *""'"); 
3676   }
3677   arg1 = (error_data *)(argp1);
3678   res2 = SWIG_AsCharArray(obj1, temp2, 128);
3679   if (!SWIG_IsOK(res2)) {
3680     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "error_data_message_set" "', argument " "2"" of type '" "char [128]""'");
3681   }
3682   arg2 = (char *)(temp2);
3683   {
3684     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3685     if (arg2) memcpy(arg1->message,arg2,128*sizeof(char));
3686     else memset(arg1->message,0,128*sizeof(char));
3687     SWIG_PYTHON_THREAD_END_ALLOW;
3688   }
3689   resultobj = SWIG_Py_Void();
3690   return resultobj;
3691 fail:
3692   return NULL;
3693 }
3694
3695
3696 SWIGINTERN PyObject *_wrap_error_data_message_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3697   PyObject *resultobj = 0;
3698   error_data *arg1 = (error_data *) 0 ;
3699   void *argp1 = 0 ;
3700   int res1 = 0 ;
3701   PyObject * obj0 = 0 ;
3702   char *result = 0 ;
3703   
3704   if (!PyArg_ParseTuple(args,(char *)"O:error_data_message_get",&obj0)) SWIG_fail;
3705   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_error_data, 0 |  0 );
3706   if (!SWIG_IsOK(res1)) {
3707     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "error_data_message_get" "', argument " "1"" of type '" "error_data *""'"); 
3708   }
3709   arg1 = (error_data *)(argp1);
3710   {
3711     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3712     result = (char *)(char *) ((arg1)->message);
3713     SWIG_PYTHON_THREAD_END_ALLOW;
3714   }
3715   {
3716     size_t size = SWIG_strnlen(result, 128);
3717     
3718     
3719     
3720     resultobj = SWIG_FromCharPtrAndSize(result, size);
3721   }
3722   return resultobj;
3723 fail:
3724   return NULL;
3725 }
3726
3727
3728 SWIGINTERN PyObject *_wrap_new_error_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3729   PyObject *resultobj = 0;
3730   error_data *result = 0 ;
3731   
3732   if (!PyArg_ParseTuple(args,(char *)":new_error_data")) SWIG_fail;
3733   {
3734     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3735     result = (error_data *)calloc(1, sizeof(error_data));
3736     SWIG_PYTHON_THREAD_END_ALLOW;
3737   }
3738   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_error_data, SWIG_POINTER_NEW |  0 );
3739   return resultobj;
3740 fail:
3741   return NULL;
3742 }
3743
3744
3745 SWIGINTERN PyObject *_wrap_delete_error_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3746   PyObject *resultobj = 0;
3747   error_data *arg1 = (error_data *) 0 ;
3748   void *argp1 = 0 ;
3749   int res1 = 0 ;
3750   PyObject * obj0 = 0 ;
3751   
3752   if (!PyArg_ParseTuple(args,(char *)"O:delete_error_data",&obj0)) SWIG_fail;
3753   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_error_data, SWIG_POINTER_DISOWN |  0 );
3754   if (!SWIG_IsOK(res1)) {
3755     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_error_data" "', argument " "1"" of type '" "error_data *""'"); 
3756   }
3757   arg1 = (error_data *)(argp1);
3758   {
3759     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3760     free((char *) arg1);
3761     SWIG_PYTHON_THREAD_END_ALLOW;
3762   }
3763   resultobj = SWIG_Py_Void();
3764   return resultobj;
3765 fail:
3766   return NULL;
3767 }
3768
3769
3770 SWIGINTERN PyObject *error_data_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3771   PyObject *obj;
3772   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
3773   SWIG_TypeNewClientData(SWIGTYPE_p_error_data, SWIG_NewClientData(obj));
3774   return SWIG_Py_Void();
3775 }
3776
3777 SWIGINTERN PyObject *_wrap_ping_data_YYYYMMDD_producer_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3778   PyObject *resultobj = 0;
3779   ping_data *arg1 = (ping_data *) 0 ;
3780   char *arg2 ;
3781   void *argp1 = 0 ;
3782   int res1 = 0 ;
3783   char temp2[8+128] ;
3784   int res2 ;
3785   PyObject * obj0 = 0 ;
3786   PyObject * obj1 = 0 ;
3787   
3788   if (!PyArg_ParseTuple(args,(char *)"OO:ping_data_YYYYMMDD_producer_set",&obj0,&obj1)) SWIG_fail;
3789   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ping_data, 0 |  0 );
3790   if (!SWIG_IsOK(res1)) {
3791     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ping_data_YYYYMMDD_producer_set" "', argument " "1"" of type '" "ping_data *""'"); 
3792   }
3793   arg1 = (ping_data *)(argp1);
3794   res2 = SWIG_AsCharArray(obj1, temp2, 8+128);
3795   if (!SWIG_IsOK(res2)) {
3796     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ping_data_YYYYMMDD_producer_set" "', argument " "2"" of type '" "char [8+128]""'");
3797   }
3798   arg2 = (char *)(temp2);
3799   {
3800     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3801     if (arg2) memcpy(arg1->YYYYMMDD_producer,arg2,8+128*sizeof(char));
3802     else memset(arg1->YYYYMMDD_producer,0,8+128*sizeof(char));
3803     SWIG_PYTHON_THREAD_END_ALLOW;
3804   }
3805   resultobj = SWIG_Py_Void();
3806   return resultobj;
3807 fail:
3808   return NULL;
3809 }
3810
3811
3812 SWIGINTERN PyObject *_wrap_ping_data_YYYYMMDD_producer_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3813   PyObject *resultobj = 0;
3814   ping_data *arg1 = (ping_data *) 0 ;
3815   void *argp1 = 0 ;
3816   int res1 = 0 ;
3817   PyObject * obj0 = 0 ;
3818   char *result = 0 ;
3819   
3820   if (!PyArg_ParseTuple(args,(char *)"O:ping_data_YYYYMMDD_producer_get",&obj0)) SWIG_fail;
3821   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ping_data, 0 |  0 );
3822   if (!SWIG_IsOK(res1)) {
3823     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ping_data_YYYYMMDD_producer_get" "', argument " "1"" of type '" "ping_data *""'"); 
3824   }
3825   arg1 = (ping_data *)(argp1);
3826   {
3827     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3828     result = (char *)(char *) ((arg1)->YYYYMMDD_producer);
3829     SWIG_PYTHON_THREAD_END_ALLOW;
3830   }
3831   {
3832     size_t size = SWIG_strnlen(result, 8+128);
3833     
3834     
3835     
3836     resultobj = SWIG_FromCharPtrAndSize(result, size);
3837   }
3838   return resultobj;
3839 fail:
3840   return NULL;
3841 }
3842
3843
3844 SWIGINTERN PyObject *_wrap_ping_data_facilities_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3845   PyObject *resultobj = 0;
3846   ping_data *arg1 = (ping_data *) 0 ;
3847   uint32_t arg2 ;
3848   void *argp1 = 0 ;
3849   int res1 = 0 ;
3850   unsigned int val2 ;
3851   int ecode2 = 0 ;
3852   PyObject * obj0 = 0 ;
3853   PyObject * obj1 = 0 ;
3854   
3855   if (!PyArg_ParseTuple(args,(char *)"OO:ping_data_facilities_set",&obj0,&obj1)) SWIG_fail;
3856   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ping_data, 0 |  0 );
3857   if (!SWIG_IsOK(res1)) {
3858     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ping_data_facilities_set" "', argument " "1"" of type '" "ping_data *""'"); 
3859   }
3860   arg1 = (ping_data *)(argp1);
3861   ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
3862   if (!SWIG_IsOK(ecode2)) {
3863     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ping_data_facilities_set" "', argument " "2"" of type '" "uint32_t""'");
3864   } 
3865   arg2 = (uint32_t)(val2);
3866   {
3867     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3868     if (arg1) (arg1)->facilities = arg2;
3869     SWIG_PYTHON_THREAD_END_ALLOW;
3870   }
3871   resultobj = SWIG_Py_Void();
3872   return resultobj;
3873 fail:
3874   return NULL;
3875 }
3876
3877
3878 SWIGINTERN PyObject *_wrap_ping_data_facilities_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3879   PyObject *resultobj = 0;
3880   ping_data *arg1 = (ping_data *) 0 ;
3881   void *argp1 = 0 ;
3882   int res1 = 0 ;
3883   PyObject * obj0 = 0 ;
3884   uint32_t result;
3885   
3886   if (!PyArg_ParseTuple(args,(char *)"O:ping_data_facilities_get",&obj0)) SWIG_fail;
3887   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ping_data, 0 |  0 );
3888   if (!SWIG_IsOK(res1)) {
3889     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ping_data_facilities_get" "', argument " "1"" of type '" "ping_data *""'"); 
3890   }
3891   arg1 = (ping_data *)(argp1);
3892   {
3893     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3894     result =  ((arg1)->facilities);
3895     SWIG_PYTHON_THREAD_END_ALLOW;
3896   }
3897   resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
3898   return resultobj;
3899 fail:
3900   return NULL;
3901 }
3902
3903
3904 SWIGINTERN PyObject *_wrap_new_ping_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3905   PyObject *resultobj = 0;
3906   ping_data *result = 0 ;
3907   
3908   if (!PyArg_ParseTuple(args,(char *)":new_ping_data")) SWIG_fail;
3909   {
3910     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3911     result = (ping_data *)calloc(1, sizeof(ping_data));
3912     SWIG_PYTHON_THREAD_END_ALLOW;
3913   }
3914   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ping_data, SWIG_POINTER_NEW |  0 );
3915   return resultobj;
3916 fail:
3917   return NULL;
3918 }
3919
3920
3921 SWIGINTERN PyObject *_wrap_delete_ping_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3922   PyObject *resultobj = 0;
3923   ping_data *arg1 = (ping_data *) 0 ;
3924   void *argp1 = 0 ;
3925   int res1 = 0 ;
3926   PyObject * obj0 = 0 ;
3927   
3928   if (!PyArg_ParseTuple(args,(char *)"O:delete_ping_data",&obj0)) SWIG_fail;
3929   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ping_data, SWIG_POINTER_DISOWN |  0 );
3930   if (!SWIG_IsOK(res1)) {
3931     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ping_data" "', argument " "1"" of type '" "ping_data *""'"); 
3932   }
3933   arg1 = (ping_data *)(argp1);
3934   {
3935     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3936     free((char *) arg1);
3937     SWIG_PYTHON_THREAD_END_ALLOW;
3938   }
3939   resultobj = SWIG_Py_Void();
3940   return resultobj;
3941 fail:
3942   return NULL;
3943 }
3944
3945
3946 SWIGINTERN PyObject *ping_data_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3947   PyObject *obj;
3948   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
3949   SWIG_TypeNewClientData(SWIGTYPE_p_ping_data, SWIG_NewClientData(obj));
3950   return SWIG_Py_Void();
3951 }
3952
3953 SWIGINTERN PyObject *_wrap_starttls_data_flags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3954   PyObject *resultobj = 0;
3955   starttls_data *arg1 = (starttls_data *) 0 ;
3956   uint32_t arg2 ;
3957   void *argp1 = 0 ;
3958   int res1 = 0 ;
3959   unsigned int val2 ;
3960   int ecode2 = 0 ;
3961   PyObject * obj0 = 0 ;
3962   PyObject * obj1 = 0 ;
3963   
3964   if (!PyArg_ParseTuple(args,(char *)"OO:starttls_data_flags_set",&obj0,&obj1)) SWIG_fail;
3965   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
3966   if (!SWIG_IsOK(res1)) {
3967     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_flags_set" "', argument " "1"" of type '" "starttls_data *""'"); 
3968   }
3969   arg1 = (starttls_data *)(argp1);
3970   ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
3971   if (!SWIG_IsOK(ecode2)) {
3972     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "starttls_data_flags_set" "', argument " "2"" of type '" "uint32_t""'");
3973   } 
3974   arg2 = (uint32_t)(val2);
3975   {
3976     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
3977     if (arg1) (arg1)->flags = arg2;
3978     SWIG_PYTHON_THREAD_END_ALLOW;
3979   }
3980   resultobj = SWIG_Py_Void();
3981   return resultobj;
3982 fail:
3983   return NULL;
3984 }
3985
3986
3987 SWIGINTERN PyObject *_wrap_starttls_data_flags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3988   PyObject *resultobj = 0;
3989   starttls_data *arg1 = (starttls_data *) 0 ;
3990   void *argp1 = 0 ;
3991   int res1 = 0 ;
3992   PyObject * obj0 = 0 ;
3993   uint32_t result;
3994   
3995   if (!PyArg_ParseTuple(args,(char *)"O:starttls_data_flags_get",&obj0)) SWIG_fail;
3996   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
3997   if (!SWIG_IsOK(res1)) {
3998     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_flags_get" "', argument " "1"" of type '" "starttls_data *""'"); 
3999   }
4000   arg1 = (starttls_data *)(argp1);
4001   {
4002     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4003     result =  ((arg1)->flags);
4004     SWIG_PYTHON_THREAD_END_ALLOW;
4005   }
4006   resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
4007   return resultobj;
4008 fail:
4009   return NULL;
4010 }
4011
4012
4013 SWIGINTERN PyObject *_wrap_starttls_data_local_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4014   PyObject *resultobj = 0;
4015   starttls_data *arg1 = (starttls_data *) 0 ;
4016   uint32_t arg2 ;
4017   void *argp1 = 0 ;
4018   int res1 = 0 ;
4019   unsigned int val2 ;
4020   int ecode2 = 0 ;
4021   PyObject * obj0 = 0 ;
4022   PyObject * obj1 = 0 ;
4023   
4024   if (!PyArg_ParseTuple(args,(char *)"OO:starttls_data_local_set",&obj0,&obj1)) SWIG_fail;
4025   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4026   if (!SWIG_IsOK(res1)) {
4027     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_local_set" "', argument " "1"" of type '" "starttls_data *""'"); 
4028   }
4029   arg1 = (starttls_data *)(argp1);
4030   ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
4031   if (!SWIG_IsOK(ecode2)) {
4032     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "starttls_data_local_set" "', argument " "2"" of type '" "uint32_t""'");
4033   } 
4034   arg2 = (uint32_t)(val2);
4035   {
4036     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4037     if (arg1) (arg1)->local = arg2;
4038     SWIG_PYTHON_THREAD_END_ALLOW;
4039   }
4040   resultobj = SWIG_Py_Void();
4041   return resultobj;
4042 fail:
4043   return NULL;
4044 }
4045
4046
4047 SWIGINTERN PyObject *_wrap_starttls_data_local_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4048   PyObject *resultobj = 0;
4049   starttls_data *arg1 = (starttls_data *) 0 ;
4050   void *argp1 = 0 ;
4051   int res1 = 0 ;
4052   PyObject * obj0 = 0 ;
4053   uint32_t result;
4054   
4055   if (!PyArg_ParseTuple(args,(char *)"O:starttls_data_local_get",&obj0)) SWIG_fail;
4056   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4057   if (!SWIG_IsOK(res1)) {
4058     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_local_get" "', argument " "1"" of type '" "starttls_data *""'"); 
4059   }
4060   arg1 = (starttls_data *)(argp1);
4061   {
4062     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4063     result =  ((arg1)->local);
4064     SWIG_PYTHON_THREAD_END_ALLOW;
4065   }
4066   resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
4067   return resultobj;
4068 fail:
4069   return NULL;
4070 }
4071
4072
4073 SWIGINTERN PyObject *_wrap_starttls_data_ipproto_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4074   PyObject *resultobj = 0;
4075   starttls_data *arg1 = (starttls_data *) 0 ;
4076   uint8_t arg2 ;
4077   void *argp1 = 0 ;
4078   int res1 = 0 ;
4079   unsigned char val2 ;
4080   int ecode2 = 0 ;
4081   PyObject * obj0 = 0 ;
4082   PyObject * obj1 = 0 ;
4083   
4084   if (!PyArg_ParseTuple(args,(char *)"OO:starttls_data_ipproto_set",&obj0,&obj1)) SWIG_fail;
4085   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4086   if (!SWIG_IsOK(res1)) {
4087     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_ipproto_set" "', argument " "1"" of type '" "starttls_data *""'"); 
4088   }
4089   arg1 = (starttls_data *)(argp1);
4090   ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
4091   if (!SWIG_IsOK(ecode2)) {
4092     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "starttls_data_ipproto_set" "', argument " "2"" of type '" "uint8_t""'");
4093   } 
4094   arg2 = (uint8_t)(val2);
4095   {
4096     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4097     if (arg1) (arg1)->ipproto = arg2;
4098     SWIG_PYTHON_THREAD_END_ALLOW;
4099   }
4100   resultobj = SWIG_Py_Void();
4101   return resultobj;
4102 fail:
4103   return NULL;
4104 }
4105
4106
4107 SWIGINTERN PyObject *_wrap_starttls_data_ipproto_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4108   PyObject *resultobj = 0;
4109   starttls_data *arg1 = (starttls_data *) 0 ;
4110   void *argp1 = 0 ;
4111   int res1 = 0 ;
4112   PyObject * obj0 = 0 ;
4113   uint8_t result;
4114   
4115   if (!PyArg_ParseTuple(args,(char *)"O:starttls_data_ipproto_get",&obj0)) SWIG_fail;
4116   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4117   if (!SWIG_IsOK(res1)) {
4118     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_ipproto_get" "', argument " "1"" of type '" "starttls_data *""'"); 
4119   }
4120   arg1 = (starttls_data *)(argp1);
4121   {
4122     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4123     result =  ((arg1)->ipproto);
4124     SWIG_PYTHON_THREAD_END_ALLOW;
4125   }
4126   resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
4127   return resultobj;
4128 fail:
4129   return NULL;
4130 }
4131
4132
4133 SWIGINTERN PyObject *_wrap_starttls_data_streamid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4134   PyObject *resultobj = 0;
4135   starttls_data *arg1 = (starttls_data *) 0 ;
4136   uint16_t arg2 ;
4137   void *argp1 = 0 ;
4138   int res1 = 0 ;
4139   unsigned short val2 ;
4140   int ecode2 = 0 ;
4141   PyObject * obj0 = 0 ;
4142   PyObject * obj1 = 0 ;
4143   
4144   if (!PyArg_ParseTuple(args,(char *)"OO:starttls_data_streamid_set",&obj0,&obj1)) SWIG_fail;
4145   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4146   if (!SWIG_IsOK(res1)) {
4147     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_streamid_set" "', argument " "1"" of type '" "starttls_data *""'"); 
4148   }
4149   arg1 = (starttls_data *)(argp1);
4150   ecode2 = SWIG_AsVal_unsigned_SS_short(obj1, &val2);
4151   if (!SWIG_IsOK(ecode2)) {
4152     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "starttls_data_streamid_set" "', argument " "2"" of type '" "uint16_t""'");
4153   } 
4154   arg2 = (uint16_t)(val2);
4155   {
4156     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4157     if (arg1) (arg1)->streamid = arg2;
4158     SWIG_PYTHON_THREAD_END_ALLOW;
4159   }
4160   resultobj = SWIG_Py_Void();
4161   return resultobj;
4162 fail:
4163   return NULL;
4164 }
4165
4166
4167 SWIGINTERN PyObject *_wrap_starttls_data_streamid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4168   PyObject *resultobj = 0;
4169   starttls_data *arg1 = (starttls_data *) 0 ;
4170   void *argp1 = 0 ;
4171   int res1 = 0 ;
4172   PyObject * obj0 = 0 ;
4173   uint16_t result;
4174   
4175   if (!PyArg_ParseTuple(args,(char *)"O:starttls_data_streamid_get",&obj0)) SWIG_fail;
4176   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4177   if (!SWIG_IsOK(res1)) {
4178     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_streamid_get" "', argument " "1"" of type '" "starttls_data *""'"); 
4179   }
4180   arg1 = (starttls_data *)(argp1);
4181   {
4182     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4183     result =  ((arg1)->streamid);
4184     SWIG_PYTHON_THREAD_END_ALLOW;
4185   }
4186   resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
4187   return resultobj;
4188 fail:
4189   return NULL;
4190 }
4191
4192
4193 SWIGINTERN PyObject *_wrap_starttls_data_localid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4194   PyObject *resultobj = 0;
4195   starttls_data *arg1 = (starttls_data *) 0 ;
4196   char *arg2 ;
4197   void *argp1 = 0 ;
4198   int res1 = 0 ;
4199   char temp2[128] ;
4200   int res2 ;
4201   PyObject * obj0 = 0 ;
4202   PyObject * obj1 = 0 ;
4203   
4204   if (!PyArg_ParseTuple(args,(char *)"OO:starttls_data_localid_set",&obj0,&obj1)) SWIG_fail;
4205   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4206   if (!SWIG_IsOK(res1)) {
4207     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_localid_set" "', argument " "1"" of type '" "starttls_data *""'"); 
4208   }
4209   arg1 = (starttls_data *)(argp1);
4210   res2 = SWIG_AsCharArray(obj1, temp2, 128);
4211   if (!SWIG_IsOK(res2)) {
4212     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "starttls_data_localid_set" "', argument " "2"" of type '" "char [128]""'");
4213   }
4214   arg2 = (char *)(temp2);
4215   {
4216     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4217     if (arg2) memcpy(arg1->localid,arg2,128*sizeof(char));
4218     else memset(arg1->localid,0,128*sizeof(char));
4219     SWIG_PYTHON_THREAD_END_ALLOW;
4220   }
4221   resultobj = SWIG_Py_Void();
4222   return resultobj;
4223 fail:
4224   return NULL;
4225 }
4226
4227
4228 SWIGINTERN PyObject *_wrap_starttls_data_localid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4229   PyObject *resultobj = 0;
4230   starttls_data *arg1 = (starttls_data *) 0 ;
4231   void *argp1 = 0 ;
4232   int res1 = 0 ;
4233   PyObject * obj0 = 0 ;
4234   char *result = 0 ;
4235   
4236   if (!PyArg_ParseTuple(args,(char *)"O:starttls_data_localid_get",&obj0)) SWIG_fail;
4237   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4238   if (!SWIG_IsOK(res1)) {
4239     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_localid_get" "', argument " "1"" of type '" "starttls_data *""'"); 
4240   }
4241   arg1 = (starttls_data *)(argp1);
4242   {
4243     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4244     result = (char *) ((arg1)->localid);
4245     SWIG_PYTHON_THREAD_END_ALLOW;
4246   }
4247   {
4248     size_t size = SWIG_strnlen(result, 128);
4249     
4250     
4251     
4252     resultobj = SWIG_FromCharPtrAndSize(result, size);
4253   }
4254   return resultobj;
4255 fail:
4256   return NULL;
4257 }
4258
4259
4260 SWIGINTERN PyObject *_wrap_starttls_data_remoteid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4261   PyObject *resultobj = 0;
4262   starttls_data *arg1 = (starttls_data *) 0 ;
4263   char *arg2 ;
4264   void *argp1 = 0 ;
4265   int res1 = 0 ;
4266   char temp2[128] ;
4267   int res2 ;
4268   PyObject * obj0 = 0 ;
4269   PyObject * obj1 = 0 ;
4270   
4271   if (!PyArg_ParseTuple(args,(char *)"OO:starttls_data_remoteid_set",&obj0,&obj1)) SWIG_fail;
4272   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4273   if (!SWIG_IsOK(res1)) {
4274     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_remoteid_set" "', argument " "1"" of type '" "starttls_data *""'"); 
4275   }
4276   arg1 = (starttls_data *)(argp1);
4277   res2 = SWIG_AsCharArray(obj1, temp2, 128);
4278   if (!SWIG_IsOK(res2)) {
4279     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "starttls_data_remoteid_set" "', argument " "2"" of type '" "char [128]""'");
4280   }
4281   arg2 = (char *)(temp2);
4282   {
4283     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4284     if (arg2) memcpy(arg1->remoteid,arg2,128*sizeof(char));
4285     else memset(arg1->remoteid,0,128*sizeof(char));
4286     SWIG_PYTHON_THREAD_END_ALLOW;
4287   }
4288   resultobj = SWIG_Py_Void();
4289   return resultobj;
4290 fail:
4291   return NULL;
4292 }
4293
4294
4295 SWIGINTERN PyObject *_wrap_starttls_data_remoteid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4296   PyObject *resultobj = 0;
4297   starttls_data *arg1 = (starttls_data *) 0 ;
4298   void *argp1 = 0 ;
4299   int res1 = 0 ;
4300   PyObject * obj0 = 0 ;
4301   char *result = 0 ;
4302   
4303   if (!PyArg_ParseTuple(args,(char *)"O:starttls_data_remoteid_get",&obj0)) SWIG_fail;
4304   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4305   if (!SWIG_IsOK(res1)) {
4306     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_remoteid_get" "', argument " "1"" of type '" "starttls_data *""'"); 
4307   }
4308   arg1 = (starttls_data *)(argp1);
4309   {
4310     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4311     result = (char *) ((arg1)->remoteid);
4312     SWIG_PYTHON_THREAD_END_ALLOW;
4313   }
4314   {
4315     size_t size = SWIG_strnlen(result, 128);
4316     
4317     
4318     
4319     resultobj = SWIG_FromCharPtrAndSize(result, size);
4320   }
4321   return resultobj;
4322 fail:
4323   return NULL;
4324 }
4325
4326
4327 SWIGINTERN PyObject *_wrap_starttls_data_ctlkey_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4328   PyObject *resultobj = 0;
4329   starttls_data *arg1 = (starttls_data *) 0 ;
4330   uint8_t *arg2 ;
4331   void *argp1 = 0 ;
4332   int res1 = 0 ;
4333   PyObject * obj0 = 0 ;
4334   PyObject * obj1 = 0 ;
4335   
4336   if (!PyArg_ParseTuple(args,(char *)"OO:starttls_data_ctlkey_set",&obj0,&obj1)) SWIG_fail;
4337   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4338   if (!SWIG_IsOK(res1)) {
4339     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_ctlkey_set" "', argument " "1"" of type '" "starttls_data *""'"); 
4340   }
4341   arg1 = (starttls_data *)(argp1);
4342   {
4343     ssize_t inlen = 0;
4344     if ((PyString_AsStringAndSize (obj1, (char **) &(arg2), &inlen) == -1) || (inlen != TLSPOOL_CTLKEYLEN)) {
4345       PyErr_SetString (PyExc_ValueError, "Control keys are binary strings of length 16");
4346       return NULL;
4347     }
4348   }
4349   {
4350     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4351     {
4352       if (arg2) {
4353         size_t ii = 0;
4354         for (; ii < (size_t)16; ++ii) *(uint8_t *)&arg1->ctlkey[ii] = *((uint8_t *)arg2 + ii);
4355       } else {
4356         SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""ctlkey""' of type '""uint8_t [16]""'");
4357       }
4358     }
4359     SWIG_PYTHON_THREAD_END_ALLOW;
4360   }
4361   resultobj = SWIG_Py_Void();
4362   return resultobj;
4363 fail:
4364   return NULL;
4365 }
4366
4367
4368 SWIGINTERN PyObject *_wrap_starttls_data_ctlkey_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4369   PyObject *resultobj = 0;
4370   starttls_data *arg1 = (starttls_data *) 0 ;
4371   void *argp1 = 0 ;
4372   int res1 = 0 ;
4373   PyObject * obj0 = 0 ;
4374   uint8_t *result = 0 ;
4375   
4376   if (!PyArg_ParseTuple(args,(char *)"O:starttls_data_ctlkey_get",&obj0)) SWIG_fail;
4377   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4378   if (!SWIG_IsOK(res1)) {
4379     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_ctlkey_get" "', argument " "1"" of type '" "starttls_data *""'"); 
4380   }
4381   arg1 = (starttls_data *)(argp1);
4382   {
4383     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4384     result = (uint8_t *) ((arg1)->ctlkey);
4385     SWIG_PYTHON_THREAD_END_ALLOW;
4386   }
4387   {
4388     if (result == NULL) {
4389       resultobj = Py_None;
4390     } else {
4391       resultobj = PyString_FromStringAndSize (result, TLSPOOL_CTLKEYLEN);
4392     }
4393   }
4394   return resultobj;
4395 fail:
4396   return NULL;
4397 }
4398
4399
4400 SWIGINTERN PyObject *_wrap_starttls_data_service_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4401   PyObject *resultobj = 0;
4402   starttls_data *arg1 = (starttls_data *) 0 ;
4403   char *arg2 ;
4404   void *argp1 = 0 ;
4405   int res1 = 0 ;
4406   char temp2[16] ;
4407   int res2 ;
4408   PyObject * obj0 = 0 ;
4409   PyObject * obj1 = 0 ;
4410   
4411   if (!PyArg_ParseTuple(args,(char *)"OO:starttls_data_service_set",&obj0,&obj1)) SWIG_fail;
4412   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4413   if (!SWIG_IsOK(res1)) {
4414     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_service_set" "', argument " "1"" of type '" "starttls_data *""'"); 
4415   }
4416   arg1 = (starttls_data *)(argp1);
4417   res2 = SWIG_AsCharArray(obj1, temp2, 16);
4418   if (!SWIG_IsOK(res2)) {
4419     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "starttls_data_service_set" "', argument " "2"" of type '" "char [16]""'");
4420   }
4421   arg2 = (char *)(temp2);
4422   {
4423     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4424     if (arg2) memcpy(arg1->service,arg2,16*sizeof(char));
4425     else memset(arg1->service,0,16*sizeof(char));
4426     SWIG_PYTHON_THREAD_END_ALLOW;
4427   }
4428   resultobj = SWIG_Py_Void();
4429   return resultobj;
4430 fail:
4431   return NULL;
4432 }
4433
4434
4435 SWIGINTERN PyObject *_wrap_starttls_data_service_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4436   PyObject *resultobj = 0;
4437   starttls_data *arg1 = (starttls_data *) 0 ;
4438   void *argp1 = 0 ;
4439   int res1 = 0 ;
4440   PyObject * obj0 = 0 ;
4441   char *result = 0 ;
4442   
4443   if (!PyArg_ParseTuple(args,(char *)"O:starttls_data_service_get",&obj0)) SWIG_fail;
4444   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4445   if (!SWIG_IsOK(res1)) {
4446     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_service_get" "', argument " "1"" of type '" "starttls_data *""'"); 
4447   }
4448   arg1 = (starttls_data *)(argp1);
4449   {
4450     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4451     result = (char *) ((arg1)->service);
4452     SWIG_PYTHON_THREAD_END_ALLOW;
4453   }
4454   {
4455     size_t size = SWIG_strnlen(result, 16);
4456     
4457     
4458     
4459     resultobj = SWIG_FromCharPtrAndSize(result, size);
4460   }
4461   return resultobj;
4462 fail:
4463   return NULL;
4464 }
4465
4466
4467 SWIGINTERN PyObject *_wrap_starttls_data_timeout_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4468   PyObject *resultobj = 0;
4469   starttls_data *arg1 = (starttls_data *) 0 ;
4470   uint32_t arg2 ;
4471   void *argp1 = 0 ;
4472   int res1 = 0 ;
4473   unsigned int val2 ;
4474   int ecode2 = 0 ;
4475   PyObject * obj0 = 0 ;
4476   PyObject * obj1 = 0 ;
4477   
4478   if (!PyArg_ParseTuple(args,(char *)"OO:starttls_data_timeout_set",&obj0,&obj1)) SWIG_fail;
4479   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4480   if (!SWIG_IsOK(res1)) {
4481     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_timeout_set" "', argument " "1"" of type '" "starttls_data *""'"); 
4482   }
4483   arg1 = (starttls_data *)(argp1);
4484   ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
4485   if (!SWIG_IsOK(ecode2)) {
4486     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "starttls_data_timeout_set" "', argument " "2"" of type '" "uint32_t""'");
4487   } 
4488   arg2 = (uint32_t)(val2);
4489   {
4490     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4491     if (arg1) (arg1)->timeout = arg2;
4492     SWIG_PYTHON_THREAD_END_ALLOW;
4493   }
4494   resultobj = SWIG_Py_Void();
4495   return resultobj;
4496 fail:
4497   return NULL;
4498 }
4499
4500
4501 SWIGINTERN PyObject *_wrap_starttls_data_timeout_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4502   PyObject *resultobj = 0;
4503   starttls_data *arg1 = (starttls_data *) 0 ;
4504   void *argp1 = 0 ;
4505   int res1 = 0 ;
4506   PyObject * obj0 = 0 ;
4507   uint32_t result;
4508   
4509   if (!PyArg_ParseTuple(args,(char *)"O:starttls_data_timeout_get",&obj0)) SWIG_fail;
4510   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, 0 |  0 );
4511   if (!SWIG_IsOK(res1)) {
4512     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starttls_data_timeout_get" "', argument " "1"" of type '" "starttls_data *""'"); 
4513   }
4514   arg1 = (starttls_data *)(argp1);
4515   {
4516     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4517     result =  ((arg1)->timeout);
4518     SWIG_PYTHON_THREAD_END_ALLOW;
4519   }
4520   resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
4521   return resultobj;
4522 fail:
4523   return NULL;
4524 }
4525
4526
4527 SWIGINTERN PyObject *_wrap_new_starttls_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4528   PyObject *resultobj = 0;
4529   starttls_data *result = 0 ;
4530   
4531   if (!PyArg_ParseTuple(args,(char *)":new_starttls_data")) SWIG_fail;
4532   {
4533     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4534     result = (starttls_data *)calloc(1, sizeof(starttls_data));
4535     SWIG_PYTHON_THREAD_END_ALLOW;
4536   }
4537   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_starttls_data, SWIG_POINTER_NEW |  0 );
4538   return resultobj;
4539 fail:
4540   return NULL;
4541 }
4542
4543
4544 SWIGINTERN PyObject *_wrap_delete_starttls_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4545   PyObject *resultobj = 0;
4546   starttls_data *arg1 = (starttls_data *) 0 ;
4547   void *argp1 = 0 ;
4548   int res1 = 0 ;
4549   PyObject * obj0 = 0 ;
4550   
4551   if (!PyArg_ParseTuple(args,(char *)"O:delete_starttls_data",&obj0)) SWIG_fail;
4552   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_starttls_data, SWIG_POINTER_DISOWN |  0 );
4553   if (!SWIG_IsOK(res1)) {
4554     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_starttls_data" "', argument " "1"" of type '" "starttls_data *""'"); 
4555   }
4556   arg1 = (starttls_data *)(argp1);
4557   {
4558     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4559     free((char *) arg1);
4560     SWIG_PYTHON_THREAD_END_ALLOW;
4561   }
4562   resultobj = SWIG_Py_Void();
4563   return resultobj;
4564 fail:
4565   return NULL;
4566 }
4567
4568
4569 SWIGINTERN PyObject *starttls_data_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4570   PyObject *obj;
4571   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
4572   SWIG_TypeNewClientData(SWIGTYPE_p_starttls_data, SWIG_NewClientData(obj));
4573   return SWIG_Py_Void();
4574 }
4575
4576 SWIGINTERN PyObject *_wrap_control_data_flags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4577   PyObject *resultobj = 0;
4578   control_data *arg1 = (control_data *) 0 ;
4579   uint32_t arg2 ;
4580   void *argp1 = 0 ;
4581   int res1 = 0 ;
4582   unsigned int val2 ;
4583   int ecode2 = 0 ;
4584   PyObject * obj0 = 0 ;
4585   PyObject * obj1 = 0 ;
4586   
4587   if (!PyArg_ParseTuple(args,(char *)"OO:control_data_flags_set",&obj0,&obj1)) SWIG_fail;
4588   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_control_data, 0 |  0 );
4589   if (!SWIG_IsOK(res1)) {
4590     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "control_data_flags_set" "', argument " "1"" of type '" "control_data *""'"); 
4591   }
4592   arg1 = (control_data *)(argp1);
4593   ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
4594   if (!SWIG_IsOK(ecode2)) {
4595     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "control_data_flags_set" "', argument " "2"" of type '" "uint32_t""'");
4596   } 
4597   arg2 = (uint32_t)(val2);
4598   {
4599     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4600     if (arg1) (arg1)->flags = arg2;
4601     SWIG_PYTHON_THREAD_END_ALLOW;
4602   }
4603   resultobj = SWIG_Py_Void();
4604   return resultobj;
4605 fail:
4606   return NULL;
4607 }
4608
4609
4610 SWIGINTERN PyObject *_wrap_control_data_flags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4611   PyObject *resultobj = 0;
4612   control_data *arg1 = (control_data *) 0 ;
4613   void *argp1 = 0 ;
4614   int res1 = 0 ;
4615   PyObject * obj0 = 0 ;
4616   uint32_t result;
4617   
4618   if (!PyArg_ParseTuple(args,(char *)"O:control_data_flags_get",&obj0)) SWIG_fail;
4619   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_control_data, 0 |  0 );
4620   if (!SWIG_IsOK(res1)) {
4621     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "control_data_flags_get" "', argument " "1"" of type '" "control_data *""'"); 
4622   }
4623   arg1 = (control_data *)(argp1);
4624   {
4625     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4626     result =  ((arg1)->flags);
4627     SWIG_PYTHON_THREAD_END_ALLOW;
4628   }
4629   resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
4630   return resultobj;
4631 fail:
4632   return NULL;
4633 }
4634
4635
4636 SWIGINTERN PyObject *_wrap_control_data_ctlkey_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4637   PyObject *resultobj = 0;
4638   control_data *arg1 = (control_data *) 0 ;
4639   uint8_t *arg2 ;
4640   void *argp1 = 0 ;
4641   int res1 = 0 ;
4642   PyObject * obj0 = 0 ;
4643   PyObject * obj1 = 0 ;
4644   
4645   if (!PyArg_ParseTuple(args,(char *)"OO:control_data_ctlkey_set",&obj0,&obj1)) SWIG_fail;
4646   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_control_data, 0 |  0 );
4647   if (!SWIG_IsOK(res1)) {
4648     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "control_data_ctlkey_set" "', argument " "1"" of type '" "control_data *""'"); 
4649   }
4650   arg1 = (control_data *)(argp1);
4651   {
4652     ssize_t inlen = 0;
4653     if ((PyString_AsStringAndSize (obj1, (char **) &(arg2), &inlen) == -1) || (inlen != TLSPOOL_CTLKEYLEN)) {
4654       PyErr_SetString (PyExc_ValueError, "Control keys are binary strings of length 16");
4655       return NULL;
4656     }
4657   }
4658   {
4659     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4660     {
4661       if (arg2) {
4662         size_t ii = 0;
4663         for (; ii < (size_t)16; ++ii) *(uint8_t *)&arg1->ctlkey[ii] = *((uint8_t *)arg2 + ii);
4664       } else {
4665         SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""ctlkey""' of type '""uint8_t [16]""'");
4666       }
4667     }
4668     SWIG_PYTHON_THREAD_END_ALLOW;
4669   }
4670   resultobj = SWIG_Py_Void();
4671   return resultobj;
4672 fail:
4673   return NULL;
4674 }
4675
4676
4677 SWIGINTERN PyObject *_wrap_control_data_ctlkey_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4678   PyObject *resultobj = 0;
4679   control_data *arg1 = (control_data *) 0 ;
4680   void *argp1 = 0 ;
4681   int res1 = 0 ;
4682   PyObject * obj0 = 0 ;
4683   uint8_t *result = 0 ;
4684   
4685   if (!PyArg_ParseTuple(args,(char *)"O:control_data_ctlkey_get",&obj0)) SWIG_fail;
4686   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_control_data, 0 |  0 );
4687   if (!SWIG_IsOK(res1)) {
4688     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "control_data_ctlkey_get" "', argument " "1"" of type '" "control_data *""'"); 
4689   }
4690   arg1 = (control_data *)(argp1);
4691   {
4692     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4693     result = (uint8_t *) ((arg1)->ctlkey);
4694     SWIG_PYTHON_THREAD_END_ALLOW;
4695   }
4696   {
4697     if (result == NULL) {
4698       resultobj = Py_None;
4699     } else {
4700       resultobj = PyString_FromStringAndSize (result, TLSPOOL_CTLKEYLEN);
4701     }
4702   }
4703   return resultobj;
4704 fail:
4705   return NULL;
4706 }
4707
4708
4709 SWIGINTERN PyObject *_wrap_control_data_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4710   PyObject *resultobj = 0;
4711   control_data *arg1 = (control_data *) 0 ;
4712   char *arg2 ;
4713   void *argp1 = 0 ;
4714   int res1 = 0 ;
4715   char temp2[128] ;
4716   int res2 ;
4717   PyObject * obj0 = 0 ;
4718   PyObject * obj1 = 0 ;
4719   
4720   if (!PyArg_ParseTuple(args,(char *)"OO:control_data_name_set",&obj0,&obj1)) SWIG_fail;
4721   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_control_data, 0 |  0 );
4722   if (!SWIG_IsOK(res1)) {
4723     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "control_data_name_set" "', argument " "1"" of type '" "control_data *""'"); 
4724   }
4725   arg1 = (control_data *)(argp1);
4726   res2 = SWIG_AsCharArray(obj1, temp2, 128);
4727   if (!SWIG_IsOK(res2)) {
4728     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "control_data_name_set" "', argument " "2"" of type '" "char [128]""'");
4729   }
4730   arg2 = (char *)(temp2);
4731   {
4732     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4733     if (arg2) memcpy(arg1->name,arg2,128*sizeof(char));
4734     else memset(arg1->name,0,128*sizeof(char));
4735     SWIG_PYTHON_THREAD_END_ALLOW;
4736   }
4737   resultobj = SWIG_Py_Void();
4738   return resultobj;
4739 fail:
4740   return NULL;
4741 }
4742
4743
4744 SWIGINTERN PyObject *_wrap_control_data_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4745   PyObject *resultobj = 0;
4746   control_data *arg1 = (control_data *) 0 ;
4747   void *argp1 = 0 ;
4748   int res1 = 0 ;
4749   PyObject * obj0 = 0 ;
4750   char *result = 0 ;
4751   
4752   if (!PyArg_ParseTuple(args,(char *)"O:control_data_name_get",&obj0)) SWIG_fail;
4753   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_control_data, 0 |  0 );
4754   if (!SWIG_IsOK(res1)) {
4755     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "control_data_name_get" "', argument " "1"" of type '" "control_data *""'"); 
4756   }
4757   arg1 = (control_data *)(argp1);
4758   {
4759     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4760     result = (char *) ((arg1)->name);
4761     SWIG_PYTHON_THREAD_END_ALLOW;
4762   }
4763   {
4764     size_t size = SWIG_strnlen(result, 128);
4765     
4766     
4767     
4768     resultobj = SWIG_FromCharPtrAndSize(result, size);
4769   }
4770   return resultobj;
4771 fail:
4772   return NULL;
4773 }
4774
4775
4776 SWIGINTERN PyObject *_wrap_new_control_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4777   PyObject *resultobj = 0;
4778   control_data *result = 0 ;
4779   
4780   if (!PyArg_ParseTuple(args,(char *)":new_control_data")) SWIG_fail;
4781   {
4782     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4783     result = (control_data *)calloc(1, sizeof(control_data));
4784     SWIG_PYTHON_THREAD_END_ALLOW;
4785   }
4786   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_control_data, SWIG_POINTER_NEW |  0 );
4787   return resultobj;
4788 fail:
4789   return NULL;
4790 }
4791
4792
4793 SWIGINTERN PyObject *_wrap_delete_control_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4794   PyObject *resultobj = 0;
4795   control_data *arg1 = (control_data *) 0 ;
4796   void *argp1 = 0 ;
4797   int res1 = 0 ;
4798   PyObject * obj0 = 0 ;
4799   
4800   if (!PyArg_ParseTuple(args,(char *)"O:delete_control_data",&obj0)) SWIG_fail;
4801   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_control_data, SWIG_POINTER_DISOWN |  0 );
4802   if (!SWIG_IsOK(res1)) {
4803     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_control_data" "', argument " "1"" of type '" "control_data *""'"); 
4804   }
4805   arg1 = (control_data *)(argp1);
4806   {
4807     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4808     free((char *) arg1);
4809     SWIG_PYTHON_THREAD_END_ALLOW;
4810   }
4811   resultobj = SWIG_Py_Void();
4812   return resultobj;
4813 fail:
4814   return NULL;
4815 }
4816
4817
4818 SWIGINTERN PyObject *control_data_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4819   PyObject *obj;
4820   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
4821   SWIG_TypeNewClientData(SWIGTYPE_p_control_data, SWIG_NewClientData(obj));
4822   return SWIG_Py_Void();
4823 }
4824
4825 SWIGINTERN PyObject *_wrap_prng_data_in1_len_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4826   PyObject *resultobj = 0;
4827   prng_data *arg1 = (prng_data *) 0 ;
4828   int16_t arg2 ;
4829   void *argp1 = 0 ;
4830   int res1 = 0 ;
4831   short val2 ;
4832   int ecode2 = 0 ;
4833   PyObject * obj0 = 0 ;
4834   PyObject * obj1 = 0 ;
4835   
4836   if (!PyArg_ParseTuple(args,(char *)"OO:prng_data_in1_len_set",&obj0,&obj1)) SWIG_fail;
4837   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prng_data, 0 |  0 );
4838   if (!SWIG_IsOK(res1)) {
4839     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prng_data_in1_len_set" "', argument " "1"" of type '" "prng_data *""'"); 
4840   }
4841   arg1 = (prng_data *)(argp1);
4842   ecode2 = SWIG_AsVal_short(obj1, &val2);
4843   if (!SWIG_IsOK(ecode2)) {
4844     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prng_data_in1_len_set" "', argument " "2"" of type '" "int16_t""'");
4845   } 
4846   arg2 = (int16_t)(val2);
4847   {
4848     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4849     if (arg1) (arg1)->in1_len = arg2;
4850     SWIG_PYTHON_THREAD_END_ALLOW;
4851   }
4852   resultobj = SWIG_Py_Void();
4853   return resultobj;
4854 fail:
4855   return NULL;
4856 }
4857
4858
4859 SWIGINTERN PyObject *_wrap_prng_data_in1_len_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4860   PyObject *resultobj = 0;
4861   prng_data *arg1 = (prng_data *) 0 ;
4862   void *argp1 = 0 ;
4863   int res1 = 0 ;
4864   PyObject * obj0 = 0 ;
4865   int16_t result;
4866   
4867   if (!PyArg_ParseTuple(args,(char *)"O:prng_data_in1_len_get",&obj0)) SWIG_fail;
4868   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prng_data, 0 |  0 );
4869   if (!SWIG_IsOK(res1)) {
4870     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prng_data_in1_len_get" "', argument " "1"" of type '" "prng_data *""'"); 
4871   }
4872   arg1 = (prng_data *)(argp1);
4873   {
4874     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4875     result =  ((arg1)->in1_len);
4876     SWIG_PYTHON_THREAD_END_ALLOW;
4877   }
4878   resultobj = SWIG_From_short((short)(result));
4879   return resultobj;
4880 fail:
4881   return NULL;
4882 }
4883
4884
4885 SWIGINTERN PyObject *_wrap_prng_data_in2_len_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4886   PyObject *resultobj = 0;
4887   prng_data *arg1 = (prng_data *) 0 ;
4888   int16_t arg2 ;
4889   void *argp1 = 0 ;
4890   int res1 = 0 ;
4891   short val2 ;
4892   int ecode2 = 0 ;
4893   PyObject * obj0 = 0 ;
4894   PyObject * obj1 = 0 ;
4895   
4896   if (!PyArg_ParseTuple(args,(char *)"OO:prng_data_in2_len_set",&obj0,&obj1)) SWIG_fail;
4897   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prng_data, 0 |  0 );
4898   if (!SWIG_IsOK(res1)) {
4899     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prng_data_in2_len_set" "', argument " "1"" of type '" "prng_data *""'"); 
4900   }
4901   arg1 = (prng_data *)(argp1);
4902   ecode2 = SWIG_AsVal_short(obj1, &val2);
4903   if (!SWIG_IsOK(ecode2)) {
4904     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prng_data_in2_len_set" "', argument " "2"" of type '" "int16_t""'");
4905   } 
4906   arg2 = (int16_t)(val2);
4907   {
4908     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4909     if (arg1) (arg1)->in2_len = arg2;
4910     SWIG_PYTHON_THREAD_END_ALLOW;
4911   }
4912   resultobj = SWIG_Py_Void();
4913   return resultobj;
4914 fail:
4915   return NULL;
4916 }
4917
4918
4919 SWIGINTERN PyObject *_wrap_prng_data_in2_len_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4920   PyObject *resultobj = 0;
4921   prng_data *arg1 = (prng_data *) 0 ;
4922   void *argp1 = 0 ;
4923   int res1 = 0 ;
4924   PyObject * obj0 = 0 ;
4925   int16_t result;
4926   
4927   if (!PyArg_ParseTuple(args,(char *)"O:prng_data_in2_len_get",&obj0)) SWIG_fail;
4928   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prng_data, 0 |  0 );
4929   if (!SWIG_IsOK(res1)) {
4930     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prng_data_in2_len_get" "', argument " "1"" of type '" "prng_data *""'"); 
4931   }
4932   arg1 = (prng_data *)(argp1);
4933   {
4934     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4935     result =  ((arg1)->in2_len);
4936     SWIG_PYTHON_THREAD_END_ALLOW;
4937   }
4938   resultobj = SWIG_From_short((short)(result));
4939   return resultobj;
4940 fail:
4941   return NULL;
4942 }
4943
4944
4945 SWIGINTERN PyObject *_wrap_prng_data_prng_len_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4946   PyObject *resultobj = 0;
4947   prng_data *arg1 = (prng_data *) 0 ;
4948   int16_t arg2 ;
4949   void *argp1 = 0 ;
4950   int res1 = 0 ;
4951   short val2 ;
4952   int ecode2 = 0 ;
4953   PyObject * obj0 = 0 ;
4954   PyObject * obj1 = 0 ;
4955   
4956   if (!PyArg_ParseTuple(args,(char *)"OO:prng_data_prng_len_set",&obj0,&obj1)) SWIG_fail;
4957   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prng_data, 0 |  0 );
4958   if (!SWIG_IsOK(res1)) {
4959     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prng_data_prng_len_set" "', argument " "1"" of type '" "prng_data *""'"); 
4960   }
4961   arg1 = (prng_data *)(argp1);
4962   ecode2 = SWIG_AsVal_short(obj1, &val2);
4963   if (!SWIG_IsOK(ecode2)) {
4964     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "prng_data_prng_len_set" "', argument " "2"" of type '" "int16_t""'");
4965   } 
4966   arg2 = (int16_t)(val2);
4967   {
4968     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4969     if (arg1) (arg1)->prng_len = arg2;
4970     SWIG_PYTHON_THREAD_END_ALLOW;
4971   }
4972   resultobj = SWIG_Py_Void();
4973   return resultobj;
4974 fail:
4975   return NULL;
4976 }
4977
4978
4979 SWIGINTERN PyObject *_wrap_prng_data_prng_len_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4980   PyObject *resultobj = 0;
4981   prng_data *arg1 = (prng_data *) 0 ;
4982   void *argp1 = 0 ;
4983   int res1 = 0 ;
4984   PyObject * obj0 = 0 ;
4985   int16_t result;
4986   
4987   if (!PyArg_ParseTuple(args,(char *)"O:prng_data_prng_len_get",&obj0)) SWIG_fail;
4988   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prng_data, 0 |  0 );
4989   if (!SWIG_IsOK(res1)) {
4990     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prng_data_prng_len_get" "', argument " "1"" of type '" "prng_data *""'"); 
4991   }
4992   arg1 = (prng_data *)(argp1);
4993   {
4994     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
4995     result =  ((arg1)->prng_len);
4996     SWIG_PYTHON_THREAD_END_ALLOW;
4997   }
4998   resultobj = SWIG_From_short((short)(result));
4999   return resultobj;
5000 fail:
5001   return NULL;
5002 }
5003
5004
5005 SWIGINTERN PyObject *_wrap_prng_data_buffer_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5006   PyObject *resultobj = 0;
5007   prng_data *arg1 = (prng_data *) 0 ;
5008   uint8_t *arg2 ;
5009   void *argp1 = 0 ;
5010   int res1 = 0 ;
5011   void *argp2 = 0 ;
5012   int res2 = 0 ;
5013   PyObject * obj0 = 0 ;
5014   PyObject * obj1 = 0 ;
5015   
5016   if (!PyArg_ParseTuple(args,(char *)"OO:prng_data_buffer_set",&obj0,&obj1)) SWIG_fail;
5017   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prng_data, 0 |  0 );
5018   if (!SWIG_IsOK(res1)) {
5019     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prng_data_buffer_set" "', argument " "1"" of type '" "prng_data *""'"); 
5020   }
5021   arg1 = (prng_data *)(argp1);
5022   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_uint8_t, 0 |  0 );
5023   if (!SWIG_IsOK(res2)) {
5024     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "prng_data_buffer_set" "', argument " "2"" of type '" "uint8_t [350]""'"); 
5025   } 
5026   arg2 = (uint8_t *)(argp2);
5027   {
5028     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5029     {
5030       if (arg2) {
5031         size_t ii = 0;
5032         for (; ii < (size_t)350; ++ii) *(uint8_t *)&arg1->buffer[ii] = *((uint8_t *)arg2 + ii);
5033       } else {
5034         SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""buffer""' of type '""uint8_t [350]""'");
5035       }
5036     }
5037     SWIG_PYTHON_THREAD_END_ALLOW;
5038   }
5039   resultobj = SWIG_Py_Void();
5040   return resultobj;
5041 fail:
5042   return NULL;
5043 }
5044
5045
5046 SWIGINTERN PyObject *_wrap_prng_data_buffer_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5047   PyObject *resultobj = 0;
5048   prng_data *arg1 = (prng_data *) 0 ;
5049   void *argp1 = 0 ;
5050   int res1 = 0 ;
5051   PyObject * obj0 = 0 ;
5052   uint8_t *result = 0 ;
5053   
5054   if (!PyArg_ParseTuple(args,(char *)"O:prng_data_buffer_get",&obj0)) SWIG_fail;
5055   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prng_data, 0 |  0 );
5056   if (!SWIG_IsOK(res1)) {
5057     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "prng_data_buffer_get" "', argument " "1"" of type '" "prng_data *""'"); 
5058   }
5059   arg1 = (prng_data *)(argp1);
5060   {
5061     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5062     result = (uint8_t *)(uint8_t *) ((arg1)->buffer);
5063     SWIG_PYTHON_THREAD_END_ALLOW;
5064   }
5065   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_uint8_t, 0 |  0 );
5066   return resultobj;
5067 fail:
5068   return NULL;
5069 }
5070
5071
5072 SWIGINTERN PyObject *_wrap_new_prng_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5073   PyObject *resultobj = 0;
5074   prng_data *result = 0 ;
5075   
5076   if (!PyArg_ParseTuple(args,(char *)":new_prng_data")) SWIG_fail;
5077   {
5078     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5079     result = (prng_data *)calloc(1, sizeof(prng_data));
5080     SWIG_PYTHON_THREAD_END_ALLOW;
5081   }
5082   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_prng_data, SWIG_POINTER_NEW |  0 );
5083   return resultobj;
5084 fail:
5085   return NULL;
5086 }
5087
5088
5089 SWIGINTERN PyObject *_wrap_delete_prng_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5090   PyObject *resultobj = 0;
5091   prng_data *arg1 = (prng_data *) 0 ;
5092   void *argp1 = 0 ;
5093   int res1 = 0 ;
5094   PyObject * obj0 = 0 ;
5095   
5096   if (!PyArg_ParseTuple(args,(char *)"O:delete_prng_data",&obj0)) SWIG_fail;
5097   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_prng_data, SWIG_POINTER_DISOWN |  0 );
5098   if (!SWIG_IsOK(res1)) {
5099     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_prng_data" "', argument " "1"" of type '" "prng_data *""'"); 
5100   }
5101   arg1 = (prng_data *)(argp1);
5102   {
5103     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5104     free((char *) arg1);
5105     SWIG_PYTHON_THREAD_END_ALLOW;
5106   }
5107   resultobj = SWIG_Py_Void();
5108   return resultobj;
5109 fail:
5110   return NULL;
5111 }
5112
5113
5114 SWIGINTERN PyObject *prng_data_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5115   PyObject *obj;
5116   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
5117   SWIG_TypeNewClientData(SWIGTYPE_p_prng_data, SWIG_NewClientData(obj));
5118   return SWIG_Py_Void();
5119 }
5120
5121 SWIGINTERN PyObject *_wrap_socket_data_unix_socket_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5122   PyObject *resultobj = 0;
5123   socket_data *arg1 = (socket_data *) 0 ;
5124   int arg2 ;
5125   void *argp1 = 0 ;
5126   int res1 = 0 ;
5127   int val2 ;
5128   int ecode2 = 0 ;
5129   PyObject * obj0 = 0 ;
5130   PyObject * obj1 = 0 ;
5131   
5132   if (!PyArg_ParseTuple(args,(char *)"OO:socket_data_unix_socket_set",&obj0,&obj1)) SWIG_fail;
5133   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_socket_data, 0 |  0 );
5134   if (!SWIG_IsOK(res1)) {
5135     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "socket_data_unix_socket_set" "', argument " "1"" of type '" "socket_data *""'"); 
5136   }
5137   arg1 = (socket_data *)(argp1);
5138   ecode2 = SWIG_AsVal_int(obj1, &val2);
5139   if (!SWIG_IsOK(ecode2)) {
5140     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "socket_data_unix_socket_set" "', argument " "2"" of type '" "int""'");
5141   } 
5142   arg2 = (int)(val2);
5143   {
5144     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5145     if (arg1) (arg1)->unix_socket = arg2;
5146     SWIG_PYTHON_THREAD_END_ALLOW;
5147   }
5148   resultobj = SWIG_Py_Void();
5149   return resultobj;
5150 fail:
5151   return NULL;
5152 }
5153
5154
5155 SWIGINTERN PyObject *_wrap_socket_data_unix_socket_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5156   PyObject *resultobj = 0;
5157   socket_data *arg1 = (socket_data *) 0 ;
5158   void *argp1 = 0 ;
5159   int res1 = 0 ;
5160   PyObject * obj0 = 0 ;
5161   int result;
5162   
5163   if (!PyArg_ParseTuple(args,(char *)"O:socket_data_unix_socket_get",&obj0)) SWIG_fail;
5164   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_socket_data, 0 |  0 );
5165   if (!SWIG_IsOK(res1)) {
5166     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "socket_data_unix_socket_get" "', argument " "1"" of type '" "socket_data *""'"); 
5167   }
5168   arg1 = (socket_data *)(argp1);
5169   {
5170     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5171     result = (int) ((arg1)->unix_socket);
5172     SWIG_PYTHON_THREAD_END_ALLOW;
5173   }
5174   resultobj = SWIG_From_int((int)(result));
5175   return resultobj;
5176 fail:
5177   return NULL;
5178 }
5179
5180
5181 SWIGINTERN PyObject *_wrap_new_socket_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5182   PyObject *resultobj = 0;
5183   socket_data *result = 0 ;
5184   
5185   if (!PyArg_ParseTuple(args,(char *)":new_socket_data")) SWIG_fail;
5186   {
5187     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5188     result = (socket_data *)calloc(1, sizeof(socket_data));
5189     SWIG_PYTHON_THREAD_END_ALLOW;
5190   }
5191   resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_socket_data, SWIG_POINTER_NEW |  0 );
5192   return resultobj;
5193 fail:
5194   return NULL;
5195 }
5196
5197
5198 SWIGINTERN PyObject *_wrap_delete_socket_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5199   PyObject *resultobj = 0;
5200   socket_data *arg1 = (socket_data *) 0 ;
5201   void *argp1 = 0 ;
5202   int res1 = 0 ;
5203   PyObject * obj0 = 0 ;
5204   
5205   if (!PyArg_ParseTuple(args,(char *)"O:delete_socket_data",&obj0)) SWIG_fail;
5206   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_socket_data, SWIG_POINTER_DISOWN |  0 );
5207   if (!SWIG_IsOK(res1)) {
5208     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_socket_data" "', argument " "1"" of type '" "socket_data *""'"); 
5209   }
5210   arg1 = (socket_data *)(argp1);
5211   {
5212     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5213     free((char *) arg1);
5214     SWIG_PYTHON_THREAD_END_ALLOW;
5215   }
5216   resultobj = SWIG_Py_Void();
5217   return resultobj;
5218 fail:
5219   return NULL;
5220 }
5221
5222
5223 SWIGINTERN PyObject *socket_data_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5224   PyObject *obj;
5225   if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
5226   SWIG_TypeNewClientData(SWIGTYPE_p_socket_data, SWIG_NewClientData(obj));
5227   return SWIG_Py_Void();
5228 }
5229
5230 SWIGINTERN PyObject *_wrap__pid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5231   PyObject *resultobj = 0;
5232   char *arg1 = (char *) 0 ;
5233   int res1 ;
5234   char *buf1 = 0 ;
5235   int alloc1 = 0 ;
5236   PyObject * obj0 = 0 ;
5237   int result;
5238   
5239   if (!PyArg_ParseTuple(args,(char *)"O:_pid",&obj0)) SWIG_fail;
5240   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5241   if (!SWIG_IsOK(res1)) {
5242     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_pid" "', argument " "1"" of type '" "char *""'");
5243   }
5244   arg1 = (char *)(buf1);
5245   {
5246     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5247     result = (int)tlspool_pid(arg1);
5248     SWIG_PYTHON_THREAD_END_ALLOW;
5249   }
5250   resultobj = SWIG_From_int((int)(result));
5251   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5252   return resultobj;
5253 fail:
5254   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5255   return NULL;
5256 }
5257
5258
5259 SWIGINTERN PyObject *_wrap__open_poolhandle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5260   PyObject *resultobj = 0;
5261   char *arg1 = (char *) 0 ;
5262   int res1 ;
5263   char *buf1 = 0 ;
5264   int alloc1 = 0 ;
5265   PyObject * obj0 = 0 ;
5266   pool_handle_t result;
5267   
5268   if (!PyArg_ParseTuple(args,(char *)"O:_open_poolhandle",&obj0)) SWIG_fail;
5269   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5270   if (!SWIG_IsOK(res1)) {
5271     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_open_poolhandle" "', argument " "1"" of type '" "char *""'");
5272   }
5273   arg1 = (char *)(buf1);
5274   {
5275     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5276     result = (pool_handle_t)tlspool_open_poolhandle(arg1);
5277     SWIG_PYTHON_THREAD_END_ALLOW;
5278   }
5279   resultobj = SWIG_From_int((int)(result));
5280   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5281   return resultobj;
5282 fail:
5283   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5284   return NULL;
5285 }
5286
5287
5288 SWIGINTERN PyObject *_wrap__ping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5289   PyObject *resultobj = 0;
5290   ping_data *arg1 = (ping_data *) 0 ;
5291   void *argp1 = 0 ;
5292   int res1 = 0 ;
5293   PyObject * obj0 = 0 ;
5294   int result;
5295   
5296   if (!PyArg_ParseTuple(args,(char *)"O:_ping",&obj0)) SWIG_fail;
5297   res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ping_data, 0 |  0 );
5298   if (!SWIG_IsOK(res1)) {
5299     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_ping" "', argument " "1"" of type '" "ping_data *""'"); 
5300   }
5301   arg1 = (ping_data *)(argp1);
5302   {
5303     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5304     result = (int)tlspool_ping(arg1);
5305     SWIG_PYTHON_THREAD_END_ALLOW;
5306   }
5307   resultobj = SWIG_From_int((int)(result));
5308   return resultobj;
5309 fail:
5310   return NULL;
5311 }
5312
5313
5314 SWIGINTERN PyObject *_wrap__starttls(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5315   PyObject *resultobj = 0;
5316   int arg1 ;
5317   starttls_data *arg2 = (starttls_data *) 0 ;
5318   void *arg3 = (void *) 0 ;
5319   void *arg4 = (void *) 0 ;
5320   int val1 ;
5321   int ecode1 = 0 ;
5322   void *argp2 = 0 ;
5323   int res2 = 0 ;
5324   int res3 ;
5325   int res4 ;
5326   PyObject * obj0 = 0 ;
5327   PyObject * obj1 = 0 ;
5328   PyObject * obj2 = 0 ;
5329   PyObject * obj3 = 0 ;
5330   int result;
5331   
5332   if (!PyArg_ParseTuple(args,(char *)"OOOO:_starttls",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
5333   ecode1 = SWIG_AsVal_int(obj0, &val1);
5334   if (!SWIG_IsOK(ecode1)) {
5335     SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_starttls" "', argument " "1"" of type '" "int""'");
5336   } 
5337   arg1 = (int)(val1);
5338   res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_starttls_data, 0 |  0 );
5339   if (!SWIG_IsOK(res2)) {
5340     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_starttls" "', argument " "2"" of type '" "starttls_data *""'"); 
5341   }
5342   arg2 = (starttls_data *)(argp2);
5343   res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
5344   if (!SWIG_IsOK(res3)) {
5345     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "_starttls" "', argument " "3"" of type '" "void *""'"); 
5346   }
5347   res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0);
5348   if (!SWIG_IsOK(res4)) {
5349     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "_starttls" "', argument " "4"" of type '" "void *""'"); 
5350   }
5351   {
5352     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5353     result = (int)tlspool_starttls(arg1,arg2,arg3,arg4);
5354     SWIG_PYTHON_THREAD_END_ALLOW;
5355   }
5356   resultobj = SWIG_From_int((int)(result));
5357   return resultobj;
5358 fail:
5359   return NULL;
5360 }
5361
5362
5363 SWIGINTERN PyObject *_wrap__control_detach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5364   PyObject *resultobj = 0;
5365   uint8_t *arg1 ;
5366   PyObject * obj0 = 0 ;
5367   int result;
5368   
5369   if (!PyArg_ParseTuple(args,(char *)"O:_control_detach",&obj0)) SWIG_fail;
5370   {
5371     ssize_t inlen = 0;
5372     if ((PyString_AsStringAndSize (obj0, (char **) &(arg1), &inlen) == -1) || (inlen != TLSPOOL_CTLKEYLEN)) {
5373       PyErr_SetString (PyExc_ValueError, "Control keys are binary strings of length 16");
5374       return NULL;
5375     }
5376   }
5377   {
5378     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5379     result = (int)tlspool_control_detach(arg1);
5380     SWIG_PYTHON_THREAD_END_ALLOW;
5381   }
5382   resultobj = SWIG_From_int((int)(result));
5383   return resultobj;
5384 fail:
5385   return NULL;
5386 }
5387
5388
5389 SWIGINTERN PyObject *_wrap__control_reattach(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5390   PyObject *resultobj = 0;
5391   uint8_t *arg1 ;
5392   PyObject * obj0 = 0 ;
5393   int result;
5394   
5395   if (!PyArg_ParseTuple(args,(char *)"O:_control_reattach",&obj0)) SWIG_fail;
5396   {
5397     ssize_t inlen = 0;
5398     if ((PyString_AsStringAndSize (obj0, (char **) &(arg1), &inlen) == -1) || (inlen != TLSPOOL_CTLKEYLEN)) {
5399       PyErr_SetString (PyExc_ValueError, "Control keys are binary strings of length 16");
5400       return NULL;
5401     }
5402   }
5403   {
5404     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5405     result = (int)tlspool_control_reattach(arg1);
5406     SWIG_PYTHON_THREAD_END_ALLOW;
5407   }
5408   resultobj = SWIG_From_int((int)(result));
5409   return resultobj;
5410 fail:
5411   return NULL;
5412 }
5413
5414
5415 SWIGINTERN PyObject *_wrap__prng(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5416   PyObject *resultobj = 0;
5417   char *arg1 = (char *) 0 ;
5418   char *arg2 = (char *) 0 ;
5419   uint16_t arg3 ;
5420   uint8_t *arg4 = (uint8_t *) 0 ;
5421   uint8_t *arg5 ;
5422   int res1 ;
5423   char *buf1 = 0 ;
5424   int alloc1 = 0 ;
5425   int res2 ;
5426   char *buf2 = 0 ;
5427   int alloc2 = 0 ;
5428   unsigned short val3 ;
5429   int ecode3 = 0 ;
5430   void *argp4 = 0 ;
5431   int res4 = 0 ;
5432   PyObject * obj0 = 0 ;
5433   PyObject * obj1 = 0 ;
5434   PyObject * obj2 = 0 ;
5435   PyObject * obj3 = 0 ;
5436   PyObject * obj4 = 0 ;
5437   int result;
5438   
5439   if (!PyArg_ParseTuple(args,(char *)"OOOOO:_prng",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
5440   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5441   if (!SWIG_IsOK(res1)) {
5442     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_prng" "', argument " "1"" of type '" "char *""'");
5443   }
5444   arg1 = (char *)(buf1);
5445   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5446   if (!SWIG_IsOK(res2)) {
5447     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_prng" "', argument " "2"" of type '" "char *""'");
5448   }
5449   arg2 = (char *)(buf2);
5450   ecode3 = SWIG_AsVal_unsigned_SS_short(obj2, &val3);
5451   if (!SWIG_IsOK(ecode3)) {
5452     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_prng" "', argument " "3"" of type '" "uint16_t""'");
5453   } 
5454   arg3 = (uint16_t)(val3);
5455   res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_uint8_t, 0 |  0 );
5456   if (!SWIG_IsOK(res4)) {
5457     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "_prng" "', argument " "4"" of type '" "uint8_t *""'"); 
5458   }
5459   arg4 = (uint8_t *)(argp4);
5460   {
5461     ssize_t inlen = 0;
5462     if ((PyString_AsStringAndSize (obj4, (char **) &(arg5), &inlen) == -1) || (inlen != TLSPOOL_CTLKEYLEN)) {
5463       PyErr_SetString (PyExc_ValueError, "Control keys are binary strings of length 16");
5464       return NULL;
5465     }
5466   }
5467   {
5468     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5469     result = (int)tlspool_prng(arg1,arg2,arg3,arg4,arg5);
5470     SWIG_PYTHON_THREAD_END_ALLOW;
5471   }
5472   resultobj = SWIG_From_int((int)(result));
5473   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5474   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5475   return resultobj;
5476 fail:
5477   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5478   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5479   return NULL;
5480 }
5481
5482
5483 SWIGINTERN PyObject *_wrap_tlspool_configvar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5484   PyObject *resultobj = 0;
5485   char *arg1 = (char *) 0 ;
5486   char *arg2 = (char *) 0 ;
5487   int res1 ;
5488   char *buf1 = 0 ;
5489   int alloc1 = 0 ;
5490   int res2 ;
5491   char *buf2 = 0 ;
5492   int alloc2 = 0 ;
5493   PyObject * obj0 = 0 ;
5494   PyObject * obj1 = 0 ;
5495   char *result = 0 ;
5496   
5497   if (!PyArg_ParseTuple(args,(char *)"OO:tlspool_configvar",&obj0,&obj1)) SWIG_fail;
5498   res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5499   if (!SWIG_IsOK(res1)) {
5500     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tlspool_configvar" "', argument " "1"" of type '" "char *""'");
5501   }
5502   arg1 = (char *)(buf1);
5503   res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5504   if (!SWIG_IsOK(res2)) {
5505     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tlspool_configvar" "', argument " "2"" of type '" "char *""'");
5506   }
5507   arg2 = (char *)(buf2);
5508   {
5509     SWIG_PYTHON_THREAD_BEGIN_ALLOW;
5510     result = (char *)tlspool_configvar(arg1,arg2);
5511     SWIG_PYTHON_THREAD_END_ALLOW;
5512   }
5513   resultobj = SWIG_FromCharPtr((const char *)result);
5514   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5515   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5516   return resultobj;
5517 fail:
5518   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
5519   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
5520   return NULL;
5521 }
5522
5523
5524 SWIGINTERN PyObject *_wrap_raise_errno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5525   PyObject *resultobj = 0;
5526   PyObject *result = 0 ;
5527   
5528   if (!PyArg_ParseTuple(args,(char *)":raise_errno")) SWIG_fail;
5529   result = (PyObject *)raise_errno();
5530   resultobj = result;
5531   return resultobj;
5532 fail:
5533   return NULL;
5534 }
5535
5536
5537 static PyMethodDef SwigMethods[] = {
5538          { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
5539          { (char *)"error_data_tlserrno_set", _wrap_error_data_tlserrno_set, METH_VARARGS, NULL},
5540          { (char *)"error_data_tlserrno_get", _wrap_error_data_tlserrno_get, METH_VARARGS, NULL},
5541          { (char *)"error_data_message_set", _wrap_error_data_message_set, METH_VARARGS, NULL},
5542          { (char *)"error_data_message_get", _wrap_error_data_message_get, METH_VARARGS, NULL},
5543          { (char *)"new_error_data", _wrap_new_error_data, METH_VARARGS, NULL},
5544          { (char *)"delete_error_data", _wrap_delete_error_data, METH_VARARGS, NULL},
5545          { (char *)"error_data_swigregister", error_data_swigregister, METH_VARARGS, NULL},
5546          { (char *)"ping_data_YYYYMMDD_producer_set", _wrap_ping_data_YYYYMMDD_producer_set, METH_VARARGS, NULL},
5547          { (char *)"ping_data_YYYYMMDD_producer_get", _wrap_ping_data_YYYYMMDD_producer_get, METH_VARARGS, NULL},
5548          { (char *)"ping_data_facilities_set", _wrap_ping_data_facilities_set, METH_VARARGS, NULL},
5549          { (char *)"ping_data_facilities_get", _wrap_ping_data_facilities_get, METH_VARARGS, NULL},
5550          { (char *)"new_ping_data", _wrap_new_ping_data, METH_VARARGS, NULL},
5551          { (char *)"delete_ping_data", _wrap_delete_ping_data, METH_VARARGS, NULL},
5552          { (char *)"ping_data_swigregister", ping_data_swigregister, METH_VARARGS, NULL},
5553          { (char *)"starttls_data_flags_set", _wrap_starttls_data_flags_set, METH_VARARGS, NULL},
5554          { (char *)"starttls_data_flags_get", _wrap_starttls_data_flags_get, METH_VARARGS, NULL},
5555          { (char *)"starttls_data_local_set", _wrap_starttls_data_local_set, METH_VARARGS, NULL},
5556          { (char *)"starttls_data_local_get", _wrap_starttls_data_local_get, METH_VARARGS, NULL},
5557          { (char *)"starttls_data_ipproto_set", _wrap_starttls_data_ipproto_set, METH_VARARGS, NULL},
5558          { (char *)"starttls_data_ipproto_get", _wrap_starttls_data_ipproto_get, METH_VARARGS, NULL},
5559          { (char *)"starttls_data_streamid_set", _wrap_starttls_data_streamid_set, METH_VARARGS, NULL},
5560          { (char *)"starttls_data_streamid_get", _wrap_starttls_data_streamid_get, METH_VARARGS, NULL},
5561          { (char *)"starttls_data_localid_set", _wrap_starttls_data_localid_set, METH_VARARGS, NULL},
5562          { (char *)"starttls_data_localid_get", _wrap_starttls_data_localid_get, METH_VARARGS, NULL},
5563          { (char *)"starttls_data_remoteid_set", _wrap_starttls_data_remoteid_set, METH_VARARGS, NULL},
5564          { (char *)"starttls_data_remoteid_get", _wrap_starttls_data_remoteid_get, METH_VARARGS, NULL},
5565          { (char *)"starttls_data_ctlkey_set", _wrap_starttls_data_ctlkey_set, METH_VARARGS, NULL},
5566          { (char *)"starttls_data_ctlkey_get", _wrap_starttls_data_ctlkey_get, METH_VARARGS, NULL},
5567          { (char *)"starttls_data_service_set", _wrap_starttls_data_service_set, METH_VARARGS, NULL},
5568          { (char *)"starttls_data_service_get", _wrap_starttls_data_service_get, METH_VARARGS, NULL},
5569          { (char *)"starttls_data_timeout_set", _wrap_starttls_data_timeout_set, METH_VARARGS, NULL},
5570          { (char *)"starttls_data_timeout_get", _wrap_starttls_data_timeout_get, METH_VARARGS, NULL},
5571          { (char *)"new_starttls_data", _wrap_new_starttls_data, METH_VARARGS, NULL},
5572          { (char *)"delete_starttls_data", _wrap_delete_starttls_data, METH_VARARGS, NULL},
5573          { (char *)"starttls_data_swigregister", starttls_data_swigregister, METH_VARARGS, NULL},
5574          { (char *)"control_data_flags_set", _wrap_control_data_flags_set, METH_VARARGS, NULL},
5575          { (char *)"control_data_flags_get", _wrap_control_data_flags_get, METH_VARARGS, NULL},
5576          { (char *)"control_data_ctlkey_set", _wrap_control_data_ctlkey_set, METH_VARARGS, NULL},
5577          { (char *)"control_data_ctlkey_get", _wrap_control_data_ctlkey_get, METH_VARARGS, NULL},
5578          { (char *)"control_data_name_set", _wrap_control_data_name_set, METH_VARARGS, NULL},
5579          { (char *)"control_data_name_get", _wrap_control_data_name_get, METH_VARARGS, NULL},
5580          { (char *)"new_control_data", _wrap_new_control_data, METH_VARARGS, NULL},
5581          { (char *)"delete_control_data", _wrap_delete_control_data, METH_VARARGS, NULL},
5582          { (char *)"control_data_swigregister", control_data_swigregister, METH_VARARGS, NULL},
5583          { (char *)"prng_data_in1_len_set", _wrap_prng_data_in1_len_set, METH_VARARGS, NULL},
5584          { (char *)"prng_data_in1_len_get", _wrap_prng_data_in1_len_get, METH_VARARGS, NULL},
5585          { (char *)"prng_data_in2_len_set", _wrap_prng_data_in2_len_set, METH_VARARGS, NULL},
5586          { (char *)"prng_data_in2_len_get", _wrap_prng_data_in2_len_get, METH_VARARGS, NULL},
5587          { (char *)"prng_data_prng_len_set", _wrap_prng_data_prng_len_set, METH_VARARGS, NULL},
5588          { (char *)"prng_data_prng_len_get", _wrap_prng_data_prng_len_get, METH_VARARGS, NULL},
5589          { (char *)"prng_data_buffer_set", _wrap_prng_data_buffer_set, METH_VARARGS, NULL},
5590          { (char *)"prng_data_buffer_get", _wrap_prng_data_buffer_get, METH_VARARGS, NULL},
5591          { (char *)"new_prng_data", _wrap_new_prng_data, METH_VARARGS, NULL},
5592          { (char *)"delete_prng_data", _wrap_delete_prng_data, METH_VARARGS, NULL},
5593          { (char *)"prng_data_swigregister", prng_data_swigregister, METH_VARARGS, NULL},
5594          { (char *)"socket_data_unix_socket_set", _wrap_socket_data_unix_socket_set, METH_VARARGS, NULL},
5595          { (char *)"socket_data_unix_socket_get", _wrap_socket_data_unix_socket_get, METH_VARARGS, NULL},
5596          { (char *)"new_socket_data", _wrap_new_socket_data, METH_VARARGS, NULL},
5597          { (char *)"delete_socket_data", _wrap_delete_socket_data, METH_VARARGS, NULL},
5598          { (char *)"socket_data_swigregister", socket_data_swigregister, METH_VARARGS, NULL},
5599          { (char *)"_pid", _wrap__pid, METH_VARARGS, NULL},
5600          { (char *)"_open_poolhandle", _wrap__open_poolhandle, METH_VARARGS, NULL},
5601          { (char *)"_ping", _wrap__ping, METH_VARARGS, NULL},
5602          { (char *)"_starttls", _wrap__starttls, METH_VARARGS, NULL},
5603          { (char *)"_control_detach", _wrap__control_detach, METH_VARARGS, NULL},
5604          { (char *)"_control_reattach", _wrap__control_reattach, METH_VARARGS, NULL},
5605          { (char *)"_prng", _wrap__prng, METH_VARARGS, NULL},
5606          { (char *)"tlspool_configvar", _wrap_tlspool_configvar, METH_VARARGS, NULL},
5607          { (char *)"raise_errno", _wrap_raise_errno, METH_VARARGS, NULL},
5608          { NULL, NULL, 0, NULL }
5609 };
5610
5611
5612 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
5613
5614 static swig_type_info _swigt__p_a_128__char = {"_p_a_128__char", "char (*)[128]|identity_t *", 0, 0, (void*)0, 0};
5615 static swig_type_info _swigt__p_a_16__char = {"_p_a_16__char", "char (*)[16]|service_t *", 0, 0, (void*)0, 0};
5616 static swig_type_info _swigt__p_a_16__uint8_t = {"_p_a_16__uint8_t", "uint8_t (*)[16]|ctlkey_t *", 0, 0, (void*)0, 0};
5617 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
5618 static swig_type_info _swigt__p_control_data = {"_p_control_data", "control_data *", 0, 0, (void*)0, 0};
5619 static swig_type_info _swigt__p_error_data = {"_p_error_data", "error_data *", 0, 0, (void*)0, 0};
5620 static swig_type_info _swigt__p_int = {"_p_int", "int *|pool_handle_t *", 0, 0, (void*)0, 0};
5621 static swig_type_info _swigt__p_ping_data = {"_p_ping_data", "ping_data *", 0, 0, (void*)0, 0};
5622 static swig_type_info _swigt__p_prng_data = {"_p_prng_data", "prng_data *", 0, 0, (void*)0, 0};
5623 static swig_type_info _swigt__p_socket_data = {"_p_socket_data", "socket_data *", 0, 0, (void*)0, 0};
5624 static swig_type_info _swigt__p_starttls_data = {"_p_starttls_data", "starttls_data *", 0, 0, (void*)0, 0};
5625 static swig_type_info _swigt__p_uint8_t = {"_p_uint8_t", "uint8_t *", 0, 0, (void*)0, 0};
5626
5627 static swig_type_info *swig_type_initial[] = {
5628   &_swigt__p_a_128__char,
5629   &_swigt__p_a_16__char,
5630   &_swigt__p_a_16__uint8_t,
5631   &_swigt__p_char,
5632   &_swigt__p_control_data,
5633   &_swigt__p_error_data,
5634   &_swigt__p_int,
5635   &_swigt__p_ping_data,
5636   &_swigt__p_prng_data,
5637   &_swigt__p_socket_data,
5638   &_swigt__p_starttls_data,
5639   &_swigt__p_uint8_t,
5640 };
5641
5642 static swig_cast_info _swigc__p_a_128__char[] = {  {&_swigt__p_a_128__char, 0, 0, 0},{0, 0, 0, 0}};
5643 static swig_cast_info _swigc__p_a_16__char[] = {  {&_swigt__p_a_16__char, 0, 0, 0},{0, 0, 0, 0}};
5644 static swig_cast_info _swigc__p_a_16__uint8_t[] = {  {&_swigt__p_a_16__uint8_t, 0, 0, 0},{0, 0, 0, 0}};
5645 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
5646 static swig_cast_info _swigc__p_control_data[] = {  {&_swigt__p_control_data, 0, 0, 0},{0, 0, 0, 0}};
5647 static swig_cast_info _swigc__p_error_data[] = {  {&_swigt__p_error_data, 0, 0, 0},{0, 0, 0, 0}};
5648 static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
5649 static swig_cast_info _swigc__p_ping_data[] = {  {&_swigt__p_ping_data, 0, 0, 0},{0, 0, 0, 0}};
5650 static swig_cast_info _swigc__p_prng_data[] = {  {&_swigt__p_prng_data, 0, 0, 0},{0, 0, 0, 0}};
5651 static swig_cast_info _swigc__p_socket_data[] = {  {&_swigt__p_socket_data, 0, 0, 0},{0, 0, 0, 0}};
5652 static swig_cast_info _swigc__p_starttls_data[] = {  {&_swigt__p_starttls_data, 0, 0, 0},{0, 0, 0, 0}};
5653 static swig_cast_info _swigc__p_uint8_t[] = {  {&_swigt__p_uint8_t, 0, 0, 0},{0, 0, 0, 0}};
5654
5655 static swig_cast_info *swig_cast_initial[] = {
5656   _swigc__p_a_128__char,
5657   _swigc__p_a_16__char,
5658   _swigc__p_a_16__uint8_t,
5659   _swigc__p_char,
5660   _swigc__p_control_data,
5661   _swigc__p_error_data,
5662   _swigc__p_int,
5663   _swigc__p_ping_data,
5664   _swigc__p_prng_data,
5665   _swigc__p_socket_data,
5666   _swigc__p_starttls_data,
5667   _swigc__p_uint8_t,
5668 };
5669
5670
5671 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
5672
5673 static swig_const_info swig_const_table[] = {
5674 {0, 0, 0, 0.0, 0, 0}};
5675
5676 #ifdef __cplusplus
5677 }
5678 #endif
5679 /* -----------------------------------------------------------------------------
5680  * Type initialization:
5681  * This problem is tough by the requirement that no dynamic
5682  * memory is used. Also, since swig_type_info structures store pointers to
5683  * swig_cast_info structures and swig_cast_info structures store pointers back
5684  * to swig_type_info structures, we need some lookup code at initialization.
5685  * The idea is that swig generates all the structures that are needed.
5686  * The runtime then collects these partially filled structures.
5687  * The SWIG_InitializeModule function takes these initial arrays out of
5688  * swig_module, and does all the lookup, filling in the swig_module.types
5689  * array with the correct data and linking the correct swig_cast_info
5690  * structures together.
5691  *
5692  * The generated swig_type_info structures are assigned statically to an initial
5693  * array. We just loop through that array, and handle each type individually.
5694  * First we lookup if this type has been already loaded, and if so, use the
5695  * loaded structure instead of the generated one. Then we have to fill in the
5696  * cast linked list. The cast data is initially stored in something like a
5697  * two-dimensional array. Each row corresponds to a type (there are the same
5698  * number of rows as there are in the swig_type_initial array). Each entry in
5699  * a column is one of the swig_cast_info structures for that type.
5700  * The cast_initial array is actually an array of arrays, because each row has
5701  * a variable number of columns. So to actually build the cast linked list,
5702  * we find the array of casts associated with the type, and loop through it
5703  * adding the casts to the list. The one last trick we need to do is making
5704  * sure the type pointer in the swig_cast_info struct is correct.
5705  *
5706  * First off, we lookup the cast->type name to see if it is already loaded.
5707  * There are three cases to handle:
5708  *  1) If the cast->type has already been loaded AND the type we are adding
5709  *     casting info to has not been loaded (it is in this module), THEN we
5710  *     replace the cast->type pointer with the type pointer that has already
5711  *     been loaded.
5712  *  2) If BOTH types (the one we are adding casting info to, and the
5713  *     cast->type) are loaded, THEN the cast info has already been loaded by
5714  *     the previous module so we just ignore it.
5715  *  3) Finally, if cast->type has not already been loaded, then we add that
5716  *     swig_cast_info to the linked list (because the cast->type) pointer will
5717  *     be correct.
5718  * ----------------------------------------------------------------------------- */
5719
5720 #ifdef __cplusplus
5721 extern "C" {
5722 #if 0
5723 } /* c-mode */
5724 #endif
5725 #endif
5726
5727 #if 0
5728 #define SWIGRUNTIME_DEBUG
5729 #endif
5730
5731
5732 SWIGRUNTIME void
5733 SWIG_InitializeModule(void *clientdata) {
5734   size_t i;
5735   swig_module_info *module_head, *iter;
5736   int init;
5737   
5738   /* check to see if the circular list has been setup, if not, set it up */
5739   if (swig_module.next==0) {
5740     /* Initialize the swig_module */
5741     swig_module.type_initial = swig_type_initial;
5742     swig_module.cast_initial = swig_cast_initial;
5743     swig_module.next = &swig_module;
5744     init = 1;
5745   } else {
5746     init = 0;
5747   }
5748   
5749   /* Try and load any already created modules */
5750   module_head = SWIG_GetModule(clientdata);
5751   if (!module_head) {
5752     /* This is the first module loaded for this interpreter */
5753     /* so set the swig module into the interpreter */
5754     SWIG_SetModule(clientdata, &swig_module);
5755   } else {
5756     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
5757     iter=module_head;
5758     do {
5759       if (iter==&swig_module) {
5760         /* Our module is already in the list, so there's nothing more to do. */
5761         return;
5762       }
5763       iter=iter->next;
5764     } while (iter!= module_head);
5765     
5766     /* otherwise we must add our module into the list */
5767     swig_module.next = module_head->next;
5768     module_head->next = &swig_module;
5769   }
5770   
5771   /* When multiple interpreters are used, a module could have already been initialized in
5772        a different interpreter, but not yet have a pointer in this interpreter.
5773        In this case, we do not want to continue adding types... everything should be
5774        set up already */
5775   if (init == 0) return;
5776   
5777   /* Now work on filling in swig_module.types */
5778 #ifdef SWIGRUNTIME_DEBUG
5779   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
5780 #endif
5781   for (i = 0; i < swig_module.size; ++i) {
5782     swig_type_info *type = 0;
5783     swig_type_info *ret;
5784     swig_cast_info *cast;
5785     
5786 #ifdef SWIGRUNTIME_DEBUG
5787     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
5788 #endif
5789     
5790     /* if there is another module already loaded */
5791     if (swig_module.next != &swig_module) {
5792       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
5793     }
5794     if (type) {
5795       /* Overwrite clientdata field */
5796 #ifdef SWIGRUNTIME_DEBUG
5797       printf("SWIG_InitializeModule: found type %s\n", type->name);
5798 #endif
5799       if (swig_module.type_initial[i]->clientdata) {
5800         type->clientdata = swig_module.type_initial[i]->clientdata;
5801 #ifdef SWIGRUNTIME_DEBUG
5802         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
5803 #endif
5804       }
5805     } else {
5806       type = swig_module.type_initial[i];
5807     }
5808     
5809     /* Insert casting types */
5810     cast = swig_module.cast_initial[i];
5811     while (cast->type) {
5812       /* Don't need to add information already in the list */
5813       ret = 0;
5814 #ifdef SWIGRUNTIME_DEBUG
5815       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
5816 #endif
5817       if (swig_module.next != &swig_module) {
5818         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
5819 #ifdef SWIGRUNTIME_DEBUG
5820         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
5821 #endif
5822       }
5823       if (ret) {
5824         if (type == swig_module.type_initial[i]) {
5825 #ifdef SWIGRUNTIME_DEBUG
5826           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
5827 #endif
5828           cast->type = ret;
5829           ret = 0;
5830         } else {
5831           /* Check for casting already in the list */
5832           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
5833 #ifdef SWIGRUNTIME_DEBUG
5834           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
5835 #endif
5836           if (!ocast) ret = 0;
5837         }
5838       }
5839       
5840       if (!ret) {
5841 #ifdef SWIGRUNTIME_DEBUG
5842         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
5843 #endif
5844         if (type->cast) {
5845           type->cast->prev = cast;
5846           cast->next = type->cast;
5847         }
5848         type->cast = cast;
5849       }
5850       cast++;
5851     }
5852     /* Set entry in modules->types array equal to the type */
5853     swig_module.types[i] = type;
5854   }
5855   swig_module.types[i] = 0;
5856   
5857 #ifdef SWIGRUNTIME_DEBUG
5858   printf("**** SWIG_InitializeModule: Cast List ******\n");
5859   for (i = 0; i < swig_module.size; ++i) {
5860     int j = 0;
5861     swig_cast_info *cast = swig_module.cast_initial[i];
5862     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
5863     while (cast->type) {
5864       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
5865       cast++;
5866       ++j;
5867     }
5868     printf("---- Total casts: %d\n",j);
5869   }
5870   printf("**** SWIG_InitializeModule: Cast List ******\n");
5871 #endif
5872 }
5873
5874 /* This function will propagate the clientdata field of type to
5875 * any new swig_type_info structures that have been added into the list
5876 * of equivalent types.  It is like calling
5877 * SWIG_TypeClientData(type, clientdata) a second time.
5878 */
5879 SWIGRUNTIME void
5880 SWIG_PropagateClientData(void) {
5881   size_t i;
5882   swig_cast_info *equiv;
5883   static int init_run = 0;
5884   
5885   if (init_run) return;
5886   init_run = 1;
5887   
5888   for (i = 0; i < swig_module.size; i++) {
5889     if (swig_module.types[i]->clientdata) {
5890       equiv = swig_module.types[i]->cast;
5891       while (equiv) {
5892         if (!equiv->converter) {
5893           if (equiv->type && !equiv->type->clientdata)
5894           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
5895         }
5896         equiv = equiv->next;
5897       }
5898     }
5899   }
5900 }
5901
5902 #ifdef __cplusplus
5903 #if 0
5904 {
5905   /* c-mode */
5906 #endif
5907 }
5908 #endif
5909
5910
5911
5912 #ifdef __cplusplus
5913 extern "C" {
5914 #endif
5915   
5916   /* Python-specific SWIG API */
5917 #define SWIG_newvarlink()                             SWIG_Python_newvarlink()
5918 #define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
5919 #define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
5920   
5921   /* -----------------------------------------------------------------------------
5922    * global variable support code.
5923    * ----------------------------------------------------------------------------- */
5924   
5925   typedef struct swig_globalvar {
5926     char       *name;                  /* Name of global variable */
5927     PyObject *(*get_attr)(void);       /* Return the current value */
5928     int       (*set_attr)(PyObject *); /* Set the value */
5929     struct swig_globalvar *next;
5930   } swig_globalvar;
5931   
5932   typedef struct swig_varlinkobject {
5933     PyObject_HEAD
5934     swig_globalvar *vars;
5935   } swig_varlinkobject;
5936   
5937   SWIGINTERN PyObject *
5938   swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
5939 #if PY_VERSION_HEX >= 0x03000000
5940     return PyUnicode_InternFromString("<Swig global variables>");
5941 #else
5942     return PyString_FromString("<Swig global variables>");
5943 #endif
5944   }
5945   
5946   SWIGINTERN PyObject *
5947   swig_varlink_str(swig_varlinkobject *v) {
5948 #if PY_VERSION_HEX >= 0x03000000
5949     PyObject *str = PyUnicode_InternFromString("(");
5950     PyObject *tail;
5951     PyObject *joined;
5952     swig_globalvar *var;
5953     for (var = v->vars; var; var=var->next) {
5954       tail = PyUnicode_FromString(var->name);
5955       joined = PyUnicode_Concat(str, tail);
5956       Py_DecRef(str);
5957       Py_DecRef(tail);
5958       str = joined;
5959       if (var->next) {
5960         tail = PyUnicode_InternFromString(", ");
5961         joined = PyUnicode_Concat(str, tail);
5962         Py_DecRef(str);
5963         Py_DecRef(tail);
5964         str = joined;
5965       }
5966     }
5967     tail = PyUnicode_InternFromString(")");
5968     joined = PyUnicode_Concat(str, tail);
5969     Py_DecRef(str);
5970     Py_DecRef(tail);
5971     str = joined;
5972 #else
5973     PyObject *str = PyString_FromString("(");
5974     swig_globalvar *var;
5975     for (var = v->vars; var; var=var->next) {
5976       PyString_ConcatAndDel(&str,PyString_FromString(var->name));
5977       if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
5978     }
5979     PyString_ConcatAndDel(&str,PyString_FromString(")"));
5980 #endif
5981     return str;
5982   }
5983   
5984   SWIGINTERN int
5985   swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
5986     char *tmp;
5987     PyObject *str = swig_varlink_str(v);
5988     fprintf(fp,"Swig global variables ");
5989     fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
5990     SWIG_Python_str_DelForPy3(tmp);
5991     Py_DECREF(str);
5992     return 0;
5993   }
5994   
5995   SWIGINTERN void
5996   swig_varlink_dealloc(swig_varlinkobject *v) {
5997     swig_globalvar *var = v->vars;
5998     while (var) {
5999       swig_globalvar *n = var->next;
6000       free(var->name);
6001       free(var);
6002       var = n;
6003     }
6004   }
6005   
6006   SWIGINTERN PyObject *
6007   swig_varlink_getattr(swig_varlinkobject *v, char *n) {
6008     PyObject *res = NULL;
6009     swig_globalvar *var = v->vars;
6010     while (var) {
6011       if (strcmp(var->name,n) == 0) {
6012         res = (*var->get_attr)();
6013         break;
6014       }
6015       var = var->next;
6016     }
6017     if (res == NULL && !PyErr_Occurred()) {
6018       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
6019     }
6020     return res;
6021   }
6022   
6023   SWIGINTERN int
6024   swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
6025     int res = 1;
6026     swig_globalvar *var = v->vars;
6027     while (var) {
6028       if (strcmp(var->name,n) == 0) {
6029         res = (*var->set_attr)(p);
6030         break;
6031       }
6032       var = var->next;
6033     }
6034     if (res == 1 && !PyErr_Occurred()) {
6035       PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
6036     }
6037     return res;
6038   }
6039   
6040   SWIGINTERN PyTypeObject*
6041   swig_varlink_type(void) {
6042     static char varlink__doc__[] = "Swig var link object";
6043     static PyTypeObject varlink_type;
6044     static int type_init = 0;
6045     if (!type_init) {
6046       const PyTypeObject tmp = {
6047         /* PyObject header changed in Python 3 */
6048 #if PY_VERSION_HEX >= 0x03000000
6049         PyVarObject_HEAD_INIT(NULL, 0)
6050 #else
6051         PyObject_HEAD_INIT(NULL)
6052         0,                                  /* ob_size */
6053 #endif
6054         (char *)"swigvarlink",              /* tp_name */
6055         sizeof(swig_varlinkobject),         /* tp_basicsize */
6056         0,                                  /* tp_itemsize */
6057         (destructor) swig_varlink_dealloc,  /* tp_dealloc */
6058         (printfunc) swig_varlink_print,     /* tp_print */
6059         (getattrfunc) swig_varlink_getattr, /* tp_getattr */
6060         (setattrfunc) swig_varlink_setattr, /* tp_setattr */
6061         0,                                  /* tp_compare */
6062         (reprfunc) swig_varlink_repr,       /* tp_repr */
6063         0,                                  /* tp_as_number */
6064         0,                                  /* tp_as_sequence */
6065         0,                                  /* tp_as_mapping */
6066         0,                                  /* tp_hash */
6067         0,                                  /* tp_call */
6068         (reprfunc) swig_varlink_str,        /* tp_str */
6069         0,                                  /* tp_getattro */
6070         0,                                  /* tp_setattro */
6071         0,                                  /* tp_as_buffer */
6072         0,                                  /* tp_flags */
6073         varlink__doc__,                     /* tp_doc */
6074         0,                                  /* tp_traverse */
6075         0,                                  /* tp_clear */
6076         0,                                  /* tp_richcompare */
6077         0,                                  /* tp_weaklistoffset */
6078 #if PY_VERSION_HEX >= 0x02020000
6079         0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
6080 #endif
6081 #if PY_VERSION_HEX >= 0x02030000
6082         0,                                  /* tp_del */
6083 #endif
6084 #if PY_VERSION_HEX >= 0x02060000
6085         0,                                  /* tp_version_tag */
6086 #endif
6087 #if PY_VERSION_HEX >= 0x03040000
6088         0,                                  /* tp_finalize */
6089 #endif
6090 #ifdef COUNT_ALLOCS
6091         0,                                  /* tp_allocs */
6092         0,                                  /* tp_frees */
6093         0,                                  /* tp_maxalloc */
6094 #if PY_VERSION_HEX >= 0x02050000
6095         0,                                  /* tp_prev */
6096 #endif
6097         0                                   /* tp_next */
6098 #endif
6099       };
6100       varlink_type = tmp;
6101       type_init = 1;
6102 #if PY_VERSION_HEX < 0x02020000
6103       varlink_type.ob_type = &PyType_Type;
6104 #else
6105       if (PyType_Ready(&varlink_type) < 0)
6106       return NULL;
6107 #endif
6108     }
6109     return &varlink_type;
6110   }
6111   
6112   /* Create a variable linking object for use later */
6113   SWIGINTERN PyObject *
6114   SWIG_Python_newvarlink(void) {
6115     swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
6116     if (result) {
6117       result->vars = 0;
6118     }
6119     return ((PyObject*) result);
6120   }
6121   
6122   SWIGINTERN void 
6123   SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
6124     swig_varlinkobject *v = (swig_varlinkobject *) p;
6125     swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
6126     if (gv) {
6127       size_t size = strlen(name)+1;
6128       gv->name = (char *)malloc(size);
6129       if (gv->name) {
6130         strncpy(gv->name,name,size);
6131         gv->get_attr = get_attr;
6132         gv->set_attr = set_attr;
6133         gv->next = v->vars;
6134       }
6135     }
6136     v->vars = gv;
6137   }
6138   
6139   SWIGINTERN PyObject *
6140   SWIG_globals(void) {
6141     static PyObject *_SWIG_globals = 0; 
6142     if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
6143     return _SWIG_globals;
6144   }
6145   
6146   /* -----------------------------------------------------------------------------
6147    * constants/methods manipulation
6148    * ----------------------------------------------------------------------------- */
6149   
6150   /* Install Constants */
6151   SWIGINTERN void
6152   SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
6153     PyObject *obj = 0;
6154     size_t i;
6155     for (i = 0; constants[i].type; ++i) {
6156       switch(constants[i].type) {
6157       case SWIG_PY_POINTER:
6158         obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
6159         break;
6160       case SWIG_PY_BINARY:
6161         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
6162         break;
6163       default:
6164         obj = 0;
6165         break;
6166       }
6167       if (obj) {
6168         PyDict_SetItemString(d, constants[i].name, obj);
6169         Py_DECREF(obj);
6170       }
6171     }
6172   }
6173   
6174   /* -----------------------------------------------------------------------------*/
6175   /* Fix SwigMethods to carry the callback ptrs when needed */
6176   /* -----------------------------------------------------------------------------*/
6177   
6178   SWIGINTERN void
6179   SWIG_Python_FixMethods(PyMethodDef *methods,
6180     swig_const_info *const_table,
6181     swig_type_info **types,
6182     swig_type_info **types_initial) {
6183     size_t i;
6184     for (i = 0; methods[i].ml_name; ++i) {
6185       const char *c = methods[i].ml_doc;
6186       if (!c) continue;
6187       c = strstr(c, "swig_ptr: ");
6188       if (c) {
6189         int j;
6190         swig_const_info *ci = 0;
6191         const char *name = c + 10;
6192         for (j = 0; const_table[j].type; ++j) {
6193           if (strncmp(const_table[j].name, name, 
6194               strlen(const_table[j].name)) == 0) {
6195             ci = &(const_table[j]);
6196             break;
6197           }
6198         }
6199         if (ci) {
6200           void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
6201           if (ptr) {
6202             size_t shift = (ci->ptype) - types;
6203             swig_type_info *ty = types_initial[shift];
6204             size_t ldoc = (c - methods[i].ml_doc);
6205             size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
6206             char *ndoc = (char*)malloc(ldoc + lptr + 10);
6207             if (ndoc) {
6208               char *buff = ndoc;
6209               strncpy(buff, methods[i].ml_doc, ldoc);
6210               buff += ldoc;
6211               strncpy(buff, "swig_ptr: ", 10);
6212               buff += 10;
6213               SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
6214               methods[i].ml_doc = ndoc;
6215             }
6216           }
6217         }
6218       }
6219     }
6220   } 
6221   
6222 #ifdef __cplusplus
6223 }
6224 #endif
6225
6226 /* -----------------------------------------------------------------------------*
6227  *  Partial Init method
6228  * -----------------------------------------------------------------------------*/
6229
6230 #ifdef __cplusplus
6231 extern "C"
6232 #endif
6233
6234 SWIGEXPORT 
6235 #if PY_VERSION_HEX >= 0x03000000
6236 PyObject*
6237 #else
6238 void
6239 #endif
6240 SWIG_init(void) {
6241   PyObject *m, *d, *md;
6242 #if PY_VERSION_HEX >= 0x03000000
6243   static struct PyModuleDef SWIG_module = {
6244 # if PY_VERSION_HEX >= 0x03020000
6245     PyModuleDef_HEAD_INIT,
6246 # else
6247     {
6248       PyObject_HEAD_INIT(NULL)
6249       NULL, /* m_init */
6250       0,    /* m_index */
6251       NULL, /* m_copy */
6252     },
6253 # endif
6254     (char *) SWIG_name,
6255     NULL,
6256     -1,
6257     SwigMethods,
6258     NULL,
6259     NULL,
6260     NULL,
6261     NULL
6262   };
6263 #endif
6264   
6265 #if defined(SWIGPYTHON_BUILTIN)
6266   static SwigPyClientData SwigPyObject_clientdata = {
6267     0, 0, 0, 0, 0, 0, 0
6268   };
6269   static PyGetSetDef this_getset_def = {
6270     (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
6271   };
6272   static SwigPyGetSet thisown_getset_closure = {
6273     (PyCFunction) SwigPyObject_own,
6274     (PyCFunction) SwigPyObject_own
6275   };
6276   static PyGetSetDef thisown_getset_def = {
6277     (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
6278   };
6279   PyObject *metatype_args;
6280   PyTypeObject *builtin_pytype;
6281   int builtin_base_count;
6282   swig_type_info *builtin_basetype;
6283   PyObject *tuple;
6284   PyGetSetDescrObject *static_getset;
6285   PyTypeObject *metatype;
6286   SwigPyClientData *cd;
6287   PyObject *public_interface, *public_symbol;
6288   PyObject *this_descr;
6289   PyObject *thisown_descr;
6290   PyObject *self = 0;
6291   int i;
6292   
6293   (void)builtin_pytype;
6294   (void)builtin_base_count;
6295   (void)builtin_basetype;
6296   (void)tuple;
6297   (void)static_getset;
6298   (void)self;
6299   
6300   /* metatype is used to implement static member variables. */
6301   metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
6302   assert(metatype_args);
6303   metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
6304   assert(metatype);
6305   Py_DECREF(metatype_args);
6306   metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
6307   assert(PyType_Ready(metatype) >= 0);
6308 #endif
6309   
6310   /* Fix SwigMethods to carry the callback ptrs when needed */
6311   SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
6312   
6313 #if PY_VERSION_HEX >= 0x03000000
6314   m = PyModule_Create(&SWIG_module);
6315 #else
6316   m = Py_InitModule((char *) SWIG_name, SwigMethods);
6317 #endif
6318   
6319   md = d = PyModule_GetDict(m);
6320   (void)md;
6321   
6322   SWIG_InitializeModule(0);
6323   
6324 #ifdef SWIGPYTHON_BUILTIN
6325   SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
6326   assert(SwigPyObject_stype);
6327   cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
6328   if (!cd) {
6329     SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
6330     SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
6331   } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
6332     PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
6333 # if PY_VERSION_HEX >= 0x03000000
6334     return NULL;
6335 # else
6336     return;
6337 # endif
6338   }
6339   
6340   /* All objects have a 'this' attribute */
6341   this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
6342   (void)this_descr;
6343   
6344   /* All objects have a 'thisown' attribute */
6345   thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
6346   (void)thisown_descr;
6347   
6348   public_interface = PyList_New(0);
6349   public_symbol = 0;
6350   (void)public_symbol;
6351   
6352   PyDict_SetItemString(md, "__all__", public_interface);
6353   Py_DECREF(public_interface);
6354   for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
6355   SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
6356   for (i = 0; swig_const_table[i].name != 0; ++i)
6357   SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
6358 #endif
6359   
6360   SWIG_InstallConstants(d,swig_const_table);
6361   
6362   SWIG_Python_SetConstant(d, "PIOC_CONTROL_DETACH_V2",SWIG_From_int((int)(0x00000100)));
6363   SWIG_Python_SetConstant(d, "PIOC_CONTROL_REATTACH_V2",SWIG_From_int((int)(0x00000101)));
6364   SWIG_Python_SetConstant(d, "PIOC_ERROR_V2",SWIG_From_int((int)(0x00000001)));
6365   SWIG_Python_SetConstant(d, "PIOC_LIDENTRY_CALLBACK_V2",SWIG_From_int((int)(0x00000201)));
6366   SWIG_Python_SetConstant(d, "PIOC_LIDENTRY_REGISTER_V2",SWIG_From_int((int)(0x00000200)));
6367   SWIG_Python_SetConstant(d, "PIOC_LOCAL",SWIG_From_int((int)(0x80000000)));
6368   SWIG_Python_SetConstant(d, "PIOC_PINENTRY_V2",SWIG_From_int((int)(0x00000029)));
6369   SWIG_Python_SetConstant(d, "PIOC_PING_V2",SWIG_From_int((int)(0x00000010)));
6370   SWIG_Python_SetConstant(d, "PIOC_PLAINTEXT_CONNECT_V2",SWIG_From_int((int)(0x0000002a)));
6371   SWIG_Python_SetConstant(d, "PIOC_PRNG_V2",SWIG_From_int((int)(0x0000002b)));
6372   SWIG_Python_SetConstant(d, "PIOC_STARTTLS_LOCALID_V2",SWIG_From_int((int)(0x00000028)));
6373   SWIG_Python_SetConstant(d, "PIOC_STARTTLS_V2",SWIG_From_int((int)(0x00000024)));
6374   SWIG_Python_SetConstant(d, "PIOC_SUCCESS_V2",SWIG_From_int((int)(0x00000000)));
6375   SWIG_Python_SetConstant(d, "PIOF_FACILITY_ALL_CURRENT",SWIG_From_int((int)(0x00000001)));
6376   SWIG_Python_SetConstant(d, "PIOF_FACILITY_STARTGSS",SWIG_From_int((int)(0x00000002)));
6377   SWIG_Python_SetConstant(d, "PIOF_FACILITY_STARTSSH",SWIG_From_int((int)(0x00000004)));
6378   SWIG_Python_SetConstant(d, "PIOF_FACILITY_STARTTLS",SWIG_From_int((int)(0x00000001)));
6379   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_DBAPPEND",SWIG_From_int((int)(0x00004000)));
6380   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_DBENTRY",SWIG_From_int((int)(0x00001000)));
6381   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_DBINSERT",SWIG_From_int((int)(0x00002000)));
6382   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_DBREORDER",SWIG_From_int((int)(0x00008000)));
6383   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_NEW",SWIG_From_int((int)(0x00100000)));
6384   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_ONTHEFLY",SWIG_From_int((int)(0x00200000)));
6385   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_REGFLAGS",SWIG_From_int((int)(0x00000fff)));
6386   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_SKIP_DBENTRY",SWIG_From_int((int)(0x00000080)));
6387   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_SKIP_DOMAIN_ONEUP",SWIG_From_int((int)(0x00000084)));
6388   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_SKIP_DOMAIN_SAME",SWIG_From_int((int)(0x00000082)));
6389   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_SKIP_DOMAIN_SUB",SWIG_From_int((int)(0x00000086)));
6390   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_SKIP_NOTROOT",SWIG_From_int((int)(0x00000088)));
6391   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_SKIP_USER",SWIG_From_int((int)(0x00000081)));
6392   SWIG_Python_SetConstant(d, "PIOF_LIDENTRY_WANT_DBENTRY",SWIG_From_int((int)(0x00000100)));
6393   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_DETACH",SWIG_From_int((int)(0x00002000)));
6394   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_DOMAIN_REPRESENTS_USER",SWIG_From_int((int)(0x00008000)));
6395   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_DTLS",SWIG_From_int((int)(0x00000100)));
6396   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_FORK",SWIG_From_int((int)(0x00004000)));
6397   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_IGNORE_CACHES",SWIG_From_int((int)(0x00000400)));
6398   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_IGNORE_REMOTEID",SWIG_From_int((int)(0x00001000)));
6399   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_LOCALID_CHECK",SWIG_From_int((int)(0x00010000)));
6400   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_LOCALID_ONTHEFLY",SWIG_From_int((int)(0x00040000)));
6401   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_LOCALROLE_CLIENT",SWIG_From_int((int)(0x00000001)));
6402   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_LOCALROLE_PEER",SWIG_From_int((int)(0x00000003)));
6403   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_LOCALROLE_SERVER",SWIG_From_int((int)(0x00000002)));
6404   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_REMOTEROLE_CLIENT",SWIG_From_int((int)(0x00000004)));
6405   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_REMOTEROLE_PEER",SWIG_From_int((int)(0x0000000c)));
6406   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_REMOTEROLE_SERVER",SWIG_From_int((int)(0x00000008)));
6407   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_RENEGOTIATE",SWIG_From_int((int)(0x00020000)));
6408   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_REQUEST_REMOTEID",SWIG_From_int((int)(0x00000800)));
6409   SWIG_Python_SetConstant(d, "PIOF_STARTTLS_WITHOUT_SNI",SWIG_From_int((int)(0x00000200)));
6410   SWIG_Python_SetConstant(d, "TLSPOOL_CTLKEYLEN",SWIG_From_int((int)(16)));
6411   SWIG_Python_SetConstant(d, "TLSPOOL_DEFAULT_PIDFILE_PATH",SWIG_FromCharPtr("/var/run/tlspool.pid"));
6412   SWIG_Python_SetConstant(d, "TLSPOOL_DEFAULT_SOCKET_PATH",SWIG_FromCharPtr("/var/run/tlspool.sock"));
6413   SWIG_Python_SetConstant(d, "TLSPOOL_IDENTITY_V2",SWIG_FromCharPtr("20151111api@tlspool.arpa2.net"));
6414   SWIG_Python_SetConstant(d, "TLSPOOL_PRNGBUFLEN",SWIG_From_int((int)(350)));
6415   SWIG_Python_SetConstant(d, "TLSPOOL_SERVICELEN",SWIG_From_int((int)(16)));
6416   SWIG_Python_SetConstant(d, "TLSPOOL_TIMEOUT_DEFAULT",SWIG_From_int((int)(0)));
6417   
6418   /* Initialize threading */
6419   SWIG_PYTHON_INITIALIZE_THREADS;
6420 #if PY_VERSION_HEX >= 0x03000000
6421   return m;
6422 #else
6423   return;
6424 #endif
6425 }
6426