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