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