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_f_p_q_const__char_p_q_const__char_int_int__void swig_types[2]
1522 #define SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void swig_types[3]
1523 #define SWIGTYPE_p_f_p_q_const__gsl_rng_p_void_double__void swig_types[4]
1524 #define SWIGTYPE_p_f_p_void__double swig_types[5]
1525 #define SWIGTYPE_p_f_p_void__p_void swig_types[6]
1526 #define SWIGTYPE_p_f_p_void__void swig_types[7]
1527 #define SWIGTYPE_p_f_p_void_p_void__double swig_types[8]
1528 #define SWIGTYPE_p_f_p_void_p_void__void swig_types[9]
1529 #define SWIGTYPE_p_gsl_rng swig_types[10]
1530 #define SWIGTYPE_p_gsl_siman_params_t swig_types[11]
1531 static swig_type_info *swig_types[13];
1532 static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
1533 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1534 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1535 
1536 /* -------- TYPES TABLE (END) -------- */
1537 
1538 #define SWIG_init    boot_Math__GSL__Siman
1539 
1540 #define SWIG_name   "Math::GSL::Simanc::boot_Math__GSL__Siman"
1541 #define SWIG_prefix "Math::GSL::Simanc::"
1542 
1543 #define SWIGVERSION 0x040001
1544 #define SWIG_VERSION SWIGVERSION
1545 
1546 
1547 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1548 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1549 
1550 
1551 #ifdef __cplusplus
1552 extern "C"
1553 #endif
1554 #ifndef PERL_OBJECT
1555 #ifndef MULTIPLICITY
1556 SWIGEXPORT void SWIG_init (CV* cv);
1557 #else
1558 SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
1559 #endif
1560 #else
1561 SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
1562 #endif
1563 
1564 
1565 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(double value)1566 SWIG_From_double  SWIG_PERL_DECL_ARGS_1(double value)
1567 {
1568   return sv_2mortal(newSVnv(value));
1569 }
1570 
1571 
1572 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(long value)1573 SWIG_From_long  SWIG_PERL_DECL_ARGS_1(long value)
1574 {
1575   SV *sv;
1576   if (IVSIZE >= sizeof(value) || (value >= IV_MIN && value <= IV_MAX))
1577     sv = newSViv(value);
1578   else
1579     sv = newSVpvf("%ld", value);
1580   return sv_2mortal(sv);
1581 }
1582 
1583 
1584 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(int value)1585 SWIG_From_int  SWIG_PERL_DECL_ARGS_1(int value)
1586 {
1587   return SWIG_From_long  SWIG_PERL_CALL_ARGS_1(value);
1588 }
1589 
1590 
1591 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)1592 SWIG_pchar_descriptor(void)
1593 {
1594   static int init = 0;
1595   static swig_type_info* info = 0;
1596   if (!init) {
1597     info = SWIG_TypeQuery("_p_char");
1598     init = 1;
1599   }
1600   return info;
1601 }
1602 
1603 
1604 SWIGINTERN int
SWIG_AsCharPtrAndSize(SV * obj,char ** cptr,size_t * psize,int * alloc)1605 SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
1606 {
1607   if (SvMAGICAL(obj)) {
1608      SV *tmp = sv_newmortal();
1609      SvSetSV(tmp, obj);
1610      obj = tmp;
1611   }
1612   if (SvPOK(obj)) {
1613     STRLEN len = 0;
1614     char *cstr = SvPV(obj, len);
1615     size_t size = len + 1;
1616     if (cptr)  {
1617       if (alloc) {
1618 	if (*alloc == SWIG_NEWOBJ) {
1619 	  *cptr = (char *)memcpy(malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
1620 	} else {
1621 	  *cptr = cstr;
1622 	  *alloc = SWIG_OLDOBJ;
1623 	}
1624       }
1625     }
1626     if (psize) *psize = size;
1627     return SWIG_OK;
1628   } else {
1629     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1630     if (pchar_descriptor) {
1631       char* vptr = 0;
1632       if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
1633 	if (cptr) *cptr = vptr;
1634 	if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
1635 	if (alloc) *alloc = SWIG_OLDOBJ;
1636 	return SWIG_OK;
1637       }
1638     }
1639   }
1640   return SWIG_TypeError;
1641 }
1642 
1643 
1644 
1645 
1646 
1647 #include <limits.h>
1648 #if !defined(SWIG_NO_LLONG_MAX)
1649 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1650 #   define LLONG_MAX __LONG_LONG_MAX__
1651 #   define LLONG_MIN (-LLONG_MAX - 1LL)
1652 #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1653 # endif
1654 #endif
1655 
1656 
1657 #include <stdlib.h>
1658 #ifdef _MSC_VER
1659 # ifndef strtoull
1660 #  define strtoull _strtoui64
1661 # endif
1662 # ifndef strtoll
1663 #  define strtoll _strtoi64
1664 # endif
1665 #endif
1666 
1667 
1668 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,double * val)1669 SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
1670 {
1671   if (SvNIOK(obj)) {
1672     if (val) *val = SvNV(obj);
1673     return SWIG_OK;
1674   } else if (SvIOK(obj)) {
1675     if (val) *val = (double) SvIV(obj);
1676     return SWIG_AddCast(SWIG_OK);
1677   } else {
1678     const char *nptr = SvPV_nolen(obj);
1679     if (nptr) {
1680       char *endptr;
1681       double v;
1682       errno = 0;
1683       v = strtod(nptr, &endptr);
1684       if (errno == ERANGE) {
1685 	errno = 0;
1686 	return SWIG_OverflowError;
1687       } else {
1688 	if (*endptr == '\0') {
1689 	  if (val) *val = v;
1690 	  return SWIG_Str2NumCast(SWIG_OK);
1691 	}
1692       }
1693     }
1694   }
1695   return SWIG_TypeError;
1696 }
1697 
1698 
1699 #include <float.h>
1700 
1701 
1702 #include <math.h>
1703 
1704 
1705 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)1706 SWIG_CanCastAsInteger(double *d, double min, double max) {
1707   double x = *d;
1708   if ((min <= x && x <= max)) {
1709    double fx = floor(x);
1710    double cx = ceil(x);
1711    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
1712    if ((errno == EDOM) || (errno == ERANGE)) {
1713      errno = 0;
1714    } else {
1715      double summ, reps, diff;
1716      if (rd < x) {
1717        diff = x - rd;
1718      } else if (rd > x) {
1719        diff = rd - x;
1720      } else {
1721        return 1;
1722      }
1723      summ = rd + x;
1724      reps = diff/summ;
1725      if (reps < 8*DBL_EPSILON) {
1726        *d = rd;
1727        return 1;
1728      }
1729    }
1730   }
1731   return 0;
1732 }
1733 
1734 
1735 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,long * val)1736 SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
1737 {
1738   if (SvUOK(obj)) {
1739     UV v = SvUV(obj);
1740     if (UVSIZE < sizeof(*val) || v <= LONG_MAX) {
1741       if (val) *val = v;
1742       return SWIG_OK;
1743     }
1744     return SWIG_OverflowError;
1745   } else if (SvIOK(obj)) {
1746     IV v = SvIV(obj);
1747     if (IVSIZE <= sizeof(*val) || (v >= LONG_MIN && v <= LONG_MAX)) {
1748       if(val) *val = v;
1749       return SWIG_OK;
1750     }
1751     return SWIG_OverflowError;
1752   } else {
1753     int dispatch = 0;
1754     const char *nptr = SvPV_nolen(obj);
1755     if (nptr) {
1756       char *endptr;
1757       long v;
1758       errno = 0;
1759       v = strtol(nptr, &endptr,0);
1760       if (errno == ERANGE) {
1761 	errno = 0;
1762 	return SWIG_OverflowError;
1763       } else {
1764 	if (*endptr == '\0') {
1765 	  if (val) *val = v;
1766 	  return SWIG_Str2NumCast(SWIG_OK);
1767 	}
1768       }
1769     }
1770     if (!dispatch) {
1771       double d;
1772       int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
1773       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
1774 	if (val) *val = (long)(d);
1775 	return res;
1776       }
1777     }
1778   }
1779   return SWIG_TypeError;
1780 }
1781 
1782 
1783 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,int * val)1784 SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
1785 {
1786   long v;
1787   int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
1788   if (SWIG_IsOK(res)) {
1789     if ((v < INT_MIN || v > INT_MAX)) {
1790       return SWIG_OverflowError;
1791     } else {
1792       if (val) *val = (int)(v);
1793     }
1794   }
1795   return res;
1796 }
1797 
1798 
1799 SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)1800 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1801 {
1802   SV *obj = sv_newmortal();
1803   if (carray) {
1804     sv_setpvn(obj, carray, size);
1805   } else {
1806     sv_setsv(obj, &PL_sv_undef);
1807   }
1808   return obj;
1809 }
1810 
1811 
1812 SWIGINTERNINLINE SV *
SWIG_FromCharPtr(const char * cptr)1813 SWIG_FromCharPtr(const char *cptr)
1814 {
1815   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1816 }
1817 
1818 
1819     #include "gsl/gsl_nan.h"
1820     #include "gsl/gsl_errno.h"
1821     #include "gsl/gsl_math.h"
1822     #include "gsl/gsl_monte.h"
1823 
1824 
1825     struct perl_array {
1826         I32 len;
1827         AV *array;
1828     };
1829 
1830 
1831 
1832 enum awType { awDouble, awFloat, awInt, awUnsigned };
1833 
1834 typedef struct {
1835     I32 size;
1836     enum awType type;
1837     void * data;
1838 } array_wrapper;
1839 
array_wrapper_alloc(int numelem,enum awType type)1840 array_wrapper * array_wrapper_alloc(int numelem, enum awType type){
1841     array_wrapper * rv =  malloc(sizeof(array_wrapper));
1842 
1843     if (rv == NULL)
1844         croak("array_wrapper_alloc: can't malloc wrapper\n");
1845 
1846     switch (type){
1847         case awDouble:
1848             rv->data = malloc(sizeof(double) * numelem);
1849             break;
1850         case awFloat:
1851             rv->data = malloc(sizeof(float) * numelem);
1852             break;
1853         case awInt:
1854             rv->data = malloc(sizeof(int) * numelem);
1855             break;
1856         case awUnsigned:
1857             rv->data = malloc(sizeof(unsigned int) * numelem);
1858             break;
1859         default:
1860             croak("array_wrapper_alloc: type should be awDouble, awFloat, awInt, or awUnsigned");
1861     }
1862 
1863     if (rv->data == NULL)
1864         croak("array_wrapper_alloc: can't malloc data");
1865 
1866     rv->size = numelem;
1867     rv->type = type;
1868     return rv;
1869 }
1870 
array_wrapper_free(array_wrapper * daw)1871 void array_wrapper_free(array_wrapper * daw){
1872     free(daw->data);
1873     free(daw);
1874 }
1875 
1876 
1877     /* structure to hold required information while the gsl function call
1878        for each callback
1879      */
1880     struct gsl_function_perl {
1881         gsl_function C_gsl_function;
1882         SV * function;
1883         SV * params;
1884     };
1885 
1886     struct gsl_function_fdf_perl {
1887         gsl_function_fdf C_gsl_function_fdf;
1888         SV * f;
1889         SV * df;
1890         SV * fdf;
1891         SV * params;
1892     };
1893 
1894     struct gsl_monte_function_perl {
1895         gsl_monte_function C_gsl_monte_function;
1896         SV * f;
1897         SV * dim;
1898         SV * params;
1899     };
1900 
gsl_function_perl_free(struct gsl_function_perl * perl_f)1901     void gsl_function_perl_free(struct gsl_function_perl * perl_f){
1902         if (perl_f != NULL) {
1903             SvREFCNT_dec(perl_f->function);
1904             SvREFCNT_dec(perl_f->params);
1905             Safefree(perl_f);
1906         }
1907     }
1908 
gsl_function_fdf_perl_free(struct gsl_function_fdf_perl * perl_fdf)1909     void gsl_function_fdf_perl_free(struct gsl_function_fdf_perl * perl_fdf){
1910         if (perl_fdf != NULL) {
1911 	  SvREFCNT_dec(perl_fdf->f);
1912 	  SvREFCNT_dec(perl_fdf->df);
1913 	  SvREFCNT_dec(perl_fdf->fdf);
1914 	  SvREFCNT_dec(perl_fdf->params);
1915 	  Safefree(perl_fdf);
1916         }
1917     }
1918 
1919     /* These functions (C callbacks) calls the perl callbacks.
1920        Info for perl callback can be found using the 'void*params' parameter
1921     */
call_gsl_function_x_params(SV * function,double x,SV * params)1922     double call_gsl_function_x_params(SV* function, double x, SV *params){
1923         unsigned int count;
1924         double y;
1925         dSP;
1926 
1927         //fprintf(stderr, "LOOKUP CALLBACK\n");
1928         ENTER;
1929         SAVETMPS;
1930 
1931         PUSHMARK(SP);
1932         XPUSHs(sv_2mortal(newSVnv((double)x)));
1933         XPUSHs(params);
1934         PUTBACK;                                /* make local stack pointer global */
1935 
1936         count = call_sv(function, G_SCALAR);
1937         SPAGAIN;
1938 
1939         if (count != 1)
1940                 croak("Expected to call subroutine in scalar context!");
1941 
1942         y = POPn;
1943 
1944         PUTBACK;                                /* make local stack pointer global */
1945         FREETMPS;
1946         LEAVE;
1947 
1948         return y;
1949     }
1950 
call_gsl_function(double x,void * params)1951     double call_gsl_function(double x , void *params){
1952         struct gsl_function_perl *F=(struct gsl_function_perl*)params;
1953 	return call_gsl_function_x_params( F->function, x, F->params );
1954     }
1955 
call_gsl_function_fdf_f(double x,void * params)1956     double call_gsl_function_fdf_f(double x , void *params){
1957         struct gsl_function_fdf_perl *F=(struct gsl_function_fdf_perl*)params;
1958 	return call_gsl_function_x_params( F->f, x, F->params );
1959     }
1960 
call_gsl_function_fdf_df(double x,void * params)1961     double call_gsl_function_fdf_df(double x , void *params){
1962         struct gsl_function_fdf_perl *F=(struct gsl_function_fdf_perl*)params;
1963 	return call_gsl_function_x_params( F->df, x, F->params );
1964     }
1965 
call_gsl_function_fdf_fdf(double x,void * params,double * f,double * df)1966     void call_gsl_function_fdf_fdf(double x , void *params, double *f, double *df ){
1967         struct gsl_function_fdf_perl *F=(struct gsl_function_fdf_perl*)params;
1968 
1969         dSP;
1970 
1971         ENTER;
1972         SAVETMPS;
1973 
1974         PUSHMARK(SP);
1975 	EXTEND(SP, 2);
1976         PUSHs(sv_2mortal(newSVnv((double)x)));
1977         PUSHs(F->params);
1978         PUTBACK;                                /* make local stack pointer global */
1979 
1980 	{
1981 	  unsigned int count = call_sv(F->fdf, G_ARRAY);
1982 	  SPAGAIN;
1983 
1984 	  if (count != 2)
1985 	    croak( "Expected two return values, got %d", count );
1986 	}
1987 
1988 	*df = POPn;
1989         *f = POPn;
1990 
1991         PUTBACK;                                /* make local stack pointer global */
1992         FREETMPS;
1993         LEAVE;
1994     }
1995 
call_gsl_monte_function(double * x_array,size_t dim,void * params)1996     double call_gsl_monte_function(double *x_array , size_t dim, void *params){
1997         struct gsl_monte_function_perl *F=(struct gsl_monte_function_perl*)params;
1998         unsigned int count;
1999         unsigned int i;
2000         AV* perl_array;
2001         double y;
2002         dSP;
2003 
2004         //fprintf(stderr, "LOOKUP CALLBACK\n");
2005         ENTER;
2006         SAVETMPS;
2007 
2008         PUSHMARK(SP);
2009         perl_array=newAV();
2010         sv_2mortal((SV*)perl_array);
2011         XPUSHs(sv_2mortal(newRV((SV *)perl_array)));
2012         for(i=0; i<dim; i++) {
2013                 /* no mortal : it is referenced by the array */
2014                 av_push(perl_array, newSVnv(x_array[i]));
2015         }
2016         XPUSHs(sv_2mortal(newSViv(dim)));
2017         XPUSHs(F->params);
2018         PUTBACK;                                /* make local stack pointer global */
2019 
2020         count = call_sv(F->f, G_SCALAR);
2021         SPAGAIN;
2022 
2023         if (count != 1)
2024                 croak("Expected to call subroutine in scalar context!");
2025 
2026         y = POPn;
2027 
2028         PUTBACK;                                /* make local stack pointer global */
2029         FREETMPS;
2030         LEAVE;
2031 
2032         return y;
2033     }
2034 
2035 
gsl_function_fdf_extract(char * param_name,HV * hash,SV * func[])2036   void gsl_function_fdf_extract( char* param_name, HV* hash, SV* func[] ) {
2037     static const char *keys[3] = { "f", "df", "fdf" };
2038 
2039     int ikey;
2040 
2041     for ( ikey = 0 ; ikey < 3 ; ++ikey ) {
2042       func[ikey] = 0;
2043       const char* key = keys[ikey];
2044       /* it just so happens that strlen(keys[ikey]) == ikey + 1 */
2045       SV** pp_sv = hv_fetch( hash, key, ikey+1, 0 );
2046       SV* function;
2047 
2048       if ( !pp_sv )
2049 	croak("Math::GSL : %s: missing key %s!", param_name, key);
2050 
2051       function = *pp_sv;
2052 
2053       if ( SvPOK(function) || ( SvROK( function ) && SvTYPE(SvRV(function)) == SVt_PVCV ) ) {
2054         /* hold on to SV after the enclosing hash goes away */
2055         SvREFCNT_inc( function );
2056 	func[ikey] = function;
2057       }
2058       else {
2059 	croak( "Math::GSL : %s:  key %s is not a reference to code!", param_name, key);
2060       }
2061     }
2062   }
2063 
2064 
2065 
2066     #include "gsl/gsl_siman.h"
2067 
2068 
2069 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,unsigned long * val)2070 SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val)
2071 {
2072   if (SvUOK(obj)) {
2073     UV v = SvUV(obj);
2074     if (UVSIZE <= sizeof(*val) || v <= ULONG_MAX) {
2075       if (val) *val = v;
2076       return SWIG_OK;
2077     }
2078     return SWIG_OverflowError;
2079   } else if (SvIOK(obj)) {
2080     IV v = SvIV(obj);
2081     if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULONG_MAX)) {
2082       if (val) *val = v;
2083       return SWIG_OK;
2084     }
2085     return SWIG_OverflowError;
2086   } else {
2087     int dispatch = 0;
2088     const char *nptr = SvPV_nolen(obj);
2089     if (nptr) {
2090       char *endptr;
2091       unsigned long v;
2092       errno = 0;
2093       v = strtoul(nptr, &endptr,0);
2094       if (errno == ERANGE) {
2095 	errno = 0;
2096 	return SWIG_OverflowError;
2097       } else {
2098 	if (*endptr == '\0') {
2099 	  if (val) *val = v;
2100 	  return SWIG_Str2NumCast(SWIG_OK);
2101 	}
2102       }
2103     }
2104     if (!dispatch) {
2105       double d;
2106       int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
2107       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
2108 	if (val) *val = (unsigned long)(d);
2109 	return res;
2110       }
2111     }
2112   }
2113   return SWIG_TypeError;
2114 }
2115 
2116 
2117 #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
2118 #  define SWIG_LONG_LONG_AVAILABLE
2119 #endif
2120 
2121 
2122 #ifdef SWIG_LONG_LONG_AVAILABLE
2123 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,unsigned long long * val)2124 SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long long *val)
2125 {
2126   if (SvUOK(obj)) {
2127     /* pretty sure this should be conditional on
2128      * (UVSIZE <= sizeof(*val) || v <= ULLONG_MAX) */
2129     if (val) *val = SvUV(obj);
2130     return SWIG_OK;
2131   } else  if (SvIOK(obj)) {
2132     IV v = SvIV(obj);
2133     if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULLONG_MAX)) {
2134       if (val) *val = v;
2135       return SWIG_OK;
2136     } else {
2137       return SWIG_OverflowError;
2138     }
2139   } else {
2140     int dispatch = 0;
2141     const char *nptr = SvPV_nolen(obj);
2142     if (nptr) {
2143       char *endptr;
2144       unsigned long long v;
2145       errno = 0;
2146       v = strtoull(nptr, &endptr,0);
2147       if (errno == ERANGE) {
2148 	errno = 0;
2149 	return SWIG_OverflowError;
2150       } else {
2151 	if (*endptr == '\0') {
2152 	  if (val) *val = v;
2153 	  return SWIG_Str2NumCast(SWIG_OK);
2154 	}
2155       }
2156     }
2157     if (!dispatch) {
2158       const double mant_max = 1LL << DBL_MANT_DIG;
2159       double d;
2160       int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
2161       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
2162 	if (val) *val = (unsigned long long)(d);
2163 	return res;
2164       }
2165     }
2166   }
2167   return SWIG_TypeError;
2168 }
2169 #endif
2170 
2171 
2172 SWIGINTERNINLINE int
SWIG_PERL_DECL_ARGS_2(SV * obj,size_t * val)2173 SWIG_AsVal_size_t SWIG_PERL_DECL_ARGS_2(SV * obj, size_t *val)
2174 {
2175   int res = SWIG_TypeError;
2176 #ifdef SWIG_LONG_LONG_AVAILABLE
2177   if (sizeof(size_t) <= sizeof(unsigned long)) {
2178 #endif
2179     unsigned long v;
2180     res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
2181     if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2182 #ifdef SWIG_LONG_LONG_AVAILABLE
2183   } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
2184     unsigned long long v;
2185     res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
2186     if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2187   }
2188 #endif
2189   return res;
2190 }
2191 
2192 #ifdef __cplusplus
2193 extern "C" {
2194 #endif
2195 
2196 #ifdef PERL_OBJECT
2197 #define MAGIC_CLASS _wrap_Math__GSL__Siman_var::
2198 class _wrap_Math__GSL__Siman_var : public CPerlObj {
2199 public:
2200 #else
2201 #define MAGIC_CLASS
2202 #endif
swig_magic_readonly(pTHX_ SV * SWIGUNUSEDPARM (sv),MAGIC * SWIGUNUSEDPARM (mg))2203 SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
2204     MAGIC_PPERL
2205     croak("Value is read-only.");
2206     return 0;
2207 }
2208 
2209 
2210 #ifdef PERL_OBJECT
2211 };
2212 #endif
2213 
2214 #ifdef __cplusplus
2215 }
2216 #endif
2217 
2218 #ifdef __cplusplus
2219 extern "C" {
2220 #endif
XS(_wrap_gsl_error)2221 XS(_wrap_gsl_error) {
2222   {
2223     char *arg1 = (char *) 0 ;
2224     char *arg2 = (char *) 0 ;
2225     int arg3 ;
2226     int arg4 ;
2227     int res1 ;
2228     char *buf1 = 0 ;
2229     int alloc1 = 0 ;
2230     int res2 ;
2231     char *buf2 = 0 ;
2232     int alloc2 = 0 ;
2233     int val3 ;
2234     int ecode3 = 0 ;
2235     int val4 ;
2236     int ecode4 = 0 ;
2237     int argvi = 0;
2238     dXSARGS;
2239 
2240     if ((items < 4) || (items > 4)) {
2241       SWIG_croak("Usage: gsl_error(reason,file,line,gsl_errno);");
2242     }
2243     res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2244     if (!SWIG_IsOK(res1)) {
2245       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_error" "', argument " "1"" of type '" "char const *""'");
2246     }
2247     arg1 = (char *)(buf1);
2248     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2249     if (!SWIG_IsOK(res2)) {
2250       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_error" "', argument " "2"" of type '" "char const *""'");
2251     }
2252     arg2 = (char *)(buf2);
2253     ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
2254     if (!SWIG_IsOK(ecode3)) {
2255       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_error" "', argument " "3"" of type '" "int""'");
2256     }
2257     arg3 = (int)(val3);
2258     ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
2259     if (!SWIG_IsOK(ecode4)) {
2260       SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gsl_error" "', argument " "4"" of type '" "int""'");
2261     }
2262     arg4 = (int)(val4);
2263     gsl_error((char const *)arg1,(char const *)arg2,arg3,arg4);
2264     ST(argvi) = &PL_sv_undef;
2265     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2266     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2267 
2268 
2269     XSRETURN(argvi);
2270   fail:
2271     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2272     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2273 
2274 
2275     SWIG_croak_null();
2276   }
2277 }
2278 
2279 
XS(_wrap_gsl_stream_printf)2280 XS(_wrap_gsl_stream_printf) {
2281   {
2282     char *arg1 = (char *) 0 ;
2283     char *arg2 = (char *) 0 ;
2284     int arg3 ;
2285     char *arg4 = (char *) 0 ;
2286     int res1 ;
2287     char *buf1 = 0 ;
2288     int alloc1 = 0 ;
2289     int res2 ;
2290     char *buf2 = 0 ;
2291     int alloc2 = 0 ;
2292     int val3 ;
2293     int ecode3 = 0 ;
2294     int res4 ;
2295     char *buf4 = 0 ;
2296     int alloc4 = 0 ;
2297     int argvi = 0;
2298     dXSARGS;
2299 
2300     if ((items < 4) || (items > 4)) {
2301       SWIG_croak("Usage: gsl_stream_printf(label,file,line,reason);");
2302     }
2303     res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2304     if (!SWIG_IsOK(res1)) {
2305       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_stream_printf" "', argument " "1"" of type '" "char const *""'");
2306     }
2307     arg1 = (char *)(buf1);
2308     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2309     if (!SWIG_IsOK(res2)) {
2310       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_stream_printf" "', argument " "2"" of type '" "char const *""'");
2311     }
2312     arg2 = (char *)(buf2);
2313     ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
2314     if (!SWIG_IsOK(ecode3)) {
2315       SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_stream_printf" "', argument " "3"" of type '" "int""'");
2316     }
2317     arg3 = (int)(val3);
2318     res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
2319     if (!SWIG_IsOK(res4)) {
2320       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gsl_stream_printf" "', argument " "4"" of type '" "char const *""'");
2321     }
2322     arg4 = (char *)(buf4);
2323     gsl_stream_printf((char const *)arg1,(char const *)arg2,arg3,(char const *)arg4);
2324     ST(argvi) = &PL_sv_undef;
2325     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2326     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2327 
2328     if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2329     XSRETURN(argvi);
2330   fail:
2331     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2332     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2333 
2334     if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2335     SWIG_croak_null();
2336   }
2337 }
2338 
2339 
XS(_wrap_gsl_strerror)2340 XS(_wrap_gsl_strerror) {
2341   {
2342     int arg1 ;
2343     int val1 ;
2344     int ecode1 = 0 ;
2345     int argvi = 0;
2346     char *result = 0 ;
2347     dXSARGS;
2348 
2349     if ((items < 1) || (items > 1)) {
2350       SWIG_croak("Usage: gsl_strerror(gsl_errno);");
2351     }
2352     ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
2353     if (!SWIG_IsOK(ecode1)) {
2354       SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_strerror" "', argument " "1"" of type '" "int""'");
2355     }
2356     arg1 = (int)(val1);
2357     result = (char *)gsl_strerror(arg1);
2358     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2359 
2360     XSRETURN(argvi);
2361   fail:
2362 
2363     SWIG_croak_null();
2364   }
2365 }
2366 
2367 
XS(_wrap_gsl_set_error_handler)2368 XS(_wrap_gsl_set_error_handler) {
2369   {
2370     gsl_error_handler_t *arg1 = (gsl_error_handler_t *) 0 ;
2371     int argvi = 0;
2372     gsl_error_handler_t *result = 0 ;
2373     dXSARGS;
2374 
2375     if ((items < 1) || (items > 1)) {
2376       SWIG_croak("Usage: gsl_set_error_handler(new_handler);");
2377     }
2378     {
2379       int res = SWIG_ConvertFunctionPtr(ST(0), (void**)(&arg1), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void);
2380       if (!SWIG_IsOK(res)) {
2381         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_set_error_handler" "', argument " "1"" of type '" "gsl_error_handler_t *""'");
2382       }
2383     }
2384     result = (gsl_error_handler_t *)gsl_set_error_handler(arg1);
2385     ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void); argvi++ ;
2386 
2387     XSRETURN(argvi);
2388   fail:
2389 
2390     SWIG_croak_null();
2391   }
2392 }
2393 
2394 
XS(_wrap_gsl_set_error_handler_off)2395 XS(_wrap_gsl_set_error_handler_off) {
2396   {
2397     int argvi = 0;
2398     gsl_error_handler_t *result = 0 ;
2399     dXSARGS;
2400 
2401     if ((items < 0) || (items > 0)) {
2402       SWIG_croak("Usage: gsl_set_error_handler_off();");
2403     }
2404     result = (gsl_error_handler_t *)gsl_set_error_handler_off();
2405     ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void); argvi++ ;
2406     XSRETURN(argvi);
2407   fail:
2408     SWIG_croak_null();
2409   }
2410 }
2411 
2412 
XS(_wrap_gsl_set_stream_handler)2413 XS(_wrap_gsl_set_stream_handler) {
2414   {
2415     gsl_stream_handler_t *arg1 = (gsl_stream_handler_t *) 0 ;
2416     int argvi = 0;
2417     gsl_stream_handler_t *result = 0 ;
2418     dXSARGS;
2419 
2420     if ((items < 1) || (items > 1)) {
2421       SWIG_croak("Usage: gsl_set_stream_handler(new_handler);");
2422     }
2423     {
2424       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);
2425       if (!SWIG_IsOK(res)) {
2426         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_set_stream_handler" "', argument " "1"" of type '" "gsl_stream_handler_t *""'");
2427       }
2428     }
2429     result = (gsl_stream_handler_t *)gsl_set_stream_handler(arg1);
2430     ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void); argvi++ ;
2431 
2432     XSRETURN(argvi);
2433   fail:
2434 
2435     SWIG_croak_null();
2436   }
2437 }
2438 
2439 
XS(_wrap_gsl_set_stream)2440 XS(_wrap_gsl_set_stream) {
2441   {
2442     FILE *arg1 = (FILE *) 0 ;
2443     void *argp1 = 0 ;
2444     int res1 = 0 ;
2445     int argvi = 0;
2446     FILE *result = 0 ;
2447     dXSARGS;
2448 
2449     if ((items < 1) || (items > 1)) {
2450       SWIG_croak("Usage: gsl_set_stream(new_stream);");
2451     }
2452     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FILE, 0 |  0 );
2453     if (!SWIG_IsOK(res1)) {
2454       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_set_stream" "', argument " "1"" of type '" "FILE *""'");
2455     }
2456     arg1 = (FILE *)(argp1);
2457     result = (FILE *)gsl_set_stream(arg1);
2458     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FILE, 0 | 0); argvi++ ;
2459 
2460     XSRETURN(argvi);
2461   fail:
2462 
2463     SWIG_croak_null();
2464   }
2465 }
2466 
2467 
XS(_wrap_gsl_siman_params_t_n_tries_set)2468 XS(_wrap_gsl_siman_params_t_n_tries_set) {
2469   {
2470     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2471     int arg2 ;
2472     void *argp1 = 0 ;
2473     int res1 = 0 ;
2474     int val2 ;
2475     int ecode2 = 0 ;
2476     int argvi = 0;
2477     dXSARGS;
2478 
2479     if ((items < 2) || (items > 2)) {
2480       SWIG_croak("Usage: gsl_siman_params_t_n_tries_set(self,n_tries);");
2481     }
2482     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2483     if (!SWIG_IsOK(res1)) {
2484       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_n_tries_set" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2485     }
2486     arg1 = (gsl_siman_params_t *)(argp1);
2487     ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2488     if (!SWIG_IsOK(ecode2)) {
2489       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_siman_params_t_n_tries_set" "', argument " "2"" of type '" "int""'");
2490     }
2491     arg2 = (int)(val2);
2492     if (arg1) (arg1)->n_tries = arg2;
2493     ST(argvi) = &PL_sv_undef;
2494 
2495 
2496     XSRETURN(argvi);
2497   fail:
2498 
2499 
2500     SWIG_croak_null();
2501   }
2502 }
2503 
2504 
XS(_wrap_gsl_siman_params_t_n_tries_get)2505 XS(_wrap_gsl_siman_params_t_n_tries_get) {
2506   {
2507     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2508     void *argp1 = 0 ;
2509     int res1 = 0 ;
2510     int argvi = 0;
2511     int result;
2512     dXSARGS;
2513 
2514     if ((items < 1) || (items > 1)) {
2515       SWIG_croak("Usage: gsl_siman_params_t_n_tries_get(self);");
2516     }
2517     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2518     if (!SWIG_IsOK(res1)) {
2519       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_n_tries_get" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2520     }
2521     arg1 = (gsl_siman_params_t *)(argp1);
2522     result = (int) ((arg1)->n_tries);
2523     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2524 
2525     XSRETURN(argvi);
2526   fail:
2527 
2528     SWIG_croak_null();
2529   }
2530 }
2531 
2532 
XS(_wrap_gsl_siman_params_t_iters_fixed_T_set)2533 XS(_wrap_gsl_siman_params_t_iters_fixed_T_set) {
2534   {
2535     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2536     int arg2 ;
2537     void *argp1 = 0 ;
2538     int res1 = 0 ;
2539     int val2 ;
2540     int ecode2 = 0 ;
2541     int argvi = 0;
2542     dXSARGS;
2543 
2544     if ((items < 2) || (items > 2)) {
2545       SWIG_croak("Usage: gsl_siman_params_t_iters_fixed_T_set(self,iters_fixed_T);");
2546     }
2547     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2548     if (!SWIG_IsOK(res1)) {
2549       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_iters_fixed_T_set" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2550     }
2551     arg1 = (gsl_siman_params_t *)(argp1);
2552     ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2553     if (!SWIG_IsOK(ecode2)) {
2554       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_siman_params_t_iters_fixed_T_set" "', argument " "2"" of type '" "int""'");
2555     }
2556     arg2 = (int)(val2);
2557     if (arg1) (arg1)->iters_fixed_T = arg2;
2558     ST(argvi) = &PL_sv_undef;
2559 
2560 
2561     XSRETURN(argvi);
2562   fail:
2563 
2564 
2565     SWIG_croak_null();
2566   }
2567 }
2568 
2569 
XS(_wrap_gsl_siman_params_t_iters_fixed_T_get)2570 XS(_wrap_gsl_siman_params_t_iters_fixed_T_get) {
2571   {
2572     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2573     void *argp1 = 0 ;
2574     int res1 = 0 ;
2575     int argvi = 0;
2576     int result;
2577     dXSARGS;
2578 
2579     if ((items < 1) || (items > 1)) {
2580       SWIG_croak("Usage: gsl_siman_params_t_iters_fixed_T_get(self);");
2581     }
2582     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2583     if (!SWIG_IsOK(res1)) {
2584       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_iters_fixed_T_get" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2585     }
2586     arg1 = (gsl_siman_params_t *)(argp1);
2587     result = (int) ((arg1)->iters_fixed_T);
2588     ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
2589 
2590     XSRETURN(argvi);
2591   fail:
2592 
2593     SWIG_croak_null();
2594   }
2595 }
2596 
2597 
XS(_wrap_gsl_siman_params_t_step_size_set)2598 XS(_wrap_gsl_siman_params_t_step_size_set) {
2599   {
2600     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2601     double arg2 ;
2602     void *argp1 = 0 ;
2603     int res1 = 0 ;
2604     double val2 ;
2605     int ecode2 = 0 ;
2606     int argvi = 0;
2607     dXSARGS;
2608 
2609     if ((items < 2) || (items > 2)) {
2610       SWIG_croak("Usage: gsl_siman_params_t_step_size_set(self,step_size);");
2611     }
2612     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2613     if (!SWIG_IsOK(res1)) {
2614       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_step_size_set" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2615     }
2616     arg1 = (gsl_siman_params_t *)(argp1);
2617     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2618     if (!SWIG_IsOK(ecode2)) {
2619       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_siman_params_t_step_size_set" "', argument " "2"" of type '" "double""'");
2620     }
2621     arg2 = (double)(val2);
2622     if (arg1) (arg1)->step_size = arg2;
2623     ST(argvi) = &PL_sv_undef;
2624 
2625 
2626     XSRETURN(argvi);
2627   fail:
2628 
2629 
2630     SWIG_croak_null();
2631   }
2632 }
2633 
2634 
XS(_wrap_gsl_siman_params_t_step_size_get)2635 XS(_wrap_gsl_siman_params_t_step_size_get) {
2636   {
2637     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2638     void *argp1 = 0 ;
2639     int res1 = 0 ;
2640     int argvi = 0;
2641     double result;
2642     dXSARGS;
2643 
2644     if ((items < 1) || (items > 1)) {
2645       SWIG_croak("Usage: gsl_siman_params_t_step_size_get(self);");
2646     }
2647     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2648     if (!SWIG_IsOK(res1)) {
2649       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_step_size_get" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2650     }
2651     arg1 = (gsl_siman_params_t *)(argp1);
2652     result = (double) ((arg1)->step_size);
2653     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
2654 
2655     XSRETURN(argvi);
2656   fail:
2657 
2658     SWIG_croak_null();
2659   }
2660 }
2661 
2662 
XS(_wrap_gsl_siman_params_t_k_set)2663 XS(_wrap_gsl_siman_params_t_k_set) {
2664   {
2665     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2666     double arg2 ;
2667     void *argp1 = 0 ;
2668     int res1 = 0 ;
2669     double val2 ;
2670     int ecode2 = 0 ;
2671     int argvi = 0;
2672     dXSARGS;
2673 
2674     if ((items < 2) || (items > 2)) {
2675       SWIG_croak("Usage: gsl_siman_params_t_k_set(self,k);");
2676     }
2677     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2678     if (!SWIG_IsOK(res1)) {
2679       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_k_set" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2680     }
2681     arg1 = (gsl_siman_params_t *)(argp1);
2682     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2683     if (!SWIG_IsOK(ecode2)) {
2684       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_siman_params_t_k_set" "', argument " "2"" of type '" "double""'");
2685     }
2686     arg2 = (double)(val2);
2687     if (arg1) (arg1)->k = arg2;
2688     ST(argvi) = &PL_sv_undef;
2689 
2690 
2691     XSRETURN(argvi);
2692   fail:
2693 
2694 
2695     SWIG_croak_null();
2696   }
2697 }
2698 
2699 
XS(_wrap_gsl_siman_params_t_k_get)2700 XS(_wrap_gsl_siman_params_t_k_get) {
2701   {
2702     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2703     void *argp1 = 0 ;
2704     int res1 = 0 ;
2705     int argvi = 0;
2706     double result;
2707     dXSARGS;
2708 
2709     if ((items < 1) || (items > 1)) {
2710       SWIG_croak("Usage: gsl_siman_params_t_k_get(self);");
2711     }
2712     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2713     if (!SWIG_IsOK(res1)) {
2714       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_k_get" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2715     }
2716     arg1 = (gsl_siman_params_t *)(argp1);
2717     result = (double) ((arg1)->k);
2718     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
2719 
2720     XSRETURN(argvi);
2721   fail:
2722 
2723     SWIG_croak_null();
2724   }
2725 }
2726 
2727 
XS(_wrap_gsl_siman_params_t_t_initial_set)2728 XS(_wrap_gsl_siman_params_t_t_initial_set) {
2729   {
2730     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2731     double arg2 ;
2732     void *argp1 = 0 ;
2733     int res1 = 0 ;
2734     double val2 ;
2735     int ecode2 = 0 ;
2736     int argvi = 0;
2737     dXSARGS;
2738 
2739     if ((items < 2) || (items > 2)) {
2740       SWIG_croak("Usage: gsl_siman_params_t_t_initial_set(self,t_initial);");
2741     }
2742     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2743     if (!SWIG_IsOK(res1)) {
2744       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_t_initial_set" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2745     }
2746     arg1 = (gsl_siman_params_t *)(argp1);
2747     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2748     if (!SWIG_IsOK(ecode2)) {
2749       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_siman_params_t_t_initial_set" "', argument " "2"" of type '" "double""'");
2750     }
2751     arg2 = (double)(val2);
2752     if (arg1) (arg1)->t_initial = arg2;
2753     ST(argvi) = &PL_sv_undef;
2754 
2755 
2756     XSRETURN(argvi);
2757   fail:
2758 
2759 
2760     SWIG_croak_null();
2761   }
2762 }
2763 
2764 
XS(_wrap_gsl_siman_params_t_t_initial_get)2765 XS(_wrap_gsl_siman_params_t_t_initial_get) {
2766   {
2767     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2768     void *argp1 = 0 ;
2769     int res1 = 0 ;
2770     int argvi = 0;
2771     double result;
2772     dXSARGS;
2773 
2774     if ((items < 1) || (items > 1)) {
2775       SWIG_croak("Usage: gsl_siman_params_t_t_initial_get(self);");
2776     }
2777     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2778     if (!SWIG_IsOK(res1)) {
2779       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_t_initial_get" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2780     }
2781     arg1 = (gsl_siman_params_t *)(argp1);
2782     result = (double) ((arg1)->t_initial);
2783     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
2784 
2785     XSRETURN(argvi);
2786   fail:
2787 
2788     SWIG_croak_null();
2789   }
2790 }
2791 
2792 
XS(_wrap_gsl_siman_params_t_mu_t_set)2793 XS(_wrap_gsl_siman_params_t_mu_t_set) {
2794   {
2795     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2796     double arg2 ;
2797     void *argp1 = 0 ;
2798     int res1 = 0 ;
2799     double val2 ;
2800     int ecode2 = 0 ;
2801     int argvi = 0;
2802     dXSARGS;
2803 
2804     if ((items < 2) || (items > 2)) {
2805       SWIG_croak("Usage: gsl_siman_params_t_mu_t_set(self,mu_t);");
2806     }
2807     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2808     if (!SWIG_IsOK(res1)) {
2809       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_mu_t_set" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2810     }
2811     arg1 = (gsl_siman_params_t *)(argp1);
2812     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2813     if (!SWIG_IsOK(ecode2)) {
2814       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_siman_params_t_mu_t_set" "', argument " "2"" of type '" "double""'");
2815     }
2816     arg2 = (double)(val2);
2817     if (arg1) (arg1)->mu_t = arg2;
2818     ST(argvi) = &PL_sv_undef;
2819 
2820 
2821     XSRETURN(argvi);
2822   fail:
2823 
2824 
2825     SWIG_croak_null();
2826   }
2827 }
2828 
2829 
XS(_wrap_gsl_siman_params_t_mu_t_get)2830 XS(_wrap_gsl_siman_params_t_mu_t_get) {
2831   {
2832     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2833     void *argp1 = 0 ;
2834     int res1 = 0 ;
2835     int argvi = 0;
2836     double result;
2837     dXSARGS;
2838 
2839     if ((items < 1) || (items > 1)) {
2840       SWIG_croak("Usage: gsl_siman_params_t_mu_t_get(self);");
2841     }
2842     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2843     if (!SWIG_IsOK(res1)) {
2844       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_mu_t_get" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2845     }
2846     arg1 = (gsl_siman_params_t *)(argp1);
2847     result = (double) ((arg1)->mu_t);
2848     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
2849 
2850     XSRETURN(argvi);
2851   fail:
2852 
2853     SWIG_croak_null();
2854   }
2855 }
2856 
2857 
XS(_wrap_gsl_siman_params_t_t_min_set)2858 XS(_wrap_gsl_siman_params_t_t_min_set) {
2859   {
2860     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2861     double arg2 ;
2862     void *argp1 = 0 ;
2863     int res1 = 0 ;
2864     double val2 ;
2865     int ecode2 = 0 ;
2866     int argvi = 0;
2867     dXSARGS;
2868 
2869     if ((items < 2) || (items > 2)) {
2870       SWIG_croak("Usage: gsl_siman_params_t_t_min_set(self,t_min);");
2871     }
2872     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2873     if (!SWIG_IsOK(res1)) {
2874       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_t_min_set" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2875     }
2876     arg1 = (gsl_siman_params_t *)(argp1);
2877     ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2878     if (!SWIG_IsOK(ecode2)) {
2879       SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_siman_params_t_t_min_set" "', argument " "2"" of type '" "double""'");
2880     }
2881     arg2 = (double)(val2);
2882     if (arg1) (arg1)->t_min = arg2;
2883     ST(argvi) = &PL_sv_undef;
2884 
2885 
2886     XSRETURN(argvi);
2887   fail:
2888 
2889 
2890     SWIG_croak_null();
2891   }
2892 }
2893 
2894 
XS(_wrap_gsl_siman_params_t_t_min_get)2895 XS(_wrap_gsl_siman_params_t_t_min_get) {
2896   {
2897     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2898     void *argp1 = 0 ;
2899     int res1 = 0 ;
2900     int argvi = 0;
2901     double result;
2902     dXSARGS;
2903 
2904     if ((items < 1) || (items > 1)) {
2905       SWIG_croak("Usage: gsl_siman_params_t_t_min_get(self);");
2906     }
2907     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, 0 |  0 );
2908     if (!SWIG_IsOK(res1)) {
2909       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_params_t_t_min_get" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2910     }
2911     arg1 = (gsl_siman_params_t *)(argp1);
2912     result = (double) ((arg1)->t_min);
2913     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
2914 
2915     XSRETURN(argvi);
2916   fail:
2917 
2918     SWIG_croak_null();
2919   }
2920 }
2921 
2922 
XS(_wrap_new_gsl_siman_params_t)2923 XS(_wrap_new_gsl_siman_params_t) {
2924   {
2925     int argvi = 0;
2926     gsl_siman_params_t *result = 0 ;
2927     dXSARGS;
2928 
2929     if ((items < 0) || (items > 0)) {
2930       SWIG_croak("Usage: new_gsl_siman_params_t();");
2931     }
2932     result = (gsl_siman_params_t *)calloc(1, sizeof(gsl_siman_params_t));
2933     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_siman_params_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2934     XSRETURN(argvi);
2935   fail:
2936     SWIG_croak_null();
2937   }
2938 }
2939 
2940 
XS(_wrap_delete_gsl_siman_params_t)2941 XS(_wrap_delete_gsl_siman_params_t) {
2942   {
2943     gsl_siman_params_t *arg1 = (gsl_siman_params_t *) 0 ;
2944     void *argp1 = 0 ;
2945     int res1 = 0 ;
2946     int argvi = 0;
2947     dXSARGS;
2948 
2949     if ((items < 1) || (items > 1)) {
2950       SWIG_croak("Usage: delete_gsl_siman_params_t(self);");
2951     }
2952     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_siman_params_t, SWIG_POINTER_DISOWN |  0 );
2953     if (!SWIG_IsOK(res1)) {
2954       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gsl_siman_params_t" "', argument " "1"" of type '" "gsl_siman_params_t *""'");
2955     }
2956     arg1 = (gsl_siman_params_t *)(argp1);
2957     free((char *) arg1);
2958     ST(argvi) = &PL_sv_undef;
2959 
2960     XSRETURN(argvi);
2961   fail:
2962 
2963     SWIG_croak_null();
2964   }
2965 }
2966 
2967 
XS(_wrap_gsl_siman_solve)2968 XS(_wrap_gsl_siman_solve) {
2969   {
2970     gsl_rng *arg1 = (gsl_rng *) 0 ;
2971     void *arg2 = (void *) 0 ;
2972     gsl_siman_Efunc_t arg3 = (gsl_siman_Efunc_t) 0 ;
2973     gsl_siman_step_t arg4 = (gsl_siman_step_t) 0 ;
2974     gsl_siman_metric_t arg5 = (gsl_siman_metric_t) 0 ;
2975     gsl_siman_print_t arg6 = (gsl_siman_print_t) 0 ;
2976     gsl_siman_copy_t arg7 = (gsl_siman_copy_t) 0 ;
2977     gsl_siman_copy_construct_t arg8 = (gsl_siman_copy_construct_t) 0 ;
2978     gsl_siman_destroy_t arg9 = (gsl_siman_destroy_t) 0 ;
2979     size_t arg10 ;
2980     gsl_siman_params_t arg11 ;
2981     void *argp1 = 0 ;
2982     int res1 = 0 ;
2983     int res2 ;
2984     size_t val10 ;
2985     int ecode10 = 0 ;
2986     void *argp11 ;
2987     int res11 = 0 ;
2988     int argvi = 0;
2989     dXSARGS;
2990 
2991     if ((items < 11) || (items > 11)) {
2992       SWIG_croak("Usage: gsl_siman_solve(r,x0_p,Ef,take_step,distance,print_position,copyfunc,copy_constructor,destructor,element_size,params);");
2993     }
2994     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_rng, 0 |  0 );
2995     if (!SWIG_IsOK(res1)) {
2996       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_solve" "', argument " "1"" of type '" "gsl_rng const *""'");
2997     }
2998     arg1 = (gsl_rng *)(argp1);
2999     res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0);
3000     if (!SWIG_IsOK(res2)) {
3001       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_siman_solve" "', argument " "2"" of type '" "void *""'");
3002     }
3003     {
3004       int res = SWIG_ConvertFunctionPtr(ST(2), (void**)(&arg3), SWIGTYPE_p_f_p_void__double);
3005       if (!SWIG_IsOK(res)) {
3006         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve" "', argument " "3"" of type '" "gsl_siman_Efunc_t""'");
3007       }
3008     }
3009     {
3010       int res = SWIG_ConvertFunctionPtr(ST(3), (void**)(&arg4), SWIGTYPE_p_f_p_q_const__gsl_rng_p_void_double__void);
3011       if (!SWIG_IsOK(res)) {
3012         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve" "', argument " "4"" of type '" "gsl_siman_step_t""'");
3013       }
3014     }
3015     {
3016       int res = SWIG_ConvertFunctionPtr(ST(4), (void**)(&arg5), SWIGTYPE_p_f_p_void_p_void__double);
3017       if (!SWIG_IsOK(res)) {
3018         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve" "', argument " "5"" of type '" "gsl_siman_metric_t""'");
3019       }
3020     }
3021     {
3022       int res = SWIG_ConvertFunctionPtr(ST(5), (void**)(&arg6), SWIGTYPE_p_f_p_void__void);
3023       if (!SWIG_IsOK(res)) {
3024         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve" "', argument " "6"" of type '" "gsl_siman_print_t""'");
3025       }
3026     }
3027     {
3028       int res = SWIG_ConvertFunctionPtr(ST(6), (void**)(&arg7), SWIGTYPE_p_f_p_void_p_void__void);
3029       if (!SWIG_IsOK(res)) {
3030         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve" "', argument " "7"" of type '" "gsl_siman_copy_t""'");
3031       }
3032     }
3033     {
3034       int res = SWIG_ConvertFunctionPtr(ST(7), (void**)(&arg8), SWIGTYPE_p_f_p_void__p_void);
3035       if (!SWIG_IsOK(res)) {
3036         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve" "', argument " "8"" of type '" "gsl_siman_copy_construct_t""'");
3037       }
3038     }
3039     {
3040       int res = SWIG_ConvertFunctionPtr(ST(8), (void**)(&arg9), SWIGTYPE_p_f_p_void__void);
3041       if (!SWIG_IsOK(res)) {
3042         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve" "', argument " "9"" of type '" "gsl_siman_destroy_t""'");
3043       }
3044     }
3045     ecode10 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(9), &val10);
3046     if (!SWIG_IsOK(ecode10)) {
3047       SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "gsl_siman_solve" "', argument " "10"" of type '" "size_t""'");
3048     }
3049     arg10 = (size_t)(val10);
3050     {
3051       res11 = SWIG_ConvertPtr(ST(10), &argp11, SWIGTYPE_p_gsl_siman_params_t,  0 );
3052       if (!SWIG_IsOK(res11)) {
3053         SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "gsl_siman_solve" "', argument " "11"" of type '" "gsl_siman_params_t""'");
3054       }
3055       if (!argp11) {
3056         SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_siman_solve" "', argument " "11"" of type '" "gsl_siman_params_t""'");
3057       } else {
3058         arg11 = *((gsl_siman_params_t *)(argp11));
3059       }
3060     }
3061     gsl_siman_solve((gsl_rng const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
3062     ST(argvi) = &PL_sv_undef;
3063 
3064 
3065 
3066 
3067 
3068 
3069 
3070 
3071 
3072 
3073     XSRETURN(argvi);
3074   fail:
3075 
3076 
3077 
3078 
3079 
3080 
3081 
3082 
3083 
3084 
3085     SWIG_croak_null();
3086   }
3087 }
3088 
3089 
XS(_wrap_gsl_siman_solve_many)3090 XS(_wrap_gsl_siman_solve_many) {
3091   {
3092     gsl_rng *arg1 = (gsl_rng *) 0 ;
3093     void *arg2 = (void *) 0 ;
3094     gsl_siman_Efunc_t arg3 = (gsl_siman_Efunc_t) 0 ;
3095     gsl_siman_step_t arg4 = (gsl_siman_step_t) 0 ;
3096     gsl_siman_metric_t arg5 = (gsl_siman_metric_t) 0 ;
3097     gsl_siman_print_t arg6 = (gsl_siman_print_t) 0 ;
3098     size_t arg7 ;
3099     gsl_siman_params_t arg8 ;
3100     void *argp1 = 0 ;
3101     int res1 = 0 ;
3102     int res2 ;
3103     size_t val7 ;
3104     int ecode7 = 0 ;
3105     void *argp8 ;
3106     int res8 = 0 ;
3107     int argvi = 0;
3108     dXSARGS;
3109 
3110     if ((items < 8) || (items > 8)) {
3111       SWIG_croak("Usage: gsl_siman_solve_many(r,x0_p,Ef,take_step,distance,print_position,element_size,params);");
3112     }
3113     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_rng, 0 |  0 );
3114     if (!SWIG_IsOK(res1)) {
3115       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_siman_solve_many" "', argument " "1"" of type '" "gsl_rng const *""'");
3116     }
3117     arg1 = (gsl_rng *)(argp1);
3118     res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0);
3119     if (!SWIG_IsOK(res2)) {
3120       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_siman_solve_many" "', argument " "2"" of type '" "void *""'");
3121     }
3122     {
3123       int res = SWIG_ConvertFunctionPtr(ST(2), (void**)(&arg3), SWIGTYPE_p_f_p_void__double);
3124       if (!SWIG_IsOK(res)) {
3125         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve_many" "', argument " "3"" of type '" "gsl_siman_Efunc_t""'");
3126       }
3127     }
3128     {
3129       int res = SWIG_ConvertFunctionPtr(ST(3), (void**)(&arg4), SWIGTYPE_p_f_p_q_const__gsl_rng_p_void_double__void);
3130       if (!SWIG_IsOK(res)) {
3131         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve_many" "', argument " "4"" of type '" "gsl_siman_step_t""'");
3132       }
3133     }
3134     {
3135       int res = SWIG_ConvertFunctionPtr(ST(4), (void**)(&arg5), SWIGTYPE_p_f_p_void_p_void__double);
3136       if (!SWIG_IsOK(res)) {
3137         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve_many" "', argument " "5"" of type '" "gsl_siman_metric_t""'");
3138       }
3139     }
3140     {
3141       int res = SWIG_ConvertFunctionPtr(ST(5), (void**)(&arg6), SWIGTYPE_p_f_p_void__void);
3142       if (!SWIG_IsOK(res)) {
3143         SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_siman_solve_many" "', argument " "6"" of type '" "gsl_siman_print_t""'");
3144       }
3145     }
3146     ecode7 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
3147     if (!SWIG_IsOK(ecode7)) {
3148       SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "gsl_siman_solve_many" "', argument " "7"" of type '" "size_t""'");
3149     }
3150     arg7 = (size_t)(val7);
3151     {
3152       res8 = SWIG_ConvertPtr(ST(7), &argp8, SWIGTYPE_p_gsl_siman_params_t,  0 );
3153       if (!SWIG_IsOK(res8)) {
3154         SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "gsl_siman_solve_many" "', argument " "8"" of type '" "gsl_siman_params_t""'");
3155       }
3156       if (!argp8) {
3157         SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_siman_solve_many" "', argument " "8"" of type '" "gsl_siman_params_t""'");
3158       } else {
3159         arg8 = *((gsl_siman_params_t *)(argp8));
3160       }
3161     }
3162     gsl_siman_solve_many((gsl_rng const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
3163     ST(argvi) = &PL_sv_undef;
3164 
3165 
3166 
3167 
3168 
3169 
3170 
3171     XSRETURN(argvi);
3172   fail:
3173 
3174 
3175 
3176 
3177 
3178 
3179 
3180     SWIG_croak_null();
3181   }
3182 }
3183 
3184 
3185 
3186 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3187 
3188 static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0};
3189 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3190 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};
3191 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};
3192 static swig_type_info _swigt__p_f_p_q_const__gsl_rng_p_void_double__void = {"_p_f_p_q_const__gsl_rng_p_void_double__void", "gsl_siman_step_t|void (*)(gsl_rng const *,void *,double)", 0, 0, (void*)0, 0};
3193 static swig_type_info _swigt__p_f_p_void__double = {"_p_f_p_void__double", "gsl_siman_Efunc_t|double (*)(void *)", 0, 0, (void*)0, 0};
3194 static swig_type_info _swigt__p_f_p_void__p_void = {"_p_f_p_void__p_void", "gsl_siman_copy_construct_t|void *(*)(void *)", 0, 0, (void*)0, 0};
3195 static swig_type_info _swigt__p_f_p_void__void = {"_p_f_p_void__void", "gsl_siman_print_t|gsl_siman_destroy_t|void (*)(void *)", 0, 0, (void*)0, 0};
3196 static swig_type_info _swigt__p_f_p_void_p_void__double = {"_p_f_p_void_p_void__double", "gsl_siman_metric_t|double (*)(void *,void *)", 0, 0, (void*)0, 0};
3197 static swig_type_info _swigt__p_f_p_void_p_void__void = {"_p_f_p_void_p_void__void", "void (*)(void *,void *)|gsl_siman_copy_t", 0, 0, (void*)0, 0};
3198 static swig_type_info _swigt__p_gsl_rng = {"_p_gsl_rng", "gsl_rng *", 0, 0, (void*)0, 0};
3199 static swig_type_info _swigt__p_gsl_siman_params_t = {"_p_gsl_siman_params_t", "gsl_siman_params_t *", 0, 0, (void*)"Math::GSL::Siman::gsl_siman_params_t", 0};
3200 
3201 static swig_type_info *swig_type_initial[] = {
3202   &_swigt__p_FILE,
3203   &_swigt__p_char,
3204   &_swigt__p_f_p_q_const__char_p_q_const__char_int_int__void,
3205   &_swigt__p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void,
3206   &_swigt__p_f_p_q_const__gsl_rng_p_void_double__void,
3207   &_swigt__p_f_p_void__double,
3208   &_swigt__p_f_p_void__p_void,
3209   &_swigt__p_f_p_void__void,
3210   &_swigt__p_f_p_void_p_void__double,
3211   &_swigt__p_f_p_void_p_void__void,
3212   &_swigt__p_gsl_rng,
3213   &_swigt__p_gsl_siman_params_t,
3214 };
3215 
3216 static swig_cast_info _swigc__p_FILE[] = {  {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
3217 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3218 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}};
3219 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}};
3220 static swig_cast_info _swigc__p_f_p_q_const__gsl_rng_p_void_double__void[] = {  {&_swigt__p_f_p_q_const__gsl_rng_p_void_double__void, 0, 0, 0},{0, 0, 0, 0}};
3221 static swig_cast_info _swigc__p_f_p_void__double[] = {  {&_swigt__p_f_p_void__double, 0, 0, 0},{0, 0, 0, 0}};
3222 static swig_cast_info _swigc__p_f_p_void__p_void[] = {  {&_swigt__p_f_p_void__p_void, 0, 0, 0},{0, 0, 0, 0}};
3223 static swig_cast_info _swigc__p_f_p_void__void[] = {  {&_swigt__p_f_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
3224 static swig_cast_info _swigc__p_f_p_void_p_void__double[] = {  {&_swigt__p_f_p_void_p_void__double, 0, 0, 0},{0, 0, 0, 0}};
3225 static swig_cast_info _swigc__p_f_p_void_p_void__void[] = {  {&_swigt__p_f_p_void_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
3226 static swig_cast_info _swigc__p_gsl_rng[] = {  {&_swigt__p_gsl_rng, 0, 0, 0},{0, 0, 0, 0}};
3227 static swig_cast_info _swigc__p_gsl_siman_params_t[] = {  {&_swigt__p_gsl_siman_params_t, 0, 0, 0},{0, 0, 0, 0}};
3228 
3229 static swig_cast_info *swig_cast_initial[] = {
3230   _swigc__p_FILE,
3231   _swigc__p_char,
3232   _swigc__p_f_p_q_const__char_p_q_const__char_int_int__void,
3233   _swigc__p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void,
3234   _swigc__p_f_p_q_const__gsl_rng_p_void_double__void,
3235   _swigc__p_f_p_void__double,
3236   _swigc__p_f_p_void__p_void,
3237   _swigc__p_f_p_void__void,
3238   _swigc__p_f_p_void_p_void__double,
3239   _swigc__p_f_p_void_p_void__void,
3240   _swigc__p_gsl_rng,
3241   _swigc__p_gsl_siman_params_t,
3242 };
3243 
3244 
3245 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3246 
3247 static swig_constant_info swig_constants[] = {
3248 {0,0,0,0,0,0}
3249 };
3250 #ifdef __cplusplus
3251 }
3252 #endif
3253 static swig_variable_info swig_variables[] = {
3254 {0,0,0,0}
3255 };
3256 static swig_command_info swig_commands[] = {
3257 {"Math::GSL::Simanc::gsl_error", _wrap_gsl_error},
3258 {"Math::GSL::Simanc::gsl_stream_printf", _wrap_gsl_stream_printf},
3259 {"Math::GSL::Simanc::gsl_strerror", _wrap_gsl_strerror},
3260 {"Math::GSL::Simanc::gsl_set_error_handler", _wrap_gsl_set_error_handler},
3261 {"Math::GSL::Simanc::gsl_set_error_handler_off", _wrap_gsl_set_error_handler_off},
3262 {"Math::GSL::Simanc::gsl_set_stream_handler", _wrap_gsl_set_stream_handler},
3263 {"Math::GSL::Simanc::gsl_set_stream", _wrap_gsl_set_stream},
3264 {"Math::GSL::Simanc::gsl_siman_params_t_n_tries_set", _wrap_gsl_siman_params_t_n_tries_set},
3265 {"Math::GSL::Simanc::gsl_siman_params_t_n_tries_get", _wrap_gsl_siman_params_t_n_tries_get},
3266 {"Math::GSL::Simanc::gsl_siman_params_t_iters_fixed_T_set", _wrap_gsl_siman_params_t_iters_fixed_T_set},
3267 {"Math::GSL::Simanc::gsl_siman_params_t_iters_fixed_T_get", _wrap_gsl_siman_params_t_iters_fixed_T_get},
3268 {"Math::GSL::Simanc::gsl_siman_params_t_step_size_set", _wrap_gsl_siman_params_t_step_size_set},
3269 {"Math::GSL::Simanc::gsl_siman_params_t_step_size_get", _wrap_gsl_siman_params_t_step_size_get},
3270 {"Math::GSL::Simanc::gsl_siman_params_t_k_set", _wrap_gsl_siman_params_t_k_set},
3271 {"Math::GSL::Simanc::gsl_siman_params_t_k_get", _wrap_gsl_siman_params_t_k_get},
3272 {"Math::GSL::Simanc::gsl_siman_params_t_t_initial_set", _wrap_gsl_siman_params_t_t_initial_set},
3273 {"Math::GSL::Simanc::gsl_siman_params_t_t_initial_get", _wrap_gsl_siman_params_t_t_initial_get},
3274 {"Math::GSL::Simanc::gsl_siman_params_t_mu_t_set", _wrap_gsl_siman_params_t_mu_t_set},
3275 {"Math::GSL::Simanc::gsl_siman_params_t_mu_t_get", _wrap_gsl_siman_params_t_mu_t_get},
3276 {"Math::GSL::Simanc::gsl_siman_params_t_t_min_set", _wrap_gsl_siman_params_t_t_min_set},
3277 {"Math::GSL::Simanc::gsl_siman_params_t_t_min_get", _wrap_gsl_siman_params_t_t_min_get},
3278 {"Math::GSL::Simanc::new_gsl_siman_params_t", _wrap_new_gsl_siman_params_t},
3279 {"Math::GSL::Simanc::delete_gsl_siman_params_t", _wrap_delete_gsl_siman_params_t},
3280 {"Math::GSL::Simanc::gsl_siman_solve", _wrap_gsl_siman_solve},
3281 {"Math::GSL::Simanc::gsl_siman_solve_many", _wrap_gsl_siman_solve_many},
3282 {0,0}
3283 };
3284 /* -----------------------------------------------------------------------------
3285  * Type initialization:
3286  * This problem is tough by the requirement that no dynamic
3287  * memory is used. Also, since swig_type_info structures store pointers to
3288  * swig_cast_info structures and swig_cast_info structures store pointers back
3289  * to swig_type_info structures, we need some lookup code at initialization.
3290  * The idea is that swig generates all the structures that are needed.
3291  * The runtime then collects these partially filled structures.
3292  * The SWIG_InitializeModule function takes these initial arrays out of
3293  * swig_module, and does all the lookup, filling in the swig_module.types
3294  * array with the correct data and linking the correct swig_cast_info
3295  * structures together.
3296  *
3297  * The generated swig_type_info structures are assigned statically to an initial
3298  * array. We just loop through that array, and handle each type individually.
3299  * First we lookup if this type has been already loaded, and if so, use the
3300  * loaded structure instead of the generated one. Then we have to fill in the
3301  * cast linked list. The cast data is initially stored in something like a
3302  * two-dimensional array. Each row corresponds to a type (there are the same
3303  * number of rows as there are in the swig_type_initial array). Each entry in
3304  * a column is one of the swig_cast_info structures for that type.
3305  * The cast_initial array is actually an array of arrays, because each row has
3306  * a variable number of columns. So to actually build the cast linked list,
3307  * we find the array of casts associated with the type, and loop through it
3308  * adding the casts to the list. The one last trick we need to do is making
3309  * sure the type pointer in the swig_cast_info struct is correct.
3310  *
3311  * First off, we lookup the cast->type name to see if it is already loaded.
3312  * There are three cases to handle:
3313  *  1) If the cast->type has already been loaded AND the type we are adding
3314  *     casting info to has not been loaded (it is in this module), THEN we
3315  *     replace the cast->type pointer with the type pointer that has already
3316  *     been loaded.
3317  *  2) If BOTH types (the one we are adding casting info to, and the
3318  *     cast->type) are loaded, THEN the cast info has already been loaded by
3319  *     the previous module so we just ignore it.
3320  *  3) Finally, if cast->type has not already been loaded, then we add that
3321  *     swig_cast_info to the linked list (because the cast->type) pointer will
3322  *     be correct.
3323  * ----------------------------------------------------------------------------- */
3324 
3325 #ifdef __cplusplus
3326 extern "C" {
3327 #if 0
3328 } /* c-mode */
3329 #endif
3330 #endif
3331 
3332 #if 0
3333 #define SWIGRUNTIME_DEBUG
3334 #endif
3335 
3336 
3337 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)3338 SWIG_InitializeModule(void *clientdata) {
3339   size_t i;
3340   swig_module_info *module_head, *iter;
3341   int init;
3342 
3343   /* check to see if the circular list has been setup, if not, set it up */
3344   if (swig_module.next==0) {
3345     /* Initialize the swig_module */
3346     swig_module.type_initial = swig_type_initial;
3347     swig_module.cast_initial = swig_cast_initial;
3348     swig_module.next = &swig_module;
3349     init = 1;
3350   } else {
3351     init = 0;
3352   }
3353 
3354   /* Try and load any already created modules */
3355   module_head = SWIG_GetModule(clientdata);
3356   if (!module_head) {
3357     /* This is the first module loaded for this interpreter */
3358     /* so set the swig module into the interpreter */
3359     SWIG_SetModule(clientdata, &swig_module);
3360   } else {
3361     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3362     iter=module_head;
3363     do {
3364       if (iter==&swig_module) {
3365         /* Our module is already in the list, so there's nothing more to do. */
3366         return;
3367       }
3368       iter=iter->next;
3369     } while (iter!= module_head);
3370 
3371     /* otherwise we must add our module into the list */
3372     swig_module.next = module_head->next;
3373     module_head->next = &swig_module;
3374   }
3375 
3376   /* When multiple interpreters are used, a module could have already been initialized in
3377        a different interpreter, but not yet have a pointer in this interpreter.
3378        In this case, we do not want to continue adding types... everything should be
3379        set up already */
3380   if (init == 0) return;
3381 
3382   /* Now work on filling in swig_module.types */
3383 #ifdef SWIGRUNTIME_DEBUG
3384   printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
3385 #endif
3386   for (i = 0; i < swig_module.size; ++i) {
3387     swig_type_info *type = 0;
3388     swig_type_info *ret;
3389     swig_cast_info *cast;
3390 
3391 #ifdef SWIGRUNTIME_DEBUG
3392     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
3393 #endif
3394 
3395     /* if there is another module already loaded */
3396     if (swig_module.next != &swig_module) {
3397       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
3398     }
3399     if (type) {
3400       /* Overwrite clientdata field */
3401 #ifdef SWIGRUNTIME_DEBUG
3402       printf("SWIG_InitializeModule: found type %s\n", type->name);
3403 #endif
3404       if (swig_module.type_initial[i]->clientdata) {
3405         type->clientdata = swig_module.type_initial[i]->clientdata;
3406 #ifdef SWIGRUNTIME_DEBUG
3407         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
3408 #endif
3409       }
3410     } else {
3411       type = swig_module.type_initial[i];
3412     }
3413 
3414     /* Insert casting types */
3415     cast = swig_module.cast_initial[i];
3416     while (cast->type) {
3417       /* Don't need to add information already in the list */
3418       ret = 0;
3419 #ifdef SWIGRUNTIME_DEBUG
3420       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
3421 #endif
3422       if (swig_module.next != &swig_module) {
3423         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
3424 #ifdef SWIGRUNTIME_DEBUG
3425         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
3426 #endif
3427       }
3428       if (ret) {
3429         if (type == swig_module.type_initial[i]) {
3430 #ifdef SWIGRUNTIME_DEBUG
3431           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
3432 #endif
3433           cast->type = ret;
3434           ret = 0;
3435         } else {
3436           /* Check for casting already in the list */
3437           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
3438 #ifdef SWIGRUNTIME_DEBUG
3439           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
3440 #endif
3441           if (!ocast) ret = 0;
3442         }
3443       }
3444 
3445       if (!ret) {
3446 #ifdef SWIGRUNTIME_DEBUG
3447         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
3448 #endif
3449         if (type->cast) {
3450           type->cast->prev = cast;
3451           cast->next = type->cast;
3452         }
3453         type->cast = cast;
3454       }
3455       cast++;
3456     }
3457     /* Set entry in modules->types array equal to the type */
3458     swig_module.types[i] = type;
3459   }
3460   swig_module.types[i] = 0;
3461 
3462 #ifdef SWIGRUNTIME_DEBUG
3463   printf("**** SWIG_InitializeModule: Cast List ******\n");
3464   for (i = 0; i < swig_module.size; ++i) {
3465     int j = 0;
3466     swig_cast_info *cast = swig_module.cast_initial[i];
3467     printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
3468     while (cast->type) {
3469       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
3470       cast++;
3471       ++j;
3472     }
3473     printf("---- Total casts: %d\n",j);
3474   }
3475   printf("**** SWIG_InitializeModule: Cast List ******\n");
3476 #endif
3477 }
3478 
3479 /* This function will propagate the clientdata field of type to
3480 * any new swig_type_info structures that have been added into the list
3481 * of equivalent types.  It is like calling
3482 * SWIG_TypeClientData(type, clientdata) a second time.
3483 */
3484 SWIGRUNTIME void
SWIG_PropagateClientData(void)3485 SWIG_PropagateClientData(void) {
3486   size_t i;
3487   swig_cast_info *equiv;
3488   static int init_run = 0;
3489 
3490   if (init_run) return;
3491   init_run = 1;
3492 
3493   for (i = 0; i < swig_module.size; i++) {
3494     if (swig_module.types[i]->clientdata) {
3495       equiv = swig_module.types[i]->cast;
3496       while (equiv) {
3497         if (!equiv->converter) {
3498           if (equiv->type && !equiv->type->clientdata)
3499           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
3500         }
3501         equiv = equiv->next;
3502       }
3503     }
3504   }
3505 }
3506 
3507 #ifdef __cplusplus
3508 #if 0
3509 {
3510   /* c-mode */
3511 #endif
3512 }
3513 #endif
3514 
3515 
3516 
3517 #if defined(__cplusplus) && ! defined(XSPROTO)
3518 extern "C"
3519 #endif
3520 
XS(SWIG_init)3521 XS(SWIG_init) {
3522   dXSARGS;
3523   int i;
3524   (void)items;
3525 
3526   SWIG_InitializeModule(0);
3527 
3528   /* Install commands */
3529   for (i = 0; swig_commands[i].name; i++) {
3530     /* Casts only needed for Perl < 5.10. */
3531 #ifdef __cplusplus
3532     newXS(const_cast<char*>(swig_commands[i].name), swig_commands[i].wrapper, const_cast<char*>(__FILE__));
3533 #else
3534     newXS((char*)swig_commands[i].name, swig_commands[i].wrapper, (char*)__FILE__);
3535 #endif
3536   }
3537 
3538   /* Install variables */
3539   for (i = 0; swig_variables[i].name; i++) {
3540     SV *sv;
3541     sv = get_sv(swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
3542     if (swig_variables[i].type) {
3543       SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
3544     } else {
3545       sv_setiv(sv,(IV) 0);
3546     }
3547     swig_create_magic(sv, swig_variables[i].name, swig_variables[i].set, swig_variables[i].get);
3548   }
3549 
3550   /* Install constant */
3551   for (i = 0; swig_constants[i].type; i++) {
3552     SV *sv;
3553     sv = get_sv(swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
3554     switch(swig_constants[i].type) {
3555     case SWIG_INT:
3556       sv_setiv(sv, (IV) swig_constants[i].lvalue);
3557       break;
3558     case SWIG_FLOAT:
3559       sv_setnv(sv, (double) swig_constants[i].dvalue);
3560       break;
3561     case SWIG_STRING:
3562       sv_setpv(sv, (const char *) swig_constants[i].pvalue);
3563       break;
3564     case SWIG_POINTER:
3565       SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
3566       break;
3567     case SWIG_BINARY:
3568       SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
3569       break;
3570     default:
3571       break;
3572     }
3573     SvREADONLY_on(sv);
3574   }
3575 
3576   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3577     SV *sv = get_sv((char*) SWIG_prefix "GSL_VERSION", TRUE | 0x2 | GV_ADDMULTI);
3578     sv_setsv(sv, SWIG_From_double  SWIG_PERL_CALL_ARGS_1((double)(2.7)));
3579     SvREADONLY_on(sv);
3580   } while(0) /*@SWIG@*/;
3581   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3582     SV *sv = get_sv((char*) SWIG_prefix "GSL_MAJOR_VERSION", TRUE | 0x2 | GV_ADDMULTI);
3583     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(2)));
3584     SvREADONLY_on(sv);
3585   } while(0) /*@SWIG@*/;
3586   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3587     SV *sv = get_sv((char*) SWIG_prefix "GSL_MINOR_VERSION", TRUE | 0x2 | GV_ADDMULTI);
3588     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(7)));
3589     SvREADONLY_on(sv);
3590   } while(0) /*@SWIG@*/;
3591   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3592     SV *sv = get_sv((char*) SWIG_prefix "GSL_POSZERO", TRUE | 0x2 | GV_ADDMULTI);
3593     sv_setsv(sv, SWIG_From_double  SWIG_PERL_CALL_ARGS_1((double)((+0.0))));
3594     SvREADONLY_on(sv);
3595   } while(0) /*@SWIG@*/;
3596   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3597     SV *sv = get_sv((char*) SWIG_prefix "GSL_NEGZERO", TRUE | 0x2 | GV_ADDMULTI);
3598     sv_setsv(sv, SWIG_From_double  SWIG_PERL_CALL_ARGS_1((double)((-0.0))));
3599     SvREADONLY_on(sv);
3600   } while(0) /*@SWIG@*/;
3601   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3602     SV *sv = get_sv((char*) SWIG_prefix "GSL_SUCCESS", TRUE | 0x2 | GV_ADDMULTI);
3603     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_SUCCESS)));
3604     SvREADONLY_on(sv);
3605   } while(0) /*@SWIG@*/;
3606   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3607     SV *sv = get_sv((char*) SWIG_prefix "GSL_FAILURE", TRUE | 0x2 | GV_ADDMULTI);
3608     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_FAILURE)));
3609     SvREADONLY_on(sv);
3610   } while(0) /*@SWIG@*/;
3611   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3612     SV *sv = get_sv((char*) SWIG_prefix "GSL_CONTINUE", TRUE | 0x2 | GV_ADDMULTI);
3613     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_CONTINUE)));
3614     SvREADONLY_on(sv);
3615   } while(0) /*@SWIG@*/;
3616   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3617     SV *sv = get_sv((char*) SWIG_prefix "GSL_EDOM", TRUE | 0x2 | GV_ADDMULTI);
3618     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EDOM)));
3619     SvREADONLY_on(sv);
3620   } while(0) /*@SWIG@*/;
3621   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3622     SV *sv = get_sv((char*) SWIG_prefix "GSL_ERANGE", TRUE | 0x2 | GV_ADDMULTI);
3623     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ERANGE)));
3624     SvREADONLY_on(sv);
3625   } while(0) /*@SWIG@*/;
3626   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3627     SV *sv = get_sv((char*) SWIG_prefix "GSL_EFAULT", TRUE | 0x2 | GV_ADDMULTI);
3628     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EFAULT)));
3629     SvREADONLY_on(sv);
3630   } while(0) /*@SWIG@*/;
3631   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3632     SV *sv = get_sv((char*) SWIG_prefix "GSL_EINVAL", TRUE | 0x2 | GV_ADDMULTI);
3633     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EINVAL)));
3634     SvREADONLY_on(sv);
3635   } while(0) /*@SWIG@*/;
3636   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3637     SV *sv = get_sv((char*) SWIG_prefix "GSL_EFAILED", TRUE | 0x2 | GV_ADDMULTI);
3638     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EFAILED)));
3639     SvREADONLY_on(sv);
3640   } while(0) /*@SWIG@*/;
3641   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3642     SV *sv = get_sv((char*) SWIG_prefix "GSL_EFACTOR", TRUE | 0x2 | GV_ADDMULTI);
3643     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EFACTOR)));
3644     SvREADONLY_on(sv);
3645   } while(0) /*@SWIG@*/;
3646   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3647     SV *sv = get_sv((char*) SWIG_prefix "GSL_ESANITY", TRUE | 0x2 | GV_ADDMULTI);
3648     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ESANITY)));
3649     SvREADONLY_on(sv);
3650   } while(0) /*@SWIG@*/;
3651   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3652     SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOMEM", TRUE | 0x2 | GV_ADDMULTI);
3653     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOMEM)));
3654     SvREADONLY_on(sv);
3655   } while(0) /*@SWIG@*/;
3656   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3657     SV *sv = get_sv((char*) SWIG_prefix "GSL_EBADFUNC", TRUE | 0x2 | GV_ADDMULTI);
3658     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EBADFUNC)));
3659     SvREADONLY_on(sv);
3660   } while(0) /*@SWIG@*/;
3661   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3662     SV *sv = get_sv((char*) SWIG_prefix "GSL_ERUNAWAY", TRUE | 0x2 | GV_ADDMULTI);
3663     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ERUNAWAY)));
3664     SvREADONLY_on(sv);
3665   } while(0) /*@SWIG@*/;
3666   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3667     SV *sv = get_sv((char*) SWIG_prefix "GSL_EMAXITER", TRUE | 0x2 | GV_ADDMULTI);
3668     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EMAXITER)));
3669     SvREADONLY_on(sv);
3670   } while(0) /*@SWIG@*/;
3671   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3672     SV *sv = get_sv((char*) SWIG_prefix "GSL_EZERODIV", TRUE | 0x2 | GV_ADDMULTI);
3673     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EZERODIV)));
3674     SvREADONLY_on(sv);
3675   } while(0) /*@SWIG@*/;
3676   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3677     SV *sv = get_sv((char*) SWIG_prefix "GSL_EBADTOL", TRUE | 0x2 | GV_ADDMULTI);
3678     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EBADTOL)));
3679     SvREADONLY_on(sv);
3680   } while(0) /*@SWIG@*/;
3681   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3682     SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOL", TRUE | 0x2 | GV_ADDMULTI);
3683     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOL)));
3684     SvREADONLY_on(sv);
3685   } while(0) /*@SWIG@*/;
3686   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3687     SV *sv = get_sv((char*) SWIG_prefix "GSL_EUNDRFLW", TRUE | 0x2 | GV_ADDMULTI);
3688     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EUNDRFLW)));
3689     SvREADONLY_on(sv);
3690   } while(0) /*@SWIG@*/;
3691   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3692     SV *sv = get_sv((char*) SWIG_prefix "GSL_EOVRFLW", TRUE | 0x2 | GV_ADDMULTI);
3693     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EOVRFLW)));
3694     SvREADONLY_on(sv);
3695   } while(0) /*@SWIG@*/;
3696   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3697     SV *sv = get_sv((char*) SWIG_prefix "GSL_ELOSS", TRUE | 0x2 | GV_ADDMULTI);
3698     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ELOSS)));
3699     SvREADONLY_on(sv);
3700   } while(0) /*@SWIG@*/;
3701   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3702     SV *sv = get_sv((char*) SWIG_prefix "GSL_EROUND", TRUE | 0x2 | GV_ADDMULTI);
3703     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EROUND)));
3704     SvREADONLY_on(sv);
3705   } while(0) /*@SWIG@*/;
3706   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3707     SV *sv = get_sv((char*) SWIG_prefix "GSL_EBADLEN", TRUE | 0x2 | GV_ADDMULTI);
3708     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EBADLEN)));
3709     SvREADONLY_on(sv);
3710   } while(0) /*@SWIG@*/;
3711   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3712     SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOTSQR", TRUE | 0x2 | GV_ADDMULTI);
3713     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOTSQR)));
3714     SvREADONLY_on(sv);
3715   } while(0) /*@SWIG@*/;
3716   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3717     SV *sv = get_sv((char*) SWIG_prefix "GSL_ESING", TRUE | 0x2 | GV_ADDMULTI);
3718     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ESING)));
3719     SvREADONLY_on(sv);
3720   } while(0) /*@SWIG@*/;
3721   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3722     SV *sv = get_sv((char*) SWIG_prefix "GSL_EDIVERGE", TRUE | 0x2 | GV_ADDMULTI);
3723     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EDIVERGE)));
3724     SvREADONLY_on(sv);
3725   } while(0) /*@SWIG@*/;
3726   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3727     SV *sv = get_sv((char*) SWIG_prefix "GSL_EUNSUP", TRUE | 0x2 | GV_ADDMULTI);
3728     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EUNSUP)));
3729     SvREADONLY_on(sv);
3730   } while(0) /*@SWIG@*/;
3731   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3732     SV *sv = get_sv((char*) SWIG_prefix "GSL_EUNIMPL", TRUE | 0x2 | GV_ADDMULTI);
3733     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EUNIMPL)));
3734     SvREADONLY_on(sv);
3735   } while(0) /*@SWIG@*/;
3736   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3737     SV *sv = get_sv((char*) SWIG_prefix "GSL_ECACHE", TRUE | 0x2 | GV_ADDMULTI);
3738     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ECACHE)));
3739     SvREADONLY_on(sv);
3740   } while(0) /*@SWIG@*/;
3741   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3742     SV *sv = get_sv((char*) SWIG_prefix "GSL_ETABLE", TRUE | 0x2 | GV_ADDMULTI);
3743     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ETABLE)));
3744     SvREADONLY_on(sv);
3745   } while(0) /*@SWIG@*/;
3746   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3747     SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOPROG", TRUE | 0x2 | GV_ADDMULTI);
3748     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOPROG)));
3749     SvREADONLY_on(sv);
3750   } while(0) /*@SWIG@*/;
3751   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3752     SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOPROGJ", TRUE | 0x2 | GV_ADDMULTI);
3753     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOPROGJ)));
3754     SvREADONLY_on(sv);
3755   } while(0) /*@SWIG@*/;
3756   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3757     SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOLF", TRUE | 0x2 | GV_ADDMULTI);
3758     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOLF)));
3759     SvREADONLY_on(sv);
3760   } while(0) /*@SWIG@*/;
3761   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3762     SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOLX", TRUE | 0x2 | GV_ADDMULTI);
3763     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOLX)));
3764     SvREADONLY_on(sv);
3765   } while(0) /*@SWIG@*/;
3766   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3767     SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOLG", TRUE | 0x2 | GV_ADDMULTI);
3768     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOLG)));
3769     SvREADONLY_on(sv);
3770   } while(0) /*@SWIG@*/;
3771   /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3772     SV *sv = get_sv((char*) SWIG_prefix "GSL_EOF", TRUE | 0x2 | GV_ADDMULTI);
3773     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(GSL_EOF)));
3774     SvREADONLY_on(sv);
3775   } while(0) /*@SWIG@*/;
3776   SWIG_TypeClientData(SWIGTYPE_p_gsl_siman_params_t, (void*) "Math::GSL::Siman::gsl_siman_params_t");
3777   ST(0) = &PL_sv_yes;
3778   XSRETURN(1);
3779 }
3780 
3781