1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
12 #define SWIG_CASTRANK_MODE
13 /* -----------------------------------------------------------------------------
14 * This section contains generic SWIG labels for method/variable
15 * declarations/attributes, and other compiler dependent labels.
16 * ----------------------------------------------------------------------------- */
18 /* template workaround for compilers that cannot correctly implement the C++ standard */
19 #ifndef SWIGTEMPLATEDISAMBIGUATOR
20 # if defined(__SUNPRO_CC)
21 # if (__SUNPRO_CC <= 0x560)
22 # define SWIGTEMPLATEDISAMBIGUATOR template
24 # define SWIGTEMPLATEDISAMBIGUATOR
27 # define SWIGTEMPLATEDISAMBIGUATOR
31 /* inline attribute */
33 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
34 # define SWIGINLINE inline
40 /* attribute recognised by some compilers to avoid 'unused' warnings */
42 # if defined(__GNUC__)
43 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
44 # define SWIGUNUSED __attribute__ ((__unused__))
49 # define SWIGUNUSED __attribute__ ((__unused__))
55 #ifndef SWIGUNUSEDPARM
57 # define SWIGUNUSEDPARM(p)
59 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
63 /* internal SWIG method */
65 # define SWIGINTERN static SWIGUNUSED
68 /* internal inline SWIG method */
69 #ifndef SWIGINTERNINLINE
70 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
73 /* exporting methods */
74 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
75 # ifndef GCC_HASCLASSVISIBILITY
76 # define GCC_HASCLASSVISIBILITY
81 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
82 # if defined(STATIC_LINKED)
85 # define SWIGEXPORT __declspec(dllexport)
88 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
89 # define SWIGEXPORT __attribute__ ((visibility("default")))
96 /* calling conventions for Windows */
98 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
99 # define SWIGSTDCALL __stdcall
105 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
106 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
107 # define _CRT_SECURE_NO_DEPRECATE
110 /* -----------------------------------------------------------------------------
113 * This file contains generic CAPI SWIG runtime support for pointer
115 * ----------------------------------------------------------------------------- */
117 /* This should only be incremented when either the layout of swig_type_info changes,
118 or for whatever reason, the runtime changes incompatibly */
119 #define SWIG_RUNTIME_VERSION "3"
121 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
122 #ifdef SWIG_TYPE_TABLE
123 # define SWIG_QUOTE_STRING(x) #x
124 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
125 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
127 # define SWIG_TYPE_TABLE_NAME
131 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
132 creating a static or dynamic library from the swig runtime code.
133 In 99.9% of the cases, swig just needs to declare them as 'static'.
135 But only do this if is strictly necessary, ie, if you have problems
136 with your compiler or so.
140 # define SWIGRUNTIME SWIGINTERN
143 #ifndef SWIGRUNTIMEINLINE
144 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
147 /* Generic buffer size */
148 #ifndef SWIG_BUFFER_SIZE
149 # define SWIG_BUFFER_SIZE 1024
152 /* Flags for pointer conversions */
153 #define SWIG_POINTER_DISOWN 0x1
155 /* Flags for new pointer objects */
156 #define SWIG_POINTER_OWN 0x1
160 Flags/methods for returning states.
162 The swig conversion methods, as ConvertPtr, return and integer
163 that tells if the conversion was successful or not. And if not,
164 an error code can be returned (see swigerrors.swg for the codes).
166 Use the following macros/flags to set or process the returning
169 In old swig versions, you usually write code as:
171 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
177 Now you can be more explicit as:
179 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
180 if (SWIG_IsOK(res)) {
186 that seems to be the same, but now you can also do
189 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
190 if (SWIG_IsOK(res)) {
192 if (SWIG_IsNewObj(res) {
202 I.e., now SWIG_ConvertPtr can return new objects and you can
203 identify the case and take care of the deallocation. Of course that
204 requires also to SWIG_ConvertPtr to return new result values, as
206 int SWIG_ConvertPtr(obj, ptr,...) {
208 if (<need new object>) {
209 *ptr = <ptr to new allocated object>;
212 *ptr = <ptr to old object>;
220 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
221 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
224 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
225 allows to return the 'cast rank', for example, if you have this
232 food(1) // cast rank '1' (1 -> 1.0)
233 fooi(1) // cast rank '0'
235 just use the SWIG_AddCast()/SWIG_CheckState()
240 #define SWIG_ERROR (-1)
241 #define SWIG_IsOK(r) (r >= 0)
242 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
244 /* The CastRankLimit says how many bits are used for the cast rank */
245 #define SWIG_CASTRANKLIMIT (1 << 8)
246 /* The NewMask denotes the object was created (using new/malloc) */
247 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
248 /* The TmpMask is for in/out typemaps that use temporal objects */
249 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
250 /* Simple returning values */
251 #define SWIG_BADOBJ (SWIG_ERROR)
252 #define SWIG_OLDOBJ (SWIG_OK)
253 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
254 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
255 /* Check, add and del mask methods */
256 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
257 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
258 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
259 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
260 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
261 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
265 #if defined(SWIG_CASTRANK_MODE)
266 # ifndef SWIG_TypeRank
267 # define SWIG_TypeRank unsigned long
269 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
270 # define SWIG_MAXCASTRANK (2)
272 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
273 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
274 SWIGINTERNINLINE
int SWIG_AddCast(int r
) {
275 return SWIG_IsOK(r
) ? ((SWIG_CastRank(r
) < SWIG_MAXCASTRANK
) ? (r
+ 1) : SWIG_ERROR
) : r
;
277 SWIGINTERNINLINE
int SWIG_CheckState(int r
) {
278 return SWIG_IsOK(r
) ? SWIG_CastRank(r
) + 1 : 0;
280 #else /* no cast-rank mode */
281 # define SWIG_AddCast
282 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
294 typedef void *(*swig_converter_func
)(void *);
295 typedef struct swig_type_info
*(*swig_dycast_func
)(void **);
297 /* Structure to store inforomation on one type */
298 typedef struct swig_type_info
{
299 const char *name
; /* mangled name of this type */
300 const char *str
; /* human readable name of this type */
301 swig_dycast_func dcast
; /* dynamic cast function down a hierarchy */
302 struct swig_cast_info
*cast
; /* linked list of types that can cast into this type */
303 void *clientdata
; /* language specific type data */
304 int owndata
; /* flag if the structure owns the clientdata */
307 /* Structure to store a type and conversion function used for casting */
308 typedef struct swig_cast_info
{
309 swig_type_info
*type
; /* pointer to type that is equivalent to this type */
310 swig_converter_func converter
; /* function to cast the void pointers */
311 struct swig_cast_info
*next
; /* pointer to next cast in linked list */
312 struct swig_cast_info
*prev
; /* pointer to the previous cast */
315 /* Structure used to store module information
316 * Each module generates one structure like this, and the runtime collects
317 * all of these structures and stores them in a circularly linked list.*/
318 typedef struct swig_module_info
{
319 swig_type_info
**types
; /* Array of pointers to swig_type_info structures that are in this module */
320 size_t size
; /* Number of types in this module */
321 struct swig_module_info
*next
; /* Pointer to next element in circularly linked list */
322 swig_type_info
**type_initial
; /* Array of initially generated type structures */
323 swig_cast_info
**cast_initial
; /* Array of initially generated casting structures */
324 void *clientdata
; /* Language specific module data */
328 Compare two type names skipping the space characters, therefore
329 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
331 Return 0 when the two name types are equivalent, as in
332 strncmp, but skipping ' '.
335 SWIG_TypeNameComp(const char *f1
, const char *l1
,
336 const char *f2
, const char *l2
) {
337 for (;(f1
!= l1
) && (f2
!= l2
); ++f1
, ++f2
) {
338 while ((*f1
== ' ') && (f1
!= l1
)) ++f1
;
339 while ((*f2
== ' ') && (f2
!= l2
)) ++f2
;
340 if (*f1
!= *f2
) return (*f1
> *f2
) ? 1 : -1;
342 return (l1
- f1
) - (l2
- f2
);
346 Check type equivalence in a name list like <name1>|<name2>|...
347 Return 0 if not equal, 1 if equal
350 SWIG_TypeEquiv(const char *nb
, const char *tb
) {
352 const char* te
= tb
+ strlen(tb
);
354 while (!equiv
&& *ne
) {
355 for (nb
= ne
; *ne
; ++ne
) {
356 if (*ne
== '|') break;
358 equiv
= (SWIG_TypeNameComp(nb
, ne
, tb
, te
) == 0) ? 1 : 0;
365 Check type equivalence in a name list like <name1>|<name2>|...
366 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
369 SWIG_TypeCompare(const char *nb
, const char *tb
) {
371 const char* te
= tb
+ strlen(tb
);
373 while (!equiv
&& *ne
) {
374 for (nb
= ne
; *ne
; ++ne
) {
375 if (*ne
== '|') break;
377 equiv
= (SWIG_TypeNameComp(nb
, ne
, tb
, te
) == 0) ? 1 : 0;
384 /* think of this as a c++ template<> or a scheme macro */
385 #define SWIG_TypeCheck_Template(comparison, ty) \
387 swig_cast_info *iter = ty->cast; \
390 if (iter == ty->cast) return iter; \
391 /* Move iter to the top of the linked list */ \
392 iter->prev->next = iter->next; \
394 iter->next->prev = iter->prev; \
395 iter->next = ty->cast; \
397 if (ty->cast) ty->cast->prev = iter; \
409 SWIGRUNTIME swig_cast_info
*
410 SWIG_TypeCheck(const char *c
, swig_type_info
*ty
) {
411 SWIG_TypeCheck_Template(strcmp(iter
->type
->name
, c
) == 0, ty
);
414 /* Same as previous function, except strcmp is replaced with a pointer comparison */
415 SWIGRUNTIME swig_cast_info
*
416 SWIG_TypeCheckStruct(swig_type_info
*from
, swig_type_info
*into
) {
417 SWIG_TypeCheck_Template(iter
->type
== from
, into
);
421 Cast a pointer up an inheritance hierarchy
423 SWIGRUNTIMEINLINE
void *
424 SWIG_TypeCast(swig_cast_info
*ty
, void *ptr
) {
425 return ((!ty
) || (!ty
->converter
)) ? ptr
: (*ty
->converter
)(ptr
);
429 Dynamic pointer casting. Down an inheritance hierarchy
431 SWIGRUNTIME swig_type_info
*
432 SWIG_TypeDynamicCast(swig_type_info
*ty
, void **ptr
) {
433 swig_type_info
*lastty
= ty
;
434 if (!ty
|| !ty
->dcast
) return ty
;
435 while (ty
&& (ty
->dcast
)) {
436 ty
= (*ty
->dcast
)(ptr
);
443 Return the name associated with this type
445 SWIGRUNTIMEINLINE
const char *
446 SWIG_TypeName(const swig_type_info
*ty
) {
451 Return the pretty name associated with this type,
452 that is an unmangled type name in a form presentable to the user.
454 SWIGRUNTIME
const char *
455 SWIG_TypePrettyName(const swig_type_info
*type
) {
456 /* The "str" field contains the equivalent pretty names of the
457 type, separated by vertical-bar characters. We choose
458 to print the last name, as it is often (?) the most
460 if (!type
) return NULL
;
461 if (type
->str
!= NULL
) {
462 const char *last_name
= type
->str
;
464 for (s
= type
->str
; *s
; s
++)
465 if (*s
== '|') last_name
= s
+1;
473 Set the clientdata field for a type
476 SWIG_TypeClientData(swig_type_info
*ti
, void *clientdata
) {
477 swig_cast_info
*cast
= ti
->cast
;
478 /* if (ti->clientdata == clientdata) return; */
479 ti
->clientdata
= clientdata
;
482 if (!cast
->converter
) {
483 swig_type_info
*tc
= cast
->type
;
484 if (!tc
->clientdata
) {
485 SWIG_TypeClientData(tc
, clientdata
);
492 SWIG_TypeNewClientData(swig_type_info
*ti
, void *clientdata
) {
493 SWIG_TypeClientData(ti
, clientdata
);
498 Search for a swig_type_info structure only by mangled name
499 Search is a O(log #types)
501 We start searching at module start, and finish searching when start == end.
502 Note: if start == end at the beginning of the function, we go all the way around
505 SWIGRUNTIME swig_type_info
*
506 SWIG_MangledTypeQueryModule(swig_module_info
*start
,
507 swig_module_info
*end
,
509 swig_module_info
*iter
= start
;
512 register size_t l
= 0;
513 register size_t r
= iter
->size
- 1;
515 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
516 register size_t i
= (l
+ r
) >> 1;
517 const char *iname
= iter
->types
[i
]->name
;
519 register int compare
= strcmp(name
, iname
);
521 return iter
->types
[i
];
522 } else if (compare
< 0) {
528 } else if (compare
> 0) {
532 break; /* should never happen */
537 } while (iter
!= end
);
542 Search for a swig_type_info structure for either a mangled name or a human readable name.
543 It first searches the mangled names of the types, which is a O(log #types)
544 If a type is not found it then searches the human readable names, which is O(#types).
546 We start searching at module start, and finish searching when start == end.
547 Note: if start == end at the beginning of the function, we go all the way around
550 SWIGRUNTIME swig_type_info
*
551 SWIG_TypeQueryModule(swig_module_info
*start
,
552 swig_module_info
*end
,
554 /* STEP 1: Search the name field using binary search */
555 swig_type_info
*ret
= SWIG_MangledTypeQueryModule(start
, end
, name
);
559 /* STEP 2: If the type hasn't been found, do a complete search
560 of the str field (the human readable name) */
561 swig_module_info
*iter
= start
;
563 register size_t i
= 0;
564 for (; i
< iter
->size
; ++i
) {
565 if (iter
->types
[i
]->str
&& (SWIG_TypeEquiv(iter
->types
[i
]->str
, name
)))
566 return iter
->types
[i
];
569 } while (iter
!= end
);
572 /* neither found a match */
577 Pack binary data into a string
580 SWIG_PackData(char *c
, void *ptr
, size_t sz
) {
581 static const char hex
[17] = "0123456789abcdef";
582 register const unsigned char *u
= (unsigned char *) ptr
;
583 register const unsigned char *eu
= u
+ sz
;
584 for (; u
!= eu
; ++u
) {
585 register unsigned char uu
= *u
;
586 *(c
++) = hex
[(uu
& 0xf0) >> 4];
587 *(c
++) = hex
[uu
& 0xf];
593 Unpack binary data from a string
595 SWIGRUNTIME
const char *
596 SWIG_UnpackData(const char *c
, void *ptr
, size_t sz
) {
597 register unsigned char *u
= (unsigned char *) ptr
;
598 register const unsigned char *eu
= u
+ sz
;
599 for (; u
!= eu
; ++u
) {
600 register char d
= *(c
++);
601 register unsigned char uu
;
602 if ((d
>= '0') && (d
<= '9'))
603 uu
= ((d
- '0') << 4);
604 else if ((d
>= 'a') && (d
<= 'f'))
605 uu
= ((d
- ('a'-10)) << 4);
609 if ((d
>= '0') && (d
<= '9'))
611 else if ((d
>= 'a') && (d
<= 'f'))
612 uu
|= (d
- ('a'-10));
621 Pack 'void *' into a string buffer.
624 SWIG_PackVoidPtr(char *buff
, void *ptr
, const char *name
, size_t bsz
) {
626 if ((2*sizeof(void *) + 2) > bsz
) return 0;
628 r
= SWIG_PackData(r
,&ptr
,sizeof(void *));
629 if (strlen(name
) + 1 > (bsz
- (r
- buff
))) return 0;
634 SWIGRUNTIME
const char *
635 SWIG_UnpackVoidPtr(const char *c
, void **ptr
, const char *name
) {
637 if (strcmp(c
,"NULL") == 0) {
644 return SWIG_UnpackData(++c
,ptr
,sizeof(void *));
648 SWIG_PackDataName(char *buff
, void *ptr
, size_t sz
, const char *name
, size_t bsz
) {
650 size_t lname
= (name
? strlen(name
) : 0);
651 if ((2*sz
+ 2 + lname
) > bsz
) return 0;
653 r
= SWIG_PackData(r
,ptr
,sz
);
655 strncpy(r
,name
,lname
+1);
662 SWIGRUNTIME
const char *
663 SWIG_UnpackDataName(const char *c
, void *ptr
, size_t sz
, const char *name
) {
665 if (strcmp(c
,"NULL") == 0) {
672 return SWIG_UnpackData(++c
,ptr
,sz
);
680 #define SWIG_UnknownError -1
681 #define SWIG_IOError -2
682 #define SWIG_RuntimeError -3
683 #define SWIG_IndexError -4
684 #define SWIG_TypeError -5
685 #define SWIG_DivisionByZero -6
686 #define SWIG_OverflowError -7
687 #define SWIG_SyntaxError -8
688 #define SWIG_ValueError -9
689 #define SWIG_SystemError -10
690 #define SWIG_AttributeError -11
691 #define SWIG_MemoryError -12
692 #define SWIG_NullReferenceError -13
697 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
706 /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
708 /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
709 #ifndef PERL_REVISION
710 # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
711 # define PERL_PATCHLEVEL_H_IMPLICIT
712 # include <patchlevel.h>
714 # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
715 # include <could_not_find_Perl_patchlevel.h>
717 # ifndef PERL_REVISION
718 # define PERL_REVISION (5)
719 # define PERL_VERSION PATCHLEVEL
720 # define PERL_SUBVERSION SUBVERSION
724 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
725 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
729 # define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
733 # define SvUOK(sv) SvIOK_UV(sv)
736 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
737 # define PL_sv_undef sv_undef
739 # define PL_errgv errgv
740 # define PL_sv_no sv_no
741 # define PL_sv_yes sv_yes
742 # define PL_markstack_ptr markstack_ptr
747 # define IVSIZE LONGSIZE
749 # define IVSIZE 4 /* A bold guess, but the best we can make. */
754 # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
756 # define INT2PTR(any,d) (any)(d)
758 # if PTRSIZE == LONGSIZE
759 # define PTRV unsigned long
761 # define PTRV unsigned
763 # define INT2PTR(any,d) (any)(PTRV)(d)
766 # define NUM2PTR(any,d) (any)(PTRV)(d)
767 # define PTR2IV(p) INT2PTR(IV,p)
768 # define PTR2UV(p) INT2PTR(UV,p)
769 # define PTR2NV(p) NUM2PTR(NV,p)
771 # if PTRSIZE == LONGSIZE
772 # define PTR2ul(p) (unsigned long)(p)
774 # define PTR2ul(p) INT2PTR(unsigned long,p)
776 #endif /* !INT2PTR */
779 # define get_sv perl_get_sv
783 # define ERRSV get_sv("@",FALSE)
795 /* -----------------------------------------------------------------------------
797 * ----------------------------------------------------------------------------- */
799 SWIGINTERN
const char*
800 SWIG_Perl_ErrorType(int code
) {
801 const char* type
= 0;
803 case SWIG_MemoryError
:
804 type
= "MemoryError";
809 case SWIG_RuntimeError
:
810 type
= "RuntimeError";
812 case SWIG_IndexError
:
818 case SWIG_DivisionByZero
:
819 type
= "ZeroDivisionError";
821 case SWIG_OverflowError
:
822 type
= "OverflowError";
824 case SWIG_SyntaxError
:
825 type
= "SyntaxError";
827 case SWIG_ValueError
:
830 case SWIG_SystemError
:
831 type
= "SystemError";
833 case SWIG_AttributeError
:
834 type
= "AttributeError";
837 type
= "RuntimeError";
845 /* -----------------------------------------------------------------------------
848 * This file contains the runtime support for Perl modules
849 * and includes code for managing global variables and pointer
851 * ----------------------------------------------------------------------------- */
854 #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
855 #define SWIG_PERL_OBJECT_CALL pPerl,
857 #define SWIG_PERL_OBJECT_DECL
858 #define SWIG_PERL_OBJECT_CALL
861 /* Common SWIG API */
863 /* for raw pointers */
864 #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
865 #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
867 /* for raw packed data */
868 #define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
869 #define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
871 /* for class or struct pointers */
872 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
873 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
875 /* for C or C++ function pointers */
876 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
877 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
879 /* for C++ member pointers, ie, member methods */
880 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty)
881 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type)
886 #define SWIG_GetModule(clientdata) SWIG_Perl_GetModule()
887 #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer)
890 /* Error manipulation */
892 #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code)
893 #define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg)
894 #define SWIG_fail goto fail
896 /* Perl-specific SWIG API */
898 #define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
899 #define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
900 #define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str)
903 #define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1)
904 #define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1)
905 #define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2)
906 #define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2)
908 /* -----------------------------------------------------------------------------
909 * pointers/data manipulation
910 * ----------------------------------------------------------------------------- */
912 /* For backward compatibility only */
913 #define SWIG_POINTER_EXCEPTION 0
919 #define SWIG_OWNER SWIG_POINTER_OWN
920 #define SWIG_SHADOW SWIG_OWNER << 1
922 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
924 /* SWIG Perl macros */
926 /* Macro to call an XS function */
928 # define SWIG_CALLXS(_name) _name(cv,pPerl)
930 # ifndef MULTIPLICITY
931 # define SWIG_CALLXS(_name) _name(cv)
933 # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
937 /* Note: SwigMagicFuncHack is a typedef used to get the C++ compiler to just shut up already */
940 #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
941 typedef int (CPerlObj::*SwigMagicFunc
)(SV
*, MAGIC
*);
946 typedef int (CPerlObj::*SwigMagicFuncHack
)(SV
*, MAGIC
*);
951 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
952 #define SWIGCLASS_STATIC
955 #define SWIGCLASS_STATIC static SWIGUNUSED
957 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
958 typedef int (*SwigMagicFunc
)(SV
*, MAGIC
*);
963 typedef int (*SwigMagicFuncHack
)(SV
*, MAGIC
*);
970 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
971 typedef int (*SwigMagicFunc
)(struct interpreter
*, SV
*, MAGIC
*);
975 typedef int (*SwigMagicFuncHack
)(struct interpreter
*, SV
*, MAGIC
*);
983 /* Workaround for bug in perl 5.6.x croak and earlier */
984 #if (PERL_VERSION < 8)
986 # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
987 static void SWIG_Perl_croak_null(CPerlObj
*pPerl
)
989 static void SWIG_croak_null()
993 # if (PERL_VERSION < 6)
996 if (SvOK(err
) && !SvROK(err
)) croak("%_", err
);
1001 # define SWIG_croak_null() croak(Nullch)
1006 Define how strict is the cast between strings and integers/doubles
1007 when overloading between these types occurs.
1009 The default is making it as strict as possible by using SWIG_AddCast
1012 You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
1013 disable the SWIG_AddCast, making the casting between string and
1014 numbers less strict.
1016 In the end, we try to solve the overloading between strings and
1017 numerical types in the more natural way, but if you can avoid it,
1018 well, avoid it using %rename, for example.
1020 #ifndef SWIG_PERL_NO_STRICT_STR2NUM
1021 # ifndef SWIG_PERL_STRICT_STR2NUM
1022 # define SWIG_PERL_STRICT_STR2NUM
1025 #ifdef SWIG_PERL_STRICT_STR2NUM
1026 /* string takes precedence */
1027 #define SWIG_Str2NumCast(x) SWIG_AddCast(x)
1029 /* number takes precedence */
1030 #define SWIG_Str2NumCast(x) x
1037 SWIGRUNTIME
const char *
1038 SWIG_Perl_TypeProxyName(const swig_type_info
*type
) {
1039 if (!type
) return NULL
;
1040 if (type
->clientdata
!= NULL
) {
1041 return (const char*) type
->clientdata
;
1048 SWIGRUNTIME swig_cast_info
*
1049 SWIG_TypeProxyCheck(const char *c
, swig_type_info
*ty
) {
1050 SWIG_TypeCheck_Template(( (!iter
->type
->clientdata
&& (strcmp((char*)iter
->type
->name
, c
) == 0))
1051 || (iter
->type
->clientdata
&& (strcmp((char*)iter
->type
->clientdata
, c
) == 0))), ty
);
1055 /* Function for getting a pointer value */
1058 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV
*sv
, void **ptr
, swig_type_info
*_t
, int flags
) {
1060 void *voidptr
= (void *)0;
1062 /* If magical, apply more magic */
1066 /* Check to see if this is an object */
1067 if (sv_isobject(sv
)) {
1069 tsv
= (SV
*) SvRV(sv
);
1070 if ((SvTYPE(tsv
) == SVt_PVHV
)) {
1072 if (SvMAGICAL(tsv
)) {
1073 mg
= mg_find(tsv
,'P');
1076 if (sv_isobject(sv
)) {
1077 tsv
= (SV
*)SvRV(sv
);
1087 voidptr
= INT2PTR(void *,tmp
);
1088 } else if (! SvOK(sv
)) { /* Check for undef */
1089 *(ptr
) = (void *) 0;
1091 } else if (SvTYPE(sv
) == SVt_RV
) { /* Check for NULL pointer */
1093 *(ptr
) = (void *) 0;
1098 } else { /* Don't know what it is */
1102 /* Now see if the types match */
1103 char *_c
= HvNAME(SvSTASH(SvRV(sv
)));
1104 tc
= SWIG_TypeProxyCheck(_c
,_t
);
1108 *ptr
= SWIG_TypeCast(tc
,voidptr
);
1114 * DISOWN implementation: we need a perl guru to check this one.
1116 if (tsv
&& (flags
& SWIG_POINTER_DISOWN
)) {
1118 * almost copy paste code from below SWIG_POINTER_OWN setting
1121 HV
*stash
= SvSTASH(SvRV(obj
));
1122 GV
*gv
= *(GV
**) hv_fetch(stash
, "OWNER", 5, TRUE
);
1126 * To set ownership (see below), a newSViv(1) entry is added.
1127 * Hence, to remove ownership, we delete the entry.
1129 if (hv_exists_ent(hv
, obj
, 0)) {
1130 hv_delete_ent(hv
, obj
, 0, 0);
1138 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV
*sv
, void *ptr
, swig_type_info
*t
, int flags
) {
1139 if (ptr
&& (flags
& SWIG_SHADOW
)) {
1144 sv_setref_pv(obj
, (char *) SWIG_Perl_TypeProxyName(t
), ptr
);
1145 stash
=SvSTASH(SvRV(obj
));
1146 if (flags
& SWIG_POINTER_OWN
) {
1148 GV
*gv
=*(GV
**)hv_fetch(stash
, "OWNER", 5, TRUE
);
1150 gv_init(gv
, stash
, "OWNER", 5, FALSE
);
1152 hv_store_ent(hv
, obj
, newSViv(1), 0);
1154 sv_magic((SV
*)hash
, (SV
*)obj
, 'P', Nullch
, 0);
1156 self
=newRV_noinc((SV
*)hash
);
1158 SvREFCNT_dec((SV
*)self
);
1159 sv_bless(sv
, stash
);
1162 sv_setref_pv(sv
, (char *) SWIG_Perl_TypeProxyName(t
), ptr
);
1166 SWIGRUNTIMEINLINE SV
*
1167 SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT
void *ptr
, swig_type_info
*t
, int flags
) {
1168 SV
*result
= sv_newmortal();
1169 SWIG_MakePtr(result
, ptr
, t
, flags
);
1174 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV
*sv
, void *ptr
, int sz
, swig_type_info
*type
) {
1177 if ((2*sz
+ 1 + strlen(SWIG_Perl_TypeProxyName(type
))) > 1000) return;
1179 r
= SWIG_PackData(r
,ptr
,sz
);
1180 strcpy(r
,SWIG_Perl_TypeProxyName(type
));
1181 sv_setpv(sv
, result
);
1185 SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT
void *ptr
, int sz
, swig_type_info
*type
) {
1186 SV
*result
= sv_newmortal();
1187 SWIG_Perl_MakePackedObj(result
, ptr
, sz
, type
);
1191 /* Convert a packed value value */
1193 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV
*obj
, void *ptr
, int sz
, swig_type_info
*ty
) {
1197 if ((!obj
) || (!SvOK(obj
))) return SWIG_ERROR
;
1198 c
= SvPV(obj
, PL_na
);
1199 /* Pointer values must start with leading underscore */
1200 if (*c
!= '_') return SWIG_ERROR
;
1202 c
= SWIG_UnpackData(c
,ptr
,sz
);
1204 tc
= SWIG_TypeCheck(c
,ty
);
1205 if (!tc
) return SWIG_ERROR
;
1211 /* Macros for low-level exception handling */
1212 #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
1215 typedef XS(SwigPerlWrapper
);
1216 typedef SwigPerlWrapper
*SwigPerlWrapperPtr
;
1218 /* Structure for command table */
1221 SwigPerlWrapperPtr wrapper
;
1222 } swig_command_info
;
1224 /* Information for constant table */
1227 #define SWIG_FLOAT 2
1228 #define SWIG_STRING 3
1229 #define SWIG_POINTER 4
1230 #define SWIG_BINARY 5
1232 /* Constant information structure */
1233 typedef struct swig_constant_info
{
1239 swig_type_info
**ptype
;
1240 } swig_constant_info
;
1243 /* Structure for variable table */
1248 swig_type_info
**type
;
1249 } swig_variable_info
;
1251 /* Magic variable code */
1253 #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
1254 #ifndef MULTIPLICITY
1255 SWIGRUNTIME
void _swig_create_magic(SV
*sv
, char *name
, int (*set
)(SV
*, MAGIC
*), int (*get
)(SV
*,MAGIC
*))
1257 SWIGRUNTIME
void _swig_create_magic(SV
*sv
, char *name
, int (*set
)(struct interpreter
*, SV
*, MAGIC
*), int (*get
)(struct interpreter
*, SV
*,MAGIC
*))
1260 # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
1261 SWIGRUNTIME
void _swig_create_magic(CPerlObj
*pPerl
, SV
*sv
, const char *name
, int (CPerlObj::*set
)(SV
*, MAGIC
*), int (CPerlObj::*get
)(SV
*, MAGIC
*))
1265 sv_magic(sv
,sv
,'U',(char *) name
,strlen(name
));
1266 mg
= mg_find(sv
,'U');
1267 mg
->mg_virtual
= (MGVTBL
*) malloc(sizeof(MGVTBL
));
1268 mg
->mg_virtual
->svt_get
= (SwigMagicFuncHack
) get
;
1269 mg
->mg_virtual
->svt_set
= (SwigMagicFuncHack
) set
;
1270 mg
->mg_virtual
->svt_len
= 0;
1271 mg
->mg_virtual
->svt_clear
= 0;
1272 mg
->mg_virtual
->svt_free
= 0;
1276 SWIGRUNTIME swig_module_info
*
1277 SWIG_Perl_GetModule(void) {
1278 static void *type_pointer
= (void *)0;
1281 /* first check if pointer already created */
1282 if (!type_pointer
) {
1283 pointer
= get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME
, FALSE
);
1284 if (pointer
&& SvOK(pointer
)) {
1285 type_pointer
= INT2PTR(swig_type_info
**, SvIV(pointer
));
1289 return (swig_module_info
*) type_pointer
;
1293 SWIG_Perl_SetModule(swig_module_info
*module
) {
1296 /* create a new pointer */
1297 pointer
= get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME
, TRUE
);
1298 sv_setiv(pointer
, PTR2IV(module
));
1305 /* Workaround perl5 global namespace pollution. Note that undefining library
1306 * functions like fopen will not solve the problem on all platforms as fopen
1307 * might be a macro on Windows but not necessarily on other operating systems. */
1401 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1403 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1407 /* -------- TYPES TABLE (BEGIN) -------- */
1409 #define SWIGTYPE_p_char swig_types[0]
1410 #define SWIGTYPE_p_netpgp_t swig_types[1]
1411 #define SWIGTYPE_p_p_char swig_types[2]
1412 #define SWIGTYPE_p_void swig_types[3]
1413 static swig_type_info
*swig_types
[5];
1414 static swig_module_info swig_module
= {swig_types
, 4, 0, 0, 0, 0};
1415 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1416 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1418 /* -------- TYPES TABLE (END) -------- */
1420 #define SWIG_init boot_netpgpperl
1422 #define SWIG_name "netpgpperlc::boot_netpgpperl"
1423 #define SWIG_prefix "netpgpperlc::"
1425 #define SWIGVERSION 0x010331
1426 #define SWIG_VERSION SWIGVERSION
1429 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1430 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1437 #ifndef MULTIPLICITY
1438 SWIGEXPORT
void SWIG_init (CV
* cv
);
1440 SWIGEXPORT
void SWIG_init (pTHXo_ CV
* cv
);
1443 SWIGEXPORT
void SWIG_init (CV
*cv
, CPerlObj
*);
1454 # define LLONG_MIN LONG_LONG_MIN
1457 # define LLONG_MAX LONG_LONG_MAX
1460 # define ULLONG_MAX ULONG_LONG_MAX
1465 SWIG_AsVal_double
SWIG_PERL_DECL_ARGS_2(SV
*obj
, double *val
)
1468 if (val
) *val
= SvNV(obj
);
1470 } else if (SvIOK(obj
)) {
1471 if (val
) *val
= (double) SvIV(obj
);
1472 return SWIG_AddCast(SWIG_OK
);
1474 const char *nptr
= SvPV(obj
, PL_na
);
1477 double v
= strtod(nptr
, &endptr
);
1478 if (errno
== ERANGE
) {
1480 return SWIG_OverflowError
;
1482 if (*endptr
== '\0') {
1484 return SWIG_Str2NumCast(SWIG_OK
);
1489 return SWIG_TypeError
;
1499 SWIGINTERNINLINE
int
1500 SWIG_CanCastAsInteger(double *d
, double min
, double max
) {
1502 if ((min
<= x
&& x
<= max
)) {
1503 double fx
= floor(x
);
1504 double cx
= ceil(x
);
1505 double rd
= ((x
- fx
) < 0.5) ? fx
: cx
; /* simple rint */
1506 if ((errno
== EDOM
) || (errno
== ERANGE
)) {
1509 double summ
, reps
, diff
;
1512 } else if (rd
> x
) {
1519 if (reps
< 8*DBL_EPSILON
) {
1530 SWIG_AsVal_unsigned_SS_long
SWIG_PERL_DECL_ARGS_2(SV
*obj
, unsigned long *val
)
1533 if (val
) *val
= SvUV(obj
);
1535 } else if (SvIOK(obj
)) {
1541 return SWIG_OverflowError
;
1545 const char *nptr
= SvPV(obj
, PL_na
);
1548 unsigned long v
= strtoul(nptr
, &endptr
,0);
1549 if (errno
== ERANGE
) {
1551 return SWIG_OverflowError
;
1553 if (*endptr
== '\0') {
1555 return SWIG_Str2NumCast(SWIG_OK
);
1561 int res
= SWIG_AddCast(SWIG_AsVal_double
SWIG_PERL_CALL_ARGS_2(obj
,&d
));
1562 if (SWIG_IsOK(res
) && SWIG_CanCastAsInteger(&d
, 0, ULONG_MAX
)) {
1563 if (val
) *val
= (unsigned long)(d
);
1568 return SWIG_TypeError
;
1573 SWIG_AsVal_unsigned_SS_int
SWIG_PERL_DECL_ARGS_2(SV
* obj
, unsigned int *val
)
1576 int res
= SWIG_AsVal_unsigned_SS_long
SWIG_PERL_CALL_ARGS_2(obj
, &v
);
1577 if (SWIG_IsOK(res
)) {
1578 if ((v
> UINT_MAX
)) {
1579 return SWIG_OverflowError
;
1581 if (val
) *val
= (unsigned int)(v
);
1588 SWIGINTERNINLINE SV
*
1589 SWIG_From_unsigned_SS_long
SWIG_PERL_DECL_ARGS_1(unsigned long value
)
1591 SV
*obj
= sv_newmortal();
1592 sv_setuv(obj
, (UV
) value
);
1597 SWIGINTERNINLINE SV
*
1598 SWIG_From_unsigned_SS_int
SWIG_PERL_DECL_ARGS_1(unsigned int value
)
1600 return SWIG_From_unsigned_SS_long
SWIG_PERL_CALL_ARGS_1(value
);
1604 SWIGINTERNINLINE SV
*
1605 SWIG_From_long
SWIG_PERL_DECL_ARGS_1(long value
)
1607 SV
*obj
= sv_newmortal();
1608 sv_setiv(obj
, (IV
) value
);
1613 SWIGINTERNINLINE SV
*
1614 SWIG_From_int
SWIG_PERL_DECL_ARGS_1(int value
)
1616 return SWIG_From_long
SWIG_PERL_CALL_ARGS_1(value
);
1620 SWIGINTERN swig_type_info
*
1621 SWIG_pchar_descriptor(void)
1623 static int init
= 0;
1624 static swig_type_info
* info
= 0;
1626 info
= SWIG_TypeQuery("_p_char");
1634 SWIG_AsCharPtrAndSize(SV
*obj
, char** cptr
, size_t* psize
, int *alloc
)
1638 char *cstr
= SvPV(obj
, len
);
1639 size_t size
= len
+ 1;
1642 if (*alloc
== SWIG_NEWOBJ
) {
1643 *cptr
= (char *)memcpy((char *)malloc((size
)*sizeof(char)), cstr
, sizeof(char)*(size
));
1646 *alloc
= SWIG_OLDOBJ
;
1650 if (psize
) *psize
= size
;
1653 swig_type_info
* pchar_descriptor
= SWIG_pchar_descriptor();
1654 if (pchar_descriptor
) {
1656 if (SWIG_ConvertPtr(obj
, (void**)&vptr
, pchar_descriptor
, 0) == SWIG_OK
) {
1657 if (cptr
) *cptr
= vptr
;
1658 if (psize
) *psize
= vptr
? (strlen(vptr
) + 1) : 0;
1659 if (alloc
) *alloc
= SWIG_OLDOBJ
;
1664 return SWIG_TypeError
;
1671 SWIGINTERNINLINE SV
*
1672 SWIG_FromCharPtrAndSize(const char* carray
, size_t size
)
1674 SV
*obj
= sv_newmortal();
1676 if (size
&& (carray
[size
- 1] == 0)) {
1677 sv_setpv(obj
, carray
);
1679 char *tmp
= (char *)malloc((size
+ 1)*sizeof(char));
1680 memcpy(tmp
, carray
, size
);
1686 sv_setsv(obj
, &PL_sv_undef
);
1692 SWIGINTERNINLINE SV
*
1693 SWIG_FromCharPtr(const char *cptr
)
1695 return SWIG_FromCharPtrAndSize(cptr
, (cptr
? strlen(cptr
) : 0));
1700 SWIG_AsVal_long
SWIG_PERL_DECL_ARGS_2(SV
*obj
, long* val
)
1703 if (val
) *val
= SvIV(obj
);
1707 const char *nptr
= SvPV(obj
, PL_na
);
1710 long v
= strtol(nptr
, &endptr
,0);
1711 if (errno
== ERANGE
) {
1713 return SWIG_OverflowError
;
1715 if (*endptr
== '\0') {
1717 return SWIG_Str2NumCast(SWIG_OK
);
1723 int res
= SWIG_AddCast(SWIG_AsVal_double
SWIG_PERL_CALL_ARGS_2(obj
,&d
));
1724 if (SWIG_IsOK(res
) && SWIG_CanCastAsInteger(&d
, LONG_MIN
, LONG_MAX
)) {
1725 if (val
) *val
= (long)(d
);
1730 return SWIG_TypeError
;
1735 SWIG_AsVal_int
SWIG_PERL_DECL_ARGS_2(SV
* obj
, int *val
)
1738 int res
= SWIG_AsVal_long
SWIG_PERL_CALL_ARGS_2(obj
, &v
);
1739 if (SWIG_IsOK(res
)) {
1740 if ((v
< INT_MIN
|| v
> INT_MAX
)) {
1741 return SWIG_OverflowError
;
1743 if (val
) *val
= (int)(v
);
1750 SWIGINTERNINLINE
int
1751 SWIG_AsVal_size_t
SWIG_PERL_DECL_ARGS_2(SV
* obj
, size_t *val
)
1754 int res
= SWIG_AsVal_unsigned_SS_long
SWIG_PERL_CALL_ARGS_2(obj
, val
? &v
: 0);
1755 if (SWIG_IsOK(res
) && val
) *val
= (size_t)(v
);
1760 #define MAGIC_CLASS _wrap_netpgpperl_var::
1761 class _wrap_netpgpperl_var
: public CPerlObj
{
1766 SWIGCLASS_STATIC
int swig_magic_readonly(pTHX_ SV
*SWIGUNUSEDPARM(sv
), MAGIC
*SWIGUNUSEDPARM(mg
)) {
1768 croak("Value is read-only.");
1780 XS(_wrap_netpgp_t_c_set
) {
1782 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1791 if ((items
< 2) || (items
> 2)) {
1792 SWIG_croak("Usage: netpgp_t_c_set(self,c);");
1794 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1795 if (!SWIG_IsOK(res1
)) {
1796 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_c_set" "', argument " "1"" of type '" "netpgp_t *""'");
1798 arg1
= (netpgp_t
*)(argp1
);
1799 ecode2
= SWIG_AsVal_unsigned_SS_int
SWIG_PERL_CALL_ARGS_2(ST(1), &val2
);
1800 if (!SWIG_IsOK(ecode2
)) {
1801 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "netpgp_t_c_set" "', argument " "2"" of type '" "unsigned int""'");
1803 arg2
= (unsigned int)(val2
);
1804 if (arg1
) (arg1
)->c
= arg2
;
1818 XS(_wrap_netpgp_t_c_get
) {
1820 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1821 unsigned int result
;
1827 if ((items
< 1) || (items
> 1)) {
1828 SWIG_croak("Usage: netpgp_t_c_get(self);");
1830 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1831 if (!SWIG_IsOK(res1
)) {
1832 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_c_get" "', argument " "1"" of type '" "netpgp_t *""'");
1834 arg1
= (netpgp_t
*)(argp1
);
1835 result
= (unsigned int) ((arg1
)->c
);
1836 ST(argvi
) = SWIG_From_unsigned_SS_int
SWIG_PERL_CALL_ARGS_1((unsigned int)(result
)); argvi
++ ;
1846 XS(_wrap_netpgp_t_size_set
) {
1848 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1857 if ((items
< 2) || (items
> 2)) {
1858 SWIG_croak("Usage: netpgp_t_size_set(self,size);");
1860 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1861 if (!SWIG_IsOK(res1
)) {
1862 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_size_set" "', argument " "1"" of type '" "netpgp_t *""'");
1864 arg1
= (netpgp_t
*)(argp1
);
1865 ecode2
= SWIG_AsVal_unsigned_SS_int
SWIG_PERL_CALL_ARGS_2(ST(1), &val2
);
1866 if (!SWIG_IsOK(ecode2
)) {
1867 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "netpgp_t_size_set" "', argument " "2"" of type '" "unsigned int""'");
1869 arg2
= (unsigned int)(val2
);
1870 if (arg1
) (arg1
)->size
= arg2
;
1884 XS(_wrap_netpgp_t_size_get
) {
1886 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1887 unsigned int result
;
1893 if ((items
< 1) || (items
> 1)) {
1894 SWIG_croak("Usage: netpgp_t_size_get(self);");
1896 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1897 if (!SWIG_IsOK(res1
)) {
1898 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_size_get" "', argument " "1"" of type '" "netpgp_t *""'");
1900 arg1
= (netpgp_t
*)(argp1
);
1901 result
= (unsigned int) ((arg1
)->size
);
1902 ST(argvi
) = SWIG_From_unsigned_SS_int
SWIG_PERL_CALL_ARGS_1((unsigned int)(result
)); argvi
++ ;
1912 XS(_wrap_netpgp_t_name_set
) {
1914 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1915 char **arg2
= (char **) 0 ;
1923 if ((items
< 2) || (items
> 2)) {
1924 SWIG_croak("Usage: netpgp_t_name_set(self,name);");
1926 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1927 if (!SWIG_IsOK(res1
)) {
1928 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_name_set" "', argument " "1"" of type '" "netpgp_t *""'");
1930 arg1
= (netpgp_t
*)(argp1
);
1931 res2
= SWIG_ConvertPtr(ST(1), &argp2
,SWIGTYPE_p_p_char
, 0 | 0 );
1932 if (!SWIG_IsOK(res2
)) {
1933 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_name_set" "', argument " "2"" of type '" "char **""'");
1935 arg2
= (char **)(argp2
);
1936 if (arg1
) (arg1
)->name
= arg2
;
1950 XS(_wrap_netpgp_t_name_get
) {
1952 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1959 if ((items
< 1) || (items
> 1)) {
1960 SWIG_croak("Usage: netpgp_t_name_get(self);");
1962 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1963 if (!SWIG_IsOK(res1
)) {
1964 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_name_get" "', argument " "1"" of type '" "netpgp_t *""'");
1966 arg1
= (netpgp_t
*)(argp1
);
1967 result
= (char **) ((arg1
)->name
);
1968 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_p_char
, 0 | 0); argvi
++ ;
1978 XS(_wrap_netpgp_t_value_set
) {
1980 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1981 char **arg2
= (char **) 0 ;
1989 if ((items
< 2) || (items
> 2)) {
1990 SWIG_croak("Usage: netpgp_t_value_set(self,value);");
1992 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1993 if (!SWIG_IsOK(res1
)) {
1994 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_value_set" "', argument " "1"" of type '" "netpgp_t *""'");
1996 arg1
= (netpgp_t
*)(argp1
);
1997 res2
= SWIG_ConvertPtr(ST(1), &argp2
,SWIGTYPE_p_p_char
, 0 | 0 );
1998 if (!SWIG_IsOK(res2
)) {
1999 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_value_set" "', argument " "2"" of type '" "char **""'");
2001 arg2
= (char **)(argp2
);
2002 if (arg1
) (arg1
)->value
= arg2
;
2016 XS(_wrap_netpgp_t_value_get
) {
2018 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2025 if ((items
< 1) || (items
> 1)) {
2026 SWIG_croak("Usage: netpgp_t_value_get(self);");
2028 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2029 if (!SWIG_IsOK(res1
)) {
2030 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_value_get" "', argument " "1"" of type '" "netpgp_t *""'");
2032 arg1
= (netpgp_t
*)(argp1
);
2033 result
= (char **) ((arg1
)->value
);
2034 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_p_char
, 0 | 0); argvi
++ ;
2044 XS(_wrap_netpgp_t_pubring_set
) {
2046 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2047 void *arg2
= (void *) 0 ;
2054 if ((items
< 2) || (items
> 2)) {
2055 SWIG_croak("Usage: netpgp_t_pubring_set(self,pubring);");
2057 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2058 if (!SWIG_IsOK(res1
)) {
2059 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_pubring_set" "', argument " "1"" of type '" "netpgp_t *""'");
2061 arg1
= (netpgp_t
*)(argp1
);
2062 res2
= SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
2063 if (!SWIG_IsOK(res2
)) {
2064 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_pubring_set" "', argument " "2"" of type '" "void *""'");
2066 if (arg1
) (arg1
)->pubring
= arg2
;
2080 XS(_wrap_netpgp_t_pubring_get
) {
2082 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2089 if ((items
< 1) || (items
> 1)) {
2090 SWIG_croak("Usage: netpgp_t_pubring_get(self);");
2092 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2093 if (!SWIG_IsOK(res1
)) {
2094 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_pubring_get" "', argument " "1"" of type '" "netpgp_t *""'");
2096 arg1
= (netpgp_t
*)(argp1
);
2097 result
= (void *) ((arg1
)->pubring
);
2098 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_void
, 0 | 0); argvi
++ ;
2108 XS(_wrap_netpgp_t_secring_set
) {
2110 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2111 void *arg2
= (void *) 0 ;
2118 if ((items
< 2) || (items
> 2)) {
2119 SWIG_croak("Usage: netpgp_t_secring_set(self,secring);");
2121 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2122 if (!SWIG_IsOK(res1
)) {
2123 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_secring_set" "', argument " "1"" of type '" "netpgp_t *""'");
2125 arg1
= (netpgp_t
*)(argp1
);
2126 res2
= SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
2127 if (!SWIG_IsOK(res2
)) {
2128 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_secring_set" "', argument " "2"" of type '" "void *""'");
2130 if (arg1
) (arg1
)->secring
= arg2
;
2144 XS(_wrap_netpgp_t_secring_get
) {
2146 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2153 if ((items
< 1) || (items
> 1)) {
2154 SWIG_croak("Usage: netpgp_t_secring_get(self);");
2156 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2157 if (!SWIG_IsOK(res1
)) {
2158 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_secring_get" "', argument " "1"" of type '" "netpgp_t *""'");
2160 arg1
= (netpgp_t
*)(argp1
);
2161 result
= (void *) ((arg1
)->secring
);
2162 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_void
, 0 | 0); argvi
++ ;
2172 XS(_wrap_netpgp_t_io_set
) {
2174 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2175 void *arg2
= (void *) 0 ;
2182 if ((items
< 2) || (items
> 2)) {
2183 SWIG_croak("Usage: netpgp_t_io_set(self,io);");
2185 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2186 if (!SWIG_IsOK(res1
)) {
2187 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_io_set" "', argument " "1"" of type '" "netpgp_t *""'");
2189 arg1
= (netpgp_t
*)(argp1
);
2190 res2
= SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
2191 if (!SWIG_IsOK(res2
)) {
2192 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_io_set" "', argument " "2"" of type '" "void *""'");
2194 if (arg1
) (arg1
)->io
= arg2
;
2208 XS(_wrap_netpgp_t_io_get
) {
2210 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2217 if ((items
< 1) || (items
> 1)) {
2218 SWIG_croak("Usage: netpgp_t_io_get(self);");
2220 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2221 if (!SWIG_IsOK(res1
)) {
2222 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_io_get" "', argument " "1"" of type '" "netpgp_t *""'");
2224 arg1
= (netpgp_t
*)(argp1
);
2225 result
= (void *) ((arg1
)->io
);
2226 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_void
, 0 | 0); argvi
++ ;
2236 XS(_wrap_netpgp_t_passfp_set
) {
2238 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2239 void *arg2
= (void *) 0 ;
2246 if ((items
< 2) || (items
> 2)) {
2247 SWIG_croak("Usage: netpgp_t_passfp_set(self,passfp);");
2249 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2250 if (!SWIG_IsOK(res1
)) {
2251 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_passfp_set" "', argument " "1"" of type '" "netpgp_t *""'");
2253 arg1
= (netpgp_t
*)(argp1
);
2254 res2
= SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
2255 if (!SWIG_IsOK(res2
)) {
2256 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_passfp_set" "', argument " "2"" of type '" "void *""'");
2258 if (arg1
) (arg1
)->passfp
= arg2
;
2272 XS(_wrap_netpgp_t_passfp_get
) {
2274 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2281 if ((items
< 1) || (items
> 1)) {
2282 SWIG_croak("Usage: netpgp_t_passfp_get(self);");
2284 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2285 if (!SWIG_IsOK(res1
)) {
2286 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_passfp_get" "', argument " "1"" of type '" "netpgp_t *""'");
2288 arg1
= (netpgp_t
*)(argp1
);
2289 result
= (void *) ((arg1
)->passfp
);
2290 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_void
, 0 | 0); argvi
++ ;
2300 XS(_wrap_new_netpgp_t
) {
2302 netpgp_t
*result
= 0 ;
2306 if ((items
< 0) || (items
> 0)) {
2307 SWIG_croak("Usage: new_netpgp_t();");
2309 result
= (netpgp_t
*)(netpgp_t
*) calloc(1, sizeof(netpgp_t
));
2310 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_netpgp_t
, SWIG_OWNER
| SWIG_SHADOW
); argvi
++ ;
2318 XS(_wrap_delete_netpgp_t
) {
2320 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2326 if ((items
< 1) || (items
> 1)) {
2327 SWIG_croak("Usage: delete_netpgp_t(self);");
2329 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, SWIG_POINTER_DISOWN
| 0 );
2330 if (!SWIG_IsOK(res1
)) {
2331 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_netpgp_t" "', argument " "1"" of type '" "netpgp_t *""'");
2333 arg1
= (netpgp_t
*)(argp1
);
2334 free((char *) arg1
);
2346 XS(_wrap_netpgp_init
) {
2348 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2355 if ((items
< 1) || (items
> 1)) {
2356 SWIG_croak("Usage: netpgp_init(netpgp_t *);");
2358 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2359 if (!SWIG_IsOK(res1
)) {
2360 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_init" "', argument " "1"" of type '" "netpgp_t *""'");
2362 arg1
= (netpgp_t
*)(argp1
);
2363 result
= (int)netpgp_init(arg1
);
2364 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2374 XS(_wrap_netpgp_end
) {
2376 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2383 if ((items
< 1) || (items
> 1)) {
2384 SWIG_croak("Usage: netpgp_end(netpgp_t *);");
2386 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2387 if (!SWIG_IsOK(res1
)) {
2388 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_end" "', argument " "1"" of type '" "netpgp_t *""'");
2390 arg1
= (netpgp_t
*)(argp1
);
2391 result
= (int)netpgp_end(arg1
);
2392 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2402 XS(_wrap_netpgp_set_debug
) {
2404 char *arg1
= (char *) 0 ;
2412 if ((items
< 1) || (items
> 1)) {
2413 SWIG_croak("Usage: netpgp_set_debug(char const *);");
2415 res1
= SWIG_AsCharPtrAndSize(ST(0), &buf1
, NULL
, &alloc1
);
2416 if (!SWIG_IsOK(res1
)) {
2417 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_set_debug" "', argument " "1"" of type '" "char const *""'");
2419 arg1
= (char *)(buf1
);
2420 result
= (int)netpgp_set_debug((char const *)arg1
);
2421 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2422 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2425 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2431 XS(_wrap_netpgp_get_debug
) {
2433 char *arg1
= (char *) 0 ;
2441 if ((items
< 1) || (items
> 1)) {
2442 SWIG_croak("Usage: netpgp_get_debug(char const *);");
2444 res1
= SWIG_AsCharPtrAndSize(ST(0), &buf1
, NULL
, &alloc1
);
2445 if (!SWIG_IsOK(res1
)) {
2446 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_get_debug" "', argument " "1"" of type '" "char const *""'");
2448 arg1
= (char *)(buf1
);
2449 result
= (int)netpgp_get_debug((char const *)arg1
);
2450 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2451 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2454 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2460 XS(_wrap_netpgp_get_info
) {
2462 char *arg1
= (char *) 0 ;
2470 if ((items
< 1) || (items
> 1)) {
2471 SWIG_croak("Usage: netpgp_get_info(char const *);");
2473 res1
= SWIG_AsCharPtrAndSize(ST(0), &buf1
, NULL
, &alloc1
);
2474 if (!SWIG_IsOK(res1
)) {
2475 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_get_info" "', argument " "1"" of type '" "char const *""'");
2477 arg1
= (char *)(buf1
);
2478 result
= (char *)netpgp_get_info((char const *)arg1
);
2479 ST(argvi
) = SWIG_FromCharPtr((const char *)result
); argvi
++ ;
2480 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2483 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2489 XS(_wrap_netpgp_list_packets
) {
2491 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2492 char *arg2
= (char *) 0 ;
2494 char *arg4
= (char *) 0 ;
2509 if ((items
< 4) || (items
> 4)) {
2510 SWIG_croak("Usage: netpgp_list_packets(netpgp_t *,char *,int,char *);");
2512 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2513 if (!SWIG_IsOK(res1
)) {
2514 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_list_packets" "', argument " "1"" of type '" "netpgp_t *""'");
2516 arg1
= (netpgp_t
*)(argp1
);
2517 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
2518 if (!SWIG_IsOK(res2
)) {
2519 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_list_packets" "', argument " "2"" of type '" "char *""'");
2521 arg2
= (char *)(buf2
);
2522 ecode3
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(2), &val3
);
2523 if (!SWIG_IsOK(ecode3
)) {
2524 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "netpgp_list_packets" "', argument " "3"" of type '" "int""'");
2527 res4
= SWIG_AsCharPtrAndSize(ST(3), &buf4
, NULL
, &alloc4
);
2528 if (!SWIG_IsOK(res4
)) {
2529 SWIG_exception_fail(SWIG_ArgError(res4
), "in method '" "netpgp_list_packets" "', argument " "4"" of type '" "char *""'");
2531 arg4
= (char *)(buf4
);
2532 result
= (int)netpgp_list_packets(arg1
,arg2
,arg3
,arg4
);
2533 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2535 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2537 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
2541 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2543 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
2549 XS(_wrap_netpgp_setvar
) {
2551 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2552 char *arg2
= (char *) 0 ;
2553 char *arg3
= (char *) 0 ;
2566 if ((items
< 3) || (items
> 3)) {
2567 SWIG_croak("Usage: netpgp_setvar(netpgp_t *,char const *,char const *);");
2569 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2570 if (!SWIG_IsOK(res1
)) {
2571 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_setvar" "', argument " "1"" of type '" "netpgp_t *""'");
2573 arg1
= (netpgp_t
*)(argp1
);
2574 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
2575 if (!SWIG_IsOK(res2
)) {
2576 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_setvar" "', argument " "2"" of type '" "char const *""'");
2578 arg2
= (char *)(buf2
);
2579 res3
= SWIG_AsCharPtrAndSize(ST(2), &buf3
, NULL
, &alloc3
);
2580 if (!SWIG_IsOK(res3
)) {
2581 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_setvar" "', argument " "3"" of type '" "char const *""'");
2583 arg3
= (char *)(buf3
);
2584 result
= (int)netpgp_setvar(arg1
,(char const *)arg2
,(char const *)arg3
);
2585 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2587 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2588 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2592 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2593 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2599 XS(_wrap_netpgp_getvar
) {
2601 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2602 char *arg2
= (char *) 0 ;
2612 if ((items
< 2) || (items
> 2)) {
2613 SWIG_croak("Usage: netpgp_getvar(netpgp_t *,char const *);");
2615 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2616 if (!SWIG_IsOK(res1
)) {
2617 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_getvar" "', argument " "1"" of type '" "netpgp_t *""'");
2619 arg1
= (netpgp_t
*)(argp1
);
2620 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
2621 if (!SWIG_IsOK(res2
)) {
2622 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_getvar" "', argument " "2"" of type '" "char const *""'");
2624 arg2
= (char *)(buf2
);
2625 result
= (char *)netpgp_getvar(arg1
,(char const *)arg2
);
2626 ST(argvi
) = SWIG_FromCharPtr((const char *)result
); argvi
++ ;
2628 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2632 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2638 XS(_wrap_netpgp_list_keys
) {
2640 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2647 if ((items
< 1) || (items
> 1)) {
2648 SWIG_croak("Usage: netpgp_list_keys(netpgp_t *);");
2650 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2651 if (!SWIG_IsOK(res1
)) {
2652 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_list_keys" "', argument " "1"" of type '" "netpgp_t *""'");
2654 arg1
= (netpgp_t
*)(argp1
);
2655 result
= (int)netpgp_list_keys(arg1
);
2656 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2666 XS(_wrap_netpgp_list_sigs
) {
2668 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2669 char *arg2
= (char *) 0 ;
2679 if ((items
< 2) || (items
> 2)) {
2680 SWIG_croak("Usage: netpgp_list_sigs(netpgp_t *,char const *);");
2682 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2683 if (!SWIG_IsOK(res1
)) {
2684 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_list_sigs" "', argument " "1"" of type '" "netpgp_t *""'");
2686 arg1
= (netpgp_t
*)(argp1
);
2687 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
2688 if (!SWIG_IsOK(res2
)) {
2689 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_list_sigs" "', argument " "2"" of type '" "char const *""'");
2691 arg2
= (char *)(buf2
);
2692 result
= (int)netpgp_list_sigs(arg1
,(char const *)arg2
);
2693 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2695 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2699 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2705 XS(_wrap_netpgp_find_key
) {
2707 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2708 char *arg2
= (char *) 0 ;
2718 if ((items
< 2) || (items
> 2)) {
2719 SWIG_croak("Usage: netpgp_find_key(netpgp_t *,char *);");
2721 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2722 if (!SWIG_IsOK(res1
)) {
2723 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_find_key" "', argument " "1"" of type '" "netpgp_t *""'");
2725 arg1
= (netpgp_t
*)(argp1
);
2726 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
2727 if (!SWIG_IsOK(res2
)) {
2728 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_find_key" "', argument " "2"" of type '" "char *""'");
2730 arg2
= (char *)(buf2
);
2731 result
= (int)netpgp_find_key(arg1
,arg2
);
2732 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2734 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2738 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2744 XS(_wrap_netpgp_get_key
) {
2746 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2747 char *arg2
= (char *) 0 ;
2757 if ((items
< 2) || (items
> 2)) {
2758 SWIG_croak("Usage: netpgp_get_key(netpgp_t *,char const *);");
2760 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2761 if (!SWIG_IsOK(res1
)) {
2762 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_get_key" "', argument " "1"" of type '" "netpgp_t *""'");
2764 arg1
= (netpgp_t
*)(argp1
);
2765 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
2766 if (!SWIG_IsOK(res2
)) {
2767 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_get_key" "', argument " "2"" of type '" "char const *""'");
2769 arg2
= (char *)(buf2
);
2770 result
= (char *)netpgp_get_key(arg1
,(char const *)arg2
);
2771 ST(argvi
) = SWIG_FromCharPtr((const char *)result
); argvi
++ ;
2773 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2777 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2783 XS(_wrap_netpgp_export_key
) {
2785 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2786 char *arg2
= (char *) 0 ;
2796 if ((items
< 2) || (items
> 2)) {
2797 SWIG_croak("Usage: netpgp_export_key(netpgp_t *,char *);");
2799 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2800 if (!SWIG_IsOK(res1
)) {
2801 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_export_key" "', argument " "1"" of type '" "netpgp_t *""'");
2803 arg1
= (netpgp_t
*)(argp1
);
2804 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
2805 if (!SWIG_IsOK(res2
)) {
2806 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_export_key" "', argument " "2"" of type '" "char *""'");
2808 arg2
= (char *)(buf2
);
2809 result
= (int)netpgp_export_key(arg1
,arg2
);
2810 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2812 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2816 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2822 XS(_wrap_netpgp_import_key
) {
2824 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2825 char *arg2
= (char *) 0 ;
2835 if ((items
< 2) || (items
> 2)) {
2836 SWIG_croak("Usage: netpgp_import_key(netpgp_t *,char *);");
2838 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2839 if (!SWIG_IsOK(res1
)) {
2840 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_import_key" "', argument " "1"" of type '" "netpgp_t *""'");
2842 arg1
= (netpgp_t
*)(argp1
);
2843 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
2844 if (!SWIG_IsOK(res2
)) {
2845 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_import_key" "', argument " "2"" of type '" "char *""'");
2847 arg2
= (char *)(buf2
);
2848 result
= (int)netpgp_import_key(arg1
,arg2
);
2849 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2851 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2855 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2861 XS(_wrap_netpgp_generate_key
) {
2863 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2864 char *arg2
= (char *) 0 ;
2877 if ((items
< 3) || (items
> 3)) {
2878 SWIG_croak("Usage: netpgp_generate_key(netpgp_t *,char *,int);");
2880 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2881 if (!SWIG_IsOK(res1
)) {
2882 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_generate_key" "', argument " "1"" of type '" "netpgp_t *""'");
2884 arg1
= (netpgp_t
*)(argp1
);
2885 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
2886 if (!SWIG_IsOK(res2
)) {
2887 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_generate_key" "', argument " "2"" of type '" "char *""'");
2889 arg2
= (char *)(buf2
);
2890 ecode3
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(2), &val3
);
2891 if (!SWIG_IsOK(ecode3
)) {
2892 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "netpgp_generate_key" "', argument " "3"" of type '" "int""'");
2895 result
= (int)netpgp_generate_key(arg1
,arg2
,arg3
);
2896 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2898 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2903 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2910 XS(_wrap_netpgp_encrypt_file
) {
2912 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2913 char *arg2
= (char *) 0 ;
2914 char *arg3
= (char *) 0 ;
2915 char *arg4
= (char *) 0 ;
2934 if ((items
< 5) || (items
> 5)) {
2935 SWIG_croak("Usage: netpgp_encrypt_file(netpgp_t *,char const *,char const *,char *,int);");
2937 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2938 if (!SWIG_IsOK(res1
)) {
2939 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_encrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
2941 arg1
= (netpgp_t
*)(argp1
);
2942 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
2943 if (!SWIG_IsOK(res2
)) {
2944 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_encrypt_file" "', argument " "2"" of type '" "char const *""'");
2946 arg2
= (char *)(buf2
);
2947 res3
= SWIG_AsCharPtrAndSize(ST(2), &buf3
, NULL
, &alloc3
);
2948 if (!SWIG_IsOK(res3
)) {
2949 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_encrypt_file" "', argument " "3"" of type '" "char const *""'");
2951 arg3
= (char *)(buf3
);
2952 res4
= SWIG_AsCharPtrAndSize(ST(3), &buf4
, NULL
, &alloc4
);
2953 if (!SWIG_IsOK(res4
)) {
2954 SWIG_exception_fail(SWIG_ArgError(res4
), "in method '" "netpgp_encrypt_file" "', argument " "4"" of type '" "char *""'");
2956 arg4
= (char *)(buf4
);
2957 ecode5
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(4), &val5
);
2958 if (!SWIG_IsOK(ecode5
)) {
2959 SWIG_exception_fail(SWIG_ArgError(ecode5
), "in method '" "netpgp_encrypt_file" "', argument " "5"" of type '" "int""'");
2962 result
= (int)netpgp_encrypt_file(arg1
,(char const *)arg2
,(char const *)arg3
,arg4
,arg5
);
2963 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
2965 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2966 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2967 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
2972 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2973 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2974 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
2981 XS(_wrap_netpgp_decrypt_file
) {
2983 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2984 char *arg2
= (char *) 0 ;
2985 char *arg3
= (char *) 0 ;
3001 if ((items
< 4) || (items
> 4)) {
3002 SWIG_croak("Usage: netpgp_decrypt_file(netpgp_t *,char const *,char *,int);");
3004 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3005 if (!SWIG_IsOK(res1
)) {
3006 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_decrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
3008 arg1
= (netpgp_t
*)(argp1
);
3009 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
3010 if (!SWIG_IsOK(res2
)) {
3011 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_decrypt_file" "', argument " "2"" of type '" "char const *""'");
3013 arg2
= (char *)(buf2
);
3014 res3
= SWIG_AsCharPtrAndSize(ST(2), &buf3
, NULL
, &alloc3
);
3015 if (!SWIG_IsOK(res3
)) {
3016 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_decrypt_file" "', argument " "3"" of type '" "char *""'");
3018 arg3
= (char *)(buf3
);
3019 ecode4
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(3), &val4
);
3020 if (!SWIG_IsOK(ecode4
)) {
3021 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_decrypt_file" "', argument " "4"" of type '" "int""'");
3024 result
= (int)netpgp_decrypt_file(arg1
,(char const *)arg2
,arg3
,arg4
);
3025 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
3027 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3028 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3033 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3034 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3041 XS(_wrap_netpgp_sign_file
) {
3043 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3044 char *arg2
= (char *) 0 ;
3045 char *arg3
= (char *) 0 ;
3046 char *arg4
= (char *) 0 ;
3071 if ((items
< 7) || (items
> 7)) {
3072 SWIG_croak("Usage: netpgp_sign_file(netpgp_t *,char const *,char const *,char *,int,int,int);");
3074 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3075 if (!SWIG_IsOK(res1
)) {
3076 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_sign_file" "', argument " "1"" of type '" "netpgp_t *""'");
3078 arg1
= (netpgp_t
*)(argp1
);
3079 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
3080 if (!SWIG_IsOK(res2
)) {
3081 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_sign_file" "', argument " "2"" of type '" "char const *""'");
3083 arg2
= (char *)(buf2
);
3084 res3
= SWIG_AsCharPtrAndSize(ST(2), &buf3
, NULL
, &alloc3
);
3085 if (!SWIG_IsOK(res3
)) {
3086 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_sign_file" "', argument " "3"" of type '" "char const *""'");
3088 arg3
= (char *)(buf3
);
3089 res4
= SWIG_AsCharPtrAndSize(ST(3), &buf4
, NULL
, &alloc4
);
3090 if (!SWIG_IsOK(res4
)) {
3091 SWIG_exception_fail(SWIG_ArgError(res4
), "in method '" "netpgp_sign_file" "', argument " "4"" of type '" "char *""'");
3093 arg4
= (char *)(buf4
);
3094 ecode5
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(4), &val5
);
3095 if (!SWIG_IsOK(ecode5
)) {
3096 SWIG_exception_fail(SWIG_ArgError(ecode5
), "in method '" "netpgp_sign_file" "', argument " "5"" of type '" "int""'");
3099 ecode6
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(5), &val6
);
3100 if (!SWIG_IsOK(ecode6
)) {
3101 SWIG_exception_fail(SWIG_ArgError(ecode6
), "in method '" "netpgp_sign_file" "', argument " "6"" of type '" "int""'");
3104 ecode7
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(6), &val7
);
3105 if (!SWIG_IsOK(ecode7
)) {
3106 SWIG_exception_fail(SWIG_ArgError(ecode7
), "in method '" "netpgp_sign_file" "', argument " "7"" of type '" "int""'");
3109 result
= (int)netpgp_sign_file(arg1
,(char const *)arg2
,(char const *)arg3
,arg4
,arg5
,arg6
,arg7
);
3110 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
3112 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3113 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3114 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
3121 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3122 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3123 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
3132 XS(_wrap_netpgp_verify_file
) {
3134 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3135 char *arg2
= (char *) 0 ;
3136 char *arg3
= (char *) 0 ;
3152 if ((items
< 4) || (items
> 4)) {
3153 SWIG_croak("Usage: netpgp_verify_file(netpgp_t *,char const *,char const *,int);");
3155 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3156 if (!SWIG_IsOK(res1
)) {
3157 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_verify_file" "', argument " "1"" of type '" "netpgp_t *""'");
3159 arg1
= (netpgp_t
*)(argp1
);
3160 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
3161 if (!SWIG_IsOK(res2
)) {
3162 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_verify_file" "', argument " "2"" of type '" "char const *""'");
3164 arg2
= (char *)(buf2
);
3165 res3
= SWIG_AsCharPtrAndSize(ST(2), &buf3
, NULL
, &alloc3
);
3166 if (!SWIG_IsOK(res3
)) {
3167 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_verify_file" "', argument " "3"" of type '" "char const *""'");
3169 arg3
= (char *)(buf3
);
3170 ecode4
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(3), &val4
);
3171 if (!SWIG_IsOK(ecode4
)) {
3172 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_verify_file" "', argument " "4"" of type '" "int""'");
3175 result
= (int)netpgp_verify_file(arg1
,(char const *)arg2
,(char const *)arg3
,arg4
);
3176 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
3178 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3179 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3184 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3185 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3192 XS(_wrap_netpgp_sign_memory
) {
3194 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3195 char *arg2
= (char *) 0 ;
3196 char *arg3
= (char *) 0 ;
3198 char *arg5
= (char *) 0 ;
3225 if ((items
< 8) || (items
> 8)) {
3226 SWIG_croak("Usage: netpgp_sign_memory(netpgp_t *,char const *,char *,size_t,char *,size_t,unsigned int const,unsigned int const);");
3228 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3229 if (!SWIG_IsOK(res1
)) {
3230 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_sign_memory" "', argument " "1"" of type '" "netpgp_t *""'");
3232 arg1
= (netpgp_t
*)(argp1
);
3233 res2
= SWIG_AsCharPtrAndSize(ST(1), &buf2
, NULL
, &alloc2
);
3234 if (!SWIG_IsOK(res2
)) {
3235 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_sign_memory" "', argument " "2"" of type '" "char const *""'");
3237 arg2
= (char *)(buf2
);
3238 res3
= SWIG_AsCharPtrAndSize(ST(2), &buf3
, NULL
, &alloc3
);
3239 if (!SWIG_IsOK(res3
)) {
3240 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_sign_memory" "', argument " "3"" of type '" "char *""'");
3242 arg3
= (char *)(buf3
);
3243 ecode4
= SWIG_AsVal_size_t
SWIG_PERL_CALL_ARGS_2(ST(3), &val4
);
3244 if (!SWIG_IsOK(ecode4
)) {
3245 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_sign_memory" "', argument " "4"" of type '" "size_t""'");
3247 arg4
= (size_t)(val4
);
3248 res5
= SWIG_AsCharPtrAndSize(ST(4), &buf5
, NULL
, &alloc5
);
3249 if (!SWIG_IsOK(res5
)) {
3250 SWIG_exception_fail(SWIG_ArgError(res5
), "in method '" "netpgp_sign_memory" "', argument " "5"" of type '" "char *""'");
3252 arg5
= (char *)(buf5
);
3253 ecode6
= SWIG_AsVal_size_t
SWIG_PERL_CALL_ARGS_2(ST(5), &val6
);
3254 if (!SWIG_IsOK(ecode6
)) {
3255 SWIG_exception_fail(SWIG_ArgError(ecode6
), "in method '" "netpgp_sign_memory" "', argument " "6"" of type '" "size_t""'");
3257 arg6
= (size_t)(val6
);
3258 ecode7
= SWIG_AsVal_unsigned_SS_int
SWIG_PERL_CALL_ARGS_2(ST(6), &val7
);
3259 if (!SWIG_IsOK(ecode7
)) {
3260 SWIG_exception_fail(SWIG_ArgError(ecode7
), "in method '" "netpgp_sign_memory" "', argument " "7"" of type '" "unsigned int""'");
3262 arg7
= (unsigned int)(val7
);
3263 ecode8
= SWIG_AsVal_unsigned_SS_int
SWIG_PERL_CALL_ARGS_2(ST(7), &val8
);
3264 if (!SWIG_IsOK(ecode8
)) {
3265 SWIG_exception_fail(SWIG_ArgError(ecode8
), "in method '" "netpgp_sign_memory" "', argument " "8"" of type '" "unsigned int""'");
3267 arg8
= (unsigned int)(val8
);
3268 result
= (int)netpgp_sign_memory(arg1
,(char const *)arg2
,arg3
,arg4
,arg5
,arg6
,arg7
,arg8
);
3269 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
3271 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3272 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3274 if (alloc5
== SWIG_NEWOBJ
) free((char*)buf5
);
3281 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3282 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3284 if (alloc5
== SWIG_NEWOBJ
) free((char*)buf5
);
3293 XS(_wrap_netpgp_verify_memory
) {
3295 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3296 void *arg2
= (void *) 0 ;
3310 if ((items
< 4) || (items
> 4)) {
3311 SWIG_croak("Usage: netpgp_verify_memory(netpgp_t *,void const *,size_t const,int const);");
3313 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3314 if (!SWIG_IsOK(res1
)) {
3315 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_verify_memory" "', argument " "1"" of type '" "netpgp_t *""'");
3317 arg1
= (netpgp_t
*)(argp1
);
3318 res2
= SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2
), 0, 0);
3319 if (!SWIG_IsOK(res2
)) {
3320 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_verify_memory" "', argument " "2"" of type '" "void const *""'");
3322 ecode3
= SWIG_AsVal_size_t
SWIG_PERL_CALL_ARGS_2(ST(2), &val3
);
3323 if (!SWIG_IsOK(ecode3
)) {
3324 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "netpgp_verify_memory" "', argument " "3"" of type '" "size_t""'");
3326 arg3
= (size_t)(val3
);
3327 ecode4
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(3), &val4
);
3328 if (!SWIG_IsOK(ecode4
)) {
3329 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_verify_memory" "', argument " "4"" of type '" "int""'");
3332 result
= (int)netpgp_verify_memory(arg1
,(void const *)arg2
,arg3
,arg4
);
3333 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1((int)(result
)); argvi
++ ;
3350 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3352 static swig_type_info _swigt__p_char
= {"_p_char", "char *", 0, 0, (void*)0, 0};
3353 static swig_type_info _swigt__p_netpgp_t
= {"_p_netpgp_t", "struct netpgp_t *|netpgp_t *", 0, 0, (void*)"netpgpperl::netpgp_t", 0};
3354 static swig_type_info _swigt__p_p_char
= {"_p_p_char", "char **", 0, 0, (void*)0, 0};
3355 static swig_type_info _swigt__p_void
= {"_p_void", "void *", 0, 0, (void*)0, 0};
3357 static swig_type_info
*swig_type_initial
[] = {
3359 &_swigt__p_netpgp_t
,
3364 static swig_cast_info _swigc__p_char
[] = { {&_swigt__p_char
, 0, 0, 0},{0, 0, 0, 0}};
3365 static swig_cast_info _swigc__p_netpgp_t
[] = { {&_swigt__p_netpgp_t
, 0, 0, 0},{0, 0, 0, 0}};
3366 static swig_cast_info _swigc__p_p_char
[] = { {&_swigt__p_p_char
, 0, 0, 0},{0, 0, 0, 0}};
3367 static swig_cast_info _swigc__p_void
[] = { {&_swigt__p_void
, 0, 0, 0},{0, 0, 0, 0}};
3369 static swig_cast_info
*swig_cast_initial
[] = {
3377 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3379 static swig_constant_info swig_constants
[] = {
3385 static swig_variable_info swig_variables
[] = {
3388 static swig_command_info swig_commands
[] = {
3389 {"netpgpperlc::netpgp_t_c_set", _wrap_netpgp_t_c_set
},
3390 {"netpgpperlc::netpgp_t_c_get", _wrap_netpgp_t_c_get
},
3391 {"netpgpperlc::netpgp_t_size_set", _wrap_netpgp_t_size_set
},
3392 {"netpgpperlc::netpgp_t_size_get", _wrap_netpgp_t_size_get
},
3393 {"netpgpperlc::netpgp_t_name_set", _wrap_netpgp_t_name_set
},
3394 {"netpgpperlc::netpgp_t_name_get", _wrap_netpgp_t_name_get
},
3395 {"netpgpperlc::netpgp_t_value_set", _wrap_netpgp_t_value_set
},
3396 {"netpgpperlc::netpgp_t_value_get", _wrap_netpgp_t_value_get
},
3397 {"netpgpperlc::netpgp_t_pubring_set", _wrap_netpgp_t_pubring_set
},
3398 {"netpgpperlc::netpgp_t_pubring_get", _wrap_netpgp_t_pubring_get
},
3399 {"netpgpperlc::netpgp_t_secring_set", _wrap_netpgp_t_secring_set
},
3400 {"netpgpperlc::netpgp_t_secring_get", _wrap_netpgp_t_secring_get
},
3401 {"netpgpperlc::netpgp_t_io_set", _wrap_netpgp_t_io_set
},
3402 {"netpgpperlc::netpgp_t_io_get", _wrap_netpgp_t_io_get
},
3403 {"netpgpperlc::netpgp_t_passfp_set", _wrap_netpgp_t_passfp_set
},
3404 {"netpgpperlc::netpgp_t_passfp_get", _wrap_netpgp_t_passfp_get
},
3405 {"netpgpperlc::new_netpgp_t", _wrap_new_netpgp_t
},
3406 {"netpgpperlc::delete_netpgp_t", _wrap_delete_netpgp_t
},
3407 {"netpgpperlc::netpgp_init", _wrap_netpgp_init
},
3408 {"netpgpperlc::netpgp_end", _wrap_netpgp_end
},
3409 {"netpgpperlc::netpgp_set_debug", _wrap_netpgp_set_debug
},
3410 {"netpgpperlc::netpgp_get_debug", _wrap_netpgp_get_debug
},
3411 {"netpgpperlc::netpgp_get_info", _wrap_netpgp_get_info
},
3412 {"netpgpperlc::netpgp_list_packets", _wrap_netpgp_list_packets
},
3413 {"netpgpperlc::netpgp_setvar", _wrap_netpgp_setvar
},
3414 {"netpgpperlc::netpgp_getvar", _wrap_netpgp_getvar
},
3415 {"netpgpperlc::netpgp_list_keys", _wrap_netpgp_list_keys
},
3416 {"netpgpperlc::netpgp_list_sigs", _wrap_netpgp_list_sigs
},
3417 {"netpgpperlc::netpgp_find_key", _wrap_netpgp_find_key
},
3418 {"netpgpperlc::netpgp_get_key", _wrap_netpgp_get_key
},
3419 {"netpgpperlc::netpgp_export_key", _wrap_netpgp_export_key
},
3420 {"netpgpperlc::netpgp_import_key", _wrap_netpgp_import_key
},
3421 {"netpgpperlc::netpgp_generate_key", _wrap_netpgp_generate_key
},
3422 {"netpgpperlc::netpgp_encrypt_file", _wrap_netpgp_encrypt_file
},
3423 {"netpgpperlc::netpgp_decrypt_file", _wrap_netpgp_decrypt_file
},
3424 {"netpgpperlc::netpgp_sign_file", _wrap_netpgp_sign_file
},
3425 {"netpgpperlc::netpgp_verify_file", _wrap_netpgp_verify_file
},
3426 {"netpgpperlc::netpgp_sign_memory", _wrap_netpgp_sign_memory
},
3427 {"netpgpperlc::netpgp_verify_memory", _wrap_netpgp_verify_memory
},
3430 /* -----------------------------------------------------------------------------
3431 * Type initialization:
3432 * This problem is tough by the requirement that no dynamic
3433 * memory is used. Also, since swig_type_info structures store pointers to
3434 * swig_cast_info structures and swig_cast_info structures store pointers back
3435 * to swig_type_info structures, we need some lookup code at initialization.
3436 * The idea is that swig generates all the structures that are needed.
3437 * The runtime then collects these partially filled structures.
3438 * The SWIG_InitializeModule function takes these initial arrays out of
3439 * swig_module, and does all the lookup, filling in the swig_module.types
3440 * array with the correct data and linking the correct swig_cast_info
3441 * structures together.
3443 * The generated swig_type_info structures are assigned staticly to an initial
3444 * array. We just loop through that array, and handle each type individually.
3445 * First we lookup if this type has been already loaded, and if so, use the
3446 * loaded structure instead of the generated one. Then we have to fill in the
3447 * cast linked list. The cast data is initially stored in something like a
3448 * two-dimensional array. Each row corresponds to a type (there are the same
3449 * number of rows as there are in the swig_type_initial array). Each entry in
3450 * a column is one of the swig_cast_info structures for that type.
3451 * The cast_initial array is actually an array of arrays, because each row has
3452 * a variable number of columns. So to actually build the cast linked list,
3453 * we find the array of casts associated with the type, and loop through it
3454 * adding the casts to the list. The one last trick we need to do is making
3455 * sure the type pointer in the swig_cast_info struct is correct.
3457 * First off, we lookup the cast->type name to see if it is already loaded.
3458 * There are three cases to handle:
3459 * 1) If the cast->type has already been loaded AND the type we are adding
3460 * casting info to has not been loaded (it is in this module), THEN we
3461 * replace the cast->type pointer with the type pointer that has already
3463 * 2) If BOTH types (the one we are adding casting info to, and the
3464 * cast->type) are loaded, THEN the cast info has already been loaded by
3465 * the previous module so we just ignore it.
3466 * 3) Finally, if cast->type has not already been loaded, then we add that
3467 * swig_cast_info to the linked list (because the cast->type) pointer will
3469 * ----------------------------------------------------------------------------- */
3479 #define SWIGRUNTIME_DEBUG
3484 SWIG_InitializeModule(void *clientdata
) {
3486 swig_module_info
*module_head
, *iter
;
3489 clientdata
= clientdata
;
3491 /* check to see if the circular list has been setup, if not, set it up */
3492 if (swig_module
.next
==0) {
3493 /* Initialize the swig_module */
3494 swig_module
.type_initial
= swig_type_initial
;
3495 swig_module
.cast_initial
= swig_cast_initial
;
3496 swig_module
.next
= &swig_module
;
3499 /* Try and load any already created modules */
3500 module_head
= SWIG_GetModule(clientdata
);
3502 /* This is the first module loaded for this interpreter */
3503 /* so set the swig module into the interpreter */
3504 SWIG_SetModule(clientdata
, &swig_module
);
3505 module_head
= &swig_module
;
3507 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3511 if (iter
==&swig_module
) {
3516 } while (iter
!= module_head
);
3518 /* if the is found in the list, then all is done and we may leave */
3520 /* otherwise we must add out module into the list */
3521 swig_module
.next
= module_head
->next
;
3522 module_head
->next
= &swig_module
;
3525 /* Now work on filling in swig_module.types */
3526 #ifdef SWIGRUNTIME_DEBUG
3527 printf("SWIG_InitializeModule: size %d\n", swig_module
.size
);
3529 for (i
= 0; i
< swig_module
.size
; ++i
) {
3530 swig_type_info
*type
= 0;
3531 swig_type_info
*ret
;
3532 swig_cast_info
*cast
;
3534 #ifdef SWIGRUNTIME_DEBUG
3535 printf("SWIG_InitializeModule: type %d %s\n", i
, swig_module
.type_initial
[i
]->name
);
3538 /* if there is another module already loaded */
3539 if (swig_module
.next
!= &swig_module
) {
3540 type
= SWIG_MangledTypeQueryModule(swig_module
.next
, &swig_module
, swig_module
.type_initial
[i
]->name
);
3543 /* Overwrite clientdata field */
3544 #ifdef SWIGRUNTIME_DEBUG
3545 printf("SWIG_InitializeModule: found type %s\n", type
->name
);
3547 if (swig_module
.type_initial
[i
]->clientdata
) {
3548 type
->clientdata
= swig_module
.type_initial
[i
]->clientdata
;
3549 #ifdef SWIGRUNTIME_DEBUG
3550 printf("SWIG_InitializeModule: found and overwrite type %s \n", type
->name
);
3554 type
= swig_module
.type_initial
[i
];
3557 /* Insert casting types */
3558 cast
= swig_module
.cast_initial
[i
];
3559 while (cast
->type
) {
3560 /* Don't need to add information already in the list */
3562 #ifdef SWIGRUNTIME_DEBUG
3563 printf("SWIG_InitializeModule: look cast %s\n", cast
->type
->name
);
3565 if (swig_module
.next
!= &swig_module
) {
3566 ret
= SWIG_MangledTypeQueryModule(swig_module
.next
, &swig_module
, cast
->type
->name
);
3567 #ifdef SWIGRUNTIME_DEBUG
3568 if (ret
) printf("SWIG_InitializeModule: found cast %s\n", ret
->name
);
3572 if (type
== swig_module
.type_initial
[i
]) {
3573 #ifdef SWIGRUNTIME_DEBUG
3574 printf("SWIG_InitializeModule: skip old type %s\n", ret
->name
);
3579 /* Check for casting already in the list */
3580 swig_cast_info
*ocast
= SWIG_TypeCheck(ret
->name
, type
);
3581 #ifdef SWIGRUNTIME_DEBUG
3582 if (ocast
) printf("SWIG_InitializeModule: skip old cast %s\n", ret
->name
);
3584 if (!ocast
) ret
= 0;
3589 #ifdef SWIGRUNTIME_DEBUG
3590 printf("SWIG_InitializeModule: adding cast %s\n", cast
->type
->name
);
3593 type
->cast
->prev
= cast
;
3594 cast
->next
= type
->cast
;
3600 /* Set entry in modules->types array equal to the type */
3601 swig_module
.types
[i
] = type
;
3603 swig_module
.types
[i
] = 0;
3605 #ifdef SWIGRUNTIME_DEBUG
3606 printf("**** SWIG_InitializeModule: Cast List ******\n");
3607 for (i
= 0; i
< swig_module
.size
; ++i
) {
3609 swig_cast_info
*cast
= swig_module
.cast_initial
[i
];
3610 printf("SWIG_InitializeModule: type %d %s\n", i
, swig_module
.type_initial
[i
]->name
);
3611 while (cast
->type
) {
3612 printf("SWIG_InitializeModule: cast type %s\n", cast
->type
->name
);
3616 printf("---- Total casts: %d\n",j
);
3618 printf("**** SWIG_InitializeModule: Cast List ******\n");
3622 /* This function will propagate the clientdata field of type to
3623 * any new swig_type_info structures that have been added into the list
3624 * of equivalent types. It is like calling
3625 * SWIG_TypeClientData(type, clientdata) a second time.
3628 SWIG_PropagateClientData(void) {
3630 swig_cast_info
*equiv
;
3631 static int init_run
= 0;
3633 if (init_run
) return;
3636 for (i
= 0; i
< swig_module
.size
; i
++) {
3637 if (swig_module
.types
[i
]->clientdata
) {
3638 equiv
= swig_module
.types
[i
]->cast
;
3640 if (!equiv
->converter
) {
3641 if (equiv
->type
&& !equiv
->type
->clientdata
)
3642 SWIG_TypeClientData(equiv
->type
, swig_module
.types
[i
]->clientdata
);
3644 equiv
= equiv
->next
;
3668 SWIG_InitializeModule(0);
3670 /* Install commands */
3671 for (i
= 0; swig_commands
[i
].name
; i
++) {
3672 newXS((char*) swig_commands
[i
].name
,swig_commands
[i
].wrapper
, (char*)__FILE__
);
3675 /* Install variables */
3676 for (i
= 0; swig_variables
[i
].name
; i
++) {
3678 sv
= get_sv((char*) swig_variables
[i
].name
, TRUE
| 0x2);
3679 if (swig_variables
[i
].type
) {
3680 SWIG_MakePtr(sv
,(void *)1, *swig_variables
[i
].type
,0);
3682 sv_setiv(sv
,(IV
) 0);
3684 swig_create_magic(sv
, (char *) swig_variables
[i
].name
, swig_variables
[i
].set
, swig_variables
[i
].get
);
3687 /* Install constant */
3688 for (i
= 0; swig_constants
[i
].type
; i
++) {
3690 sv
= get_sv((char*)swig_constants
[i
].name
, TRUE
| 0x2);
3691 switch(swig_constants
[i
].type
) {
3693 sv_setiv(sv
, (IV
) swig_constants
[i
].lvalue
);
3696 sv_setnv(sv
, (double) swig_constants
[i
].dvalue
);
3699 sv_setpv(sv
, (char *) swig_constants
[i
].pvalue
);
3702 SWIG_MakePtr(sv
, swig_constants
[i
].pvalue
, *(swig_constants
[i
].ptype
),0);
3705 SWIG_MakePackedObj(sv
, swig_constants
[i
].pvalue
, swig_constants
[i
].lvalue
, *(swig_constants
[i
].ptype
));
3713 SWIG_TypeClientData(SWIGTYPE_p_netpgp_t
, (void*) "netpgpperl::netpgp_t");