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