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