1e1d61885Sagc /* ----------------------------------------------------------------------------
2e1d61885Sagc * This file was automatically generated by SWIG (http://www.swig.org).
3e1d61885Sagc * Version 1.3.31
4e1d61885Sagc *
5e1d61885Sagc * This file is not intended to be easily readable and contains a number of
6e1d61885Sagc * coding conventions designed to improve portability and efficiency. Do not make
7e1d61885Sagc * changes to this file unless you know what you are doing--modify the SWIG
8e1d61885Sagc * interface file instead.
9e1d61885Sagc * ----------------------------------------------------------------------------- */
10e1d61885Sagc
11e1d61885Sagc #define SWIGPERL
12e1d61885Sagc #define SWIG_CASTRANK_MODE
13e1d61885Sagc /* -----------------------------------------------------------------------------
14e1d61885Sagc * This section contains generic SWIG labels for method/variable
15e1d61885Sagc * declarations/attributes, and other compiler dependent labels.
16e1d61885Sagc * ----------------------------------------------------------------------------- */
17e1d61885Sagc
18e1d61885Sagc /* template workaround for compilers that cannot correctly implement the C++ standard */
19e1d61885Sagc #ifndef SWIGTEMPLATEDISAMBIGUATOR
20e1d61885Sagc # if defined(__SUNPRO_CC)
21e1d61885Sagc # if (__SUNPRO_CC <= 0x560)
22e1d61885Sagc # define SWIGTEMPLATEDISAMBIGUATOR template
23e1d61885Sagc # else
24e1d61885Sagc # define SWIGTEMPLATEDISAMBIGUATOR
25e1d61885Sagc # endif
26e1d61885Sagc # else
27e1d61885Sagc # define SWIGTEMPLATEDISAMBIGUATOR
28e1d61885Sagc # endif
29e1d61885Sagc #endif
30e1d61885Sagc
31e1d61885Sagc /* inline attribute */
32e1d61885Sagc #ifndef SWIGINLINE
33e1d61885Sagc # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
34e1d61885Sagc # define SWIGINLINE inline
35e1d61885Sagc # else
36e1d61885Sagc # define SWIGINLINE
37e1d61885Sagc # endif
38e1d61885Sagc #endif
39e1d61885Sagc
40e1d61885Sagc /* attribute recognised by some compilers to avoid 'unused' warnings */
41e1d61885Sagc #ifndef SWIGUNUSED
42e1d61885Sagc # if defined(__GNUC__)
43e1d61885Sagc # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
44e1d61885Sagc # define SWIGUNUSED __attribute__ ((__unused__))
45e1d61885Sagc # else
46e1d61885Sagc # define SWIGUNUSED
47e1d61885Sagc # endif
48e1d61885Sagc # elif defined(__ICC)
49e1d61885Sagc # define SWIGUNUSED __attribute__ ((__unused__))
50e1d61885Sagc # else
51e1d61885Sagc # define SWIGUNUSED
52e1d61885Sagc # endif
53e1d61885Sagc #endif
54e1d61885Sagc
55e1d61885Sagc #ifndef SWIGUNUSEDPARM
56e1d61885Sagc # ifdef __cplusplus
57e1d61885Sagc # define SWIGUNUSEDPARM(p)
58e1d61885Sagc # else
59e1d61885Sagc # define SWIGUNUSEDPARM(p) p SWIGUNUSED
60e1d61885Sagc # endif
61e1d61885Sagc #endif
62e1d61885Sagc
63e1d61885Sagc /* internal SWIG method */
64e1d61885Sagc #ifndef SWIGINTERN
65e1d61885Sagc # define SWIGINTERN static SWIGUNUSED
66e1d61885Sagc #endif
67e1d61885Sagc
68e1d61885Sagc /* internal inline SWIG method */
69e1d61885Sagc #ifndef SWIGINTERNINLINE
70e1d61885Sagc # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
71e1d61885Sagc #endif
72e1d61885Sagc
73e1d61885Sagc /* exporting methods */
74e1d61885Sagc #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
75e1d61885Sagc # ifndef GCC_HASCLASSVISIBILITY
76e1d61885Sagc # define GCC_HASCLASSVISIBILITY
77e1d61885Sagc # endif
78e1d61885Sagc #endif
79e1d61885Sagc
80e1d61885Sagc #ifndef SWIGEXPORT
81e1d61885Sagc # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
82e1d61885Sagc # if defined(STATIC_LINKED)
83e1d61885Sagc # define SWIGEXPORT
84e1d61885Sagc # else
85e1d61885Sagc # define SWIGEXPORT __declspec(dllexport)
86e1d61885Sagc # endif
87e1d61885Sagc # else
88e1d61885Sagc # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
89e1d61885Sagc # define SWIGEXPORT __attribute__ ((visibility("default")))
90e1d61885Sagc # else
91e1d61885Sagc # define SWIGEXPORT
92e1d61885Sagc # endif
93e1d61885Sagc # endif
94e1d61885Sagc #endif
95e1d61885Sagc
96e1d61885Sagc /* calling conventions for Windows */
97e1d61885Sagc #ifndef SWIGSTDCALL
98e1d61885Sagc # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
99e1d61885Sagc # define SWIGSTDCALL __stdcall
100e1d61885Sagc # else
101e1d61885Sagc # define SWIGSTDCALL
102e1d61885Sagc # endif
103e1d61885Sagc #endif
104e1d61885Sagc
105e1d61885Sagc /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
106e1d61885Sagc #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
107e1d61885Sagc # define _CRT_SECURE_NO_DEPRECATE
108e1d61885Sagc #endif
109e1d61885Sagc
110e1d61885Sagc /* -----------------------------------------------------------------------------
111e1d61885Sagc * swigrun.swg
112e1d61885Sagc *
113e1d61885Sagc * This file contains generic CAPI SWIG runtime support for pointer
114e1d61885Sagc * type checking.
115e1d61885Sagc * ----------------------------------------------------------------------------- */
116e1d61885Sagc
117e1d61885Sagc /* This should only be incremented when either the layout of swig_type_info changes,
118e1d61885Sagc or for whatever reason, the runtime changes incompatibly */
119e1d61885Sagc #define SWIG_RUNTIME_VERSION "3"
120e1d61885Sagc
121e1d61885Sagc /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
122e1d61885Sagc #ifdef SWIG_TYPE_TABLE
123e1d61885Sagc # define SWIG_QUOTE_STRING(x) #x
124e1d61885Sagc # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
125e1d61885Sagc # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
126e1d61885Sagc #else
127e1d61885Sagc # define SWIG_TYPE_TABLE_NAME
128e1d61885Sagc #endif
129e1d61885Sagc
130e1d61885Sagc /*
131e1d61885Sagc You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
132e1d61885Sagc creating a static or dynamic library from the swig runtime code.
133e1d61885Sagc In 99.9% of the cases, swig just needs to declare them as 'static'.
134e1d61885Sagc
135e1d61885Sagc But only do this if is strictly necessary, ie, if you have problems
136e1d61885Sagc with your compiler or so.
137e1d61885Sagc */
138e1d61885Sagc
139e1d61885Sagc #ifndef SWIGRUNTIME
140e1d61885Sagc # define SWIGRUNTIME SWIGINTERN
141e1d61885Sagc #endif
142e1d61885Sagc
143e1d61885Sagc #ifndef SWIGRUNTIMEINLINE
144e1d61885Sagc # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
145e1d61885Sagc #endif
146e1d61885Sagc
147e1d61885Sagc /* Generic buffer size */
148e1d61885Sagc #ifndef SWIG_BUFFER_SIZE
149e1d61885Sagc # define SWIG_BUFFER_SIZE 1024
150e1d61885Sagc #endif
151e1d61885Sagc
152e1d61885Sagc /* Flags for pointer conversions */
153e1d61885Sagc #define SWIG_POINTER_DISOWN 0x1
154e1d61885Sagc
155e1d61885Sagc /* Flags for new pointer objects */
156e1d61885Sagc #define SWIG_POINTER_OWN 0x1
157e1d61885Sagc
158e1d61885Sagc
159e1d61885Sagc /*
160e1d61885Sagc Flags/methods for returning states.
161e1d61885Sagc
162e1d61885Sagc The swig conversion methods, as ConvertPtr, return and integer
163e1d61885Sagc that tells if the conversion was successful or not. And if not,
164e1d61885Sagc an error code can be returned (see swigerrors.swg for the codes).
165e1d61885Sagc
166e1d61885Sagc Use the following macros/flags to set or process the returning
167e1d61885Sagc states.
168e1d61885Sagc
169e1d61885Sagc In old swig versions, you usually write code as:
170e1d61885Sagc
171e1d61885Sagc if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
172e1d61885Sagc // success code
173e1d61885Sagc } else {
174e1d61885Sagc //fail code
175e1d61885Sagc }
176e1d61885Sagc
177e1d61885Sagc Now you can be more explicit as:
178e1d61885Sagc
179e1d61885Sagc int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
180e1d61885Sagc if (SWIG_IsOK(res)) {
181e1d61885Sagc // success code
182e1d61885Sagc } else {
183e1d61885Sagc // fail code
184e1d61885Sagc }
185e1d61885Sagc
186e1d61885Sagc that seems to be the same, but now you can also do
187e1d61885Sagc
188e1d61885Sagc Type *ptr;
189e1d61885Sagc int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
190e1d61885Sagc if (SWIG_IsOK(res)) {
191e1d61885Sagc // success code
192e1d61885Sagc if (SWIG_IsNewObj(res) {
193e1d61885Sagc ...
194e1d61885Sagc delete *ptr;
195e1d61885Sagc } else {
196e1d61885Sagc ...
197e1d61885Sagc }
198e1d61885Sagc } else {
199e1d61885Sagc // fail code
200e1d61885Sagc }
201e1d61885Sagc
202e1d61885Sagc I.e., now SWIG_ConvertPtr can return new objects and you can
203e1d61885Sagc identify the case and take care of the deallocation. Of course that
204e1d61885Sagc requires also to SWIG_ConvertPtr to return new result values, as
205e1d61885Sagc
206e1d61885Sagc int SWIG_ConvertPtr(obj, ptr,...) {
207e1d61885Sagc if (<obj is ok>) {
208e1d61885Sagc if (<need new object>) {
209e1d61885Sagc *ptr = <ptr to new allocated object>;
210e1d61885Sagc return SWIG_NEWOBJ;
211e1d61885Sagc } else {
212e1d61885Sagc *ptr = <ptr to old object>;
213e1d61885Sagc return SWIG_OLDOBJ;
214e1d61885Sagc }
215e1d61885Sagc } else {
216e1d61885Sagc return SWIG_BADOBJ;
217e1d61885Sagc }
218e1d61885Sagc }
219e1d61885Sagc
220e1d61885Sagc Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
221e1d61885Sagc more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
222e1d61885Sagc swig errors code.
223e1d61885Sagc
224e1d61885Sagc Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
225e1d61885Sagc allows to return the 'cast rank', for example, if you have this
226e1d61885Sagc
227e1d61885Sagc int food(double)
228e1d61885Sagc int fooi(int);
229e1d61885Sagc
230e1d61885Sagc and you call
231e1d61885Sagc
232e1d61885Sagc food(1) // cast rank '1' (1 -> 1.0)
233e1d61885Sagc fooi(1) // cast rank '0'
234e1d61885Sagc
235e1d61885Sagc just use the SWIG_AddCast()/SWIG_CheckState()
236e1d61885Sagc
237e1d61885Sagc
238e1d61885Sagc */
239e1d61885Sagc #define SWIG_OK (0)
240e1d61885Sagc #define SWIG_ERROR (-1)
241e1d61885Sagc #define SWIG_IsOK(r) (r >= 0)
242e1d61885Sagc #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
243e1d61885Sagc
244e1d61885Sagc /* The CastRankLimit says how many bits are used for the cast rank */
245e1d61885Sagc #define SWIG_CASTRANKLIMIT (1 << 8)
246e1d61885Sagc /* The NewMask denotes the object was created (using new/malloc) */
247e1d61885Sagc #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
248e1d61885Sagc /* The TmpMask is for in/out typemaps that use temporal objects */
249e1d61885Sagc #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
250e1d61885Sagc /* Simple returning values */
251e1d61885Sagc #define SWIG_BADOBJ (SWIG_ERROR)
252e1d61885Sagc #define SWIG_OLDOBJ (SWIG_OK)
253e1d61885Sagc #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
254e1d61885Sagc #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
255e1d61885Sagc /* Check, add and del mask methods */
256e1d61885Sagc #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
257e1d61885Sagc #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
258e1d61885Sagc #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
259e1d61885Sagc #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
260e1d61885Sagc #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
261e1d61885Sagc #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
262e1d61885Sagc
263e1d61885Sagc
264e1d61885Sagc /* Cast-Rank Mode */
265e1d61885Sagc #if defined(SWIG_CASTRANK_MODE)
266e1d61885Sagc # ifndef SWIG_TypeRank
267e1d61885Sagc # define SWIG_TypeRank unsigned long
268e1d61885Sagc # endif
269e1d61885Sagc # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
270e1d61885Sagc # define SWIG_MAXCASTRANK (2)
271e1d61885Sagc # endif
272e1d61885Sagc # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
273e1d61885Sagc # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)274e1d61885Sagc SWIGINTERNINLINE int SWIG_AddCast(int r) {
275e1d61885Sagc return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
276e1d61885Sagc }
SWIG_CheckState(int r)277e1d61885Sagc SWIGINTERNINLINE int SWIG_CheckState(int r) {
278e1d61885Sagc return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
279e1d61885Sagc }
280e1d61885Sagc #else /* no cast-rank mode */
281e1d61885Sagc # define SWIG_AddCast
282e1d61885Sagc # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
283e1d61885Sagc #endif
284e1d61885Sagc
285e1d61885Sagc
286e1d61885Sagc
287e1d61885Sagc
288e1d61885Sagc #include <string.h>
289e1d61885Sagc
290e1d61885Sagc #ifdef __cplusplus
291e1d61885Sagc extern "C" {
292e1d61885Sagc #endif
293e1d61885Sagc
294e1d61885Sagc typedef void *(*swig_converter_func)(void *);
295e1d61885Sagc typedef struct swig_type_info *(*swig_dycast_func)(void **);
296e1d61885Sagc
297e1d61885Sagc /* Structure to store inforomation on one type */
298e1d61885Sagc typedef struct swig_type_info {
299e1d61885Sagc const char *name; /* mangled name of this type */
300e1d61885Sagc const char *str; /* human readable name of this type */
301e1d61885Sagc swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
302e1d61885Sagc struct swig_cast_info *cast; /* linked list of types that can cast into this type */
303e1d61885Sagc void *clientdata; /* language specific type data */
304e1d61885Sagc int owndata; /* flag if the structure owns the clientdata */
305e1d61885Sagc } swig_type_info;
306e1d61885Sagc
307e1d61885Sagc /* Structure to store a type and conversion function used for casting */
308e1d61885Sagc typedef struct swig_cast_info {
309e1d61885Sagc swig_type_info *type; /* pointer to type that is equivalent to this type */
310e1d61885Sagc swig_converter_func converter; /* function to cast the void pointers */
311e1d61885Sagc struct swig_cast_info *next; /* pointer to next cast in linked list */
312e1d61885Sagc struct swig_cast_info *prev; /* pointer to the previous cast */
313e1d61885Sagc } swig_cast_info;
314e1d61885Sagc
315e1d61885Sagc /* Structure used to store module information
316e1d61885Sagc * Each module generates one structure like this, and the runtime collects
317e1d61885Sagc * all of these structures and stores them in a circularly linked list.*/
318e1d61885Sagc typedef struct swig_module_info {
319e1d61885Sagc swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
320e1d61885Sagc size_t size; /* Number of types in this module */
321e1d61885Sagc struct swig_module_info *next; /* Pointer to next element in circularly linked list */
322e1d61885Sagc swig_type_info **type_initial; /* Array of initially generated type structures */
323e1d61885Sagc swig_cast_info **cast_initial; /* Array of initially generated casting structures */
324e1d61885Sagc void *clientdata; /* Language specific module data */
325e1d61885Sagc } swig_module_info;
326e1d61885Sagc
327e1d61885Sagc /*
328e1d61885Sagc Compare two type names skipping the space characters, therefore
329e1d61885Sagc "char*" == "char *" and "Class<int>" == "Class<int >", etc.
330e1d61885Sagc
331e1d61885Sagc Return 0 when the two name types are equivalent, as in
332e1d61885Sagc strncmp, but skipping ' '.
333e1d61885Sagc */
334e1d61885Sagc SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)335e1d61885Sagc SWIG_TypeNameComp(const char *f1, const char *l1,
336e1d61885Sagc const char *f2, const char *l2) {
337e1d61885Sagc for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
338e1d61885Sagc while ((*f1 == ' ') && (f1 != l1)) ++f1;
339e1d61885Sagc while ((*f2 == ' ') && (f2 != l2)) ++f2;
340e1d61885Sagc if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
341e1d61885Sagc }
342e1d61885Sagc return (l1 - f1) - (l2 - f2);
343e1d61885Sagc }
344e1d61885Sagc
345e1d61885Sagc /*
346e1d61885Sagc Check type equivalence in a name list like <name1>|<name2>|...
347e1d61885Sagc Return 0 if not equal, 1 if equal
348e1d61885Sagc */
349e1d61885Sagc SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)350e1d61885Sagc SWIG_TypeEquiv(const char *nb, const char *tb) {
351e1d61885Sagc int equiv = 0;
352e1d61885Sagc const char* te = tb + strlen(tb);
353e1d61885Sagc const char* ne = nb;
354e1d61885Sagc while (!equiv && *ne) {
355e1d61885Sagc for (nb = ne; *ne; ++ne) {
356e1d61885Sagc if (*ne == '|') break;
357e1d61885Sagc }
358e1d61885Sagc equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
359e1d61885Sagc if (*ne) ++ne;
360e1d61885Sagc }
361e1d61885Sagc return equiv;
362e1d61885Sagc }
363e1d61885Sagc
364e1d61885Sagc /*
365e1d61885Sagc Check type equivalence in a name list like <name1>|<name2>|...
366e1d61885Sagc Return 0 if equal, -1 if nb < tb, 1 if nb > tb
367e1d61885Sagc */
368e1d61885Sagc SWIGRUNTIME int
SWIG_TypeCompare(const char * nb,const char * tb)369e1d61885Sagc SWIG_TypeCompare(const char *nb, const char *tb) {
370e1d61885Sagc int equiv = 0;
371e1d61885Sagc const char* te = tb + strlen(tb);
372e1d61885Sagc const char* ne = nb;
373e1d61885Sagc while (!equiv && *ne) {
374e1d61885Sagc for (nb = ne; *ne; ++ne) {
375e1d61885Sagc if (*ne == '|') break;
376e1d61885Sagc }
377e1d61885Sagc equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
378e1d61885Sagc if (*ne) ++ne;
379e1d61885Sagc }
380e1d61885Sagc return equiv;
381e1d61885Sagc }
382e1d61885Sagc
383e1d61885Sagc
384e1d61885Sagc /* think of this as a c++ template<> or a scheme macro */
385e1d61885Sagc #define SWIG_TypeCheck_Template(comparison, ty) \
386e1d61885Sagc if (ty) { \
387e1d61885Sagc swig_cast_info *iter = ty->cast; \
388e1d61885Sagc while (iter) { \
389e1d61885Sagc if (comparison) { \
390e1d61885Sagc if (iter == ty->cast) return iter; \
391e1d61885Sagc /* Move iter to the top of the linked list */ \
392e1d61885Sagc iter->prev->next = iter->next; \
393e1d61885Sagc if (iter->next) \
394e1d61885Sagc iter->next->prev = iter->prev; \
395e1d61885Sagc iter->next = ty->cast; \
396e1d61885Sagc iter->prev = 0; \
397e1d61885Sagc if (ty->cast) ty->cast->prev = iter; \
398e1d61885Sagc ty->cast = iter; \
399e1d61885Sagc return iter; \
400e1d61885Sagc } \
401e1d61885Sagc iter = iter->next; \
402e1d61885Sagc } \
403e1d61885Sagc } \
404e1d61885Sagc return 0
405e1d61885Sagc
406e1d61885Sagc /*
407e1d61885Sagc Check the typename
408e1d61885Sagc */
409e1d61885Sagc SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)410e1d61885Sagc SWIG_TypeCheck(const char *c, swig_type_info *ty) {
411e1d61885Sagc SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
412e1d61885Sagc }
413e1d61885Sagc
414e1d61885Sagc /* Same as previous function, except strcmp is replaced with a pointer comparison */
415e1d61885Sagc SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * into)416e1d61885Sagc SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
417e1d61885Sagc SWIG_TypeCheck_Template(iter->type == from, into);
418e1d61885Sagc }
419e1d61885Sagc
420e1d61885Sagc /*
421e1d61885Sagc Cast a pointer up an inheritance hierarchy
422e1d61885Sagc */
423e1d61885Sagc SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr)424e1d61885Sagc SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
425e1d61885Sagc return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
426e1d61885Sagc }
427e1d61885Sagc
428e1d61885Sagc /*
429e1d61885Sagc Dynamic pointer casting. Down an inheritance hierarchy
430e1d61885Sagc */
431e1d61885Sagc SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)432e1d61885Sagc SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
433e1d61885Sagc swig_type_info *lastty = ty;
434e1d61885Sagc if (!ty || !ty->dcast) return ty;
435e1d61885Sagc while (ty && (ty->dcast)) {
436e1d61885Sagc ty = (*ty->dcast)(ptr);
437e1d61885Sagc if (ty) lastty = ty;
438e1d61885Sagc }
439e1d61885Sagc return lastty;
440e1d61885Sagc }
441e1d61885Sagc
442e1d61885Sagc /*
443e1d61885Sagc Return the name associated with this type
444e1d61885Sagc */
445e1d61885Sagc SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)446e1d61885Sagc SWIG_TypeName(const swig_type_info *ty) {
447e1d61885Sagc return ty->name;
448e1d61885Sagc }
449e1d61885Sagc
450e1d61885Sagc /*
451e1d61885Sagc Return the pretty name associated with this type,
452e1d61885Sagc that is an unmangled type name in a form presentable to the user.
453e1d61885Sagc */
454e1d61885Sagc SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)455e1d61885Sagc SWIG_TypePrettyName(const swig_type_info *type) {
456e1d61885Sagc /* The "str" field contains the equivalent pretty names of the
457e1d61885Sagc type, separated by vertical-bar characters. We choose
458e1d61885Sagc to print the last name, as it is often (?) the most
459e1d61885Sagc specific. */
460e1d61885Sagc if (!type) return NULL;
461e1d61885Sagc if (type->str != NULL) {
462e1d61885Sagc const char *last_name = type->str;
463e1d61885Sagc const char *s;
464e1d61885Sagc for (s = type->str; *s; s++)
465e1d61885Sagc if (*s == '|') last_name = s+1;
466e1d61885Sagc return last_name;
467e1d61885Sagc }
468e1d61885Sagc else
469e1d61885Sagc return type->name;
470e1d61885Sagc }
471e1d61885Sagc
472e1d61885Sagc /*
473e1d61885Sagc Set the clientdata field for a type
474e1d61885Sagc */
475e1d61885Sagc SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)476e1d61885Sagc SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
477e1d61885Sagc swig_cast_info *cast = ti->cast;
478e1d61885Sagc /* if (ti->clientdata == clientdata) return; */
479e1d61885Sagc ti->clientdata = clientdata;
480e1d61885Sagc
481e1d61885Sagc while (cast) {
482e1d61885Sagc if (!cast->converter) {
483e1d61885Sagc swig_type_info *tc = cast->type;
484e1d61885Sagc if (!tc->clientdata) {
485e1d61885Sagc SWIG_TypeClientData(tc, clientdata);
486e1d61885Sagc }
487e1d61885Sagc }
488e1d61885Sagc cast = cast->next;
489e1d61885Sagc }
490e1d61885Sagc }
491e1d61885Sagc SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)492e1d61885Sagc SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
493e1d61885Sagc SWIG_TypeClientData(ti, clientdata);
494e1d61885Sagc ti->owndata = 1;
495e1d61885Sagc }
496e1d61885Sagc
497e1d61885Sagc /*
498e1d61885Sagc Search for a swig_type_info structure only by mangled name
499e1d61885Sagc Search is a O(log #types)
500e1d61885Sagc
501e1d61885Sagc We start searching at module start, and finish searching when start == end.
502e1d61885Sagc Note: if start == end at the beginning of the function, we go all the way around
503e1d61885Sagc the circular list.
504e1d61885Sagc */
505e1d61885Sagc SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)506e1d61885Sagc SWIG_MangledTypeQueryModule(swig_module_info *start,
507e1d61885Sagc swig_module_info *end,
508e1d61885Sagc const char *name) {
509e1d61885Sagc swig_module_info *iter = start;
510e1d61885Sagc do {
511e1d61885Sagc if (iter->size) {
512e1d61885Sagc register size_t l = 0;
513e1d61885Sagc register size_t r = iter->size - 1;
514e1d61885Sagc do {
515e1d61885Sagc /* since l+r >= 0, we can (>> 1) instead (/ 2) */
516e1d61885Sagc register size_t i = (l + r) >> 1;
517e1d61885Sagc const char *iname = iter->types[i]->name;
518e1d61885Sagc if (iname) {
519e1d61885Sagc register int compare = strcmp(name, iname);
520e1d61885Sagc if (compare == 0) {
521e1d61885Sagc return iter->types[i];
522e1d61885Sagc } else if (compare < 0) {
523e1d61885Sagc if (i) {
524e1d61885Sagc r = i - 1;
525e1d61885Sagc } else {
526e1d61885Sagc break;
527e1d61885Sagc }
528e1d61885Sagc } else if (compare > 0) {
529e1d61885Sagc l = i + 1;
530e1d61885Sagc }
531e1d61885Sagc } else {
532e1d61885Sagc break; /* should never happen */
533e1d61885Sagc }
534e1d61885Sagc } while (l <= r);
535e1d61885Sagc }
536e1d61885Sagc iter = iter->next;
537e1d61885Sagc } while (iter != end);
538e1d61885Sagc return 0;
539e1d61885Sagc }
540e1d61885Sagc
541e1d61885Sagc /*
542e1d61885Sagc Search for a swig_type_info structure for either a mangled name or a human readable name.
543e1d61885Sagc It first searches the mangled names of the types, which is a O(log #types)
544e1d61885Sagc If a type is not found it then searches the human readable names, which is O(#types).
545e1d61885Sagc
546e1d61885Sagc We start searching at module start, and finish searching when start == end.
547e1d61885Sagc Note: if start == end at the beginning of the function, we go all the way around
548e1d61885Sagc the circular list.
549e1d61885Sagc */
550e1d61885Sagc SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)551e1d61885Sagc SWIG_TypeQueryModule(swig_module_info *start,
552e1d61885Sagc swig_module_info *end,
553e1d61885Sagc const char *name) {
554e1d61885Sagc /* STEP 1: Search the name field using binary search */
555e1d61885Sagc swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
556e1d61885Sagc if (ret) {
557e1d61885Sagc return ret;
558e1d61885Sagc } else {
559e1d61885Sagc /* STEP 2: If the type hasn't been found, do a complete search
560e1d61885Sagc of the str field (the human readable name) */
561e1d61885Sagc swig_module_info *iter = start;
562e1d61885Sagc do {
563e1d61885Sagc register size_t i = 0;
564e1d61885Sagc for (; i < iter->size; ++i) {
565e1d61885Sagc if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
566e1d61885Sagc return iter->types[i];
567e1d61885Sagc }
568e1d61885Sagc iter = iter->next;
569e1d61885Sagc } while (iter != end);
570e1d61885Sagc }
571e1d61885Sagc
572e1d61885Sagc /* neither found a match */
573e1d61885Sagc return 0;
574e1d61885Sagc }
575e1d61885Sagc
576e1d61885Sagc /*
577e1d61885Sagc Pack binary data into a string
578e1d61885Sagc */
579e1d61885Sagc SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)580e1d61885Sagc SWIG_PackData(char *c, void *ptr, size_t sz) {
581e1d61885Sagc static const char hex[17] = "0123456789abcdef";
582e1d61885Sagc register const unsigned char *u = (unsigned char *) ptr;
583e1d61885Sagc register const unsigned char *eu = u + sz;
584e1d61885Sagc for (; u != eu; ++u) {
585e1d61885Sagc register unsigned char uu = *u;
586e1d61885Sagc *(c++) = hex[(uu & 0xf0) >> 4];
587e1d61885Sagc *(c++) = hex[uu & 0xf];
588e1d61885Sagc }
589e1d61885Sagc return c;
590e1d61885Sagc }
591e1d61885Sagc
592e1d61885Sagc /*
593e1d61885Sagc Unpack binary data from a string
594e1d61885Sagc */
595e1d61885Sagc SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)596e1d61885Sagc SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
597e1d61885Sagc register unsigned char *u = (unsigned char *) ptr;
598e1d61885Sagc register const unsigned char *eu = u + sz;
599e1d61885Sagc for (; u != eu; ++u) {
600e1d61885Sagc register char d = *(c++);
601e1d61885Sagc register unsigned char uu;
602e1d61885Sagc if ((d >= '0') && (d <= '9'))
603e1d61885Sagc uu = ((d - '0') << 4);
604e1d61885Sagc else if ((d >= 'a') && (d <= 'f'))
605e1d61885Sagc uu = ((d - ('a'-10)) << 4);
606e1d61885Sagc else
607e1d61885Sagc return (char *) 0;
608e1d61885Sagc d = *(c++);
609e1d61885Sagc if ((d >= '0') && (d <= '9'))
610e1d61885Sagc uu |= (d - '0');
611e1d61885Sagc else if ((d >= 'a') && (d <= 'f'))
612e1d61885Sagc uu |= (d - ('a'-10));
613e1d61885Sagc else
614e1d61885Sagc return (char *) 0;
615e1d61885Sagc *u = uu;
616e1d61885Sagc }
617e1d61885Sagc return c;
618e1d61885Sagc }
619e1d61885Sagc
620e1d61885Sagc /*
621e1d61885Sagc Pack 'void *' into a string buffer.
622e1d61885Sagc */
623e1d61885Sagc SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)624e1d61885Sagc SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
625e1d61885Sagc char *r = buff;
626e1d61885Sagc if ((2*sizeof(void *) + 2) > bsz) return 0;
627e1d61885Sagc *(r++) = '_';
628e1d61885Sagc r = SWIG_PackData(r,&ptr,sizeof(void *));
629e1d61885Sagc if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
630e1d61885Sagc strcpy(r,name);
631e1d61885Sagc return buff;
632e1d61885Sagc }
633e1d61885Sagc
634e1d61885Sagc SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)635e1d61885Sagc SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
636e1d61885Sagc if (*c != '_') {
637e1d61885Sagc if (strcmp(c,"NULL") == 0) {
638e1d61885Sagc *ptr = (void *) 0;
639e1d61885Sagc return name;
640e1d61885Sagc } else {
641e1d61885Sagc return 0;
642e1d61885Sagc }
643e1d61885Sagc }
644e1d61885Sagc return SWIG_UnpackData(++c,ptr,sizeof(void *));
645e1d61885Sagc }
646e1d61885Sagc
647e1d61885Sagc SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)648e1d61885Sagc SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
649e1d61885Sagc char *r = buff;
650e1d61885Sagc size_t lname = (name ? strlen(name) : 0);
651e1d61885Sagc if ((2*sz + 2 + lname) > bsz) return 0;
652e1d61885Sagc *(r++) = '_';
653e1d61885Sagc r = SWIG_PackData(r,ptr,sz);
654e1d61885Sagc if (lname) {
655e1d61885Sagc strncpy(r,name,lname+1);
656e1d61885Sagc } else {
657e1d61885Sagc *r = 0;
658e1d61885Sagc }
659e1d61885Sagc return buff;
660e1d61885Sagc }
661e1d61885Sagc
662e1d61885Sagc SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)663e1d61885Sagc SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
664e1d61885Sagc if (*c != '_') {
665e1d61885Sagc if (strcmp(c,"NULL") == 0) {
666e1d61885Sagc memset(ptr,0,sz);
667e1d61885Sagc return name;
668e1d61885Sagc } else {
669e1d61885Sagc return 0;
670e1d61885Sagc }
671e1d61885Sagc }
672e1d61885Sagc return SWIG_UnpackData(++c,ptr,sz);
673e1d61885Sagc }
674e1d61885Sagc
675e1d61885Sagc #ifdef __cplusplus
676e1d61885Sagc }
677e1d61885Sagc #endif
678e1d61885Sagc
679e1d61885Sagc /* Errors in SWIG */
680e1d61885Sagc #define SWIG_UnknownError -1
681e1d61885Sagc #define SWIG_IOError -2
682e1d61885Sagc #define SWIG_RuntimeError -3
683e1d61885Sagc #define SWIG_IndexError -4
684e1d61885Sagc #define SWIG_TypeError -5
685e1d61885Sagc #define SWIG_DivisionByZero -6
686e1d61885Sagc #define SWIG_OverflowError -7
687e1d61885Sagc #define SWIG_SyntaxError -8
688e1d61885Sagc #define SWIG_ValueError -9
689e1d61885Sagc #define SWIG_SystemError -10
690e1d61885Sagc #define SWIG_AttributeError -11
691e1d61885Sagc #define SWIG_MemoryError -12
692e1d61885Sagc #define SWIG_NullReferenceError -13
693e1d61885Sagc
694e1d61885Sagc
695e1d61885Sagc
696e1d61885Sagc #ifdef __cplusplus
697e1d61885Sagc /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
698e1d61885Sagc #include <math.h>
699e1d61885Sagc #include <stdlib.h>
700e1d61885Sagc extern "C" {
701e1d61885Sagc #endif
702e1d61885Sagc #include "EXTERN.h"
703e1d61885Sagc #include "perl.h"
704e1d61885Sagc #include "XSUB.h"
705e1d61885Sagc
706e1d61885Sagc /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
707e1d61885Sagc
708e1d61885Sagc /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
709e1d61885Sagc #ifndef PERL_REVISION
710e1d61885Sagc # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
711e1d61885Sagc # define PERL_PATCHLEVEL_H_IMPLICIT
712e1d61885Sagc # include <patchlevel.h>
713e1d61885Sagc # endif
714e1d61885Sagc # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
715e1d61885Sagc # include <could_not_find_Perl_patchlevel.h>
716e1d61885Sagc # endif
717e1d61885Sagc # ifndef PERL_REVISION
718e1d61885Sagc # define PERL_REVISION (5)
719e1d61885Sagc # define PERL_VERSION PATCHLEVEL
720e1d61885Sagc # define PERL_SUBVERSION SUBVERSION
721e1d61885Sagc # endif
722e1d61885Sagc #endif
723e1d61885Sagc
724e1d61885Sagc #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
725e1d61885Sagc #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
726e1d61885Sagc #endif
727e1d61885Sagc
728e1d61885Sagc #ifndef SvIOK_UV
729e1d61885Sagc # define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
730e1d61885Sagc #endif
731e1d61885Sagc
732e1d61885Sagc #ifndef SvUOK
733e1d61885Sagc # define SvUOK(sv) SvIOK_UV(sv)
734e1d61885Sagc #endif
735e1d61885Sagc
736e1d61885Sagc #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
737e1d61885Sagc # define PL_sv_undef sv_undef
738e1d61885Sagc # define PL_na na
739e1d61885Sagc # define PL_errgv errgv
740e1d61885Sagc # define PL_sv_no sv_no
741e1d61885Sagc # define PL_sv_yes sv_yes
742e1d61885Sagc # define PL_markstack_ptr markstack_ptr
743e1d61885Sagc #endif
744e1d61885Sagc
745e1d61885Sagc #ifndef IVSIZE
746e1d61885Sagc # ifdef LONGSIZE
747e1d61885Sagc # define IVSIZE LONGSIZE
748e1d61885Sagc # else
749e1d61885Sagc # define IVSIZE 4 /* A bold guess, but the best we can make. */
750e1d61885Sagc # endif
751e1d61885Sagc #endif
752e1d61885Sagc
753e1d61885Sagc #ifndef INT2PTR
754e1d61885Sagc # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
755e1d61885Sagc # define PTRV UV
756e1d61885Sagc # define INT2PTR(any,d) (any)(d)
757e1d61885Sagc # else
758e1d61885Sagc # if PTRSIZE == LONGSIZE
759e1d61885Sagc # define PTRV unsigned long
760e1d61885Sagc # else
761e1d61885Sagc # define PTRV unsigned
762e1d61885Sagc # endif
763e1d61885Sagc # define INT2PTR(any,d) (any)(PTRV)(d)
764e1d61885Sagc # endif
765e1d61885Sagc
766e1d61885Sagc # define NUM2PTR(any,d) (any)(PTRV)(d)
767e1d61885Sagc # define PTR2IV(p) INT2PTR(IV,p)
768e1d61885Sagc # define PTR2UV(p) INT2PTR(UV,p)
769e1d61885Sagc # define PTR2NV(p) NUM2PTR(NV,p)
770e1d61885Sagc
771e1d61885Sagc # if PTRSIZE == LONGSIZE
772e1d61885Sagc # define PTR2ul(p) (unsigned long)(p)
773e1d61885Sagc # else
774e1d61885Sagc # define PTR2ul(p) INT2PTR(unsigned long,p)
775e1d61885Sagc # endif
776e1d61885Sagc #endif /* !INT2PTR */
777e1d61885Sagc
778e1d61885Sagc #ifndef get_sv
779e1d61885Sagc # define get_sv perl_get_sv
780e1d61885Sagc #endif
781e1d61885Sagc
782e1d61885Sagc #ifndef ERRSV
783e1d61885Sagc # define ERRSV get_sv("@",FALSE)
784e1d61885Sagc #endif
785e1d61885Sagc
786e1d61885Sagc #ifndef pTHX_
787e1d61885Sagc #define pTHX_
788e1d61885Sagc #endif
789e1d61885Sagc
790e1d61885Sagc #include <string.h>
791e1d61885Sagc #ifdef __cplusplus
792e1d61885Sagc }
793e1d61885Sagc #endif
794e1d61885Sagc
795e1d61885Sagc /* -----------------------------------------------------------------------------
796e1d61885Sagc * error manipulation
797e1d61885Sagc * ----------------------------------------------------------------------------- */
798e1d61885Sagc
799e1d61885Sagc SWIGINTERN const char*
SWIG_Perl_ErrorType(int code)800e1d61885Sagc SWIG_Perl_ErrorType(int code) {
801e1d61885Sagc const char* type = 0;
802e1d61885Sagc switch(code) {
803e1d61885Sagc case SWIG_MemoryError:
804e1d61885Sagc type = "MemoryError";
805e1d61885Sagc break;
806e1d61885Sagc case SWIG_IOError:
807e1d61885Sagc type = "IOError";
808e1d61885Sagc break;
809e1d61885Sagc case SWIG_RuntimeError:
810e1d61885Sagc type = "RuntimeError";
811e1d61885Sagc break;
812e1d61885Sagc case SWIG_IndexError:
813e1d61885Sagc type = "IndexError";
814e1d61885Sagc break;
815e1d61885Sagc case SWIG_TypeError:
816e1d61885Sagc type = "TypeError";
817e1d61885Sagc break;
818e1d61885Sagc case SWIG_DivisionByZero:
819e1d61885Sagc type = "ZeroDivisionError";
820e1d61885Sagc break;
821e1d61885Sagc case SWIG_OverflowError:
822e1d61885Sagc type = "OverflowError";
823e1d61885Sagc break;
824e1d61885Sagc case SWIG_SyntaxError:
825e1d61885Sagc type = "SyntaxError";
826e1d61885Sagc break;
827e1d61885Sagc case SWIG_ValueError:
828e1d61885Sagc type = "ValueError";
829e1d61885Sagc break;
830e1d61885Sagc case SWIG_SystemError:
831e1d61885Sagc type = "SystemError";
832e1d61885Sagc break;
833e1d61885Sagc case SWIG_AttributeError:
834e1d61885Sagc type = "AttributeError";
835e1d61885Sagc break;
836e1d61885Sagc default:
837e1d61885Sagc type = "RuntimeError";
838e1d61885Sagc }
839e1d61885Sagc return type;
840e1d61885Sagc }
841e1d61885Sagc
842e1d61885Sagc
843e1d61885Sagc
844e1d61885Sagc
845e1d61885Sagc /* -----------------------------------------------------------------------------
846e1d61885Sagc * perlrun.swg
847e1d61885Sagc *
848e1d61885Sagc * This file contains the runtime support for Perl modules
849e1d61885Sagc * and includes code for managing global variables and pointer
850e1d61885Sagc * type checking.
851e1d61885Sagc * ----------------------------------------------------------------------------- */
852e1d61885Sagc
853e1d61885Sagc #ifdef PERL_OBJECT
854e1d61885Sagc #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
855e1d61885Sagc #define SWIG_PERL_OBJECT_CALL pPerl,
856e1d61885Sagc #else
857e1d61885Sagc #define SWIG_PERL_OBJECT_DECL
858e1d61885Sagc #define SWIG_PERL_OBJECT_CALL
859e1d61885Sagc #endif
860e1d61885Sagc
861e1d61885Sagc /* Common SWIG API */
862e1d61885Sagc
863e1d61885Sagc /* for raw pointers */
864e1d61885Sagc #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
865e1d61885Sagc #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
866e1d61885Sagc
867e1d61885Sagc /* for raw packed data */
868e1d61885Sagc #define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
869e1d61885Sagc #define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
870e1d61885Sagc
871e1d61885Sagc /* for class or struct pointers */
872e1d61885Sagc #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
873e1d61885Sagc #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
874e1d61885Sagc
875e1d61885Sagc /* for C or C++ function pointers */
876e1d61885Sagc #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
877e1d61885Sagc #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
878e1d61885Sagc
879e1d61885Sagc /* for C++ member pointers, ie, member methods */
880e1d61885Sagc #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty)
881e1d61885Sagc #define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type)
882e1d61885Sagc
883e1d61885Sagc
884e1d61885Sagc /* Runtime API */
885e1d61885Sagc
886e1d61885Sagc #define SWIG_GetModule(clientdata) SWIG_Perl_GetModule()
887e1d61885Sagc #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer)
888e1d61885Sagc
889e1d61885Sagc
890e1d61885Sagc /* Error manipulation */
891e1d61885Sagc
892e1d61885Sagc #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code)
893e1d61885Sagc #define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg)
894e1d61885Sagc #define SWIG_fail goto fail
895e1d61885Sagc
896e1d61885Sagc /* Perl-specific SWIG API */
897e1d61885Sagc
898e1d61885Sagc #define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
899e1d61885Sagc #define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
900e1d61885Sagc #define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str)
901e1d61885Sagc
902e1d61885Sagc
903e1d61885Sagc #define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1)
904e1d61885Sagc #define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1)
905e1d61885Sagc #define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2)
906e1d61885Sagc #define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2)
907e1d61885Sagc
908e1d61885Sagc /* -----------------------------------------------------------------------------
909e1d61885Sagc * pointers/data manipulation
910e1d61885Sagc * ----------------------------------------------------------------------------- */
911e1d61885Sagc
912e1d61885Sagc /* For backward compatibility only */
913e1d61885Sagc #define SWIG_POINTER_EXCEPTION 0
914e1d61885Sagc
915e1d61885Sagc #ifdef __cplusplus
916e1d61885Sagc extern "C" {
917e1d61885Sagc #endif
918e1d61885Sagc
919e1d61885Sagc #define SWIG_OWNER SWIG_POINTER_OWN
920e1d61885Sagc #define SWIG_SHADOW SWIG_OWNER << 1
921e1d61885Sagc
922e1d61885Sagc #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
923e1d61885Sagc
924e1d61885Sagc /* SWIG Perl macros */
925e1d61885Sagc
926e1d61885Sagc /* Macro to call an XS function */
927e1d61885Sagc #ifdef PERL_OBJECT
928e1d61885Sagc # define SWIG_CALLXS(_name) _name(cv,pPerl)
929e1d61885Sagc #else
930e1d61885Sagc # ifndef MULTIPLICITY
931e1d61885Sagc # define SWIG_CALLXS(_name) _name(cv)
932e1d61885Sagc # else
933e1d61885Sagc # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
934e1d61885Sagc # endif
935e1d61885Sagc #endif
936e1d61885Sagc
937e1d61885Sagc /* Note: SwigMagicFuncHack is a typedef used to get the C++ compiler to just shut up already */
938e1d61885Sagc
939e1d61885Sagc #ifdef PERL_OBJECT
940e1d61885Sagc #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
941e1d61885Sagc typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
942e1d61885Sagc
943e1d61885Sagc #ifdef __cplusplus
944e1d61885Sagc extern "C" {
945e1d61885Sagc #endif
946e1d61885Sagc typedef int (CPerlObj::*SwigMagicFuncHack)(SV *, MAGIC *);
947e1d61885Sagc #ifdef __cplusplus
948e1d61885Sagc }
949e1d61885Sagc #endif
950e1d61885Sagc
951e1d61885Sagc #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
952e1d61885Sagc #define SWIGCLASS_STATIC
953e1d61885Sagc #else
954e1d61885Sagc #define MAGIC_PPERL
955e1d61885Sagc #define SWIGCLASS_STATIC static SWIGUNUSED
956e1d61885Sagc #ifndef MULTIPLICITY
957e1d61885Sagc #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
958e1d61885Sagc typedef int (*SwigMagicFunc)(SV *, MAGIC *);
959e1d61885Sagc
960e1d61885Sagc #ifdef __cplusplus
961e1d61885Sagc extern "C" {
962e1d61885Sagc #endif
963e1d61885Sagc typedef int (*SwigMagicFuncHack)(SV *, MAGIC *);
964e1d61885Sagc #ifdef __cplusplus
965e1d61885Sagc }
966e1d61885Sagc #endif
967e1d61885Sagc
968e1d61885Sagc
969e1d61885Sagc #else
970e1d61885Sagc #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
971e1d61885Sagc typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
972e1d61885Sagc #ifdef __cplusplus
973e1d61885Sagc extern "C" {
974e1d61885Sagc #endif
975e1d61885Sagc typedef int (*SwigMagicFuncHack)(struct interpreter *, SV *, MAGIC *);
976e1d61885Sagc #ifdef __cplusplus
977e1d61885Sagc }
978e1d61885Sagc #endif
979e1d61885Sagc
980e1d61885Sagc #endif
981e1d61885Sagc #endif
982e1d61885Sagc
983e1d61885Sagc /* Workaround for bug in perl 5.6.x croak and earlier */
984e1d61885Sagc #if (PERL_VERSION < 8)
985e1d61885Sagc # ifdef PERL_OBJECT
986e1d61885Sagc # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
SWIG_Perl_croak_null(CPerlObj * pPerl)987e1d61885Sagc static void SWIG_Perl_croak_null(CPerlObj *pPerl)
988e1d61885Sagc # else
989e1d61885Sagc static void SWIG_croak_null()
990e1d61885Sagc # endif
991e1d61885Sagc {
992e1d61885Sagc SV *err=ERRSV;
993e1d61885Sagc # if (PERL_VERSION < 6)
994e1d61885Sagc croak("%_", err);
995e1d61885Sagc # else
996e1d61885Sagc if (SvOK(err) && !SvROK(err)) croak("%_", err);
997e1d61885Sagc croak(Nullch);
998e1d61885Sagc # endif
999e1d61885Sagc }
1000e1d61885Sagc #else
1001e1d61885Sagc # define SWIG_croak_null() croak(Nullch)
1002e1d61885Sagc #endif
1003e1d61885Sagc
1004e1d61885Sagc
1005e1d61885Sagc /*
1006e1d61885Sagc Define how strict is the cast between strings and integers/doubles
1007e1d61885Sagc when overloading between these types occurs.
1008e1d61885Sagc
1009e1d61885Sagc The default is making it as strict as possible by using SWIG_AddCast
1010e1d61885Sagc when needed.
1011e1d61885Sagc
1012e1d61885Sagc You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
1013e1d61885Sagc disable the SWIG_AddCast, making the casting between string and
1014e1d61885Sagc numbers less strict.
1015e1d61885Sagc
1016e1d61885Sagc In the end, we try to solve the overloading between strings and
1017e1d61885Sagc numerical types in the more natural way, but if you can avoid it,
1018e1d61885Sagc well, avoid it using %rename, for example.
1019e1d61885Sagc */
1020e1d61885Sagc #ifndef SWIG_PERL_NO_STRICT_STR2NUM
1021e1d61885Sagc # ifndef SWIG_PERL_STRICT_STR2NUM
1022e1d61885Sagc # define SWIG_PERL_STRICT_STR2NUM
1023e1d61885Sagc # endif
1024e1d61885Sagc #endif
1025e1d61885Sagc #ifdef SWIG_PERL_STRICT_STR2NUM
1026e1d61885Sagc /* string takes precedence */
1027e1d61885Sagc #define SWIG_Str2NumCast(x) SWIG_AddCast(x)
1028e1d61885Sagc #else
1029e1d61885Sagc /* number takes precedence */
1030e1d61885Sagc #define SWIG_Str2NumCast(x) x
1031e1d61885Sagc #endif
1032e1d61885Sagc
1033e1d61885Sagc
1034e1d61885Sagc
1035e1d61885Sagc #include <stdlib.h>
1036e1d61885Sagc
1037e1d61885Sagc SWIGRUNTIME const char *
SWIG_Perl_TypeProxyName(const swig_type_info * type)1038e1d61885Sagc SWIG_Perl_TypeProxyName(const swig_type_info *type) {
1039e1d61885Sagc if (!type) return NULL;
1040e1d61885Sagc if (type->clientdata != NULL) {
1041e1d61885Sagc return (const char*) type->clientdata;
1042e1d61885Sagc }
1043e1d61885Sagc else {
1044e1d61885Sagc return type->name;
1045e1d61885Sagc }
1046e1d61885Sagc }
1047e1d61885Sagc
1048e1d61885Sagc SWIGRUNTIME swig_cast_info *
SWIG_TypeProxyCheck(const char * c,swig_type_info * ty)1049e1d61885Sagc SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
1050e1d61885Sagc SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp((char*)iter->type->name, c) == 0))
1051e1d61885Sagc || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0))), ty);
1052e1d61885Sagc }
1053e1d61885Sagc
1054e1d61885Sagc
1055e1d61885Sagc /* Function for getting a pointer value */
1056e1d61885Sagc
1057e1d61885Sagc SWIGRUNTIME int
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV * sv,void ** ptr,swig_type_info * _t,int flags)1058e1d61885Sagc SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
1059e1d61885Sagc swig_cast_info *tc;
1060e1d61885Sagc void *voidptr = (void *)0;
1061e1d61885Sagc SV *tsv = 0;
1062e1d61885Sagc /* If magical, apply more magic */
1063e1d61885Sagc if (SvGMAGICAL(sv))
1064e1d61885Sagc mg_get(sv);
1065e1d61885Sagc
1066e1d61885Sagc /* Check to see if this is an object */
1067e1d61885Sagc if (sv_isobject(sv)) {
1068e1d61885Sagc IV tmp = 0;
1069e1d61885Sagc tsv = (SV*) SvRV(sv);
1070e1d61885Sagc if ((SvTYPE(tsv) == SVt_PVHV)) {
1071e1d61885Sagc MAGIC *mg;
1072e1d61885Sagc if (SvMAGICAL(tsv)) {
1073e1d61885Sagc mg = mg_find(tsv,'P');
1074e1d61885Sagc if (mg) {
1075e1d61885Sagc sv = mg->mg_obj;
1076e1d61885Sagc if (sv_isobject(sv)) {
1077e1d61885Sagc tsv = (SV*)SvRV(sv);
1078e1d61885Sagc tmp = SvIV(tsv);
1079e1d61885Sagc }
1080e1d61885Sagc }
1081e1d61885Sagc } else {
1082e1d61885Sagc return SWIG_ERROR;
1083e1d61885Sagc }
1084e1d61885Sagc } else {
1085e1d61885Sagc tmp = SvIV(tsv);
1086e1d61885Sagc }
1087e1d61885Sagc voidptr = INT2PTR(void *,tmp);
1088e1d61885Sagc } else if (! SvOK(sv)) { /* Check for undef */
1089e1d61885Sagc *(ptr) = (void *) 0;
1090e1d61885Sagc return SWIG_OK;
1091e1d61885Sagc } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */
1092e1d61885Sagc if (!SvROK(sv)) {
1093e1d61885Sagc *(ptr) = (void *) 0;
1094e1d61885Sagc return SWIG_OK;
1095e1d61885Sagc } else {
1096e1d61885Sagc return SWIG_ERROR;
1097e1d61885Sagc }
1098e1d61885Sagc } else { /* Don't know what it is */
1099e1d61885Sagc return SWIG_ERROR;
1100e1d61885Sagc }
1101e1d61885Sagc if (_t) {
1102e1d61885Sagc /* Now see if the types match */
1103e1d61885Sagc char *_c = HvNAME(SvSTASH(SvRV(sv)));
1104e1d61885Sagc tc = SWIG_TypeProxyCheck(_c,_t);
1105e1d61885Sagc if (!tc) {
1106e1d61885Sagc return SWIG_ERROR;
1107e1d61885Sagc }
1108e1d61885Sagc *ptr = SWIG_TypeCast(tc,voidptr);
1109e1d61885Sagc } else {
1110e1d61885Sagc *ptr = voidptr;
1111e1d61885Sagc }
1112e1d61885Sagc
1113e1d61885Sagc /*
1114e1d61885Sagc * DISOWN implementation: we need a perl guru to check this one.
1115e1d61885Sagc */
1116e1d61885Sagc if (tsv && (flags & SWIG_POINTER_DISOWN)) {
1117e1d61885Sagc /*
1118e1d61885Sagc * almost copy paste code from below SWIG_POINTER_OWN setting
1119e1d61885Sagc */
1120e1d61885Sagc SV *obj = sv;
1121e1d61885Sagc HV *stash = SvSTASH(SvRV(obj));
1122e1d61885Sagc GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE);
1123e1d61885Sagc if (isGV(gv)) {
1124e1d61885Sagc HV *hv = GvHVn(gv);
1125e1d61885Sagc /*
1126e1d61885Sagc * To set ownership (see below), a newSViv(1) entry is added.
1127e1d61885Sagc * Hence, to remove ownership, we delete the entry.
1128e1d61885Sagc */
1129e1d61885Sagc if (hv_exists_ent(hv, obj, 0)) {
1130e1d61885Sagc hv_delete_ent(hv, obj, 0, 0);
1131e1d61885Sagc }
1132e1d61885Sagc }
1133e1d61885Sagc }
1134e1d61885Sagc return SWIG_OK;
1135e1d61885Sagc }
1136e1d61885Sagc
1137e1d61885Sagc SWIGRUNTIME void
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV * sv,void * ptr,swig_type_info * t,int flags)1138e1d61885Sagc SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
1139e1d61885Sagc if (ptr && (flags & SWIG_SHADOW)) {
1140e1d61885Sagc SV *self;
1141e1d61885Sagc SV *obj=newSV(0);
1142e1d61885Sagc HV *hash=newHV();
1143e1d61885Sagc HV *stash;
1144e1d61885Sagc sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr);
1145e1d61885Sagc stash=SvSTASH(SvRV(obj));
1146e1d61885Sagc if (flags & SWIG_POINTER_OWN) {
1147e1d61885Sagc HV *hv;
1148e1d61885Sagc GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1149e1d61885Sagc if (!isGV(gv))
1150e1d61885Sagc gv_init(gv, stash, "OWNER", 5, FALSE);
1151e1d61885Sagc hv=GvHVn(gv);
1152e1d61885Sagc hv_store_ent(hv, obj, newSViv(1), 0);
1153e1d61885Sagc }
1154e1d61885Sagc sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
1155e1d61885Sagc SvREFCNT_dec(obj);
1156e1d61885Sagc self=newRV_noinc((SV *)hash);
1157e1d61885Sagc sv_setsv(sv, self);
1158e1d61885Sagc SvREFCNT_dec((SV *)self);
1159e1d61885Sagc sv_bless(sv, stash);
1160e1d61885Sagc }
1161e1d61885Sagc else {
1162e1d61885Sagc sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr);
1163e1d61885Sagc }
1164e1d61885Sagc }
1165e1d61885Sagc
1166e1d61885Sagc SWIGRUNTIMEINLINE SV *
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void * ptr,swig_type_info * t,int flags)1167e1d61885Sagc SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
1168e1d61885Sagc SV *result = sv_newmortal();
1169e1d61885Sagc SWIG_MakePtr(result, ptr, t, flags);
1170e1d61885Sagc return result;
1171e1d61885Sagc }
1172e1d61885Sagc
1173e1d61885Sagc SWIGRUNTIME void
SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV * sv,void * ptr,int sz,swig_type_info * type)1174e1d61885Sagc SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
1175e1d61885Sagc char result[1024];
1176e1d61885Sagc char *r = result;
1177e1d61885Sagc if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
1178e1d61885Sagc *(r++) = '_';
1179e1d61885Sagc r = SWIG_PackData(r,ptr,sz);
1180e1d61885Sagc strcpy(r,SWIG_Perl_TypeProxyName(type));
1181e1d61885Sagc sv_setpv(sv, result);
1182e1d61885Sagc }
1183e1d61885Sagc
1184e1d61885Sagc SWIGRUNTIME SV *
SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void * ptr,int sz,swig_type_info * type)1185e1d61885Sagc SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
1186e1d61885Sagc SV *result = sv_newmortal();
1187e1d61885Sagc SWIG_Perl_MakePackedObj(result, ptr, sz, type);
1188e1d61885Sagc return result;
1189e1d61885Sagc }
1190e1d61885Sagc
1191e1d61885Sagc /* Convert a packed value value */
1192e1d61885Sagc SWIGRUNTIME int
SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV * obj,void * ptr,int sz,swig_type_info * ty)1193e1d61885Sagc SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
1194e1d61885Sagc swig_cast_info *tc;
1195e1d61885Sagc const char *c = 0;
1196e1d61885Sagc
1197e1d61885Sagc if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
1198e1d61885Sagc c = SvPV(obj, PL_na);
1199e1d61885Sagc /* Pointer values must start with leading underscore */
1200e1d61885Sagc if (*c != '_') return SWIG_ERROR;
1201e1d61885Sagc c++;
1202e1d61885Sagc c = SWIG_UnpackData(c,ptr,sz);
1203e1d61885Sagc if (ty) {
1204e1d61885Sagc tc = SWIG_TypeCheck(c,ty);
1205e1d61885Sagc if (!tc) return SWIG_ERROR;
1206e1d61885Sagc }
1207e1d61885Sagc return SWIG_OK;
1208e1d61885Sagc }
1209e1d61885Sagc
1210e1d61885Sagc
1211e1d61885Sagc /* Macros for low-level exception handling */
1212e1d61885Sagc #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
1213e1d61885Sagc
1214e1d61885Sagc
1215e1d61885Sagc typedef XS(SwigPerlWrapper);
1216e1d61885Sagc typedef SwigPerlWrapper *SwigPerlWrapperPtr;
1217e1d61885Sagc
1218e1d61885Sagc /* Structure for command table */
1219e1d61885Sagc typedef struct {
1220e1d61885Sagc const char *name;
1221e1d61885Sagc SwigPerlWrapperPtr wrapper;
1222e1d61885Sagc } swig_command_info;
1223e1d61885Sagc
1224e1d61885Sagc /* Information for constant table */
1225e1d61885Sagc
1226e1d61885Sagc #define SWIG_INT 1
1227e1d61885Sagc #define SWIG_FLOAT 2
1228e1d61885Sagc #define SWIG_STRING 3
1229e1d61885Sagc #define SWIG_POINTER 4
1230e1d61885Sagc #define SWIG_BINARY 5
1231e1d61885Sagc
1232e1d61885Sagc /* Constant information structure */
1233e1d61885Sagc typedef struct swig_constant_info {
1234e1d61885Sagc int type;
1235e1d61885Sagc const char *name;
1236e1d61885Sagc long lvalue;
1237e1d61885Sagc double dvalue;
1238e1d61885Sagc void *pvalue;
1239e1d61885Sagc swig_type_info **ptype;
1240e1d61885Sagc } swig_constant_info;
1241e1d61885Sagc
1242e1d61885Sagc
1243e1d61885Sagc /* Structure for variable table */
1244e1d61885Sagc typedef struct {
1245e1d61885Sagc const char *name;
1246e1d61885Sagc SwigMagicFunc set;
1247e1d61885Sagc SwigMagicFunc get;
1248e1d61885Sagc swig_type_info **type;
1249e1d61885Sagc } swig_variable_info;
1250e1d61885Sagc
1251e1d61885Sagc /* Magic variable code */
1252e1d61885Sagc #ifndef PERL_OBJECT
1253e1d61885Sagc #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
1254e1d61885Sagc #ifndef MULTIPLICITY
_swig_create_magic(SV * sv,char * name,int (* set)(SV *,MAGIC *),int (* get)(SV *,MAGIC *))1255e1d61885Sagc SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *))
1256e1d61885Sagc #else
1257e1d61885Sagc SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *))
1258e1d61885Sagc #endif
1259e1d61885Sagc #else
1260e1d61885Sagc # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
1261e1d61885Sagc SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *))
1262e1d61885Sagc #endif
1263e1d61885Sagc {
1264e1d61885Sagc MAGIC *mg;
1265e1d61885Sagc sv_magic(sv,sv,'U',(char *) name,strlen(name));
1266e1d61885Sagc mg = mg_find(sv,'U');
1267e1d61885Sagc mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
1268e1d61885Sagc mg->mg_virtual->svt_get = (SwigMagicFuncHack) get;
1269e1d61885Sagc mg->mg_virtual->svt_set = (SwigMagicFuncHack) set;
1270e1d61885Sagc mg->mg_virtual->svt_len = 0;
1271e1d61885Sagc mg->mg_virtual->svt_clear = 0;
1272e1d61885Sagc mg->mg_virtual->svt_free = 0;
1273e1d61885Sagc }
1274e1d61885Sagc
1275e1d61885Sagc
1276e1d61885Sagc SWIGRUNTIME swig_module_info *
SWIG_Perl_GetModule(void)1277e1d61885Sagc SWIG_Perl_GetModule(void) {
1278e1d61885Sagc static void *type_pointer = (void *)0;
1279e1d61885Sagc SV *pointer;
1280e1d61885Sagc
1281e1d61885Sagc /* first check if pointer already created */
1282e1d61885Sagc if (!type_pointer) {
1283e1d61885Sagc pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE);
1284e1d61885Sagc if (pointer && SvOK(pointer)) {
1285e1d61885Sagc type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
1286e1d61885Sagc }
1287e1d61885Sagc }
1288e1d61885Sagc
1289e1d61885Sagc return (swig_module_info *) type_pointer;
1290e1d61885Sagc }
1291e1d61885Sagc
1292e1d61885Sagc SWIGRUNTIME void
SWIG_Perl_SetModule(swig_module_info * module)1293e1d61885Sagc SWIG_Perl_SetModule(swig_module_info *module) {
1294e1d61885Sagc SV *pointer;
1295e1d61885Sagc
1296e1d61885Sagc /* create a new pointer */
1297e1d61885Sagc pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE);
1298e1d61885Sagc sv_setiv(pointer, PTR2IV(module));
1299e1d61885Sagc }
1300e1d61885Sagc
1301e1d61885Sagc #ifdef __cplusplus
1302e1d61885Sagc }
1303e1d61885Sagc #endif
1304e1d61885Sagc
1305e1d61885Sagc /* Workaround perl5 global namespace pollution. Note that undefining library
1306e1d61885Sagc * functions like fopen will not solve the problem on all platforms as fopen
1307e1d61885Sagc * might be a macro on Windows but not necessarily on other operating systems. */
1308e1d61885Sagc #ifdef do_open
1309e1d61885Sagc #undef do_open
1310e1d61885Sagc #endif
1311e1d61885Sagc #ifdef do_close
1312e1d61885Sagc #undef do_close
1313e1d61885Sagc #endif
1314e1d61885Sagc #ifdef scalar
1315e1d61885Sagc #undef scalar
1316e1d61885Sagc #endif
1317e1d61885Sagc #ifdef list
1318e1d61885Sagc #undef list
1319e1d61885Sagc #endif
1320e1d61885Sagc #ifdef apply
1321e1d61885Sagc #undef apply
1322e1d61885Sagc #endif
1323e1d61885Sagc #ifdef convert
1324e1d61885Sagc #undef convert
1325e1d61885Sagc #endif
1326e1d61885Sagc #ifdef Error
1327e1d61885Sagc #undef Error
1328e1d61885Sagc #endif
1329e1d61885Sagc #ifdef form
1330e1d61885Sagc #undef form
1331e1d61885Sagc #endif
1332e1d61885Sagc #ifdef vform
1333e1d61885Sagc #undef vform
1334e1d61885Sagc #endif
1335e1d61885Sagc #ifdef LABEL
1336e1d61885Sagc #undef LABEL
1337e1d61885Sagc #endif
1338e1d61885Sagc #ifdef METHOD
1339e1d61885Sagc #undef METHOD
1340e1d61885Sagc #endif
1341e1d61885Sagc #ifdef Move
1342e1d61885Sagc #undef Move
1343e1d61885Sagc #endif
1344e1d61885Sagc #ifdef yylex
1345e1d61885Sagc #undef yylex
1346e1d61885Sagc #endif
1347e1d61885Sagc #ifdef yyparse
1348e1d61885Sagc #undef yyparse
1349e1d61885Sagc #endif
1350e1d61885Sagc #ifdef yyerror
1351e1d61885Sagc #undef yyerror
1352e1d61885Sagc #endif
1353e1d61885Sagc #ifdef invert
1354e1d61885Sagc #undef invert
1355e1d61885Sagc #endif
1356e1d61885Sagc #ifdef ref
1357e1d61885Sagc #undef ref
1358e1d61885Sagc #endif
1359e1d61885Sagc #ifdef read
1360e1d61885Sagc #undef read
1361e1d61885Sagc #endif
1362e1d61885Sagc #ifdef write
1363e1d61885Sagc #undef write
1364e1d61885Sagc #endif
1365e1d61885Sagc #ifdef eof
1366e1d61885Sagc #undef eof
1367e1d61885Sagc #endif
1368e1d61885Sagc #ifdef bool
1369e1d61885Sagc #undef bool
1370e1d61885Sagc #endif
1371e1d61885Sagc #ifdef close
1372e1d61885Sagc #undef close
1373e1d61885Sagc #endif
1374e1d61885Sagc #ifdef rewind
1375e1d61885Sagc #undef rewind
1376e1d61885Sagc #endif
1377e1d61885Sagc #ifdef free
1378e1d61885Sagc #undef free
1379e1d61885Sagc #endif
1380e1d61885Sagc #ifdef malloc
1381e1d61885Sagc #undef malloc
1382e1d61885Sagc #endif
1383e1d61885Sagc #ifdef calloc
1384e1d61885Sagc #undef calloc
1385e1d61885Sagc #endif
1386e1d61885Sagc #ifdef Stat
1387e1d61885Sagc #undef Stat
1388e1d61885Sagc #endif
1389e1d61885Sagc #ifdef check
1390e1d61885Sagc #undef check
1391e1d61885Sagc #endif
1392e1d61885Sagc #ifdef seekdir
1393e1d61885Sagc #undef seekdir
1394e1d61885Sagc #endif
1395e1d61885Sagc #ifdef open
1396e1d61885Sagc #undef open
1397e1d61885Sagc #endif
1398e1d61885Sagc
1399e1d61885Sagc
1400e1d61885Sagc
1401e1d61885Sagc #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1402e1d61885Sagc
1403e1d61885Sagc #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1404e1d61885Sagc
1405e1d61885Sagc
1406e1d61885Sagc
1407e1d61885Sagc /* -------- TYPES TABLE (BEGIN) -------- */
1408e1d61885Sagc
1409e1d61885Sagc #define SWIGTYPE_p_char swig_types[0]
1410e1d61885Sagc #define SWIGTYPE_p_netpgp_t swig_types[1]
1411e1d61885Sagc #define SWIGTYPE_p_p_char swig_types[2]
1412e1d61885Sagc #define SWIGTYPE_p_void swig_types[3]
1413e1d61885Sagc static swig_type_info *swig_types[5];
1414e1d61885Sagc static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
1415e1d61885Sagc #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1416e1d61885Sagc #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1417e1d61885Sagc
1418e1d61885Sagc /* -------- TYPES TABLE (END) -------- */
1419e1d61885Sagc
1420e1d61885Sagc #define SWIG_init boot_netpgpperl
1421e1d61885Sagc
1422e1d61885Sagc #define SWIG_name "netpgpperlc::boot_netpgpperl"
1423e1d61885Sagc #define SWIG_prefix "netpgpperlc::"
1424e1d61885Sagc
1425e1d61885Sagc #define SWIGVERSION 0x010331
1426e1d61885Sagc #define SWIG_VERSION SWIGVERSION
1427e1d61885Sagc
1428e1d61885Sagc
1429e1d61885Sagc #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1430e1d61885Sagc #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1431e1d61885Sagc
1432e1d61885Sagc
1433e1d61885Sagc #ifdef __cplusplus
1434e1d61885Sagc extern "C"
1435e1d61885Sagc #endif
1436e1d61885Sagc #ifndef PERL_OBJECT
1437e1d61885Sagc #ifndef MULTIPLICITY
1438e1d61885Sagc SWIGEXPORT void SWIG_init (CV* cv);
1439e1d61885Sagc #else
1440e1d61885Sagc SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
1441e1d61885Sagc #endif
1442e1d61885Sagc #else
1443e1d61885Sagc SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
1444e1d61885Sagc #endif
1445e1d61885Sagc
1446e1d61885Sagc
1447e1d61885Sagc #include <netpgp.h>
1448e5e6e153Sagc #undef SvPOK
1449e5e6e153Sagc #define SvPOK(x) 1
1450e1d61885Sagc
1451e1d61885Sagc
1452e1d61885Sagc #include <limits.h>
1453e1d61885Sagc #ifndef LLONG_MIN
1454e1d61885Sagc # define LLONG_MIN LONG_LONG_MIN
1455e1d61885Sagc #endif
1456e1d61885Sagc #ifndef LLONG_MAX
1457e1d61885Sagc # define LLONG_MAX LONG_LONG_MAX
1458e1d61885Sagc #endif
1459e1d61885Sagc #ifndef ULLONG_MAX
1460e1d61885Sagc # define ULLONG_MAX ULONG_LONG_MAX
1461e1d61885Sagc #endif
1462e1d61885Sagc
1463e1d61885Sagc
1464e1d61885Sagc SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,double * val)1465e1d61885Sagc SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
1466e1d61885Sagc {
1467e1d61885Sagc if (SvNIOK(obj)) {
1468e1d61885Sagc if (val) *val = SvNV(obj);
1469e1d61885Sagc return SWIG_OK;
1470e1d61885Sagc } else if (SvIOK(obj)) {
1471e1d61885Sagc if (val) *val = (double) SvIV(obj);
1472e1d61885Sagc return SWIG_AddCast(SWIG_OK);
1473e1d61885Sagc } else {
1474e1d61885Sagc const char *nptr = SvPV(obj, PL_na);
1475e1d61885Sagc if (nptr) {
1476e1d61885Sagc char *endptr;
1477e1d61885Sagc double v = strtod(nptr, &endptr);
1478e1d61885Sagc if (errno == ERANGE) {
1479e1d61885Sagc errno = 0;
1480e1d61885Sagc return SWIG_OverflowError;
1481e1d61885Sagc } else {
1482e1d61885Sagc if (*endptr == '\0') {
1483e1d61885Sagc if (val) *val = v;
1484e1d61885Sagc return SWIG_Str2NumCast(SWIG_OK);
1485e1d61885Sagc }
1486e1d61885Sagc }
1487e1d61885Sagc }
1488e1d61885Sagc }
1489e1d61885Sagc return SWIG_TypeError;
1490e1d61885Sagc }
1491e1d61885Sagc
1492e1d61885Sagc
1493e1d61885Sagc #include <float.h>
1494e1d61885Sagc
1495e1d61885Sagc
1496e1d61885Sagc #include <math.h>
1497e1d61885Sagc
1498e1d61885Sagc
1499e1d61885Sagc SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)1500e1d61885Sagc SWIG_CanCastAsInteger(double *d, double min, double max) {
1501e1d61885Sagc double x = *d;
1502e1d61885Sagc if ((min <= x && x <= max)) {
1503e1d61885Sagc double fx = floor(x);
1504e1d61885Sagc double cx = ceil(x);
1505e1d61885Sagc double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
1506e1d61885Sagc if ((errno == EDOM) || (errno == ERANGE)) {
1507e1d61885Sagc errno = 0;
1508e1d61885Sagc } else {
1509e1d61885Sagc double summ, reps, diff;
1510e1d61885Sagc if (rd < x) {
1511e1d61885Sagc diff = x - rd;
1512e1d61885Sagc } else if (rd > x) {
1513e1d61885Sagc diff = rd - x;
1514e1d61885Sagc } else {
1515e1d61885Sagc return 1;
1516e1d61885Sagc }
1517e1d61885Sagc summ = rd + x;
1518e1d61885Sagc reps = diff/summ;
1519e1d61885Sagc if (reps < 8*DBL_EPSILON) {
1520e1d61885Sagc *d = rd;
1521e1d61885Sagc return 1;
1522e1d61885Sagc }
1523e1d61885Sagc }
1524e1d61885Sagc }
1525e1d61885Sagc return 0;
1526e1d61885Sagc }
1527e1d61885Sagc
1528e1d61885Sagc
1529e1d61885Sagc SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,unsigned long * val)1530e1d61885Sagc SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val)
1531e1d61885Sagc {
1532e1d61885Sagc if (SvUOK(obj)) {
1533e1d61885Sagc if (val) *val = SvUV(obj);
1534e1d61885Sagc return SWIG_OK;
1535e1d61885Sagc } else if (SvIOK(obj)) {
1536e1d61885Sagc long v = SvIV(obj);
1537e1d61885Sagc if (v >= 0) {
1538e1d61885Sagc if (val) *val = v;
1539e1d61885Sagc return SWIG_OK;
1540e1d61885Sagc } else {
1541e1d61885Sagc return SWIG_OverflowError;
1542e1d61885Sagc }
1543e1d61885Sagc } else {
1544e1d61885Sagc int dispatch = 0;
1545e1d61885Sagc const char *nptr = SvPV(obj, PL_na);
1546e1d61885Sagc if (nptr) {
1547e1d61885Sagc char *endptr;
1548e1d61885Sagc unsigned long v = strtoul(nptr, &endptr,0);
1549e1d61885Sagc if (errno == ERANGE) {
1550e1d61885Sagc errno = 0;
1551e1d61885Sagc return SWIG_OverflowError;
1552e1d61885Sagc } else {
1553e1d61885Sagc if (*endptr == '\0') {
1554e1d61885Sagc if (val) *val = v;
1555e1d61885Sagc return SWIG_Str2NumCast(SWIG_OK);
1556e1d61885Sagc }
1557e1d61885Sagc }
1558e1d61885Sagc }
1559e1d61885Sagc if (!dispatch) {
1560e1d61885Sagc double d;
1561e1d61885Sagc int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
1562e1d61885Sagc if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
1563e1d61885Sagc if (val) *val = (unsigned long)(d);
1564e1d61885Sagc return res;
1565e1d61885Sagc }
1566e1d61885Sagc }
1567e1d61885Sagc }
1568e1d61885Sagc return SWIG_TypeError;
1569e1d61885Sagc }
1570e1d61885Sagc
1571e1d61885Sagc
1572e1d61885Sagc SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,unsigned int * val)1573e1d61885Sagc SWIG_AsVal_unsigned_SS_int SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned int *val)
1574e1d61885Sagc {
1575e1d61885Sagc unsigned long v;
1576e1d61885Sagc int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, &v);
1577e1d61885Sagc if (SWIG_IsOK(res)) {
1578e1d61885Sagc if ((v > UINT_MAX)) {
1579e1d61885Sagc return SWIG_OverflowError;
1580e1d61885Sagc } else {
1581e1d61885Sagc if (val) *val = (unsigned int)(v);
1582e1d61885Sagc }
1583e1d61885Sagc }
1584e1d61885Sagc return res;
1585e1d61885Sagc }
1586e1d61885Sagc
1587e1d61885Sagc
1588e1d61885Sagc SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(unsigned long value)1589e1d61885Sagc SWIG_From_unsigned_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long value)
1590e1d61885Sagc {
1591e1d61885Sagc SV *obj = sv_newmortal();
1592e1d61885Sagc sv_setuv(obj, (UV) value);
1593e1d61885Sagc return obj;
1594e1d61885Sagc }
1595e1d61885Sagc
1596e1d61885Sagc
1597e1d61885Sagc SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(unsigned int value)1598e1d61885Sagc SWIG_From_unsigned_SS_int SWIG_PERL_DECL_ARGS_1(unsigned int value)
1599e1d61885Sagc {
1600e1d61885Sagc return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1(value);
1601e1d61885Sagc }
1602e1d61885Sagc
1603e1d61885Sagc
1604e1d61885Sagc SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(long value)1605e1d61885Sagc SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value)
1606e1d61885Sagc {
1607e1d61885Sagc SV *obj = sv_newmortal();
1608e1d61885Sagc sv_setiv(obj, (IV) value);
1609e1d61885Sagc return obj;
1610e1d61885Sagc }
1611e1d61885Sagc
1612e1d61885Sagc
1613e1d61885Sagc SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(int value)1614e1d61885Sagc SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value)
1615e1d61885Sagc {
1616e1d61885Sagc return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value);
1617e1d61885Sagc }
1618e1d61885Sagc
1619e1d61885Sagc
1620e1d61885Sagc SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)1621e1d61885Sagc SWIG_pchar_descriptor(void)
1622e1d61885Sagc {
1623e1d61885Sagc static int init = 0;
1624e1d61885Sagc static swig_type_info* info = 0;
1625e1d61885Sagc if (!init) {
1626e1d61885Sagc info = SWIG_TypeQuery("_p_char");
1627e1d61885Sagc init = 1;
1628e1d61885Sagc }
1629e1d61885Sagc return info;
1630e1d61885Sagc }
1631e1d61885Sagc
1632e1d61885Sagc
1633e1d61885Sagc SWIGINTERN int
SWIG_AsCharPtrAndSize(SV * obj,char ** cptr,size_t * psize,int * alloc)1634e1d61885Sagc SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
1635e1d61885Sagc {
1636e1d61885Sagc if (SvPOK(obj)) {
1637e1d61885Sagc STRLEN len = 0;
1638e1d61885Sagc char *cstr = SvPV(obj, len);
1639e1d61885Sagc size_t size = len + 1;
1640e1d61885Sagc if (cptr) {
1641e1d61885Sagc if (alloc) {
1642e1d61885Sagc if (*alloc == SWIG_NEWOBJ) {
1643e1d61885Sagc *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
1644e1d61885Sagc } else {
1645e1d61885Sagc *cptr = cstr;
1646e1d61885Sagc *alloc = SWIG_OLDOBJ;
1647e1d61885Sagc }
1648e1d61885Sagc }
1649e1d61885Sagc }
1650e1d61885Sagc if (psize) *psize = size;
1651e1d61885Sagc return SWIG_OK;
1652e1d61885Sagc } else {
1653e1d61885Sagc swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1654e1d61885Sagc if (pchar_descriptor) {
1655e1d61885Sagc char* vptr = 0;
1656e1d61885Sagc if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
1657e1d61885Sagc if (cptr) *cptr = vptr;
1658e1d61885Sagc if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
1659e1d61885Sagc if (alloc) *alloc = SWIG_OLDOBJ;
1660e1d61885Sagc return SWIG_OK;
1661e1d61885Sagc }
1662e1d61885Sagc }
1663e1d61885Sagc }
1664e1d61885Sagc return SWIG_TypeError;
1665e1d61885Sagc }
1666e1d61885Sagc
1667e1d61885Sagc
1668e1d61885Sagc
1669e1d61885Sagc
1670e1d61885Sagc
1671e1d61885Sagc SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)1672e1d61885Sagc SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1673e1d61885Sagc {
1674e1d61885Sagc SV *obj = sv_newmortal();
1675e1d61885Sagc if (carray) {
1676e1d61885Sagc if (size && (carray[size - 1] == 0)) {
1677e1d61885Sagc sv_setpv(obj, carray);
1678e1d61885Sagc } else {
1679e1d61885Sagc char *tmp = (char *)malloc((size + 1)*sizeof(char));
1680e1d61885Sagc memcpy(tmp, carray, size);
1681e1d61885Sagc tmp[size] = 0;
1682e1d61885Sagc sv_setpv(obj, tmp);
1683e1d61885Sagc free((char*)tmp);
1684e1d61885Sagc }
1685e1d61885Sagc } else {
1686e1d61885Sagc sv_setsv(obj, &PL_sv_undef);
1687e1d61885Sagc }
1688e1d61885Sagc return obj;
1689e1d61885Sagc }
1690e1d61885Sagc
1691e1d61885Sagc
1692e1d61885Sagc SWIGINTERNINLINE SV *
SWIG_FromCharPtr(const char * cptr)1693e1d61885Sagc SWIG_FromCharPtr(const char *cptr)
1694e1d61885Sagc {
1695e1d61885Sagc return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1696e1d61885Sagc }
1697e1d61885Sagc
1698e1d61885Sagc
1699e1d61885Sagc SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,long * val)1700e1d61885Sagc SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
1701e1d61885Sagc {
1702e1d61885Sagc if (SvIOK(obj)) {
1703e1d61885Sagc if (val) *val = SvIV(obj);
1704e1d61885Sagc return SWIG_OK;
1705e1d61885Sagc } else {
1706e1d61885Sagc int dispatch = 0;
1707e1d61885Sagc const char *nptr = SvPV(obj, PL_na);
1708e1d61885Sagc if (nptr) {
1709e1d61885Sagc char *endptr;
1710e1d61885Sagc long v = strtol(nptr, &endptr,0);
1711e1d61885Sagc if (errno == ERANGE) {
1712e1d61885Sagc errno = 0;
1713e1d61885Sagc return SWIG_OverflowError;
1714e1d61885Sagc } else {
1715e1d61885Sagc if (*endptr == '\0') {
1716e1d61885Sagc if (val) *val = v;
1717e1d61885Sagc return SWIG_Str2NumCast(SWIG_OK);
1718e1d61885Sagc }
1719e1d61885Sagc }
1720e1d61885Sagc }
1721e1d61885Sagc if (!dispatch) {
1722e1d61885Sagc double d;
1723e1d61885Sagc int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
1724e1d61885Sagc if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
1725e1d61885Sagc if (val) *val = (long)(d);
1726e1d61885Sagc return res;
1727e1d61885Sagc }
1728e1d61885Sagc }
1729e1d61885Sagc }
1730e1d61885Sagc return SWIG_TypeError;
1731e1d61885Sagc }
1732e1d61885Sagc
1733e1d61885Sagc
1734e1d61885Sagc SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,int * val)1735e1d61885Sagc SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
1736e1d61885Sagc {
1737e1d61885Sagc long v;
1738e1d61885Sagc int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
1739e1d61885Sagc if (SWIG_IsOK(res)) {
1740e1d61885Sagc if ((v < INT_MIN || v > INT_MAX)) {
1741e1d61885Sagc return SWIG_OverflowError;
1742e1d61885Sagc } else {
1743e1d61885Sagc if (val) *val = (int)(v);
1744e1d61885Sagc }
1745e1d61885Sagc }
1746e1d61885Sagc return res;
1747e1d61885Sagc }
1748e1d61885Sagc
1749e1d61885Sagc
1750e1d61885Sagc SWIGINTERNINLINE int
SWIG_PERL_DECL_ARGS_2(SV * obj,size_t * val)1751e1d61885Sagc SWIG_AsVal_size_t SWIG_PERL_DECL_ARGS_2(SV * obj, size_t *val)
1752e1d61885Sagc {
1753e1d61885Sagc unsigned long v;
1754e1d61885Sagc int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
1755e1d61885Sagc if (SWIG_IsOK(res) && val) *val = (size_t)(v);
1756e1d61885Sagc return res;
1757e1d61885Sagc }
1758e1d61885Sagc
1759e1d61885Sagc #ifdef PERL_OBJECT
1760e1d61885Sagc #define MAGIC_CLASS _wrap_netpgpperl_var::
1761e1d61885Sagc class _wrap_netpgpperl_var : public CPerlObj {
1762e1d61885Sagc public:
1763e1d61885Sagc #else
1764e1d61885Sagc #define MAGIC_CLASS
1765e1d61885Sagc #endif
swig_magic_readonly(pTHX_ SV * SWIGUNUSEDPARM (sv),MAGIC * SWIGUNUSEDPARM (mg))1766e1d61885Sagc SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
1767e1d61885Sagc MAGIC_PPERL
1768e1d61885Sagc croak("Value is read-only.");
1769e1d61885Sagc return 0;
1770e1d61885Sagc }
1771e1d61885Sagc
1772e1d61885Sagc
1773e1d61885Sagc #ifdef PERL_OBJECT
1774e1d61885Sagc };
1775e1d61885Sagc #endif
1776e1d61885Sagc
1777e1d61885Sagc #ifdef __cplusplus
1778e1d61885Sagc extern "C" {
1779e1d61885Sagc #endif
XS(_wrap_netpgp_t_c_set)1780e1d61885Sagc XS(_wrap_netpgp_t_c_set) {
1781e1d61885Sagc {
1782e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
1783e1d61885Sagc unsigned int arg2 ;
1784e1d61885Sagc void *argp1 = 0 ;
1785e1d61885Sagc int res1 = 0 ;
1786e1d61885Sagc unsigned int val2 ;
1787e1d61885Sagc int ecode2 = 0 ;
1788e1d61885Sagc int argvi = 0;
1789e1d61885Sagc dXSARGS;
1790e1d61885Sagc
1791e1d61885Sagc if ((items < 2) || (items > 2)) {
1792e1d61885Sagc SWIG_croak("Usage: netpgp_t_c_set(self,c);");
1793e1d61885Sagc }
1794e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
1795e1d61885Sagc if (!SWIG_IsOK(res1)) {
1796e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_c_set" "', argument " "1"" of type '" "netpgp_t *""'");
1797e1d61885Sagc }
1798e1d61885Sagc arg1 = (netpgp_t *)(argp1);
1799e1d61885Sagc ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
1800e1d61885Sagc if (!SWIG_IsOK(ecode2)) {
1801e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "netpgp_t_c_set" "', argument " "2"" of type '" "unsigned int""'");
1802e1d61885Sagc }
1803e1d61885Sagc arg2 = (unsigned int)(val2);
1804e1d61885Sagc if (arg1) (arg1)->c = arg2;
1805e1d61885Sagc
1806e1d61885Sagc
1807e1d61885Sagc
1808e1d61885Sagc
1809e1d61885Sagc XSRETURN(argvi);
1810e1d61885Sagc fail:
1811e1d61885Sagc
1812e1d61885Sagc
1813e1d61885Sagc SWIG_croak_null();
1814e1d61885Sagc }
1815e1d61885Sagc }
1816e1d61885Sagc
1817e1d61885Sagc
XS(_wrap_netpgp_t_c_get)1818e1d61885Sagc XS(_wrap_netpgp_t_c_get) {
1819e1d61885Sagc {
1820e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
1821e1d61885Sagc unsigned int result;
1822e1d61885Sagc void *argp1 = 0 ;
1823e1d61885Sagc int res1 = 0 ;
1824e1d61885Sagc int argvi = 0;
1825e1d61885Sagc dXSARGS;
1826e1d61885Sagc
1827e1d61885Sagc if ((items < 1) || (items > 1)) {
1828e1d61885Sagc SWIG_croak("Usage: netpgp_t_c_get(self);");
1829e1d61885Sagc }
1830e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
1831e1d61885Sagc if (!SWIG_IsOK(res1)) {
1832e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_c_get" "', argument " "1"" of type '" "netpgp_t *""'");
1833e1d61885Sagc }
1834e1d61885Sagc arg1 = (netpgp_t *)(argp1);
1835e1d61885Sagc result = (unsigned int) ((arg1)->c);
1836e1d61885Sagc ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ;
1837e1d61885Sagc
1838e1d61885Sagc XSRETURN(argvi);
1839e1d61885Sagc fail:
1840e1d61885Sagc
1841e1d61885Sagc SWIG_croak_null();
1842e1d61885Sagc }
1843e1d61885Sagc }
1844e1d61885Sagc
1845e1d61885Sagc
XS(_wrap_netpgp_t_size_set)1846e1d61885Sagc XS(_wrap_netpgp_t_size_set) {
1847e1d61885Sagc {
1848e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
1849e1d61885Sagc unsigned int arg2 ;
1850e1d61885Sagc void *argp1 = 0 ;
1851e1d61885Sagc int res1 = 0 ;
1852e1d61885Sagc unsigned int val2 ;
1853e1d61885Sagc int ecode2 = 0 ;
1854e1d61885Sagc int argvi = 0;
1855e1d61885Sagc dXSARGS;
1856e1d61885Sagc
1857e1d61885Sagc if ((items < 2) || (items > 2)) {
1858e1d61885Sagc SWIG_croak("Usage: netpgp_t_size_set(self,size);");
1859e1d61885Sagc }
1860e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
1861e1d61885Sagc if (!SWIG_IsOK(res1)) {
1862e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_size_set" "', argument " "1"" of type '" "netpgp_t *""'");
1863e1d61885Sagc }
1864e1d61885Sagc arg1 = (netpgp_t *)(argp1);
1865e1d61885Sagc ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
1866e1d61885Sagc if (!SWIG_IsOK(ecode2)) {
1867e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "netpgp_t_size_set" "', argument " "2"" of type '" "unsigned int""'");
1868e1d61885Sagc }
1869e1d61885Sagc arg2 = (unsigned int)(val2);
1870e1d61885Sagc if (arg1) (arg1)->size = arg2;
1871e1d61885Sagc
1872e1d61885Sagc
1873e1d61885Sagc
1874e1d61885Sagc
1875e1d61885Sagc XSRETURN(argvi);
1876e1d61885Sagc fail:
1877e1d61885Sagc
1878e1d61885Sagc
1879e1d61885Sagc SWIG_croak_null();
1880e1d61885Sagc }
1881e1d61885Sagc }
1882e1d61885Sagc
1883e1d61885Sagc
XS(_wrap_netpgp_t_size_get)1884e1d61885Sagc XS(_wrap_netpgp_t_size_get) {
1885e1d61885Sagc {
1886e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
1887e1d61885Sagc unsigned int result;
1888e1d61885Sagc void *argp1 = 0 ;
1889e1d61885Sagc int res1 = 0 ;
1890e1d61885Sagc int argvi = 0;
1891e1d61885Sagc dXSARGS;
1892e1d61885Sagc
1893e1d61885Sagc if ((items < 1) || (items > 1)) {
1894e1d61885Sagc SWIG_croak("Usage: netpgp_t_size_get(self);");
1895e1d61885Sagc }
1896e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
1897e1d61885Sagc if (!SWIG_IsOK(res1)) {
1898e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_size_get" "', argument " "1"" of type '" "netpgp_t *""'");
1899e1d61885Sagc }
1900e1d61885Sagc arg1 = (netpgp_t *)(argp1);
1901e1d61885Sagc result = (unsigned int) ((arg1)->size);
1902e1d61885Sagc ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1((unsigned int)(result)); argvi++ ;
1903e1d61885Sagc
1904e1d61885Sagc XSRETURN(argvi);
1905e1d61885Sagc fail:
1906e1d61885Sagc
1907e1d61885Sagc SWIG_croak_null();
1908e1d61885Sagc }
1909e1d61885Sagc }
1910e1d61885Sagc
1911e1d61885Sagc
XS(_wrap_netpgp_t_name_set)1912e1d61885Sagc XS(_wrap_netpgp_t_name_set) {
1913e1d61885Sagc {
1914e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
1915e1d61885Sagc char **arg2 = (char **) 0 ;
1916e1d61885Sagc void *argp1 = 0 ;
1917e1d61885Sagc int res1 = 0 ;
1918e1d61885Sagc void *argp2 = 0 ;
1919e1d61885Sagc int res2 = 0 ;
1920e1d61885Sagc int argvi = 0;
1921e1d61885Sagc dXSARGS;
1922e1d61885Sagc
1923e1d61885Sagc if ((items < 2) || (items > 2)) {
1924e1d61885Sagc SWIG_croak("Usage: netpgp_t_name_set(self,name);");
1925e1d61885Sagc }
1926e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
1927e1d61885Sagc if (!SWIG_IsOK(res1)) {
1928e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_name_set" "', argument " "1"" of type '" "netpgp_t *""'");
1929e1d61885Sagc }
1930e1d61885Sagc arg1 = (netpgp_t *)(argp1);
1931e1d61885Sagc res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_char, 0 | 0 );
1932e1d61885Sagc if (!SWIG_IsOK(res2)) {
1933e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_name_set" "', argument " "2"" of type '" "char **""'");
1934e1d61885Sagc }
1935e1d61885Sagc arg2 = (char **)(argp2);
1936e1d61885Sagc if (arg1) (arg1)->name = arg2;
1937e1d61885Sagc
1938e1d61885Sagc
1939e1d61885Sagc
1940e1d61885Sagc
1941e1d61885Sagc XSRETURN(argvi);
1942e1d61885Sagc fail:
1943e1d61885Sagc
1944e1d61885Sagc
1945e1d61885Sagc SWIG_croak_null();
1946e1d61885Sagc }
1947e1d61885Sagc }
1948e1d61885Sagc
1949e1d61885Sagc
XS(_wrap_netpgp_t_name_get)1950e1d61885Sagc XS(_wrap_netpgp_t_name_get) {
1951e1d61885Sagc {
1952e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
1953e1d61885Sagc char **result = 0 ;
1954e1d61885Sagc void *argp1 = 0 ;
1955e1d61885Sagc int res1 = 0 ;
1956e1d61885Sagc int argvi = 0;
1957e1d61885Sagc dXSARGS;
1958e1d61885Sagc
1959e1d61885Sagc if ((items < 1) || (items > 1)) {
1960e1d61885Sagc SWIG_croak("Usage: netpgp_t_name_get(self);");
1961e1d61885Sagc }
1962e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
1963e1d61885Sagc if (!SWIG_IsOK(res1)) {
1964e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_name_get" "', argument " "1"" of type '" "netpgp_t *""'");
1965e1d61885Sagc }
1966e1d61885Sagc arg1 = (netpgp_t *)(argp1);
1967e1d61885Sagc result = (char **) ((arg1)->name);
1968e1d61885Sagc ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 | 0); argvi++ ;
1969e1d61885Sagc
1970e1d61885Sagc XSRETURN(argvi);
1971e1d61885Sagc fail:
1972e1d61885Sagc
1973e1d61885Sagc SWIG_croak_null();
1974e1d61885Sagc }
1975e1d61885Sagc }
1976e1d61885Sagc
1977e1d61885Sagc
XS(_wrap_netpgp_t_value_set)1978e1d61885Sagc XS(_wrap_netpgp_t_value_set) {
1979e1d61885Sagc {
1980e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
1981e1d61885Sagc char **arg2 = (char **) 0 ;
1982e1d61885Sagc void *argp1 = 0 ;
1983e1d61885Sagc int res1 = 0 ;
1984e1d61885Sagc void *argp2 = 0 ;
1985e1d61885Sagc int res2 = 0 ;
1986e1d61885Sagc int argvi = 0;
1987e1d61885Sagc dXSARGS;
1988e1d61885Sagc
1989e1d61885Sagc if ((items < 2) || (items > 2)) {
1990e1d61885Sagc SWIG_croak("Usage: netpgp_t_value_set(self,value);");
1991e1d61885Sagc }
1992e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
1993e1d61885Sagc if (!SWIG_IsOK(res1)) {
1994e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_value_set" "', argument " "1"" of type '" "netpgp_t *""'");
1995e1d61885Sagc }
1996e1d61885Sagc arg1 = (netpgp_t *)(argp1);
1997e1d61885Sagc res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_p_char, 0 | 0 );
1998e1d61885Sagc if (!SWIG_IsOK(res2)) {
1999e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_value_set" "', argument " "2"" of type '" "char **""'");
2000e1d61885Sagc }
2001e1d61885Sagc arg2 = (char **)(argp2);
2002e1d61885Sagc if (arg1) (arg1)->value = arg2;
2003e1d61885Sagc
2004e1d61885Sagc
2005e1d61885Sagc
2006e1d61885Sagc
2007e1d61885Sagc XSRETURN(argvi);
2008e1d61885Sagc fail:
2009e1d61885Sagc
2010e1d61885Sagc
2011e1d61885Sagc SWIG_croak_null();
2012e1d61885Sagc }
2013e1d61885Sagc }
2014e1d61885Sagc
2015e1d61885Sagc
XS(_wrap_netpgp_t_value_get)2016e1d61885Sagc XS(_wrap_netpgp_t_value_get) {
2017e1d61885Sagc {
2018e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2019e1d61885Sagc char **result = 0 ;
2020e1d61885Sagc void *argp1 = 0 ;
2021e1d61885Sagc int res1 = 0 ;
2022e1d61885Sagc int argvi = 0;
2023e1d61885Sagc dXSARGS;
2024e1d61885Sagc
2025e1d61885Sagc if ((items < 1) || (items > 1)) {
2026e1d61885Sagc SWIG_croak("Usage: netpgp_t_value_get(self);");
2027e1d61885Sagc }
2028e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2029e1d61885Sagc if (!SWIG_IsOK(res1)) {
2030e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_value_get" "', argument " "1"" of type '" "netpgp_t *""'");
2031e1d61885Sagc }
2032e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2033e1d61885Sagc result = (char **) ((arg1)->value);
2034e1d61885Sagc ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 | 0); argvi++ ;
2035e1d61885Sagc
2036e1d61885Sagc XSRETURN(argvi);
2037e1d61885Sagc fail:
2038e1d61885Sagc
2039e1d61885Sagc SWIG_croak_null();
2040e1d61885Sagc }
2041e1d61885Sagc }
2042e1d61885Sagc
2043e1d61885Sagc
XS(_wrap_netpgp_t_pubring_set)2044e1d61885Sagc XS(_wrap_netpgp_t_pubring_set) {
2045e1d61885Sagc {
2046e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2047e1d61885Sagc void *arg2 = (void *) 0 ;
2048e1d61885Sagc void *argp1 = 0 ;
2049e1d61885Sagc int res1 = 0 ;
2050e1d61885Sagc int res2 ;
2051e1d61885Sagc int argvi = 0;
2052e1d61885Sagc dXSARGS;
2053e1d61885Sagc
2054e1d61885Sagc if ((items < 2) || (items > 2)) {
2055e1d61885Sagc SWIG_croak("Usage: netpgp_t_pubring_set(self,pubring);");
2056e1d61885Sagc }
2057e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2058e1d61885Sagc if (!SWIG_IsOK(res1)) {
2059e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_pubring_set" "', argument " "1"" of type '" "netpgp_t *""'");
2060e1d61885Sagc }
2061e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2062e1d61885Sagc res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
2063e1d61885Sagc if (!SWIG_IsOK(res2)) {
2064e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_pubring_set" "', argument " "2"" of type '" "void *""'");
2065e1d61885Sagc }
2066e1d61885Sagc if (arg1) (arg1)->pubring = arg2;
2067e1d61885Sagc
2068e1d61885Sagc
2069e1d61885Sagc
2070e1d61885Sagc
2071e1d61885Sagc XSRETURN(argvi);
2072e1d61885Sagc fail:
2073e1d61885Sagc
2074e1d61885Sagc
2075e1d61885Sagc SWIG_croak_null();
2076e1d61885Sagc }
2077e1d61885Sagc }
2078e1d61885Sagc
2079e1d61885Sagc
XS(_wrap_netpgp_t_pubring_get)2080e1d61885Sagc XS(_wrap_netpgp_t_pubring_get) {
2081e1d61885Sagc {
2082e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2083e1d61885Sagc void *result = 0 ;
2084e1d61885Sagc void *argp1 = 0 ;
2085e1d61885Sagc int res1 = 0 ;
2086e1d61885Sagc int argvi = 0;
2087e1d61885Sagc dXSARGS;
2088e1d61885Sagc
2089e1d61885Sagc if ((items < 1) || (items > 1)) {
2090e1d61885Sagc SWIG_croak("Usage: netpgp_t_pubring_get(self);");
2091e1d61885Sagc }
2092e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2093e1d61885Sagc if (!SWIG_IsOK(res1)) {
2094e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_pubring_get" "', argument " "1"" of type '" "netpgp_t *""'");
2095e1d61885Sagc }
2096e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2097e1d61885Sagc result = (void *) ((arg1)->pubring);
2098e1d61885Sagc ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ;
2099e1d61885Sagc
2100e1d61885Sagc XSRETURN(argvi);
2101e1d61885Sagc fail:
2102e1d61885Sagc
2103e1d61885Sagc SWIG_croak_null();
2104e1d61885Sagc }
2105e1d61885Sagc }
2106e1d61885Sagc
2107e1d61885Sagc
XS(_wrap_netpgp_t_secring_set)2108e1d61885Sagc XS(_wrap_netpgp_t_secring_set) {
2109e1d61885Sagc {
2110e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2111e1d61885Sagc void *arg2 = (void *) 0 ;
2112e1d61885Sagc void *argp1 = 0 ;
2113e1d61885Sagc int res1 = 0 ;
2114e1d61885Sagc int res2 ;
2115e1d61885Sagc int argvi = 0;
2116e1d61885Sagc dXSARGS;
2117e1d61885Sagc
2118e1d61885Sagc if ((items < 2) || (items > 2)) {
2119e1d61885Sagc SWIG_croak("Usage: netpgp_t_secring_set(self,secring);");
2120e1d61885Sagc }
2121e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2122e1d61885Sagc if (!SWIG_IsOK(res1)) {
2123e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_secring_set" "', argument " "1"" of type '" "netpgp_t *""'");
2124e1d61885Sagc }
2125e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2126e1d61885Sagc res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
2127e1d61885Sagc if (!SWIG_IsOK(res2)) {
2128e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_secring_set" "', argument " "2"" of type '" "void *""'");
2129e1d61885Sagc }
2130e1d61885Sagc if (arg1) (arg1)->secring = arg2;
2131e1d61885Sagc
2132e1d61885Sagc
2133e1d61885Sagc
2134e1d61885Sagc
2135e1d61885Sagc XSRETURN(argvi);
2136e1d61885Sagc fail:
2137e1d61885Sagc
2138e1d61885Sagc
2139e1d61885Sagc SWIG_croak_null();
2140e1d61885Sagc }
2141e1d61885Sagc }
2142e1d61885Sagc
2143e1d61885Sagc
XS(_wrap_netpgp_t_secring_get)2144e1d61885Sagc XS(_wrap_netpgp_t_secring_get) {
2145e1d61885Sagc {
2146e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2147e1d61885Sagc void *result = 0 ;
2148e1d61885Sagc void *argp1 = 0 ;
2149e1d61885Sagc int res1 = 0 ;
2150e1d61885Sagc int argvi = 0;
2151e1d61885Sagc dXSARGS;
2152e1d61885Sagc
2153e1d61885Sagc if ((items < 1) || (items > 1)) {
2154e1d61885Sagc SWIG_croak("Usage: netpgp_t_secring_get(self);");
2155e1d61885Sagc }
2156e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2157e1d61885Sagc if (!SWIG_IsOK(res1)) {
2158e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_secring_get" "', argument " "1"" of type '" "netpgp_t *""'");
2159e1d61885Sagc }
2160e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2161e1d61885Sagc result = (void *) ((arg1)->secring);
2162e1d61885Sagc ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ;
2163e1d61885Sagc
2164e1d61885Sagc XSRETURN(argvi);
2165e1d61885Sagc fail:
2166e1d61885Sagc
2167e1d61885Sagc SWIG_croak_null();
2168e1d61885Sagc }
2169e1d61885Sagc }
2170e1d61885Sagc
2171e1d61885Sagc
XS(_wrap_netpgp_t_io_set)2172e1d61885Sagc XS(_wrap_netpgp_t_io_set) {
2173e1d61885Sagc {
2174e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2175e1d61885Sagc void *arg2 = (void *) 0 ;
2176e1d61885Sagc void *argp1 = 0 ;
2177e1d61885Sagc int res1 = 0 ;
2178e1d61885Sagc int res2 ;
2179e1d61885Sagc int argvi = 0;
2180e1d61885Sagc dXSARGS;
2181e1d61885Sagc
2182e1d61885Sagc if ((items < 2) || (items > 2)) {
2183e1d61885Sagc SWIG_croak("Usage: netpgp_t_io_set(self,io);");
2184e1d61885Sagc }
2185e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2186e1d61885Sagc if (!SWIG_IsOK(res1)) {
2187e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_io_set" "', argument " "1"" of type '" "netpgp_t *""'");
2188e1d61885Sagc }
2189e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2190e1d61885Sagc res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
2191e1d61885Sagc if (!SWIG_IsOK(res2)) {
2192e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_io_set" "', argument " "2"" of type '" "void *""'");
2193e1d61885Sagc }
2194e1d61885Sagc if (arg1) (arg1)->io = arg2;
2195e1d61885Sagc
2196e1d61885Sagc
2197e1d61885Sagc
2198e1d61885Sagc
2199e1d61885Sagc XSRETURN(argvi);
2200e1d61885Sagc fail:
2201e1d61885Sagc
2202e1d61885Sagc
2203e1d61885Sagc SWIG_croak_null();
2204e1d61885Sagc }
2205e1d61885Sagc }
2206e1d61885Sagc
2207e1d61885Sagc
XS(_wrap_netpgp_t_io_get)2208e1d61885Sagc XS(_wrap_netpgp_t_io_get) {
2209e1d61885Sagc {
2210e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2211e1d61885Sagc void *result = 0 ;
2212e1d61885Sagc void *argp1 = 0 ;
2213e1d61885Sagc int res1 = 0 ;
2214e1d61885Sagc int argvi = 0;
2215e1d61885Sagc dXSARGS;
2216e1d61885Sagc
2217e1d61885Sagc if ((items < 1) || (items > 1)) {
2218e1d61885Sagc SWIG_croak("Usage: netpgp_t_io_get(self);");
2219e1d61885Sagc }
2220e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2221e1d61885Sagc if (!SWIG_IsOK(res1)) {
2222e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_io_get" "', argument " "1"" of type '" "netpgp_t *""'");
2223e1d61885Sagc }
2224e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2225e1d61885Sagc result = (void *) ((arg1)->io);
2226e1d61885Sagc ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ;
2227e1d61885Sagc
2228e1d61885Sagc XSRETURN(argvi);
2229e1d61885Sagc fail:
2230e1d61885Sagc
2231e1d61885Sagc SWIG_croak_null();
2232e1d61885Sagc }
2233e1d61885Sagc }
2234e1d61885Sagc
2235e1d61885Sagc
XS(_wrap_netpgp_t_passfp_set)2236e1d61885Sagc XS(_wrap_netpgp_t_passfp_set) {
2237e1d61885Sagc {
2238e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2239e1d61885Sagc void *arg2 = (void *) 0 ;
2240e1d61885Sagc void *argp1 = 0 ;
2241e1d61885Sagc int res1 = 0 ;
2242e1d61885Sagc int res2 ;
2243e1d61885Sagc int argvi = 0;
2244e1d61885Sagc dXSARGS;
2245e1d61885Sagc
2246e1d61885Sagc if ((items < 2) || (items > 2)) {
2247e1d61885Sagc SWIG_croak("Usage: netpgp_t_passfp_set(self,passfp);");
2248e1d61885Sagc }
2249e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2250e1d61885Sagc if (!SWIG_IsOK(res1)) {
2251e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_passfp_set" "', argument " "1"" of type '" "netpgp_t *""'");
2252e1d61885Sagc }
2253e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2254e1d61885Sagc res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
2255e1d61885Sagc if (!SWIG_IsOK(res2)) {
2256e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_passfp_set" "', argument " "2"" of type '" "void *""'");
2257e1d61885Sagc }
2258e1d61885Sagc if (arg1) (arg1)->passfp = arg2;
2259e1d61885Sagc
2260e1d61885Sagc
2261e1d61885Sagc
2262e1d61885Sagc
2263e1d61885Sagc XSRETURN(argvi);
2264e1d61885Sagc fail:
2265e1d61885Sagc
2266e1d61885Sagc
2267e1d61885Sagc SWIG_croak_null();
2268e1d61885Sagc }
2269e1d61885Sagc }
2270e1d61885Sagc
2271e1d61885Sagc
XS(_wrap_netpgp_t_passfp_get)2272e1d61885Sagc XS(_wrap_netpgp_t_passfp_get) {
2273e1d61885Sagc {
2274e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2275e1d61885Sagc void *result = 0 ;
2276e1d61885Sagc void *argp1 = 0 ;
2277e1d61885Sagc int res1 = 0 ;
2278e1d61885Sagc int argvi = 0;
2279e1d61885Sagc dXSARGS;
2280e1d61885Sagc
2281e1d61885Sagc if ((items < 1) || (items > 1)) {
2282e1d61885Sagc SWIG_croak("Usage: netpgp_t_passfp_get(self);");
2283e1d61885Sagc }
2284e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2285e1d61885Sagc if (!SWIG_IsOK(res1)) {
2286e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_passfp_get" "', argument " "1"" of type '" "netpgp_t *""'");
2287e1d61885Sagc }
2288e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2289e1d61885Sagc result = (void *) ((arg1)->passfp);
2290e1d61885Sagc ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ;
2291e1d61885Sagc
2292e1d61885Sagc XSRETURN(argvi);
2293e1d61885Sagc fail:
2294e1d61885Sagc
2295e1d61885Sagc SWIG_croak_null();
2296e1d61885Sagc }
2297e1d61885Sagc }
2298e1d61885Sagc
2299e1d61885Sagc
XS(_wrap_new_netpgp_t)2300e1d61885Sagc XS(_wrap_new_netpgp_t) {
2301e1d61885Sagc {
2302e1d61885Sagc netpgp_t *result = 0 ;
2303e1d61885Sagc int argvi = 0;
2304e1d61885Sagc dXSARGS;
2305e1d61885Sagc
2306e1d61885Sagc if ((items < 0) || (items > 0)) {
2307e1d61885Sagc SWIG_croak("Usage: new_netpgp_t();");
2308e1d61885Sagc }
2309e1d61885Sagc result = (netpgp_t *)(netpgp_t *) calloc(1, sizeof(netpgp_t));
2310e1d61885Sagc ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_netpgp_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2311e1d61885Sagc XSRETURN(argvi);
2312e1d61885Sagc fail:
2313e1d61885Sagc SWIG_croak_null();
2314e1d61885Sagc }
2315e1d61885Sagc }
2316e1d61885Sagc
2317e1d61885Sagc
XS(_wrap_delete_netpgp_t)2318e1d61885Sagc XS(_wrap_delete_netpgp_t) {
2319e1d61885Sagc {
2320e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2321e1d61885Sagc void *argp1 = 0 ;
2322e1d61885Sagc int res1 = 0 ;
2323e1d61885Sagc int argvi = 0;
2324e1d61885Sagc dXSARGS;
2325e1d61885Sagc
2326e1d61885Sagc if ((items < 1) || (items > 1)) {
2327e1d61885Sagc SWIG_croak("Usage: delete_netpgp_t(self);");
2328e1d61885Sagc }
2329e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, SWIG_POINTER_DISOWN | 0 );
2330e1d61885Sagc if (!SWIG_IsOK(res1)) {
2331e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_netpgp_t" "', argument " "1"" of type '" "netpgp_t *""'");
2332e1d61885Sagc }
2333e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2334e1d61885Sagc free((char *) arg1);
2335e1d61885Sagc
2336e1d61885Sagc
2337e1d61885Sagc
2338e1d61885Sagc XSRETURN(argvi);
2339e1d61885Sagc fail:
2340e1d61885Sagc
2341e1d61885Sagc SWIG_croak_null();
2342e1d61885Sagc }
2343e1d61885Sagc }
2344e1d61885Sagc
2345e1d61885Sagc
XS(_wrap_netpgp_init)2346e1d61885Sagc XS(_wrap_netpgp_init) {
2347e1d61885Sagc {
2348e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2349e1d61885Sagc int result;
2350e1d61885Sagc void *argp1 = 0 ;
2351e1d61885Sagc int res1 = 0 ;
2352e1d61885Sagc int argvi = 0;
2353e1d61885Sagc dXSARGS;
2354e1d61885Sagc
2355e1d61885Sagc if ((items < 1) || (items > 1)) {
2356e1d61885Sagc SWIG_croak("Usage: netpgp_init(netpgp_t *);");
2357e1d61885Sagc }
2358e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2359e1d61885Sagc if (!SWIG_IsOK(res1)) {
2360e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_init" "', argument " "1"" of type '" "netpgp_t *""'");
2361e1d61885Sagc }
2362e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2363e1d61885Sagc result = (int)netpgp_init(arg1);
2364e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2365e1d61885Sagc
2366e1d61885Sagc XSRETURN(argvi);
2367e1d61885Sagc fail:
2368e1d61885Sagc
2369e1d61885Sagc SWIG_croak_null();
2370e1d61885Sagc }
2371e1d61885Sagc }
2372e1d61885Sagc
2373e1d61885Sagc
XS(_wrap_netpgp_end)2374e1d61885Sagc XS(_wrap_netpgp_end) {
2375e1d61885Sagc {
2376e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2377e1d61885Sagc int result;
2378e1d61885Sagc void *argp1 = 0 ;
2379e1d61885Sagc int res1 = 0 ;
2380e1d61885Sagc int argvi = 0;
2381e1d61885Sagc dXSARGS;
2382e1d61885Sagc
2383e1d61885Sagc if ((items < 1) || (items > 1)) {
2384e1d61885Sagc SWIG_croak("Usage: netpgp_end(netpgp_t *);");
2385e1d61885Sagc }
2386e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2387e1d61885Sagc if (!SWIG_IsOK(res1)) {
2388e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_end" "', argument " "1"" of type '" "netpgp_t *""'");
2389e1d61885Sagc }
2390e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2391e1d61885Sagc result = (int)netpgp_end(arg1);
2392e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2393e1d61885Sagc
2394e1d61885Sagc XSRETURN(argvi);
2395e1d61885Sagc fail:
2396e1d61885Sagc
2397e1d61885Sagc SWIG_croak_null();
2398e1d61885Sagc }
2399e1d61885Sagc }
2400e1d61885Sagc
2401e1d61885Sagc
XS(_wrap_netpgp_set_debug)2402e1d61885Sagc XS(_wrap_netpgp_set_debug) {
2403e1d61885Sagc {
2404e1d61885Sagc char *arg1 = (char *) 0 ;
2405e1d61885Sagc int result;
2406e1d61885Sagc int res1 ;
2407e1d61885Sagc char *buf1 = 0 ;
2408e1d61885Sagc int alloc1 = 0 ;
2409e1d61885Sagc int argvi = 0;
2410e1d61885Sagc dXSARGS;
2411e1d61885Sagc
2412e1d61885Sagc if ((items < 1) || (items > 1)) {
2413e1d61885Sagc SWIG_croak("Usage: netpgp_set_debug(char const *);");
2414e1d61885Sagc }
2415e1d61885Sagc res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2416e1d61885Sagc if (!SWIG_IsOK(res1)) {
2417e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_set_debug" "', argument " "1"" of type '" "char const *""'");
2418e1d61885Sagc }
2419e1d61885Sagc arg1 = (char *)(buf1);
2420e1d61885Sagc result = (int)netpgp_set_debug((char const *)arg1);
2421e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2422e1d61885Sagc if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2423e1d61885Sagc XSRETURN(argvi);
2424e1d61885Sagc fail:
2425e1d61885Sagc if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2426e1d61885Sagc SWIG_croak_null();
2427e1d61885Sagc }
2428e1d61885Sagc }
2429e1d61885Sagc
2430e1d61885Sagc
XS(_wrap_netpgp_get_debug)2431e1d61885Sagc XS(_wrap_netpgp_get_debug) {
2432e1d61885Sagc {
2433e1d61885Sagc char *arg1 = (char *) 0 ;
2434e1d61885Sagc int result;
2435e1d61885Sagc int res1 ;
2436e1d61885Sagc char *buf1 = 0 ;
2437e1d61885Sagc int alloc1 = 0 ;
2438e1d61885Sagc int argvi = 0;
2439e1d61885Sagc dXSARGS;
2440e1d61885Sagc
2441e1d61885Sagc if ((items < 1) || (items > 1)) {
2442e1d61885Sagc SWIG_croak("Usage: netpgp_get_debug(char const *);");
2443e1d61885Sagc }
2444e1d61885Sagc res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2445e1d61885Sagc if (!SWIG_IsOK(res1)) {
2446e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_get_debug" "', argument " "1"" of type '" "char const *""'");
2447e1d61885Sagc }
2448e1d61885Sagc arg1 = (char *)(buf1);
2449e1d61885Sagc result = (int)netpgp_get_debug((char const *)arg1);
2450e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2451e1d61885Sagc if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2452e1d61885Sagc XSRETURN(argvi);
2453e1d61885Sagc fail:
2454e1d61885Sagc if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2455e1d61885Sagc SWIG_croak_null();
2456e1d61885Sagc }
2457e1d61885Sagc }
2458e1d61885Sagc
2459e1d61885Sagc
XS(_wrap_netpgp_get_info)2460e1d61885Sagc XS(_wrap_netpgp_get_info) {
2461e1d61885Sagc {
2462e1d61885Sagc char *arg1 = (char *) 0 ;
2463e1d61885Sagc char *result = 0 ;
2464e1d61885Sagc int res1 ;
2465e1d61885Sagc char *buf1 = 0 ;
2466e1d61885Sagc int alloc1 = 0 ;
2467e1d61885Sagc int argvi = 0;
2468e1d61885Sagc dXSARGS;
2469e1d61885Sagc
2470e1d61885Sagc if ((items < 1) || (items > 1)) {
2471e1d61885Sagc SWIG_croak("Usage: netpgp_get_info(char const *);");
2472e1d61885Sagc }
2473e1d61885Sagc res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2474e1d61885Sagc if (!SWIG_IsOK(res1)) {
2475e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_get_info" "', argument " "1"" of type '" "char const *""'");
2476e1d61885Sagc }
2477e1d61885Sagc arg1 = (char *)(buf1);
2478e1d61885Sagc result = (char *)netpgp_get_info((char const *)arg1);
2479e1d61885Sagc ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2480e1d61885Sagc if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2481e1d61885Sagc XSRETURN(argvi);
2482e1d61885Sagc fail:
2483e1d61885Sagc if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2484e1d61885Sagc SWIG_croak_null();
2485e1d61885Sagc }
2486e1d61885Sagc }
2487e1d61885Sagc
2488e1d61885Sagc
XS(_wrap_netpgp_list_packets)2489e1d61885Sagc XS(_wrap_netpgp_list_packets) {
2490e1d61885Sagc {
2491e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2492e1d61885Sagc char *arg2 = (char *) 0 ;
2493e1d61885Sagc int arg3 ;
2494e1d61885Sagc char *arg4 = (char *) 0 ;
2495e1d61885Sagc int result;
2496e1d61885Sagc void *argp1 = 0 ;
2497e1d61885Sagc int res1 = 0 ;
2498e1d61885Sagc int res2 ;
2499e1d61885Sagc char *buf2 = 0 ;
2500e1d61885Sagc int alloc2 = 0 ;
2501e1d61885Sagc int val3 ;
2502e1d61885Sagc int ecode3 = 0 ;
2503e1d61885Sagc int res4 ;
2504e1d61885Sagc char *buf4 = 0 ;
2505e1d61885Sagc int alloc4 = 0 ;
2506e1d61885Sagc int argvi = 0;
2507e1d61885Sagc dXSARGS;
2508e1d61885Sagc
2509e1d61885Sagc if ((items < 4) || (items > 4)) {
2510e1d61885Sagc SWIG_croak("Usage: netpgp_list_packets(netpgp_t *,char *,int,char *);");
2511e1d61885Sagc }
2512e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2513e1d61885Sagc if (!SWIG_IsOK(res1)) {
2514e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_list_packets" "', argument " "1"" of type '" "netpgp_t *""'");
2515e1d61885Sagc }
2516e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2517e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2518e1d61885Sagc if (!SWIG_IsOK(res2)) {
2519e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_list_packets" "', argument " "2"" of type '" "char *""'");
2520e1d61885Sagc }
2521e1d61885Sagc arg2 = (char *)(buf2);
2522e1d61885Sagc ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
2523e1d61885Sagc if (!SWIG_IsOK(ecode3)) {
2524e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_list_packets" "', argument " "3"" of type '" "int""'");
2525e1d61885Sagc }
2526e1d61885Sagc arg3 = (int)(val3);
2527e1d61885Sagc res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
2528e1d61885Sagc if (!SWIG_IsOK(res4)) {
2529e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_list_packets" "', argument " "4"" of type '" "char *""'");
2530e1d61885Sagc }
2531e1d61885Sagc arg4 = (char *)(buf4);
2532e1d61885Sagc result = (int)netpgp_list_packets(arg1,arg2,arg3,arg4);
2533e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2534e1d61885Sagc
2535e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2536e1d61885Sagc
2537e1d61885Sagc if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2538e1d61885Sagc XSRETURN(argvi);
2539e1d61885Sagc fail:
2540e1d61885Sagc
2541e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2542e1d61885Sagc
2543e1d61885Sagc if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2544e1d61885Sagc SWIG_croak_null();
2545e1d61885Sagc }
2546e1d61885Sagc }
2547e1d61885Sagc
2548e1d61885Sagc
XS(_wrap_netpgp_setvar)2549e1d61885Sagc XS(_wrap_netpgp_setvar) {
2550e1d61885Sagc {
2551e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2552e1d61885Sagc char *arg2 = (char *) 0 ;
2553e1d61885Sagc char *arg3 = (char *) 0 ;
2554e1d61885Sagc int result;
2555e1d61885Sagc void *argp1 = 0 ;
2556e1d61885Sagc int res1 = 0 ;
2557e1d61885Sagc int res2 ;
2558e1d61885Sagc char *buf2 = 0 ;
2559e1d61885Sagc int alloc2 = 0 ;
2560e1d61885Sagc int res3 ;
2561e1d61885Sagc char *buf3 = 0 ;
2562e1d61885Sagc int alloc3 = 0 ;
2563e1d61885Sagc int argvi = 0;
2564e1d61885Sagc dXSARGS;
2565e1d61885Sagc
2566e1d61885Sagc if ((items < 3) || (items > 3)) {
2567e1d61885Sagc SWIG_croak("Usage: netpgp_setvar(netpgp_t *,char const *,char const *);");
2568e1d61885Sagc }
2569e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2570e1d61885Sagc if (!SWIG_IsOK(res1)) {
2571e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_setvar" "', argument " "1"" of type '" "netpgp_t *""'");
2572e1d61885Sagc }
2573e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2574e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2575e1d61885Sagc if (!SWIG_IsOK(res2)) {
2576e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_setvar" "', argument " "2"" of type '" "char const *""'");
2577e1d61885Sagc }
2578e1d61885Sagc arg2 = (char *)(buf2);
2579e1d61885Sagc res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
2580e1d61885Sagc if (!SWIG_IsOK(res3)) {
2581e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_setvar" "', argument " "3"" of type '" "char const *""'");
2582e1d61885Sagc }
2583e1d61885Sagc arg3 = (char *)(buf3);
2584e1d61885Sagc result = (int)netpgp_setvar(arg1,(char const *)arg2,(char const *)arg3);
2585e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2586e1d61885Sagc
2587e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2588e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2589e1d61885Sagc XSRETURN(argvi);
2590e1d61885Sagc fail:
2591e1d61885Sagc
2592e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2593e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2594e1d61885Sagc SWIG_croak_null();
2595e1d61885Sagc }
2596e1d61885Sagc }
2597e1d61885Sagc
2598e1d61885Sagc
XS(_wrap_netpgp_getvar)2599e1d61885Sagc XS(_wrap_netpgp_getvar) {
2600e1d61885Sagc {
2601e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2602e1d61885Sagc char *arg2 = (char *) 0 ;
2603e1d61885Sagc char *result = 0 ;
2604e1d61885Sagc void *argp1 = 0 ;
2605e1d61885Sagc int res1 = 0 ;
2606e1d61885Sagc int res2 ;
2607e1d61885Sagc char *buf2 = 0 ;
2608e1d61885Sagc int alloc2 = 0 ;
2609e1d61885Sagc int argvi = 0;
2610e1d61885Sagc dXSARGS;
2611e1d61885Sagc
2612e1d61885Sagc if ((items < 2) || (items > 2)) {
2613e1d61885Sagc SWIG_croak("Usage: netpgp_getvar(netpgp_t *,char const *);");
2614e1d61885Sagc }
2615e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2616e1d61885Sagc if (!SWIG_IsOK(res1)) {
2617e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_getvar" "', argument " "1"" of type '" "netpgp_t *""'");
2618e1d61885Sagc }
2619e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2620e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2621e1d61885Sagc if (!SWIG_IsOK(res2)) {
2622e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_getvar" "', argument " "2"" of type '" "char const *""'");
2623e1d61885Sagc }
2624e1d61885Sagc arg2 = (char *)(buf2);
2625e1d61885Sagc result = (char *)netpgp_getvar(arg1,(char const *)arg2);
2626e1d61885Sagc ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2627e1d61885Sagc
2628e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2629e1d61885Sagc XSRETURN(argvi);
2630e1d61885Sagc fail:
2631e1d61885Sagc
2632e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2633e1d61885Sagc SWIG_croak_null();
2634e1d61885Sagc }
2635e1d61885Sagc }
2636e1d61885Sagc
2637e1d61885Sagc
XS(_wrap_netpgp_incvar)2638*cc1edcabSagc XS(_wrap_netpgp_incvar) {
2639e1d61885Sagc {
2640e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2641*cc1edcabSagc char *arg2 = (char *) 0 ;
2642*cc1edcabSagc int arg3 ;
2643e1d61885Sagc int result;
2644e1d61885Sagc void *argp1 = 0 ;
2645e1d61885Sagc int res1 = 0 ;
2646*cc1edcabSagc int res2 ;
2647*cc1edcabSagc char *buf2 = 0 ;
2648*cc1edcabSagc int alloc2 = 0 ;
2649*cc1edcabSagc int val3 ;
2650*cc1edcabSagc int ecode3 = 0 ;
2651e1d61885Sagc int argvi = 0;
2652e1d61885Sagc dXSARGS;
2653e1d61885Sagc
2654*cc1edcabSagc if ((items < 3) || (items > 3)) {
2655*cc1edcabSagc SWIG_croak("Usage: netpgp_incvar(netpgp_t *,char const *,int const);");
2656e1d61885Sagc }
2657e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2658e1d61885Sagc if (!SWIG_IsOK(res1)) {
2659*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_incvar" "', argument " "1"" of type '" "netpgp_t *""'");
2660e1d61885Sagc }
2661e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2662*cc1edcabSagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2663*cc1edcabSagc if (!SWIG_IsOK(res2)) {
2664*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_incvar" "', argument " "2"" of type '" "char const *""'");
2665*cc1edcabSagc }
2666*cc1edcabSagc arg2 = (char *)(buf2);
2667*cc1edcabSagc ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
2668*cc1edcabSagc if (!SWIG_IsOK(ecode3)) {
2669*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_incvar" "', argument " "3"" of type '" "int""'");
2670*cc1edcabSagc }
2671*cc1edcabSagc arg3 = (int)(val3);
2672*cc1edcabSagc result = (int)netpgp_incvar(arg1,(char const *)arg2,arg3);
2673e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2674e1d61885Sagc
2675*cc1edcabSagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2676*cc1edcabSagc
2677e1d61885Sagc XSRETURN(argvi);
2678e1d61885Sagc fail:
2679e1d61885Sagc
2680*cc1edcabSagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2681*cc1edcabSagc
2682e1d61885Sagc SWIG_croak_null();
2683e1d61885Sagc }
2684e1d61885Sagc }
2685e1d61885Sagc
2686e1d61885Sagc
XS(_wrap_netpgp_unsetvar)2687*cc1edcabSagc XS(_wrap_netpgp_unsetvar) {
2688e1d61885Sagc {
2689e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2690e1d61885Sagc char *arg2 = (char *) 0 ;
2691e1d61885Sagc int result;
2692e1d61885Sagc void *argp1 = 0 ;
2693e1d61885Sagc int res1 = 0 ;
2694e1d61885Sagc int res2 ;
2695e1d61885Sagc char *buf2 = 0 ;
2696e1d61885Sagc int alloc2 = 0 ;
2697e1d61885Sagc int argvi = 0;
2698e1d61885Sagc dXSARGS;
2699e1d61885Sagc
2700e1d61885Sagc if ((items < 2) || (items > 2)) {
2701*cc1edcabSagc SWIG_croak("Usage: netpgp_unsetvar(netpgp_t *,char const *);");
2702e1d61885Sagc }
2703e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2704e1d61885Sagc if (!SWIG_IsOK(res1)) {
2705*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_unsetvar" "', argument " "1"" of type '" "netpgp_t *""'");
2706e1d61885Sagc }
2707e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2708e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2709e1d61885Sagc if (!SWIG_IsOK(res2)) {
2710*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_unsetvar" "', argument " "2"" of type '" "char const *""'");
2711e1d61885Sagc }
2712e1d61885Sagc arg2 = (char *)(buf2);
2713*cc1edcabSagc result = (int)netpgp_unsetvar(arg1,(char const *)arg2);
2714e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2715e1d61885Sagc
2716e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2717e1d61885Sagc XSRETURN(argvi);
2718e1d61885Sagc fail:
2719e1d61885Sagc
2720e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2721e1d61885Sagc SWIG_croak_null();
2722e1d61885Sagc }
2723e1d61885Sagc }
2724e1d61885Sagc
2725e1d61885Sagc
XS(_wrap_netpgp_set_homedir)2726*cc1edcabSagc XS(_wrap_netpgp_set_homedir) {
2727*cc1edcabSagc {
2728*cc1edcabSagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2729*cc1edcabSagc char *arg2 = (char *) 0 ;
2730*cc1edcabSagc char *arg3 = (char *) 0 ;
2731*cc1edcabSagc int arg4 ;
2732*cc1edcabSagc int result;
2733*cc1edcabSagc void *argp1 = 0 ;
2734*cc1edcabSagc int res1 = 0 ;
2735*cc1edcabSagc int res2 ;
2736*cc1edcabSagc char *buf2 = 0 ;
2737*cc1edcabSagc int alloc2 = 0 ;
2738*cc1edcabSagc int res3 ;
2739*cc1edcabSagc char *buf3 = 0 ;
2740*cc1edcabSagc int alloc3 = 0 ;
2741*cc1edcabSagc int val4 ;
2742*cc1edcabSagc int ecode4 = 0 ;
2743*cc1edcabSagc int argvi = 0;
2744*cc1edcabSagc dXSARGS;
2745*cc1edcabSagc
2746*cc1edcabSagc if ((items < 4) || (items > 4)) {
2747*cc1edcabSagc SWIG_croak("Usage: netpgp_set_homedir(netpgp_t *,char *,char const *,int const);");
2748*cc1edcabSagc }
2749*cc1edcabSagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2750*cc1edcabSagc if (!SWIG_IsOK(res1)) {
2751*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_set_homedir" "', argument " "1"" of type '" "netpgp_t *""'");
2752*cc1edcabSagc }
2753*cc1edcabSagc arg1 = (netpgp_t *)(argp1);
2754*cc1edcabSagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2755*cc1edcabSagc if (!SWIG_IsOK(res2)) {
2756*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_set_homedir" "', argument " "2"" of type '" "char *""'");
2757*cc1edcabSagc }
2758*cc1edcabSagc arg2 = (char *)(buf2);
2759*cc1edcabSagc res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
2760*cc1edcabSagc if (!SWIG_IsOK(res3)) {
2761*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_set_homedir" "', argument " "3"" of type '" "char const *""'");
2762*cc1edcabSagc }
2763*cc1edcabSagc arg3 = (char *)(buf3);
2764*cc1edcabSagc ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
2765*cc1edcabSagc if (!SWIG_IsOK(ecode4)) {
2766*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_set_homedir" "', argument " "4"" of type '" "int""'");
2767*cc1edcabSagc }
2768*cc1edcabSagc arg4 = (int)(val4);
2769*cc1edcabSagc result = (int)netpgp_set_homedir(arg1,arg2,(char const *)arg3,arg4);
2770*cc1edcabSagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2771*cc1edcabSagc
2772*cc1edcabSagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2773*cc1edcabSagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2774*cc1edcabSagc
2775*cc1edcabSagc XSRETURN(argvi);
2776*cc1edcabSagc fail:
2777*cc1edcabSagc
2778*cc1edcabSagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2779*cc1edcabSagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2780*cc1edcabSagc
2781*cc1edcabSagc SWIG_croak_null();
2782*cc1edcabSagc }
2783*cc1edcabSagc }
2784*cc1edcabSagc
2785*cc1edcabSagc
XS(_wrap_netpgp_list_keys)2786*cc1edcabSagc XS(_wrap_netpgp_list_keys) {
2787*cc1edcabSagc {
2788*cc1edcabSagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2789*cc1edcabSagc int arg2 ;
2790*cc1edcabSagc int result;
2791*cc1edcabSagc void *argp1 = 0 ;
2792*cc1edcabSagc int res1 = 0 ;
2793*cc1edcabSagc int val2 ;
2794*cc1edcabSagc int ecode2 = 0 ;
2795*cc1edcabSagc int argvi = 0;
2796*cc1edcabSagc dXSARGS;
2797*cc1edcabSagc
2798*cc1edcabSagc if ((items < 2) || (items > 2)) {
2799*cc1edcabSagc SWIG_croak("Usage: netpgp_list_keys(netpgp_t *,int const);");
2800*cc1edcabSagc }
2801*cc1edcabSagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2802*cc1edcabSagc if (!SWIG_IsOK(res1)) {
2803*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_list_keys" "', argument " "1"" of type '" "netpgp_t *""'");
2804*cc1edcabSagc }
2805*cc1edcabSagc arg1 = (netpgp_t *)(argp1);
2806*cc1edcabSagc ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2807*cc1edcabSagc if (!SWIG_IsOK(ecode2)) {
2808*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "netpgp_list_keys" "', argument " "2"" of type '" "int""'");
2809*cc1edcabSagc }
2810*cc1edcabSagc arg2 = (int)(val2);
2811*cc1edcabSagc result = (int)netpgp_list_keys(arg1,arg2);
2812*cc1edcabSagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2813*cc1edcabSagc
2814*cc1edcabSagc
2815*cc1edcabSagc XSRETURN(argvi);
2816*cc1edcabSagc fail:
2817*cc1edcabSagc
2818*cc1edcabSagc
2819*cc1edcabSagc SWIG_croak_null();
2820*cc1edcabSagc }
2821*cc1edcabSagc }
2822*cc1edcabSagc
2823*cc1edcabSagc
XS(_wrap_netpgp_find_key)2824e1d61885Sagc XS(_wrap_netpgp_find_key) {
2825e1d61885Sagc {
2826e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2827e1d61885Sagc char *arg2 = (char *) 0 ;
2828e1d61885Sagc int result;
2829e1d61885Sagc void *argp1 = 0 ;
2830e1d61885Sagc int res1 = 0 ;
2831e1d61885Sagc int res2 ;
2832e1d61885Sagc char *buf2 = 0 ;
2833e1d61885Sagc int alloc2 = 0 ;
2834e1d61885Sagc int argvi = 0;
2835e1d61885Sagc dXSARGS;
2836e1d61885Sagc
2837e1d61885Sagc if ((items < 2) || (items > 2)) {
2838e1d61885Sagc SWIG_croak("Usage: netpgp_find_key(netpgp_t *,char *);");
2839e1d61885Sagc }
2840e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2841e1d61885Sagc if (!SWIG_IsOK(res1)) {
2842e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_find_key" "', argument " "1"" of type '" "netpgp_t *""'");
2843e1d61885Sagc }
2844e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2845e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2846e1d61885Sagc if (!SWIG_IsOK(res2)) {
2847e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_find_key" "', argument " "2"" of type '" "char *""'");
2848e1d61885Sagc }
2849e1d61885Sagc arg2 = (char *)(buf2);
2850e1d61885Sagc result = (int)netpgp_find_key(arg1,arg2);
2851e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2852e1d61885Sagc
2853e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2854e1d61885Sagc XSRETURN(argvi);
2855e1d61885Sagc fail:
2856e1d61885Sagc
2857e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2858e1d61885Sagc SWIG_croak_null();
2859e1d61885Sagc }
2860e1d61885Sagc }
2861e1d61885Sagc
2862e1d61885Sagc
XS(_wrap_netpgp_get_key)2863e1d61885Sagc XS(_wrap_netpgp_get_key) {
2864e1d61885Sagc {
2865e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2866e1d61885Sagc char *arg2 = (char *) 0 ;
2867*cc1edcabSagc char *arg3 = (char *) 0 ;
2868e1d61885Sagc char *result = 0 ;
2869e1d61885Sagc void *argp1 = 0 ;
2870e1d61885Sagc int res1 = 0 ;
2871e1d61885Sagc int res2 ;
2872e1d61885Sagc char *buf2 = 0 ;
2873e1d61885Sagc int alloc2 = 0 ;
2874*cc1edcabSagc int res3 ;
2875*cc1edcabSagc char *buf3 = 0 ;
2876*cc1edcabSagc int alloc3 = 0 ;
2877e1d61885Sagc int argvi = 0;
2878e1d61885Sagc dXSARGS;
2879e1d61885Sagc
2880*cc1edcabSagc if ((items < 3) || (items > 3)) {
2881*cc1edcabSagc SWIG_croak("Usage: netpgp_get_key(netpgp_t *,char const *,char const *);");
2882e1d61885Sagc }
2883e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2884e1d61885Sagc if (!SWIG_IsOK(res1)) {
2885e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_get_key" "', argument " "1"" of type '" "netpgp_t *""'");
2886e1d61885Sagc }
2887e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2888e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2889e1d61885Sagc if (!SWIG_IsOK(res2)) {
2890e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_get_key" "', argument " "2"" of type '" "char const *""'");
2891e1d61885Sagc }
2892e1d61885Sagc arg2 = (char *)(buf2);
2893*cc1edcabSagc res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
2894*cc1edcabSagc if (!SWIG_IsOK(res3)) {
2895*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_get_key" "', argument " "3"" of type '" "char const *""'");
2896*cc1edcabSagc }
2897*cc1edcabSagc arg3 = (char *)(buf3);
2898*cc1edcabSagc result = (char *)netpgp_get_key(arg1,(char const *)arg2,(char const *)arg3);
2899e1d61885Sagc ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2900e1d61885Sagc
2901e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2902*cc1edcabSagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2903e1d61885Sagc XSRETURN(argvi);
2904e1d61885Sagc fail:
2905e1d61885Sagc
2906e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2907*cc1edcabSagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2908e1d61885Sagc SWIG_croak_null();
2909e1d61885Sagc }
2910e1d61885Sagc }
2911e1d61885Sagc
2912e1d61885Sagc
XS(_wrap_netpgp_export_key)2913e1d61885Sagc XS(_wrap_netpgp_export_key) {
2914e1d61885Sagc {
2915e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2916e1d61885Sagc char *arg2 = (char *) 0 ;
2917*cc1edcabSagc char *result = 0 ;
2918e1d61885Sagc void *argp1 = 0 ;
2919e1d61885Sagc int res1 = 0 ;
2920e1d61885Sagc int res2 ;
2921e1d61885Sagc char *buf2 = 0 ;
2922e1d61885Sagc int alloc2 = 0 ;
2923e1d61885Sagc int argvi = 0;
2924e1d61885Sagc dXSARGS;
2925e1d61885Sagc
2926e1d61885Sagc if ((items < 2) || (items > 2)) {
2927e1d61885Sagc SWIG_croak("Usage: netpgp_export_key(netpgp_t *,char *);");
2928e1d61885Sagc }
2929e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2930e1d61885Sagc if (!SWIG_IsOK(res1)) {
2931e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_export_key" "', argument " "1"" of type '" "netpgp_t *""'");
2932e1d61885Sagc }
2933e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2934e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2935e1d61885Sagc if (!SWIG_IsOK(res2)) {
2936e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_export_key" "', argument " "2"" of type '" "char *""'");
2937e1d61885Sagc }
2938e1d61885Sagc arg2 = (char *)(buf2);
2939*cc1edcabSagc result = (char *)netpgp_export_key(arg1,arg2);
2940*cc1edcabSagc ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2941e1d61885Sagc
2942e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2943e1d61885Sagc XSRETURN(argvi);
2944e1d61885Sagc fail:
2945e1d61885Sagc
2946e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2947e1d61885Sagc SWIG_croak_null();
2948e1d61885Sagc }
2949e1d61885Sagc }
2950e1d61885Sagc
2951e1d61885Sagc
XS(_wrap_netpgp_import_key)2952e1d61885Sagc XS(_wrap_netpgp_import_key) {
2953e1d61885Sagc {
2954e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2955e1d61885Sagc char *arg2 = (char *) 0 ;
2956e1d61885Sagc int result;
2957e1d61885Sagc void *argp1 = 0 ;
2958e1d61885Sagc int res1 = 0 ;
2959e1d61885Sagc int res2 ;
2960e1d61885Sagc char *buf2 = 0 ;
2961e1d61885Sagc int alloc2 = 0 ;
2962e1d61885Sagc int argvi = 0;
2963e1d61885Sagc dXSARGS;
2964e1d61885Sagc
2965e1d61885Sagc if ((items < 2) || (items > 2)) {
2966e1d61885Sagc SWIG_croak("Usage: netpgp_import_key(netpgp_t *,char *);");
2967e1d61885Sagc }
2968e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
2969e1d61885Sagc if (!SWIG_IsOK(res1)) {
2970e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_import_key" "', argument " "1"" of type '" "netpgp_t *""'");
2971e1d61885Sagc }
2972e1d61885Sagc arg1 = (netpgp_t *)(argp1);
2973e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2974e1d61885Sagc if (!SWIG_IsOK(res2)) {
2975e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_import_key" "', argument " "2"" of type '" "char *""'");
2976e1d61885Sagc }
2977e1d61885Sagc arg2 = (char *)(buf2);
2978e1d61885Sagc result = (int)netpgp_import_key(arg1,arg2);
2979e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2980e1d61885Sagc
2981e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2982e1d61885Sagc XSRETURN(argvi);
2983e1d61885Sagc fail:
2984e1d61885Sagc
2985e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2986e1d61885Sagc SWIG_croak_null();
2987e1d61885Sagc }
2988e1d61885Sagc }
2989e1d61885Sagc
2990e1d61885Sagc
XS(_wrap_netpgp_generate_key)2991e1d61885Sagc XS(_wrap_netpgp_generate_key) {
2992e1d61885Sagc {
2993e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
2994e1d61885Sagc char *arg2 = (char *) 0 ;
2995e1d61885Sagc int arg3 ;
2996e1d61885Sagc int result;
2997e1d61885Sagc void *argp1 = 0 ;
2998e1d61885Sagc int res1 = 0 ;
2999e1d61885Sagc int res2 ;
3000e1d61885Sagc char *buf2 = 0 ;
3001e1d61885Sagc int alloc2 = 0 ;
3002e1d61885Sagc int val3 ;
3003e1d61885Sagc int ecode3 = 0 ;
3004e1d61885Sagc int argvi = 0;
3005e1d61885Sagc dXSARGS;
3006e1d61885Sagc
3007e1d61885Sagc if ((items < 3) || (items > 3)) {
3008e1d61885Sagc SWIG_croak("Usage: netpgp_generate_key(netpgp_t *,char *,int);");
3009e1d61885Sagc }
3010e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3011e1d61885Sagc if (!SWIG_IsOK(res1)) {
3012e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_generate_key" "', argument " "1"" of type '" "netpgp_t *""'");
3013e1d61885Sagc }
3014e1d61885Sagc arg1 = (netpgp_t *)(argp1);
3015e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
3016e1d61885Sagc if (!SWIG_IsOK(res2)) {
3017e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_generate_key" "', argument " "2"" of type '" "char *""'");
3018e1d61885Sagc }
3019e1d61885Sagc arg2 = (char *)(buf2);
3020e1d61885Sagc ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
3021e1d61885Sagc if (!SWIG_IsOK(ecode3)) {
3022e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_generate_key" "', argument " "3"" of type '" "int""'");
3023e1d61885Sagc }
3024e1d61885Sagc arg3 = (int)(val3);
3025e1d61885Sagc result = (int)netpgp_generate_key(arg1,arg2,arg3);
3026e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3027e1d61885Sagc
3028e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3029e1d61885Sagc
3030e1d61885Sagc XSRETURN(argvi);
3031e1d61885Sagc fail:
3032e1d61885Sagc
3033e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3034e1d61885Sagc
3035e1d61885Sagc SWIG_croak_null();
3036e1d61885Sagc }
3037e1d61885Sagc }
3038e1d61885Sagc
3039e1d61885Sagc
XS(_wrap_netpgp_encrypt_file)3040e1d61885Sagc XS(_wrap_netpgp_encrypt_file) {
3041e1d61885Sagc {
3042e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3043e1d61885Sagc char *arg2 = (char *) 0 ;
3044e1d61885Sagc char *arg3 = (char *) 0 ;
3045e1d61885Sagc char *arg4 = (char *) 0 ;
3046e1d61885Sagc int arg5 ;
3047e1d61885Sagc int result;
3048e1d61885Sagc void *argp1 = 0 ;
3049e1d61885Sagc int res1 = 0 ;
3050e1d61885Sagc int res2 ;
3051e1d61885Sagc char *buf2 = 0 ;
3052e1d61885Sagc int alloc2 = 0 ;
3053e1d61885Sagc int res3 ;
3054e1d61885Sagc char *buf3 = 0 ;
3055e1d61885Sagc int alloc3 = 0 ;
3056e1d61885Sagc int res4 ;
3057e1d61885Sagc char *buf4 = 0 ;
3058e1d61885Sagc int alloc4 = 0 ;
3059e1d61885Sagc int val5 ;
3060e1d61885Sagc int ecode5 = 0 ;
3061e1d61885Sagc int argvi = 0;
3062e1d61885Sagc dXSARGS;
3063e1d61885Sagc
3064e1d61885Sagc if ((items < 5) || (items > 5)) {
3065e1d61885Sagc SWIG_croak("Usage: netpgp_encrypt_file(netpgp_t *,char const *,char const *,char *,int);");
3066e1d61885Sagc }
3067e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3068e1d61885Sagc if (!SWIG_IsOK(res1)) {
3069e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_encrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
3070e1d61885Sagc }
3071e1d61885Sagc arg1 = (netpgp_t *)(argp1);
3072e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
3073e1d61885Sagc if (!SWIG_IsOK(res2)) {
3074e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_encrypt_file" "', argument " "2"" of type '" "char const *""'");
3075e1d61885Sagc }
3076e1d61885Sagc arg2 = (char *)(buf2);
3077e1d61885Sagc res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
3078e1d61885Sagc if (!SWIG_IsOK(res3)) {
3079e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_encrypt_file" "', argument " "3"" of type '" "char const *""'");
3080e1d61885Sagc }
3081e1d61885Sagc arg3 = (char *)(buf3);
3082e1d61885Sagc res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
3083e1d61885Sagc if (!SWIG_IsOK(res4)) {
3084e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_encrypt_file" "', argument " "4"" of type '" "char *""'");
3085e1d61885Sagc }
3086e1d61885Sagc arg4 = (char *)(buf4);
3087e1d61885Sagc ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
3088e1d61885Sagc if (!SWIG_IsOK(ecode5)) {
3089e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_encrypt_file" "', argument " "5"" of type '" "int""'");
3090e1d61885Sagc }
3091e1d61885Sagc arg5 = (int)(val5);
3092e1d61885Sagc result = (int)netpgp_encrypt_file(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
3093e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3094e1d61885Sagc
3095e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3096e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3097e1d61885Sagc if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
3098e1d61885Sagc
3099e1d61885Sagc XSRETURN(argvi);
3100e1d61885Sagc fail:
3101e1d61885Sagc
3102e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3103e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3104e1d61885Sagc if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
3105e1d61885Sagc
3106e1d61885Sagc SWIG_croak_null();
3107e1d61885Sagc }
3108e1d61885Sagc }
3109e1d61885Sagc
3110e1d61885Sagc
XS(_wrap_netpgp_decrypt_file)3111e1d61885Sagc XS(_wrap_netpgp_decrypt_file) {
3112e1d61885Sagc {
3113e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3114e1d61885Sagc char *arg2 = (char *) 0 ;
3115e1d61885Sagc char *arg3 = (char *) 0 ;
3116e1d61885Sagc int arg4 ;
3117e1d61885Sagc int result;
3118e1d61885Sagc void *argp1 = 0 ;
3119e1d61885Sagc int res1 = 0 ;
3120e1d61885Sagc int res2 ;
3121e1d61885Sagc char *buf2 = 0 ;
3122e1d61885Sagc int alloc2 = 0 ;
3123e1d61885Sagc int res3 ;
3124e1d61885Sagc char *buf3 = 0 ;
3125e1d61885Sagc int alloc3 = 0 ;
3126e1d61885Sagc int val4 ;
3127e1d61885Sagc int ecode4 = 0 ;
3128e1d61885Sagc int argvi = 0;
3129e1d61885Sagc dXSARGS;
3130e1d61885Sagc
3131e1d61885Sagc if ((items < 4) || (items > 4)) {
3132e1d61885Sagc SWIG_croak("Usage: netpgp_decrypt_file(netpgp_t *,char const *,char *,int);");
3133e1d61885Sagc }
3134e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3135e1d61885Sagc if (!SWIG_IsOK(res1)) {
3136e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_decrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
3137e1d61885Sagc }
3138e1d61885Sagc arg1 = (netpgp_t *)(argp1);
3139e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
3140e1d61885Sagc if (!SWIG_IsOK(res2)) {
3141e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_decrypt_file" "', argument " "2"" of type '" "char const *""'");
3142e1d61885Sagc }
3143e1d61885Sagc arg2 = (char *)(buf2);
3144e1d61885Sagc res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
3145e1d61885Sagc if (!SWIG_IsOK(res3)) {
3146e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_decrypt_file" "', argument " "3"" of type '" "char *""'");
3147e1d61885Sagc }
3148e1d61885Sagc arg3 = (char *)(buf3);
3149e1d61885Sagc ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
3150e1d61885Sagc if (!SWIG_IsOK(ecode4)) {
3151e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_decrypt_file" "', argument " "4"" of type '" "int""'");
3152e1d61885Sagc }
3153e1d61885Sagc arg4 = (int)(val4);
3154e1d61885Sagc result = (int)netpgp_decrypt_file(arg1,(char const *)arg2,arg3,arg4);
3155e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3156e1d61885Sagc
3157e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3158e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3159e1d61885Sagc
3160e1d61885Sagc XSRETURN(argvi);
3161e1d61885Sagc fail:
3162e1d61885Sagc
3163e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3164e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3165e1d61885Sagc
3166e1d61885Sagc SWIG_croak_null();
3167e1d61885Sagc }
3168e1d61885Sagc }
3169e1d61885Sagc
3170e1d61885Sagc
XS(_wrap_netpgp_sign_file)3171e1d61885Sagc XS(_wrap_netpgp_sign_file) {
3172e1d61885Sagc {
3173e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3174e1d61885Sagc char *arg2 = (char *) 0 ;
3175e1d61885Sagc char *arg3 = (char *) 0 ;
3176e1d61885Sagc char *arg4 = (char *) 0 ;
3177e1d61885Sagc int arg5 ;
3178e1d61885Sagc int arg6 ;
3179e1d61885Sagc int arg7 ;
3180e1d61885Sagc int result;
3181e1d61885Sagc void *argp1 = 0 ;
3182e1d61885Sagc int res1 = 0 ;
3183e1d61885Sagc int res2 ;
3184e1d61885Sagc char *buf2 = 0 ;
3185e1d61885Sagc int alloc2 = 0 ;
3186e1d61885Sagc int res3 ;
3187e1d61885Sagc char *buf3 = 0 ;
3188e1d61885Sagc int alloc3 = 0 ;
3189e1d61885Sagc int res4 ;
3190e1d61885Sagc char *buf4 = 0 ;
3191e1d61885Sagc int alloc4 = 0 ;
3192e1d61885Sagc int val5 ;
3193e1d61885Sagc int ecode5 = 0 ;
3194e1d61885Sagc int val6 ;
3195e1d61885Sagc int ecode6 = 0 ;
3196e1d61885Sagc int val7 ;
3197e1d61885Sagc int ecode7 = 0 ;
3198e1d61885Sagc int argvi = 0;
3199e1d61885Sagc dXSARGS;
3200e1d61885Sagc
3201e1d61885Sagc if ((items < 7) || (items > 7)) {
3202e1d61885Sagc SWIG_croak("Usage: netpgp_sign_file(netpgp_t *,char const *,char const *,char *,int,int,int);");
3203e1d61885Sagc }
3204e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3205e1d61885Sagc if (!SWIG_IsOK(res1)) {
3206e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_sign_file" "', argument " "1"" of type '" "netpgp_t *""'");
3207e1d61885Sagc }
3208e1d61885Sagc arg1 = (netpgp_t *)(argp1);
3209e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
3210e1d61885Sagc if (!SWIG_IsOK(res2)) {
3211e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_sign_file" "', argument " "2"" of type '" "char const *""'");
3212e1d61885Sagc }
3213e1d61885Sagc arg2 = (char *)(buf2);
3214e1d61885Sagc res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
3215e1d61885Sagc if (!SWIG_IsOK(res3)) {
3216e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_sign_file" "', argument " "3"" of type '" "char const *""'");
3217e1d61885Sagc }
3218e1d61885Sagc arg3 = (char *)(buf3);
3219e1d61885Sagc res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
3220e1d61885Sagc if (!SWIG_IsOK(res4)) {
3221e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_sign_file" "', argument " "4"" of type '" "char *""'");
3222e1d61885Sagc }
3223e1d61885Sagc arg4 = (char *)(buf4);
3224e1d61885Sagc ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
3225e1d61885Sagc if (!SWIG_IsOK(ecode5)) {
3226e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_sign_file" "', argument " "5"" of type '" "int""'");
3227e1d61885Sagc }
3228e1d61885Sagc arg5 = (int)(val5);
3229e1d61885Sagc ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
3230e1d61885Sagc if (!SWIG_IsOK(ecode6)) {
3231e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_sign_file" "', argument " "6"" of type '" "int""'");
3232e1d61885Sagc }
3233e1d61885Sagc arg6 = (int)(val6);
3234e1d61885Sagc ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
3235e1d61885Sagc if (!SWIG_IsOK(ecode7)) {
3236e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "netpgp_sign_file" "', argument " "7"" of type '" "int""'");
3237e1d61885Sagc }
3238e1d61885Sagc arg7 = (int)(val7);
3239e1d61885Sagc result = (int)netpgp_sign_file(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7);
3240e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3241e1d61885Sagc
3242e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3243e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3244e1d61885Sagc if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
3245e1d61885Sagc
3246e1d61885Sagc
3247e1d61885Sagc
3248e1d61885Sagc XSRETURN(argvi);
3249e1d61885Sagc fail:
3250e1d61885Sagc
3251e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3252e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3253e1d61885Sagc if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
3254e1d61885Sagc
3255e1d61885Sagc
3256e1d61885Sagc
3257e1d61885Sagc SWIG_croak_null();
3258e1d61885Sagc }
3259e1d61885Sagc }
3260e1d61885Sagc
3261e1d61885Sagc
XS(_wrap_netpgp_verify_file)3262e1d61885Sagc XS(_wrap_netpgp_verify_file) {
3263e1d61885Sagc {
3264e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3265e1d61885Sagc char *arg2 = (char *) 0 ;
3266e1d61885Sagc char *arg3 = (char *) 0 ;
3267e1d61885Sagc int arg4 ;
3268e1d61885Sagc int result;
3269e1d61885Sagc void *argp1 = 0 ;
3270e1d61885Sagc int res1 = 0 ;
3271e1d61885Sagc int res2 ;
3272e1d61885Sagc char *buf2 = 0 ;
3273e1d61885Sagc int alloc2 = 0 ;
3274e1d61885Sagc int res3 ;
3275e1d61885Sagc char *buf3 = 0 ;
3276e1d61885Sagc int alloc3 = 0 ;
3277e1d61885Sagc int val4 ;
3278e1d61885Sagc int ecode4 = 0 ;
3279e1d61885Sagc int argvi = 0;
3280e1d61885Sagc dXSARGS;
3281e1d61885Sagc
3282e1d61885Sagc if ((items < 4) || (items > 4)) {
3283e1d61885Sagc SWIG_croak("Usage: netpgp_verify_file(netpgp_t *,char const *,char const *,int);");
3284e1d61885Sagc }
3285e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3286e1d61885Sagc if (!SWIG_IsOK(res1)) {
3287e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_verify_file" "', argument " "1"" of type '" "netpgp_t *""'");
3288e1d61885Sagc }
3289e1d61885Sagc arg1 = (netpgp_t *)(argp1);
3290e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
3291e1d61885Sagc if (!SWIG_IsOK(res2)) {
3292e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_verify_file" "', argument " "2"" of type '" "char const *""'");
3293e1d61885Sagc }
3294e1d61885Sagc arg2 = (char *)(buf2);
3295e1d61885Sagc res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
3296e1d61885Sagc if (!SWIG_IsOK(res3)) {
3297e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_verify_file" "', argument " "3"" of type '" "char const *""'");
3298e1d61885Sagc }
3299e1d61885Sagc arg3 = (char *)(buf3);
3300e1d61885Sagc ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
3301e1d61885Sagc if (!SWIG_IsOK(ecode4)) {
3302e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_verify_file" "', argument " "4"" of type '" "int""'");
3303e1d61885Sagc }
3304e1d61885Sagc arg4 = (int)(val4);
3305e1d61885Sagc result = (int)netpgp_verify_file(arg1,(char const *)arg2,(char const *)arg3,arg4);
3306e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3307e1d61885Sagc
3308e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3309e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3310e1d61885Sagc
3311e1d61885Sagc XSRETURN(argvi);
3312e1d61885Sagc fail:
3313e1d61885Sagc
3314e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3315e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3316e1d61885Sagc
3317e1d61885Sagc SWIG_croak_null();
3318e1d61885Sagc }
3319e1d61885Sagc }
3320e1d61885Sagc
3321e1d61885Sagc
XS(_wrap_netpgp_sign_memory)3322e1d61885Sagc XS(_wrap_netpgp_sign_memory) {
3323e1d61885Sagc {
3324e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3325e1d61885Sagc char *arg2 = (char *) 0 ;
3326e1d61885Sagc char *arg3 = (char *) 0 ;
3327e1d61885Sagc size_t arg4 ;
3328e1d61885Sagc char *arg5 = (char *) 0 ;
3329e1d61885Sagc size_t arg6 ;
3330e1d61885Sagc unsigned int arg7 ;
3331e1d61885Sagc unsigned int arg8 ;
3332e1d61885Sagc int result;
3333e1d61885Sagc void *argp1 = 0 ;
3334e1d61885Sagc int res1 = 0 ;
3335e1d61885Sagc int res2 ;
3336e1d61885Sagc char *buf2 = 0 ;
3337e1d61885Sagc int alloc2 = 0 ;
3338e1d61885Sagc int res3 ;
3339e1d61885Sagc char *buf3 = 0 ;
3340e1d61885Sagc int alloc3 = 0 ;
3341e1d61885Sagc size_t val4 ;
3342e1d61885Sagc int ecode4 = 0 ;
3343e1d61885Sagc int res5 ;
3344e1d61885Sagc char *buf5 = 0 ;
3345e1d61885Sagc int alloc5 = 0 ;
3346e1d61885Sagc size_t val6 ;
3347e1d61885Sagc int ecode6 = 0 ;
3348e1d61885Sagc unsigned int val7 ;
3349e1d61885Sagc int ecode7 = 0 ;
3350e1d61885Sagc unsigned int val8 ;
3351e1d61885Sagc int ecode8 = 0 ;
3352e1d61885Sagc int argvi = 0;
3353e1d61885Sagc dXSARGS;
3354e1d61885Sagc
3355e1d61885Sagc if ((items < 8) || (items > 8)) {
3356e1d61885Sagc SWIG_croak("Usage: netpgp_sign_memory(netpgp_t *,char const *,char *,size_t,char *,size_t,unsigned int const,unsigned int const);");
3357e1d61885Sagc }
3358e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3359e1d61885Sagc if (!SWIG_IsOK(res1)) {
3360e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_sign_memory" "', argument " "1"" of type '" "netpgp_t *""'");
3361e1d61885Sagc }
3362e1d61885Sagc arg1 = (netpgp_t *)(argp1);
3363e1d61885Sagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
3364e1d61885Sagc if (!SWIG_IsOK(res2)) {
3365e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_sign_memory" "', argument " "2"" of type '" "char const *""'");
3366e1d61885Sagc }
3367e1d61885Sagc arg2 = (char *)(buf2);
3368e1d61885Sagc res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
3369e1d61885Sagc if (!SWIG_IsOK(res3)) {
3370e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_sign_memory" "', argument " "3"" of type '" "char *""'");
3371e1d61885Sagc }
3372e1d61885Sagc arg3 = (char *)(buf3);
3373e1d61885Sagc ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
3374e1d61885Sagc if (!SWIG_IsOK(ecode4)) {
3375e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_sign_memory" "', argument " "4"" of type '" "size_t""'");
3376e1d61885Sagc }
3377e1d61885Sagc arg4 = (size_t)(val4);
3378e1d61885Sagc res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5);
3379e1d61885Sagc if (!SWIG_IsOK(res5)) {
3380e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "netpgp_sign_memory" "', argument " "5"" of type '" "char *""'");
3381e1d61885Sagc }
3382e1d61885Sagc arg5 = (char *)(buf5);
3383e1d61885Sagc ecode6 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
3384e1d61885Sagc if (!SWIG_IsOK(ecode6)) {
3385e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_sign_memory" "', argument " "6"" of type '" "size_t""'");
3386e1d61885Sagc }
3387e1d61885Sagc arg6 = (size_t)(val6);
3388e1d61885Sagc ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
3389e1d61885Sagc if (!SWIG_IsOK(ecode7)) {
3390e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "netpgp_sign_memory" "', argument " "7"" of type '" "unsigned int""'");
3391e1d61885Sagc }
3392e1d61885Sagc arg7 = (unsigned int)(val7);
3393e1d61885Sagc ecode8 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(7), &val8);
3394e1d61885Sagc if (!SWIG_IsOK(ecode8)) {
3395e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "netpgp_sign_memory" "', argument " "8"" of type '" "unsigned int""'");
3396e1d61885Sagc }
3397e1d61885Sagc arg8 = (unsigned int)(val8);
3398e1d61885Sagc result = (int)netpgp_sign_memory(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
3399e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3400e1d61885Sagc
3401e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3402e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3403e1d61885Sagc
3404e1d61885Sagc if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
3405e1d61885Sagc
3406e1d61885Sagc
3407e1d61885Sagc
3408e1d61885Sagc XSRETURN(argvi);
3409e1d61885Sagc fail:
3410e1d61885Sagc
3411e1d61885Sagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3412e1d61885Sagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3413e1d61885Sagc
3414e1d61885Sagc if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
3415e1d61885Sagc
3416e1d61885Sagc
3417e1d61885Sagc
3418e1d61885Sagc SWIG_croak_null();
3419e1d61885Sagc }
3420e1d61885Sagc }
3421e1d61885Sagc
3422e1d61885Sagc
XS(_wrap_netpgp_verify_memory)3423e1d61885Sagc XS(_wrap_netpgp_verify_memory) {
3424e1d61885Sagc {
3425e1d61885Sagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3426e1d61885Sagc void *arg2 = (void *) 0 ;
3427e1d61885Sagc size_t arg3 ;
3428*cc1edcabSagc void *arg4 = (void *) 0 ;
3429*cc1edcabSagc size_t arg5 ;
3430*cc1edcabSagc int arg6 ;
3431e1d61885Sagc int result;
3432e1d61885Sagc void *argp1 = 0 ;
3433e1d61885Sagc int res1 = 0 ;
3434e1d61885Sagc int res2 ;
3435e1d61885Sagc size_t val3 ;
3436e1d61885Sagc int ecode3 = 0 ;
3437*cc1edcabSagc int res4 ;
3438*cc1edcabSagc size_t val5 ;
3439*cc1edcabSagc int ecode5 = 0 ;
3440*cc1edcabSagc int val6 ;
3441*cc1edcabSagc int ecode6 = 0 ;
3442e1d61885Sagc int argvi = 0;
3443e1d61885Sagc dXSARGS;
3444e1d61885Sagc
3445*cc1edcabSagc if ((items < 6) || (items > 6)) {
3446*cc1edcabSagc SWIG_croak("Usage: netpgp_verify_memory(netpgp_t *,void const *,size_t const,void *,size_t,int const);");
3447e1d61885Sagc }
3448e1d61885Sagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3449e1d61885Sagc if (!SWIG_IsOK(res1)) {
3450e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_verify_memory" "', argument " "1"" of type '" "netpgp_t *""'");
3451e1d61885Sagc }
3452e1d61885Sagc arg1 = (netpgp_t *)(argp1);
3453e1d61885Sagc res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0);
3454e1d61885Sagc if (!SWIG_IsOK(res2)) {
3455e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_verify_memory" "', argument " "2"" of type '" "void const *""'");
3456e1d61885Sagc }
3457e1d61885Sagc ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
3458e1d61885Sagc if (!SWIG_IsOK(ecode3)) {
3459e1d61885Sagc SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_verify_memory" "', argument " "3"" of type '" "size_t""'");
3460e1d61885Sagc }
3461e1d61885Sagc arg3 = (size_t)(val3);
3462*cc1edcabSagc res4 = SWIG_ConvertPtr(ST(3),SWIG_as_voidptrptr(&arg4), 0, 0);
3463*cc1edcabSagc if (!SWIG_IsOK(res4)) {
3464*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_verify_memory" "', argument " "4"" of type '" "void *""'");
3465e1d61885Sagc }
3466*cc1edcabSagc ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
3467*cc1edcabSagc if (!SWIG_IsOK(ecode5)) {
3468*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_verify_memory" "', argument " "5"" of type '" "size_t""'");
3469*cc1edcabSagc }
3470*cc1edcabSagc arg5 = (size_t)(val5);
3471*cc1edcabSagc ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
3472*cc1edcabSagc if (!SWIG_IsOK(ecode6)) {
3473*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_verify_memory" "', argument " "6"" of type '" "int""'");
3474*cc1edcabSagc }
3475*cc1edcabSagc arg6 = (int)(val6);
3476*cc1edcabSagc result = (int)netpgp_verify_memory(arg1,(void const *)arg2,arg3,arg4,arg5,arg6);
3477e1d61885Sagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3478e1d61885Sagc
3479e1d61885Sagc
3480e1d61885Sagc
3481e1d61885Sagc
3482*cc1edcabSagc
3483*cc1edcabSagc
3484e1d61885Sagc XSRETURN(argvi);
3485e1d61885Sagc fail:
3486e1d61885Sagc
3487e1d61885Sagc
3488e1d61885Sagc
3489e1d61885Sagc
3490*cc1edcabSagc
3491*cc1edcabSagc
3492*cc1edcabSagc SWIG_croak_null();
3493*cc1edcabSagc }
3494*cc1edcabSagc }
3495*cc1edcabSagc
3496*cc1edcabSagc
XS(_wrap_netpgp_encrypt_memory)3497*cc1edcabSagc XS(_wrap_netpgp_encrypt_memory) {
3498*cc1edcabSagc {
3499*cc1edcabSagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3500*cc1edcabSagc char *arg2 = (char *) 0 ;
3501*cc1edcabSagc void *arg3 = (void *) 0 ;
3502*cc1edcabSagc size_t arg4 ;
3503*cc1edcabSagc char *arg5 = (char *) 0 ;
3504*cc1edcabSagc size_t arg6 ;
3505*cc1edcabSagc int arg7 ;
3506*cc1edcabSagc int result;
3507*cc1edcabSagc void *argp1 = 0 ;
3508*cc1edcabSagc int res1 = 0 ;
3509*cc1edcabSagc int res2 ;
3510*cc1edcabSagc char *buf2 = 0 ;
3511*cc1edcabSagc int alloc2 = 0 ;
3512*cc1edcabSagc int res3 ;
3513*cc1edcabSagc size_t val4 ;
3514*cc1edcabSagc int ecode4 = 0 ;
3515*cc1edcabSagc int res5 ;
3516*cc1edcabSagc char *buf5 = 0 ;
3517*cc1edcabSagc int alloc5 = 0 ;
3518*cc1edcabSagc size_t val6 ;
3519*cc1edcabSagc int ecode6 = 0 ;
3520*cc1edcabSagc int val7 ;
3521*cc1edcabSagc int ecode7 = 0 ;
3522*cc1edcabSagc int argvi = 0;
3523*cc1edcabSagc dXSARGS;
3524*cc1edcabSagc
3525*cc1edcabSagc if ((items < 7) || (items > 7)) {
3526*cc1edcabSagc SWIG_croak("Usage: netpgp_encrypt_memory(netpgp_t *,char const *,void *,size_t const,char *,size_t,int);");
3527*cc1edcabSagc }
3528*cc1edcabSagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3529*cc1edcabSagc if (!SWIG_IsOK(res1)) {
3530*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_encrypt_memory" "', argument " "1"" of type '" "netpgp_t *""'");
3531*cc1edcabSagc }
3532*cc1edcabSagc arg1 = (netpgp_t *)(argp1);
3533*cc1edcabSagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
3534*cc1edcabSagc if (!SWIG_IsOK(res2)) {
3535*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_encrypt_memory" "', argument " "2"" of type '" "char const *""'");
3536*cc1edcabSagc }
3537*cc1edcabSagc arg2 = (char *)(buf2);
3538*cc1edcabSagc res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0);
3539*cc1edcabSagc if (!SWIG_IsOK(res3)) {
3540*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_encrypt_memory" "', argument " "3"" of type '" "void *""'");
3541*cc1edcabSagc }
3542*cc1edcabSagc ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
3543*cc1edcabSagc if (!SWIG_IsOK(ecode4)) {
3544*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_encrypt_memory" "', argument " "4"" of type '" "size_t""'");
3545*cc1edcabSagc }
3546*cc1edcabSagc arg4 = (size_t)(val4);
3547*cc1edcabSagc res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5);
3548*cc1edcabSagc if (!SWIG_IsOK(res5)) {
3549*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "netpgp_encrypt_memory" "', argument " "5"" of type '" "char *""'");
3550*cc1edcabSagc }
3551*cc1edcabSagc arg5 = (char *)(buf5);
3552*cc1edcabSagc ecode6 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
3553*cc1edcabSagc if (!SWIG_IsOK(ecode6)) {
3554*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_encrypt_memory" "', argument " "6"" of type '" "size_t""'");
3555*cc1edcabSagc }
3556*cc1edcabSagc arg6 = (size_t)(val6);
3557*cc1edcabSagc ecode7 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
3558*cc1edcabSagc if (!SWIG_IsOK(ecode7)) {
3559*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "netpgp_encrypt_memory" "', argument " "7"" of type '" "int""'");
3560*cc1edcabSagc }
3561*cc1edcabSagc arg7 = (int)(val7);
3562*cc1edcabSagc result = (int)netpgp_encrypt_memory(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
3563*cc1edcabSagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3564*cc1edcabSagc
3565*cc1edcabSagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3566*cc1edcabSagc
3567*cc1edcabSagc
3568*cc1edcabSagc if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
3569*cc1edcabSagc
3570*cc1edcabSagc
3571*cc1edcabSagc XSRETURN(argvi);
3572*cc1edcabSagc fail:
3573*cc1edcabSagc
3574*cc1edcabSagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3575*cc1edcabSagc
3576*cc1edcabSagc
3577*cc1edcabSagc if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
3578*cc1edcabSagc
3579*cc1edcabSagc
3580*cc1edcabSagc SWIG_croak_null();
3581*cc1edcabSagc }
3582*cc1edcabSagc }
3583*cc1edcabSagc
3584*cc1edcabSagc
XS(_wrap_netpgp_decrypt_memory)3585*cc1edcabSagc XS(_wrap_netpgp_decrypt_memory) {
3586*cc1edcabSagc {
3587*cc1edcabSagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3588*cc1edcabSagc void *arg2 = (void *) 0 ;
3589*cc1edcabSagc size_t arg3 ;
3590*cc1edcabSagc char *arg4 = (char *) 0 ;
3591*cc1edcabSagc size_t arg5 ;
3592*cc1edcabSagc int arg6 ;
3593*cc1edcabSagc int result;
3594*cc1edcabSagc void *argp1 = 0 ;
3595*cc1edcabSagc int res1 = 0 ;
3596*cc1edcabSagc int res2 ;
3597*cc1edcabSagc size_t val3 ;
3598*cc1edcabSagc int ecode3 = 0 ;
3599*cc1edcabSagc int res4 ;
3600*cc1edcabSagc char *buf4 = 0 ;
3601*cc1edcabSagc int alloc4 = 0 ;
3602*cc1edcabSagc size_t val5 ;
3603*cc1edcabSagc int ecode5 = 0 ;
3604*cc1edcabSagc int val6 ;
3605*cc1edcabSagc int ecode6 = 0 ;
3606*cc1edcabSagc int argvi = 0;
3607*cc1edcabSagc dXSARGS;
3608*cc1edcabSagc
3609*cc1edcabSagc if ((items < 6) || (items > 6)) {
3610*cc1edcabSagc SWIG_croak("Usage: netpgp_decrypt_memory(netpgp_t *,void const *,size_t const,char *,size_t,int const);");
3611*cc1edcabSagc }
3612*cc1edcabSagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3613*cc1edcabSagc if (!SWIG_IsOK(res1)) {
3614*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_decrypt_memory" "', argument " "1"" of type '" "netpgp_t *""'");
3615*cc1edcabSagc }
3616*cc1edcabSagc arg1 = (netpgp_t *)(argp1);
3617*cc1edcabSagc res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0);
3618*cc1edcabSagc if (!SWIG_IsOK(res2)) {
3619*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_decrypt_memory" "', argument " "2"" of type '" "void const *""'");
3620*cc1edcabSagc }
3621*cc1edcabSagc ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
3622*cc1edcabSagc if (!SWIG_IsOK(ecode3)) {
3623*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_decrypt_memory" "', argument " "3"" of type '" "size_t""'");
3624*cc1edcabSagc }
3625*cc1edcabSagc arg3 = (size_t)(val3);
3626*cc1edcabSagc res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
3627*cc1edcabSagc if (!SWIG_IsOK(res4)) {
3628*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_decrypt_memory" "', argument " "4"" of type '" "char *""'");
3629*cc1edcabSagc }
3630*cc1edcabSagc arg4 = (char *)(buf4);
3631*cc1edcabSagc ecode5 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
3632*cc1edcabSagc if (!SWIG_IsOK(ecode5)) {
3633*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_decrypt_memory" "', argument " "5"" of type '" "size_t""'");
3634*cc1edcabSagc }
3635*cc1edcabSagc arg5 = (size_t)(val5);
3636*cc1edcabSagc ecode6 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
3637*cc1edcabSagc if (!SWIG_IsOK(ecode6)) {
3638*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_decrypt_memory" "', argument " "6"" of type '" "int""'");
3639*cc1edcabSagc }
3640*cc1edcabSagc arg6 = (int)(val6);
3641*cc1edcabSagc result = (int)netpgp_decrypt_memory(arg1,(void const *)arg2,arg3,arg4,arg5,arg6);
3642*cc1edcabSagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3643*cc1edcabSagc
3644*cc1edcabSagc
3645*cc1edcabSagc
3646*cc1edcabSagc if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
3647*cc1edcabSagc
3648*cc1edcabSagc
3649*cc1edcabSagc XSRETURN(argvi);
3650*cc1edcabSagc fail:
3651*cc1edcabSagc
3652*cc1edcabSagc
3653*cc1edcabSagc
3654*cc1edcabSagc if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
3655*cc1edcabSagc
3656*cc1edcabSagc
3657*cc1edcabSagc SWIG_croak_null();
3658*cc1edcabSagc }
3659*cc1edcabSagc }
3660*cc1edcabSagc
3661*cc1edcabSagc
XS(_wrap_netpgp_match_keys)3662*cc1edcabSagc XS(_wrap_netpgp_match_keys) {
3663*cc1edcabSagc {
3664*cc1edcabSagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3665*cc1edcabSagc char *arg2 = (char *) 0 ;
3666*cc1edcabSagc char *arg3 = (char *) 0 ;
3667*cc1edcabSagc void *arg4 = (void *) 0 ;
3668*cc1edcabSagc int arg5 ;
3669*cc1edcabSagc int result;
3670*cc1edcabSagc void *argp1 = 0 ;
3671*cc1edcabSagc int res1 = 0 ;
3672*cc1edcabSagc int res2 ;
3673*cc1edcabSagc char *buf2 = 0 ;
3674*cc1edcabSagc int alloc2 = 0 ;
3675*cc1edcabSagc int res3 ;
3676*cc1edcabSagc char *buf3 = 0 ;
3677*cc1edcabSagc int alloc3 = 0 ;
3678*cc1edcabSagc int res4 ;
3679*cc1edcabSagc int val5 ;
3680*cc1edcabSagc int ecode5 = 0 ;
3681*cc1edcabSagc int argvi = 0;
3682*cc1edcabSagc dXSARGS;
3683*cc1edcabSagc
3684*cc1edcabSagc if ((items < 5) || (items > 5)) {
3685*cc1edcabSagc SWIG_croak("Usage: netpgp_match_keys(netpgp_t *,char *,char const *,void *,int const);");
3686*cc1edcabSagc }
3687*cc1edcabSagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3688*cc1edcabSagc if (!SWIG_IsOK(res1)) {
3689*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_match_keys" "', argument " "1"" of type '" "netpgp_t *""'");
3690*cc1edcabSagc }
3691*cc1edcabSagc arg1 = (netpgp_t *)(argp1);
3692*cc1edcabSagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
3693*cc1edcabSagc if (!SWIG_IsOK(res2)) {
3694*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_match_keys" "', argument " "2"" of type '" "char *""'");
3695*cc1edcabSagc }
3696*cc1edcabSagc arg2 = (char *)(buf2);
3697*cc1edcabSagc res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
3698*cc1edcabSagc if (!SWIG_IsOK(res3)) {
3699*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_match_keys" "', argument " "3"" of type '" "char const *""'");
3700*cc1edcabSagc }
3701*cc1edcabSagc arg3 = (char *)(buf3);
3702*cc1edcabSagc res4 = SWIG_ConvertPtr(ST(3),SWIG_as_voidptrptr(&arg4), 0, 0);
3703*cc1edcabSagc if (!SWIG_IsOK(res4)) {
3704*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_match_keys" "', argument " "4"" of type '" "void *""'");
3705*cc1edcabSagc }
3706*cc1edcabSagc ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
3707*cc1edcabSagc if (!SWIG_IsOK(ecode5)) {
3708*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_match_keys" "', argument " "5"" of type '" "int""'");
3709*cc1edcabSagc }
3710*cc1edcabSagc arg5 = (int)(val5);
3711*cc1edcabSagc result = (int)netpgp_match_keys(arg1,arg2,(char const *)arg3,arg4,arg5);
3712*cc1edcabSagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3713*cc1edcabSagc
3714*cc1edcabSagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3715*cc1edcabSagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3716*cc1edcabSagc
3717*cc1edcabSagc
3718*cc1edcabSagc XSRETURN(argvi);
3719*cc1edcabSagc fail:
3720*cc1edcabSagc
3721*cc1edcabSagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3722*cc1edcabSagc if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3723*cc1edcabSagc
3724*cc1edcabSagc
3725*cc1edcabSagc SWIG_croak_null();
3726*cc1edcabSagc }
3727*cc1edcabSagc }
3728*cc1edcabSagc
3729*cc1edcabSagc
XS(_wrap_netpgp_match_pubkeys)3730*cc1edcabSagc XS(_wrap_netpgp_match_pubkeys) {
3731*cc1edcabSagc {
3732*cc1edcabSagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3733*cc1edcabSagc char *arg2 = (char *) 0 ;
3734*cc1edcabSagc void *arg3 = (void *) 0 ;
3735*cc1edcabSagc int result;
3736*cc1edcabSagc void *argp1 = 0 ;
3737*cc1edcabSagc int res1 = 0 ;
3738*cc1edcabSagc int res2 ;
3739*cc1edcabSagc char *buf2 = 0 ;
3740*cc1edcabSagc int alloc2 = 0 ;
3741*cc1edcabSagc int res3 ;
3742*cc1edcabSagc int argvi = 0;
3743*cc1edcabSagc dXSARGS;
3744*cc1edcabSagc
3745*cc1edcabSagc if ((items < 3) || (items > 3)) {
3746*cc1edcabSagc SWIG_croak("Usage: netpgp_match_pubkeys(netpgp_t *,char *,void *);");
3747*cc1edcabSagc }
3748*cc1edcabSagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3749*cc1edcabSagc if (!SWIG_IsOK(res1)) {
3750*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_match_pubkeys" "', argument " "1"" of type '" "netpgp_t *""'");
3751*cc1edcabSagc }
3752*cc1edcabSagc arg1 = (netpgp_t *)(argp1);
3753*cc1edcabSagc res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
3754*cc1edcabSagc if (!SWIG_IsOK(res2)) {
3755*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_match_pubkeys" "', argument " "2"" of type '" "char *""'");
3756*cc1edcabSagc }
3757*cc1edcabSagc arg2 = (char *)(buf2);
3758*cc1edcabSagc res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0);
3759*cc1edcabSagc if (!SWIG_IsOK(res3)) {
3760*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_match_pubkeys" "', argument " "3"" of type '" "void *""'");
3761*cc1edcabSagc }
3762*cc1edcabSagc result = (int)netpgp_match_pubkeys(arg1,arg2,arg3);
3763*cc1edcabSagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3764*cc1edcabSagc
3765*cc1edcabSagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3766*cc1edcabSagc
3767*cc1edcabSagc XSRETURN(argvi);
3768*cc1edcabSagc fail:
3769*cc1edcabSagc
3770*cc1edcabSagc if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3771*cc1edcabSagc
3772*cc1edcabSagc SWIG_croak_null();
3773*cc1edcabSagc }
3774*cc1edcabSagc }
3775*cc1edcabSagc
3776*cc1edcabSagc
XS(_wrap_netpgp_validate_sigs)3777*cc1edcabSagc XS(_wrap_netpgp_validate_sigs) {
3778*cc1edcabSagc {
3779*cc1edcabSagc netpgp_t *arg1 = (netpgp_t *) 0 ;
3780*cc1edcabSagc int result;
3781*cc1edcabSagc void *argp1 = 0 ;
3782*cc1edcabSagc int res1 = 0 ;
3783*cc1edcabSagc int argvi = 0;
3784*cc1edcabSagc dXSARGS;
3785*cc1edcabSagc
3786*cc1edcabSagc if ((items < 1) || (items > 1)) {
3787*cc1edcabSagc SWIG_croak("Usage: netpgp_validate_sigs(netpgp_t *);");
3788*cc1edcabSagc }
3789*cc1edcabSagc res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_netpgp_t, 0 | 0 );
3790*cc1edcabSagc if (!SWIG_IsOK(res1)) {
3791*cc1edcabSagc SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_validate_sigs" "', argument " "1"" of type '" "netpgp_t *""'");
3792*cc1edcabSagc }
3793*cc1edcabSagc arg1 = (netpgp_t *)(argp1);
3794*cc1edcabSagc result = (int)netpgp_validate_sigs(arg1);
3795*cc1edcabSagc ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3796*cc1edcabSagc
3797*cc1edcabSagc XSRETURN(argvi);
3798*cc1edcabSagc fail:
3799*cc1edcabSagc
3800e1d61885Sagc SWIG_croak_null();
3801e1d61885Sagc }
3802e1d61885Sagc }
3803e1d61885Sagc
3804e1d61885Sagc
3805e1d61885Sagc
3806e1d61885Sagc /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3807e1d61885Sagc
3808e1d61885Sagc static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3809e1d61885Sagc static swig_type_info _swigt__p_netpgp_t = {"_p_netpgp_t", "struct netpgp_t *|netpgp_t *", 0, 0, (void*)"netpgpperl::netpgp_t", 0};
3810e1d61885Sagc static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
3811e1d61885Sagc static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
3812e1d61885Sagc
3813e1d61885Sagc static swig_type_info *swig_type_initial[] = {
3814e1d61885Sagc &_swigt__p_char,
3815e1d61885Sagc &_swigt__p_netpgp_t,
3816e1d61885Sagc &_swigt__p_p_char,
3817e1d61885Sagc &_swigt__p_void,
3818e1d61885Sagc };
3819e1d61885Sagc
3820e1d61885Sagc static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3821e1d61885Sagc static swig_cast_info _swigc__p_netpgp_t[] = { {&_swigt__p_netpgp_t, 0, 0, 0},{0, 0, 0, 0}};
3822e1d61885Sagc static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
3823e1d61885Sagc static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
3824e1d61885Sagc
3825e1d61885Sagc static swig_cast_info *swig_cast_initial[] = {
3826e1d61885Sagc _swigc__p_char,
3827e1d61885Sagc _swigc__p_netpgp_t,
3828e1d61885Sagc _swigc__p_p_char,
3829e1d61885Sagc _swigc__p_void,
3830e1d61885Sagc };
3831e1d61885Sagc
3832e1d61885Sagc
3833e1d61885Sagc /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3834e1d61885Sagc
3835e1d61885Sagc static swig_constant_info swig_constants[] = {
3836e1d61885Sagc {0,0,0,0,0,0}
3837e1d61885Sagc };
3838e1d61885Sagc #ifdef __cplusplus
3839e1d61885Sagc }
3840e1d61885Sagc #endif
3841e1d61885Sagc static swig_variable_info swig_variables[] = {
3842e1d61885Sagc {0,0,0,0}
3843e1d61885Sagc };
3844e1d61885Sagc static swig_command_info swig_commands[] = {
3845e1d61885Sagc {"netpgpperlc::netpgp_t_c_set", _wrap_netpgp_t_c_set},
3846e1d61885Sagc {"netpgpperlc::netpgp_t_c_get", _wrap_netpgp_t_c_get},
3847e1d61885Sagc {"netpgpperlc::netpgp_t_size_set", _wrap_netpgp_t_size_set},
3848e1d61885Sagc {"netpgpperlc::netpgp_t_size_get", _wrap_netpgp_t_size_get},
3849e1d61885Sagc {"netpgpperlc::netpgp_t_name_set", _wrap_netpgp_t_name_set},
3850e1d61885Sagc {"netpgpperlc::netpgp_t_name_get", _wrap_netpgp_t_name_get},
3851e1d61885Sagc {"netpgpperlc::netpgp_t_value_set", _wrap_netpgp_t_value_set},
3852e1d61885Sagc {"netpgpperlc::netpgp_t_value_get", _wrap_netpgp_t_value_get},
3853e1d61885Sagc {"netpgpperlc::netpgp_t_pubring_set", _wrap_netpgp_t_pubring_set},
3854e1d61885Sagc {"netpgpperlc::netpgp_t_pubring_get", _wrap_netpgp_t_pubring_get},
3855e1d61885Sagc {"netpgpperlc::netpgp_t_secring_set", _wrap_netpgp_t_secring_set},
3856e1d61885Sagc {"netpgpperlc::netpgp_t_secring_get", _wrap_netpgp_t_secring_get},
3857e1d61885Sagc {"netpgpperlc::netpgp_t_io_set", _wrap_netpgp_t_io_set},
3858e1d61885Sagc {"netpgpperlc::netpgp_t_io_get", _wrap_netpgp_t_io_get},
3859e1d61885Sagc {"netpgpperlc::netpgp_t_passfp_set", _wrap_netpgp_t_passfp_set},
3860e1d61885Sagc {"netpgpperlc::netpgp_t_passfp_get", _wrap_netpgp_t_passfp_get},
3861e1d61885Sagc {"netpgpperlc::new_netpgp_t", _wrap_new_netpgp_t},
3862e1d61885Sagc {"netpgpperlc::delete_netpgp_t", _wrap_delete_netpgp_t},
3863e1d61885Sagc {"netpgpperlc::netpgp_init", _wrap_netpgp_init},
3864e1d61885Sagc {"netpgpperlc::netpgp_end", _wrap_netpgp_end},
3865e1d61885Sagc {"netpgpperlc::netpgp_set_debug", _wrap_netpgp_set_debug},
3866e1d61885Sagc {"netpgpperlc::netpgp_get_debug", _wrap_netpgp_get_debug},
3867e1d61885Sagc {"netpgpperlc::netpgp_get_info", _wrap_netpgp_get_info},
3868e1d61885Sagc {"netpgpperlc::netpgp_list_packets", _wrap_netpgp_list_packets},
3869e1d61885Sagc {"netpgpperlc::netpgp_setvar", _wrap_netpgp_setvar},
3870e1d61885Sagc {"netpgpperlc::netpgp_getvar", _wrap_netpgp_getvar},
3871*cc1edcabSagc {"netpgpperlc::netpgp_incvar", _wrap_netpgp_incvar},
3872*cc1edcabSagc {"netpgpperlc::netpgp_unsetvar", _wrap_netpgp_unsetvar},
3873*cc1edcabSagc {"netpgpperlc::netpgp_set_homedir", _wrap_netpgp_set_homedir},
3874e1d61885Sagc {"netpgpperlc::netpgp_list_keys", _wrap_netpgp_list_keys},
3875e1d61885Sagc {"netpgpperlc::netpgp_find_key", _wrap_netpgp_find_key},
3876e1d61885Sagc {"netpgpperlc::netpgp_get_key", _wrap_netpgp_get_key},
3877e1d61885Sagc {"netpgpperlc::netpgp_export_key", _wrap_netpgp_export_key},
3878e1d61885Sagc {"netpgpperlc::netpgp_import_key", _wrap_netpgp_import_key},
3879e1d61885Sagc {"netpgpperlc::netpgp_generate_key", _wrap_netpgp_generate_key},
3880e1d61885Sagc {"netpgpperlc::netpgp_encrypt_file", _wrap_netpgp_encrypt_file},
3881e1d61885Sagc {"netpgpperlc::netpgp_decrypt_file", _wrap_netpgp_decrypt_file},
3882e1d61885Sagc {"netpgpperlc::netpgp_sign_file", _wrap_netpgp_sign_file},
3883e1d61885Sagc {"netpgpperlc::netpgp_verify_file", _wrap_netpgp_verify_file},
3884e1d61885Sagc {"netpgpperlc::netpgp_sign_memory", _wrap_netpgp_sign_memory},
3885e1d61885Sagc {"netpgpperlc::netpgp_verify_memory", _wrap_netpgp_verify_memory},
3886*cc1edcabSagc {"netpgpperlc::netpgp_encrypt_memory", _wrap_netpgp_encrypt_memory},
3887*cc1edcabSagc {"netpgpperlc::netpgp_decrypt_memory", _wrap_netpgp_decrypt_memory},
3888*cc1edcabSagc {"netpgpperlc::netpgp_match_keys", _wrap_netpgp_match_keys},
3889*cc1edcabSagc {"netpgpperlc::netpgp_match_pubkeys", _wrap_netpgp_match_pubkeys},
3890*cc1edcabSagc {"netpgpperlc::netpgp_validate_sigs", _wrap_netpgp_validate_sigs},
3891e1d61885Sagc {0,0}
3892e1d61885Sagc };
3893e1d61885Sagc /* -----------------------------------------------------------------------------
3894e1d61885Sagc * Type initialization:
3895e1d61885Sagc * This problem is tough by the requirement that no dynamic
3896e1d61885Sagc * memory is used. Also, since swig_type_info structures store pointers to
3897e1d61885Sagc * swig_cast_info structures and swig_cast_info structures store pointers back
3898e1d61885Sagc * to swig_type_info structures, we need some lookup code at initialization.
3899e1d61885Sagc * The idea is that swig generates all the structures that are needed.
3900e1d61885Sagc * The runtime then collects these partially filled structures.
3901e1d61885Sagc * The SWIG_InitializeModule function takes these initial arrays out of
3902e1d61885Sagc * swig_module, and does all the lookup, filling in the swig_module.types
3903e1d61885Sagc * array with the correct data and linking the correct swig_cast_info
3904e1d61885Sagc * structures together.
3905e1d61885Sagc *
3906e1d61885Sagc * The generated swig_type_info structures are assigned staticly to an initial
3907e1d61885Sagc * array. We just loop through that array, and handle each type individually.
3908e1d61885Sagc * First we lookup if this type has been already loaded, and if so, use the
3909e1d61885Sagc * loaded structure instead of the generated one. Then we have to fill in the
3910e1d61885Sagc * cast linked list. The cast data is initially stored in something like a
3911e1d61885Sagc * two-dimensional array. Each row corresponds to a type (there are the same
3912e1d61885Sagc * number of rows as there are in the swig_type_initial array). Each entry in
3913e1d61885Sagc * a column is one of the swig_cast_info structures for that type.
3914e1d61885Sagc * The cast_initial array is actually an array of arrays, because each row has
3915e1d61885Sagc * a variable number of columns. So to actually build the cast linked list,
3916e1d61885Sagc * we find the array of casts associated with the type, and loop through it
3917e1d61885Sagc * adding the casts to the list. The one last trick we need to do is making
3918e1d61885Sagc * sure the type pointer in the swig_cast_info struct is correct.
3919e1d61885Sagc *
3920e1d61885Sagc * First off, we lookup the cast->type name to see if it is already loaded.
3921e1d61885Sagc * There are three cases to handle:
3922e1d61885Sagc * 1) If the cast->type has already been loaded AND the type we are adding
3923e1d61885Sagc * casting info to has not been loaded (it is in this module), THEN we
3924e1d61885Sagc * replace the cast->type pointer with the type pointer that has already
3925e1d61885Sagc * been loaded.
3926e1d61885Sagc * 2) If BOTH types (the one we are adding casting info to, and the
3927e1d61885Sagc * cast->type) are loaded, THEN the cast info has already been loaded by
3928e1d61885Sagc * the previous module so we just ignore it.
3929e1d61885Sagc * 3) Finally, if cast->type has not already been loaded, then we add that
3930e1d61885Sagc * swig_cast_info to the linked list (because the cast->type) pointer will
3931e1d61885Sagc * be correct.
3932e1d61885Sagc * ----------------------------------------------------------------------------- */
3933e1d61885Sagc
3934e1d61885Sagc #ifdef __cplusplus
3935e1d61885Sagc extern "C" {
3936e1d61885Sagc #if 0
3937e1d61885Sagc } /* c-mode */
3938e1d61885Sagc #endif
3939e1d61885Sagc #endif
3940e1d61885Sagc
3941e1d61885Sagc #if 0
3942e1d61885Sagc #define SWIGRUNTIME_DEBUG
3943e1d61885Sagc #endif
3944e1d61885Sagc
3945e1d61885Sagc
3946e1d61885Sagc SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)3947e1d61885Sagc SWIG_InitializeModule(void *clientdata) {
3948e1d61885Sagc size_t i;
3949e1d61885Sagc swig_module_info *module_head, *iter;
3950e1d61885Sagc int found;
3951e1d61885Sagc
3952e1d61885Sagc clientdata = clientdata;
3953e1d61885Sagc
3954e1d61885Sagc /* check to see if the circular list has been setup, if not, set it up */
3955e1d61885Sagc if (swig_module.next==0) {
3956e1d61885Sagc /* Initialize the swig_module */
3957e1d61885Sagc swig_module.type_initial = swig_type_initial;
3958e1d61885Sagc swig_module.cast_initial = swig_cast_initial;
3959e1d61885Sagc swig_module.next = &swig_module;
3960e1d61885Sagc }
3961e1d61885Sagc
3962e1d61885Sagc /* Try and load any already created modules */
3963e1d61885Sagc module_head = SWIG_GetModule(clientdata);
3964e1d61885Sagc if (!module_head) {
3965e1d61885Sagc /* This is the first module loaded for this interpreter */
3966e1d61885Sagc /* so set the swig module into the interpreter */
3967e1d61885Sagc SWIG_SetModule(clientdata, &swig_module);
3968e1d61885Sagc module_head = &swig_module;
3969e1d61885Sagc } else {
3970e1d61885Sagc /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3971e1d61885Sagc found=0;
3972e1d61885Sagc iter=module_head;
3973e1d61885Sagc do {
3974e1d61885Sagc if (iter==&swig_module) {
3975e1d61885Sagc found=1;
3976e1d61885Sagc break;
3977e1d61885Sagc }
3978e1d61885Sagc iter=iter->next;
3979e1d61885Sagc } while (iter!= module_head);
3980e1d61885Sagc
3981e1d61885Sagc /* if the is found in the list, then all is done and we may leave */
3982e1d61885Sagc if (found) return;
3983e1d61885Sagc /* otherwise we must add out module into the list */
3984e1d61885Sagc swig_module.next = module_head->next;
3985e1d61885Sagc module_head->next = &swig_module;
3986e1d61885Sagc }
3987e1d61885Sagc
3988e1d61885Sagc /* Now work on filling in swig_module.types */
3989e1d61885Sagc #ifdef SWIGRUNTIME_DEBUG
3990e1d61885Sagc printf("SWIG_InitializeModule: size %d\n", swig_module.size);
3991e1d61885Sagc #endif
3992e1d61885Sagc for (i = 0; i < swig_module.size; ++i) {
3993e1d61885Sagc swig_type_info *type = 0;
3994e1d61885Sagc swig_type_info *ret;
3995e1d61885Sagc swig_cast_info *cast;
3996e1d61885Sagc
3997e1d61885Sagc #ifdef SWIGRUNTIME_DEBUG
3998e1d61885Sagc printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3999e1d61885Sagc #endif
4000e1d61885Sagc
4001e1d61885Sagc /* if there is another module already loaded */
4002e1d61885Sagc if (swig_module.next != &swig_module) {
4003e1d61885Sagc type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
4004e1d61885Sagc }
4005e1d61885Sagc if (type) {
4006e1d61885Sagc /* Overwrite clientdata field */
4007e1d61885Sagc #ifdef SWIGRUNTIME_DEBUG
4008e1d61885Sagc printf("SWIG_InitializeModule: found type %s\n", type->name);
4009e1d61885Sagc #endif
4010e1d61885Sagc if (swig_module.type_initial[i]->clientdata) {
4011e1d61885Sagc type->clientdata = swig_module.type_initial[i]->clientdata;
4012e1d61885Sagc #ifdef SWIGRUNTIME_DEBUG
4013e1d61885Sagc printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4014e1d61885Sagc #endif
4015e1d61885Sagc }
4016e1d61885Sagc } else {
4017e1d61885Sagc type = swig_module.type_initial[i];
4018e1d61885Sagc }
4019e1d61885Sagc
4020e1d61885Sagc /* Insert casting types */
4021e1d61885Sagc cast = swig_module.cast_initial[i];
4022e1d61885Sagc while (cast->type) {
4023e1d61885Sagc /* Don't need to add information already in the list */
4024e1d61885Sagc ret = 0;
4025e1d61885Sagc #ifdef SWIGRUNTIME_DEBUG
4026e1d61885Sagc printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
4027e1d61885Sagc #endif
4028e1d61885Sagc if (swig_module.next != &swig_module) {
4029e1d61885Sagc ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
4030e1d61885Sagc #ifdef SWIGRUNTIME_DEBUG
4031e1d61885Sagc if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
4032e1d61885Sagc #endif
4033e1d61885Sagc }
4034e1d61885Sagc if (ret) {
4035e1d61885Sagc if (type == swig_module.type_initial[i]) {
4036e1d61885Sagc #ifdef SWIGRUNTIME_DEBUG
4037e1d61885Sagc printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
4038e1d61885Sagc #endif
4039e1d61885Sagc cast->type = ret;
4040e1d61885Sagc ret = 0;
4041e1d61885Sagc } else {
4042e1d61885Sagc /* Check for casting already in the list */
4043e1d61885Sagc swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
4044e1d61885Sagc #ifdef SWIGRUNTIME_DEBUG
4045e1d61885Sagc if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
4046e1d61885Sagc #endif
4047e1d61885Sagc if (!ocast) ret = 0;
4048e1d61885Sagc }
4049e1d61885Sagc }
4050e1d61885Sagc
4051e1d61885Sagc if (!ret) {
4052e1d61885Sagc #ifdef SWIGRUNTIME_DEBUG
4053e1d61885Sagc printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4054e1d61885Sagc #endif
4055e1d61885Sagc if (type->cast) {
4056e1d61885Sagc type->cast->prev = cast;
4057e1d61885Sagc cast->next = type->cast;
4058e1d61885Sagc }
4059e1d61885Sagc type->cast = cast;
4060e1d61885Sagc }
4061e1d61885Sagc cast++;
4062e1d61885Sagc }
4063e1d61885Sagc /* Set entry in modules->types array equal to the type */
4064e1d61885Sagc swig_module.types[i] = type;
4065e1d61885Sagc }
4066e1d61885Sagc swig_module.types[i] = 0;
4067e1d61885Sagc
4068e1d61885Sagc #ifdef SWIGRUNTIME_DEBUG
4069e1d61885Sagc printf("**** SWIG_InitializeModule: Cast List ******\n");
4070e1d61885Sagc for (i = 0; i < swig_module.size; ++i) {
4071e1d61885Sagc int j = 0;
4072e1d61885Sagc swig_cast_info *cast = swig_module.cast_initial[i];
4073e1d61885Sagc printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4074e1d61885Sagc while (cast->type) {
4075e1d61885Sagc printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4076e1d61885Sagc cast++;
4077e1d61885Sagc ++j;
4078e1d61885Sagc }
4079e1d61885Sagc printf("---- Total casts: %d\n",j);
4080e1d61885Sagc }
4081e1d61885Sagc printf("**** SWIG_InitializeModule: Cast List ******\n");
4082e1d61885Sagc #endif
4083e1d61885Sagc }
4084e1d61885Sagc
4085e1d61885Sagc /* This function will propagate the clientdata field of type to
4086e1d61885Sagc * any new swig_type_info structures that have been added into the list
4087e1d61885Sagc * of equivalent types. It is like calling
4088e1d61885Sagc * SWIG_TypeClientData(type, clientdata) a second time.
4089e1d61885Sagc */
4090e1d61885Sagc SWIGRUNTIME void
SWIG_PropagateClientData(void)4091e1d61885Sagc SWIG_PropagateClientData(void) {
4092e1d61885Sagc size_t i;
4093e1d61885Sagc swig_cast_info *equiv;
4094e1d61885Sagc static int init_run = 0;
4095e1d61885Sagc
4096e1d61885Sagc if (init_run) return;
4097e1d61885Sagc init_run = 1;
4098e1d61885Sagc
4099e1d61885Sagc for (i = 0; i < swig_module.size; i++) {
4100e1d61885Sagc if (swig_module.types[i]->clientdata) {
4101e1d61885Sagc equiv = swig_module.types[i]->cast;
4102e1d61885Sagc while (equiv) {
4103e1d61885Sagc if (!equiv->converter) {
4104e1d61885Sagc if (equiv->type && !equiv->type->clientdata)
4105e1d61885Sagc SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
4106e1d61885Sagc }
4107e1d61885Sagc equiv = equiv->next;
4108e1d61885Sagc }
4109e1d61885Sagc }
4110e1d61885Sagc }
4111e1d61885Sagc }
4112e1d61885Sagc
4113e1d61885Sagc #ifdef __cplusplus
4114e1d61885Sagc #if 0
4115e1d61885Sagc {
4116e1d61885Sagc /* c-mode */
4117e1d61885Sagc #endif
4118e1d61885Sagc }
4119e1d61885Sagc #endif
4120e1d61885Sagc
4121e1d61885Sagc
4122e1d61885Sagc
4123e1d61885Sagc #ifdef __cplusplus
4124e1d61885Sagc extern "C"
4125e1d61885Sagc #endif
4126e1d61885Sagc
XS(SWIG_init)4127e1d61885Sagc XS(SWIG_init) {
4128e1d61885Sagc dXSARGS;
4129e1d61885Sagc int i;
4130e1d61885Sagc
4131e1d61885Sagc SWIG_InitializeModule(0);
4132e1d61885Sagc
4133e1d61885Sagc /* Install commands */
4134e1d61885Sagc for (i = 0; swig_commands[i].name; i++) {
4135e1d61885Sagc newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__);
4136e1d61885Sagc }
4137e1d61885Sagc
4138e1d61885Sagc /* Install variables */
4139e1d61885Sagc for (i = 0; swig_variables[i].name; i++) {
4140e1d61885Sagc SV *sv;
4141e1d61885Sagc sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2);
4142e1d61885Sagc if (swig_variables[i].type) {
4143e1d61885Sagc SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
4144e1d61885Sagc } else {
4145e1d61885Sagc sv_setiv(sv,(IV) 0);
4146e1d61885Sagc }
4147e1d61885Sagc swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get);
4148e1d61885Sagc }
4149e1d61885Sagc
4150e1d61885Sagc /* Install constant */
4151e1d61885Sagc for (i = 0; swig_constants[i].type; i++) {
4152e1d61885Sagc SV *sv;
4153e1d61885Sagc sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2);
4154e1d61885Sagc switch(swig_constants[i].type) {
4155e1d61885Sagc case SWIG_INT:
4156e1d61885Sagc sv_setiv(sv, (IV) swig_constants[i].lvalue);
4157e1d61885Sagc break;
4158e1d61885Sagc case SWIG_FLOAT:
4159e1d61885Sagc sv_setnv(sv, (double) swig_constants[i].dvalue);
4160e1d61885Sagc break;
4161e1d61885Sagc case SWIG_STRING:
4162e1d61885Sagc sv_setpv(sv, (char *) swig_constants[i].pvalue);
4163e1d61885Sagc break;
4164e1d61885Sagc case SWIG_POINTER:
4165e1d61885Sagc SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
4166e1d61885Sagc break;
4167e1d61885Sagc case SWIG_BINARY:
4168e1d61885Sagc SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
4169e1d61885Sagc break;
4170e1d61885Sagc default:
4171e1d61885Sagc break;
4172e1d61885Sagc }
4173e1d61885Sagc SvREADONLY_on(sv);
4174e1d61885Sagc }
4175e1d61885Sagc
4176e1d61885Sagc SWIG_TypeClientData(SWIGTYPE_p_netpgp_t, (void*) "netpgpperl::netpgp_t");
4177e1d61885Sagc ST(0) = &PL_sv_yes;
4178e1d61885Sagc XSRETURN(1);
4179e1d61885Sagc }
4180e1d61885Sagc
4181