1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.1
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11
12 #ifndef SWIGPERL
13 #define SWIGPERL
14 #endif
15
16 #define SWIG_CASTRANK_MODE
17
18 /* -----------------------------------------------------------------------------
19 * This section contains generic SWIG labels for method/variable
20 * declarations/attributes, and other compiler dependent labels.
21 * ----------------------------------------------------------------------------- */
22
23 /* template workaround for compilers that cannot correctly implement the C++ standard */
24 #ifndef SWIGTEMPLATEDISAMBIGUATOR
25 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
26 # define SWIGTEMPLATEDISAMBIGUATOR template
27 # elif defined(__HP_aCC)
28 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
29 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
30 # define SWIGTEMPLATEDISAMBIGUATOR template
31 # else
32 # define SWIGTEMPLATEDISAMBIGUATOR
33 # endif
34 #endif
35
36 /* inline attribute */
37 #ifndef SWIGINLINE
38 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
39 # define SWIGINLINE inline
40 # else
41 # define SWIGINLINE
42 # endif
43 #endif
44
45 /* attribute recognised by some compilers to avoid 'unused' warnings */
46 #ifndef SWIGUNUSED
47 # if defined(__GNUC__)
48 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
49 # define SWIGUNUSED __attribute__ ((__unused__))
50 # else
51 # define SWIGUNUSED
52 # endif
53 # elif defined(__ICC)
54 # define SWIGUNUSED __attribute__ ((__unused__))
55 # else
56 # define SWIGUNUSED
57 # endif
58 #endif
59
60 #ifndef SWIG_MSC_UNSUPPRESS_4505
61 # if defined(_MSC_VER)
62 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
63 # endif
64 #endif
65
66 #ifndef SWIGUNUSEDPARM
67 # ifdef __cplusplus
68 # define SWIGUNUSEDPARM(p)
69 # else
70 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
71 # endif
72 #endif
73
74 /* internal SWIG method */
75 #ifndef SWIGINTERN
76 # define SWIGINTERN static SWIGUNUSED
77 #endif
78
79 /* internal inline SWIG method */
80 #ifndef SWIGINTERNINLINE
81 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
82 #endif
83
84 /* exporting methods */
85 #if defined(__GNUC__)
86 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
87 # ifndef GCC_HASCLASSVISIBILITY
88 # define GCC_HASCLASSVISIBILITY
89 # endif
90 # endif
91 #endif
92
93 #ifndef SWIGEXPORT
94 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
95 # if defined(STATIC_LINKED)
96 # define SWIGEXPORT
97 # else
98 # define SWIGEXPORT __declspec(dllexport)
99 # endif
100 # else
101 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
102 # define SWIGEXPORT __attribute__ ((visibility("default")))
103 # else
104 # define SWIGEXPORT
105 # endif
106 # endif
107 #endif
108
109 /* calling conventions for Windows */
110 #ifndef SWIGSTDCALL
111 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
112 # define SWIGSTDCALL __stdcall
113 # else
114 # define SWIGSTDCALL
115 # endif
116 #endif
117
118 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
119 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
120 # define _CRT_SECURE_NO_DEPRECATE
121 #endif
122
123 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
124 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
125 # define _SCL_SECURE_NO_DEPRECATE
126 #endif
127
128 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
129 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
130 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
131 #endif
132
133 /* Intel's compiler complains if a variable which was never initialised is
134 * cast to void, which is a common idiom which we use to indicate that we
135 * are aware a variable isn't used. So we just silence that warning.
136 * See: https://github.com/swig/swig/issues/192 for more discussion.
137 */
138 #ifdef __INTEL_COMPILER
139 # pragma warning disable 592
140 #endif
141
142 /* -----------------------------------------------------------------------------
143 * swigrun.swg
144 *
145 * This file contains generic C API SWIG runtime support for pointer
146 * type checking.
147 * ----------------------------------------------------------------------------- */
148
149 /* This should only be incremented when either the layout of swig_type_info changes,
150 or for whatever reason, the runtime changes incompatibly */
151 #define SWIG_RUNTIME_VERSION "4"
152
153 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
154 #ifdef SWIG_TYPE_TABLE
155 # define SWIG_QUOTE_STRING(x) #x
156 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
157 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
158 #else
159 # define SWIG_TYPE_TABLE_NAME
160 #endif
161
162 /*
163 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
164 creating a static or dynamic library from the SWIG runtime code.
165 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
166
167 But only do this if strictly necessary, ie, if you have problems
168 with your compiler or suchlike.
169 */
170
171 #ifndef SWIGRUNTIME
172 # define SWIGRUNTIME SWIGINTERN
173 #endif
174
175 #ifndef SWIGRUNTIMEINLINE
176 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
177 #endif
178
179 /* Generic buffer size */
180 #ifndef SWIG_BUFFER_SIZE
181 # define SWIG_BUFFER_SIZE 1024
182 #endif
183
184 /* Flags for pointer conversions */
185 #define SWIG_POINTER_DISOWN 0x1
186 #define SWIG_CAST_NEW_MEMORY 0x2
187 #define SWIG_POINTER_NO_NULL 0x4
188
189 /* Flags for new pointer objects */
190 #define SWIG_POINTER_OWN 0x1
191
192
193 /*
194 Flags/methods for returning states.
195
196 The SWIG conversion methods, as ConvertPtr, return an integer
197 that tells if the conversion was successful or not. And if not,
198 an error code can be returned (see swigerrors.swg for the codes).
199
200 Use the following macros/flags to set or process the returning
201 states.
202
203 In old versions of SWIG, code such as the following was usually written:
204
205 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
206 // success code
207 } else {
208 //fail code
209 }
210
211 Now you can be more explicit:
212
213 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
214 if (SWIG_IsOK(res)) {
215 // success code
216 } else {
217 // fail code
218 }
219
220 which is the same really, but now you can also do
221
222 Type *ptr;
223 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
224 if (SWIG_IsOK(res)) {
225 // success code
226 if (SWIG_IsNewObj(res) {
227 ...
228 delete *ptr;
229 } else {
230 ...
231 }
232 } else {
233 // fail code
234 }
235
236 I.e., now SWIG_ConvertPtr can return new objects and you can
237 identify the case and take care of the deallocation. Of course that
238 also requires SWIG_ConvertPtr to return new result values, such as
239
240 int SWIG_ConvertPtr(obj, ptr,...) {
241 if (<obj is ok>) {
242 if (<need new object>) {
243 *ptr = <ptr to new allocated object>;
244 return SWIG_NEWOBJ;
245 } else {
246 *ptr = <ptr to old object>;
247 return SWIG_OLDOBJ;
248 }
249 } else {
250 return SWIG_BADOBJ;
251 }
252 }
253
254 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
255 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
256 SWIG errors code.
257
258 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
259 allows to return the 'cast rank', for example, if you have this
260
261 int food(double)
262 int fooi(int);
263
264 and you call
265
266 food(1) // cast rank '1' (1 -> 1.0)
267 fooi(1) // cast rank '0'
268
269 just use the SWIG_AddCast()/SWIG_CheckState()
270 */
271
272 #define SWIG_OK (0)
273 #define SWIG_ERROR (-1)
274 #define SWIG_IsOK(r) (r >= 0)
275 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
276
277 /* The CastRankLimit says how many bits are used for the cast rank */
278 #define SWIG_CASTRANKLIMIT (1 << 8)
279 /* The NewMask denotes the object was created (using new/malloc) */
280 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
281 /* The TmpMask is for in/out typemaps that use temporal objects */
282 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
283 /* Simple returning values */
284 #define SWIG_BADOBJ (SWIG_ERROR)
285 #define SWIG_OLDOBJ (SWIG_OK)
286 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
287 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
288 /* Check, add and del mask methods */
289 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
290 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
291 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
292 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
293 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
294 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
295
296 /* Cast-Rank Mode */
297 #if defined(SWIG_CASTRANK_MODE)
298 # ifndef SWIG_TypeRank
299 # define SWIG_TypeRank unsigned long
300 # endif
301 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
302 # define SWIG_MAXCASTRANK (2)
303 # endif
304 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
305 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)306 SWIGINTERNINLINE int SWIG_AddCast(int r) {
307 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
308 }
SWIG_CheckState(int r)309 SWIGINTERNINLINE int SWIG_CheckState(int r) {
310 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
311 }
312 #else /* no cast-rank mode */
313 # define SWIG_AddCast(r) (r)
314 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
315 #endif
316
317
318 #include <string.h>
319
320 #ifdef __cplusplus
321 extern "C" {
322 #endif
323
324 typedef void *(*swig_converter_func)(void *, int *);
325 typedef struct swig_type_info *(*swig_dycast_func)(void **);
326
327 /* Structure to store information on one type */
328 typedef struct swig_type_info {
329 const char *name; /* mangled name of this type */
330 const char *str; /* human readable name of this type */
331 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
332 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
333 void *clientdata; /* language specific type data */
334 int owndata; /* flag if the structure owns the clientdata */
335 } swig_type_info;
336
337 /* Structure to store a type and conversion function used for casting */
338 typedef struct swig_cast_info {
339 swig_type_info *type; /* pointer to type that is equivalent to this type */
340 swig_converter_func converter; /* function to cast the void pointers */
341 struct swig_cast_info *next; /* pointer to next cast in linked list */
342 struct swig_cast_info *prev; /* pointer to the previous cast */
343 } swig_cast_info;
344
345 /* Structure used to store module information
346 * Each module generates one structure like this, and the runtime collects
347 * all of these structures and stores them in a circularly linked list.*/
348 typedef struct swig_module_info {
349 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
350 size_t size; /* Number of types in this module */
351 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
352 swig_type_info **type_initial; /* Array of initially generated type structures */
353 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
354 void *clientdata; /* Language specific module data */
355 } swig_module_info;
356
357 /*
358 Compare two type names skipping the space characters, therefore
359 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
360
361 Return 0 when the two name types are equivalent, as in
362 strncmp, but skipping ' '.
363 */
364 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)365 SWIG_TypeNameComp(const char *f1, const char *l1,
366 const char *f2, const char *l2) {
367 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
368 while ((*f1 == ' ') && (f1 != l1)) ++f1;
369 while ((*f2 == ' ') && (f2 != l2)) ++f2;
370 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
371 }
372 return (int)((l1 - f1) - (l2 - f2));
373 }
374
375 /*
376 Check type equivalence in a name list like <name1>|<name2>|...
377 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
378 */
379 SWIGRUNTIME int
SWIG_TypeCmp(const char * nb,const char * tb)380 SWIG_TypeCmp(const char *nb, const char *tb) {
381 int equiv = 1;
382 const char* te = tb + strlen(tb);
383 const char* ne = nb;
384 while (equiv != 0 && *ne) {
385 for (nb = ne; *ne; ++ne) {
386 if (*ne == '|') break;
387 }
388 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
389 if (*ne) ++ne;
390 }
391 return equiv;
392 }
393
394 /*
395 Check type equivalence in a name list like <name1>|<name2>|...
396 Return 0 if not equal, 1 if equal
397 */
398 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)399 SWIG_TypeEquiv(const char *nb, const char *tb) {
400 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
401 }
402
403 /*
404 Check the typename
405 */
406 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)407 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
408 if (ty) {
409 swig_cast_info *iter = ty->cast;
410 while (iter) {
411 if (strcmp(iter->type->name, c) == 0) {
412 if (iter == ty->cast)
413 return iter;
414 /* Move iter to the top of the linked list */
415 iter->prev->next = iter->next;
416 if (iter->next)
417 iter->next->prev = iter->prev;
418 iter->next = ty->cast;
419 iter->prev = 0;
420 if (ty->cast) ty->cast->prev = iter;
421 ty->cast = iter;
422 return iter;
423 }
424 iter = iter->next;
425 }
426 }
427 return 0;
428 }
429
430 /*
431 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
432 */
433 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)434 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
435 if (ty) {
436 swig_cast_info *iter = ty->cast;
437 while (iter) {
438 if (iter->type == from) {
439 if (iter == ty->cast)
440 return iter;
441 /* Move iter to the top of the linked list */
442 iter->prev->next = iter->next;
443 if (iter->next)
444 iter->next->prev = iter->prev;
445 iter->next = ty->cast;
446 iter->prev = 0;
447 if (ty->cast) ty->cast->prev = iter;
448 ty->cast = iter;
449 return iter;
450 }
451 iter = iter->next;
452 }
453 }
454 return 0;
455 }
456
457 /*
458 Cast a pointer up an inheritance hierarchy
459 */
460 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)461 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
462 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
463 }
464
465 /*
466 Dynamic pointer casting. Down an inheritance hierarchy
467 */
468 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)469 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
470 swig_type_info *lastty = ty;
471 if (!ty || !ty->dcast) return ty;
472 while (ty && (ty->dcast)) {
473 ty = (*ty->dcast)(ptr);
474 if (ty) lastty = ty;
475 }
476 return lastty;
477 }
478
479 /*
480 Return the name associated with this type
481 */
482 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)483 SWIG_TypeName(const swig_type_info *ty) {
484 return ty->name;
485 }
486
487 /*
488 Return the pretty name associated with this type,
489 that is an unmangled type name in a form presentable to the user.
490 */
491 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)492 SWIG_TypePrettyName(const swig_type_info *type) {
493 /* The "str" field contains the equivalent pretty names of the
494 type, separated by vertical-bar characters. We choose
495 to print the last name, as it is often (?) the most
496 specific. */
497 if (!type) return NULL;
498 if (type->str != NULL) {
499 const char *last_name = type->str;
500 const char *s;
501 for (s = type->str; *s; s++)
502 if (*s == '|') last_name = s+1;
503 return last_name;
504 }
505 else
506 return type->name;
507 }
508
509 /*
510 Set the clientdata field for a type
511 */
512 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)513 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
514 swig_cast_info *cast = ti->cast;
515 /* if (ti->clientdata == clientdata) return; */
516 ti->clientdata = clientdata;
517
518 while (cast) {
519 if (!cast->converter) {
520 swig_type_info *tc = cast->type;
521 if (!tc->clientdata) {
522 SWIG_TypeClientData(tc, clientdata);
523 }
524 }
525 cast = cast->next;
526 }
527 }
528 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)529 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
530 SWIG_TypeClientData(ti, clientdata);
531 ti->owndata = 1;
532 }
533
534 /*
535 Search for a swig_type_info structure only by mangled name
536 Search is a O(log #types)
537
538 We start searching at module start, and finish searching when start == end.
539 Note: if start == end at the beginning of the function, we go all the way around
540 the circular list.
541 */
542 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)543 SWIG_MangledTypeQueryModule(swig_module_info *start,
544 swig_module_info *end,
545 const char *name) {
546 swig_module_info *iter = start;
547 do {
548 if (iter->size) {
549 size_t l = 0;
550 size_t r = iter->size - 1;
551 do {
552 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
553 size_t i = (l + r) >> 1;
554 const char *iname = iter->types[i]->name;
555 if (iname) {
556 int compare = strcmp(name, iname);
557 if (compare == 0) {
558 return iter->types[i];
559 } else if (compare < 0) {
560 if (i) {
561 r = i - 1;
562 } else {
563 break;
564 }
565 } else if (compare > 0) {
566 l = i + 1;
567 }
568 } else {
569 break; /* should never happen */
570 }
571 } while (l <= r);
572 }
573 iter = iter->next;
574 } while (iter != end);
575 return 0;
576 }
577
578 /*
579 Search for a swig_type_info structure for either a mangled name or a human readable name.
580 It first searches the mangled names of the types, which is a O(log #types)
581 If a type is not found it then searches the human readable names, which is O(#types).
582
583 We start searching at module start, and finish searching when start == end.
584 Note: if start == end at the beginning of the function, we go all the way around
585 the circular list.
586 */
587 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)588 SWIG_TypeQueryModule(swig_module_info *start,
589 swig_module_info *end,
590 const char *name) {
591 /* STEP 1: Search the name field using binary search */
592 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
593 if (ret) {
594 return ret;
595 } else {
596 /* STEP 2: If the type hasn't been found, do a complete search
597 of the str field (the human readable name) */
598 swig_module_info *iter = start;
599 do {
600 size_t i = 0;
601 for (; i < iter->size; ++i) {
602 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
603 return iter->types[i];
604 }
605 iter = iter->next;
606 } while (iter != end);
607 }
608
609 /* neither found a match */
610 return 0;
611 }
612
613 /*
614 Pack binary data into a string
615 */
616 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)617 SWIG_PackData(char *c, void *ptr, size_t sz) {
618 static const char hex[17] = "0123456789abcdef";
619 const unsigned char *u = (unsigned char *) ptr;
620 const unsigned char *eu = u + sz;
621 for (; u != eu; ++u) {
622 unsigned char uu = *u;
623 *(c++) = hex[(uu & 0xf0) >> 4];
624 *(c++) = hex[uu & 0xf];
625 }
626 return c;
627 }
628
629 /*
630 Unpack binary data from a string
631 */
632 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)633 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
634 unsigned char *u = (unsigned char *) ptr;
635 const unsigned char *eu = u + sz;
636 for (; u != eu; ++u) {
637 char d = *(c++);
638 unsigned char uu;
639 if ((d >= '0') && (d <= '9'))
640 uu = (unsigned char)((d - '0') << 4);
641 else if ((d >= 'a') && (d <= 'f'))
642 uu = (unsigned char)((d - ('a'-10)) << 4);
643 else
644 return (char *) 0;
645 d = *(c++);
646 if ((d >= '0') && (d <= '9'))
647 uu |= (unsigned char)(d - '0');
648 else if ((d >= 'a') && (d <= 'f'))
649 uu |= (unsigned char)(d - ('a'-10));
650 else
651 return (char *) 0;
652 *u = uu;
653 }
654 return c;
655 }
656
657 /*
658 Pack 'void *' into a string buffer.
659 */
660 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)661 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
662 char *r = buff;
663 if ((2*sizeof(void *) + 2) > bsz) return 0;
664 *(r++) = '_';
665 r = SWIG_PackData(r,&ptr,sizeof(void *));
666 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
667 strcpy(r,name);
668 return buff;
669 }
670
671 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)672 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
673 if (*c != '_') {
674 if (strcmp(c,"NULL") == 0) {
675 *ptr = (void *) 0;
676 return name;
677 } else {
678 return 0;
679 }
680 }
681 return SWIG_UnpackData(++c,ptr,sizeof(void *));
682 }
683
684 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)685 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
686 char *r = buff;
687 size_t lname = (name ? strlen(name) : 0);
688 if ((2*sz + 2 + lname) > bsz) return 0;
689 *(r++) = '_';
690 r = SWIG_PackData(r,ptr,sz);
691 if (lname) {
692 strncpy(r,name,lname+1);
693 } else {
694 *r = 0;
695 }
696 return buff;
697 }
698
699 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)700 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
701 if (*c != '_') {
702 if (strcmp(c,"NULL") == 0) {
703 memset(ptr,0,sz);
704 return name;
705 } else {
706 return 0;
707 }
708 }
709 return SWIG_UnpackData(++c,ptr,sz);
710 }
711
712 #ifdef __cplusplus
713 }
714 #endif
715
716 /* Errors in SWIG */
717 #define SWIG_UnknownError -1
718 #define SWIG_IOError -2
719 #define SWIG_RuntimeError -3
720 #define SWIG_IndexError -4
721 #define SWIG_TypeError -5
722 #define SWIG_DivisionByZero -6
723 #define SWIG_OverflowError -7
724 #define SWIG_SyntaxError -8
725 #define SWIG_ValueError -9
726 #define SWIG_SystemError -10
727 #define SWIG_AttributeError -11
728 #define SWIG_MemoryError -12
729 #define SWIG_NullReferenceError -13
730
731
732
733 #ifdef __cplusplus
734 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
735 #include <math.h>
736 #include <stdlib.h>
737 extern "C" {
738 #endif
739 #include "EXTERN.h"
740 #include "perl.h"
741 #include "XSUB.h"
742
743 /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
744
745 /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
746 #ifndef PERL_REVISION
747 # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
748 # define PERL_PATCHLEVEL_H_IMPLICIT
749 # include <patchlevel.h>
750 # endif
751 # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
752 # include <could_not_find_Perl_patchlevel.h>
753 # endif
754 # ifndef PERL_REVISION
755 # define PERL_REVISION (5)
756 # define PERL_VERSION PATCHLEVEL
757 # define PERL_SUBVERSION SUBVERSION
758 # endif
759 #endif
760
761 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
762 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
763 #endif
764
765 #ifndef SvIOK_UV
766 # define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
767 #endif
768
769 #ifndef SvUOK
770 # define SvUOK(sv) SvIOK_UV(sv)
771 #endif
772
773 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
774 # define PL_sv_undef sv_undef
775 # define PL_na na
776 # define PL_errgv errgv
777 # define PL_sv_no sv_no
778 # define PL_sv_yes sv_yes
779 # define PL_markstack_ptr markstack_ptr
780 #endif
781
782 #ifndef IVSIZE
783 # ifdef LONGSIZE
784 # define IVSIZE LONGSIZE
785 # else
786 # define IVSIZE 4 /* A bold guess, but the best we can make. */
787 # endif
788 #endif
789
790 #ifndef INT2PTR
791 # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
792 # define PTRV UV
793 # define INT2PTR(any,d) (any)(d)
794 # else
795 # if PTRSIZE == LONGSIZE
796 # define PTRV unsigned long
797 # else
798 # define PTRV unsigned
799 # endif
800 # define INT2PTR(any,d) (any)(PTRV)(d)
801 # endif
802
803 # define NUM2PTR(any,d) (any)(PTRV)(d)
804 # define PTR2IV(p) INT2PTR(IV,p)
805 # define PTR2UV(p) INT2PTR(UV,p)
806 # define PTR2NV(p) NUM2PTR(NV,p)
807
808 # if PTRSIZE == LONGSIZE
809 # define PTR2ul(p) (unsigned long)(p)
810 # else
811 # define PTR2ul(p) INT2PTR(unsigned long,p)
812 # endif
813 #endif /* !INT2PTR */
814
815 #ifndef SvPV_nolen
816 # define SvPV_nolen(x) SvPV(x,PL_na)
817 #endif
818
819 #ifndef get_sv
820 # define get_sv perl_get_sv
821 #endif
822
823 #ifndef ERRSV
824 # define ERRSV get_sv("@",FALSE)
825 #endif
826
827 #ifndef pTHX_
828 #define pTHX_
829 #endif
830
831 #include <string.h>
832 #ifdef __cplusplus
833 }
834 #endif
835
836 /* -----------------------------------------------------------------------------
837 * error manipulation
838 * ----------------------------------------------------------------------------- */
839
840 SWIGINTERN const char*
SWIG_Perl_ErrorType(int code)841 SWIG_Perl_ErrorType(int code) {
842 switch(code) {
843 case SWIG_MemoryError:
844 return "MemoryError";
845 case SWIG_IOError:
846 return "IOError";
847 case SWIG_RuntimeError:
848 return "RuntimeError";
849 case SWIG_IndexError:
850 return "IndexError";
851 case SWIG_TypeError:
852 return "TypeError";
853 case SWIG_DivisionByZero:
854 return "ZeroDivisionError";
855 case SWIG_OverflowError:
856 return "OverflowError";
857 case SWIG_SyntaxError:
858 return "SyntaxError";
859 case SWIG_ValueError:
860 return "ValueError";
861 case SWIG_SystemError:
862 return "SystemError";
863 case SWIG_AttributeError:
864 return "AttributeError";
865 default:
866 return "RuntimeError";
867 }
868 }
869
870
871 /* -----------------------------------------------------------------------------
872 * perlrun.swg
873 *
874 * This file contains the runtime support for Perl modules
875 * and includes code for managing global variables and pointer
876 * type checking.
877 * ----------------------------------------------------------------------------- */
878
879 #ifdef PERL_OBJECT
880 #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
881 #define SWIG_PERL_OBJECT_CALL pPerl,
882 #else
883 #define SWIG_PERL_OBJECT_DECL
884 #define SWIG_PERL_OBJECT_CALL
885 #endif
886
887 /* Common SWIG API */
888
889 /* for raw pointers */
890 #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
891 #define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own)
892 #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
893 #define SWIG_AcquirePtr(ptr, src) SWIG_Perl_AcquirePtr(ptr, src)
894 #define swig_owntype int
895
896 /* for raw packed data */
897 #define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
898 #define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
899
900 /* for class or struct pointers */
901 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
902 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
903
904 /* for C or C++ function pointers */
905 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
906 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
907
908 /* for C++ member pointers, ie, member methods */
909 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty)
910 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type)
911
912
913 /* Runtime API */
914
915 #define SWIG_GetModule(clientdata) SWIG_Perl_GetModule(clientdata)
916 #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer)
917
918
919 /* Error manipulation */
920
921 #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code)
922 #define SWIG_Error(code, msg) sv_setpvf(get_sv("@", GV_ADD), "%s %s", SWIG_ErrorType(code), msg)
923 #define SWIG_fail goto fail
924
925 /* Perl-specific SWIG API */
926
927 #define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
928 #define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
929 #define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str)
930
931
932 #define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1)
933 #define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1)
934 #define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2)
935 #define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2)
936
937 /* -----------------------------------------------------------------------------
938 * pointers/data manipulation
939 * ----------------------------------------------------------------------------- */
940
941 /* For backward compatibility only */
942 #define SWIG_POINTER_EXCEPTION 0
943
944 #ifdef __cplusplus
945 extern "C" {
946 #endif
947
948 #define SWIG_OWNER SWIG_POINTER_OWN
949 #define SWIG_SHADOW SWIG_OWNER << 1
950
951 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
952
953 /* SWIG Perl macros */
954
955 /* Macro to declare an XS function */
956 #ifndef XSPROTO
957 # define XSPROTO(name) void name(pTHX_ CV* cv)
958 #endif
959
960 /* Macro to call an XS function */
961 #ifdef PERL_OBJECT
962 # define SWIG_CALLXS(_name) _name(cv,pPerl)
963 #else
964 # ifndef MULTIPLICITY
965 # define SWIG_CALLXS(_name) _name(cv)
966 # else
967 # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
968 # endif
969 #endif
970
971 #ifdef PERL_OBJECT
972 #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
973
974 #ifdef __cplusplus
975 extern "C" {
976 #endif
977 typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
978 #ifdef __cplusplus
979 }
980 #endif
981
982 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
983 #define SWIGCLASS_STATIC
984
985 #else /* PERL_OBJECT */
986
987 #define MAGIC_PPERL
988 #define SWIGCLASS_STATIC static SWIGUNUSED
989
990 #ifndef MULTIPLICITY
991 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
992
993 #ifdef __cplusplus
994 extern "C" {
995 #endif
996 typedef int (*SwigMagicFunc)(SV *, MAGIC *);
997 #ifdef __cplusplus
998 }
999 #endif
1000
1001 #else /* MULTIPLICITY */
1002
1003 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
1004
1005 #ifdef __cplusplus
1006 extern "C" {
1007 #endif
1008 typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
1009 #ifdef __cplusplus
1010 }
1011 #endif
1012
1013 #endif /* MULTIPLICITY */
1014 #endif /* PERL_OBJECT */
1015
1016 # ifdef PERL_OBJECT
1017 # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
SWIG_Perl_croak_null(CPerlObj * pPerl)1018 static void SWIGUNUSED SWIG_Perl_croak_null(CPerlObj *pPerl)
1019 # else
1020 static void SWIGUNUSED SWIG_croak_null()
1021 # endif
1022 {
1023 SV *err = get_sv("@", GV_ADD);
1024 # if (PERL_VERSION < 6)
1025 croak("%_", err);
1026 # else
1027 if (sv_isobject(err))
1028 croak(0);
1029 else
1030 croak("%s", SvPV_nolen(err));
1031 # endif
1032 }
1033
1034
1035 /*
1036 Define how strict is the cast between strings and integers/doubles
1037 when overloading between these types occurs.
1038
1039 The default is making it as strict as possible by using SWIG_AddCast
1040 when needed.
1041
1042 You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
1043 disable the SWIG_AddCast, making the casting between string and
1044 numbers less strict.
1045
1046 In the end, we try to solve the overloading between strings and
1047 numerical types in the more natural way, but if you can avoid it,
1048 well, avoid it using %rename, for example.
1049 */
1050 #ifndef SWIG_PERL_NO_STRICT_STR2NUM
1051 # ifndef SWIG_PERL_STRICT_STR2NUM
1052 # define SWIG_PERL_STRICT_STR2NUM
1053 # endif
1054 #endif
1055 #ifdef SWIG_PERL_STRICT_STR2NUM
1056 /* string takes precedence */
1057 #define SWIG_Str2NumCast(x) SWIG_AddCast(x)
1058 #else
1059 /* number takes precedence */
1060 #define SWIG_Str2NumCast(x) x
1061 #endif
1062
1063
1064
1065 #include <stdlib.h>
1066
1067 SWIGRUNTIME const char *
SWIG_Perl_TypeProxyName(const swig_type_info * type)1068 SWIG_Perl_TypeProxyName(const swig_type_info *type) {
1069 if (!type) return NULL;
1070 if (type->clientdata != NULL) {
1071 return (const char*) type->clientdata;
1072 }
1073 else {
1074 return type->name;
1075 }
1076 }
1077
1078 /* Identical to SWIG_TypeCheck, except for strcmp comparison */
1079 SWIGRUNTIME swig_cast_info *
SWIG_TypeProxyCheck(const char * c,swig_type_info * ty)1080 SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
1081 if (ty) {
1082 swig_cast_info *iter = ty->cast;
1083 while (iter) {
1084 if (strcmp(SWIG_Perl_TypeProxyName(iter->type), c) == 0) {
1085 if (iter == ty->cast)
1086 return iter;
1087 /* Move iter to the top of the linked list */
1088 iter->prev->next = iter->next;
1089 if (iter->next)
1090 iter->next->prev = iter->prev;
1091 iter->next = ty->cast;
1092 iter->prev = 0;
1093 if (ty->cast) ty->cast->prev = iter;
1094 ty->cast = iter;
1095 return iter;
1096 }
1097 iter = iter->next;
1098 }
1099 }
1100 return 0;
1101 }
1102
1103 /* Acquire a pointer value */
1104
1105 SWIGRUNTIME int
SWIG_Perl_AcquirePtr(SWIG_MAYBE_PERL_OBJECT SV * sv,int own)1106 SWIG_Perl_AcquirePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, int own) {
1107 /* TODO */
1108 return 0;
1109 }
1110
1111 /* Function for getting a pointer value */
1112
1113 SWIGRUNTIME int
SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV * sv,void ** ptr,swig_type_info * _t,int flags,int * own)1114 SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) {
1115 swig_cast_info *tc;
1116 void *voidptr = (void *)0;
1117 SV *tsv = 0;
1118
1119 if (own)
1120 *own = 0;
1121
1122 /* If magical, apply more magic */
1123 if (SvGMAGICAL(sv))
1124 mg_get(sv);
1125
1126 /* Check to see if this is an object */
1127 if (sv_isobject(sv)) {
1128 IV tmp = 0;
1129 tsv = (SV*) SvRV(sv);
1130 if ((SvTYPE(tsv) == SVt_PVHV)) {
1131 MAGIC *mg;
1132 if (SvMAGICAL(tsv)) {
1133 mg = mg_find(tsv,'P');
1134 if (mg) {
1135 sv = mg->mg_obj;
1136 if (sv_isobject(sv)) {
1137 tsv = (SV*)SvRV(sv);
1138 tmp = SvIV(tsv);
1139 }
1140 }
1141 } else {
1142 return SWIG_ERROR;
1143 }
1144 } else {
1145 tmp = SvIV(tsv);
1146 }
1147 voidptr = INT2PTR(void *,tmp);
1148 } else if (! SvOK(sv)) { /* Check for undef */
1149 *(ptr) = (void *) 0;
1150 return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
1151 } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */
1152 if (!SvROK(sv)) {
1153 /* In Perl 5.12 and later, SVt_RV == SVt_IV, so sv could be a valid integer value. */
1154 if (SvIOK(sv)) {
1155 return SWIG_ERROR;
1156 } else {
1157 /* NULL pointer (reference to undef). */
1158 *(ptr) = (void *) 0;
1159 return SWIG_OK;
1160 }
1161 } else {
1162 return SWIG_ERROR;
1163 }
1164 } else { /* Don't know what it is */
1165 return SWIG_ERROR;
1166 }
1167 if (_t) {
1168 /* Now see if the types match */
1169 char *_c = HvNAME(SvSTASH(SvRV(sv)));
1170 tc = SWIG_TypeProxyCheck(_c,_t);
1171 #ifdef SWIG_DIRECTORS
1172 if (!tc && !sv_derived_from(sv,SWIG_Perl_TypeProxyName(_t))) {
1173 #else
1174 if (!tc) {
1175 #endif
1176 return SWIG_ERROR;
1177 }
1178 {
1179 int newmemory = 0;
1180 *ptr = SWIG_TypeCast(tc,voidptr,&newmemory);
1181 if (newmemory == SWIG_CAST_NEW_MEMORY) {
1182 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
1183 if (own)
1184 *own = *own | SWIG_CAST_NEW_MEMORY;
1185 }
1186 }
1187 } else {
1188 *ptr = voidptr;
1189 }
1190
1191 /*
1192 * DISOWN implementation: we need a perl guru to check this one.
1193 */
1194 if (tsv && (flags & SWIG_POINTER_DISOWN)) {
1195 /*
1196 * almost copy paste code from below SWIG_POINTER_OWN setting
1197 */
1198 SV *obj = sv;
1199 HV *stash = SvSTASH(SvRV(obj));
1200 GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1201 if (isGV(gv)) {
1202 HV *hv = GvHVn(gv);
1203 /*
1204 * To set ownership (see below), a newSViv(1) entry is added.
1205 * Hence, to remove ownership, we delete the entry.
1206 */
1207 if (hv_exists_ent(hv, obj, 0)) {
1208 hv_delete_ent(hv, obj, 0, 0);
1209 }
1210 }
1211 }
1212 return SWIG_OK;
1213 }
1214
1215 SWIGRUNTIME int
1216 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
1217 return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0);
1218 }
1219
1220 SWIGRUNTIME void
1221 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
1222 if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) {
1223 SV *self;
1224 SV *obj=newSV(0);
1225 HV *hash=newHV();
1226 HV *stash;
1227 sv_setref_pv(obj, SWIG_Perl_TypeProxyName(t), ptr);
1228 stash=SvSTASH(SvRV(obj));
1229 if (flags & SWIG_POINTER_OWN) {
1230 HV *hv;
1231 GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1232 if (!isGV(gv))
1233 gv_init(gv, stash, "OWNER", 5, FALSE);
1234 hv=GvHVn(gv);
1235 hv_store_ent(hv, obj, newSViv(1), 0);
1236 }
1237 sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
1238 SvREFCNT_dec(obj);
1239 self=newRV_noinc((SV *)hash);
1240 sv_setsv(sv, self);
1241 SvREFCNT_dec((SV *)self);
1242 sv_bless(sv, stash);
1243 }
1244 else {
1245 sv_setref_pv(sv, SWIG_Perl_TypeProxyName(t), ptr);
1246 }
1247 }
1248
1249 SWIGRUNTIMEINLINE SV *
1250 SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
1251 SV *result = sv_newmortal();
1252 SWIG_MakePtr(result, ptr, t, flags);
1253 return result;
1254 }
1255
1256 SWIGRUNTIME void
1257 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
1258 char result[1024];
1259 char *r = result;
1260 if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
1261 *(r++) = '_';
1262 r = SWIG_PackData(r,ptr,sz);
1263 strcpy(r,SWIG_Perl_TypeProxyName(type));
1264 sv_setpv(sv, result);
1265 }
1266
1267 SWIGRUNTIME SV *
1268 SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
1269 SV *result = sv_newmortal();
1270 SWIG_Perl_MakePackedObj(result, ptr, sz, type);
1271 return result;
1272 }
1273
1274 /* Convert a packed pointer value */
1275 SWIGRUNTIME int
1276 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
1277 swig_cast_info *tc;
1278 const char *c = 0;
1279
1280 if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
1281 c = SvPV_nolen(obj);
1282 /* Pointer values must start with leading underscore */
1283 if (*c != '_') return SWIG_ERROR;
1284 c++;
1285 c = SWIG_UnpackData(c,ptr,sz);
1286 if (ty) {
1287 tc = SWIG_TypeCheck(c,ty);
1288 if (!tc) return SWIG_ERROR;
1289 }
1290 return SWIG_OK;
1291 }
1292
1293
1294 /* Macros for low-level exception handling */
1295 #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
1296
1297
1298 typedef XSPROTO(SwigPerlWrapper);
1299 typedef SwigPerlWrapper *SwigPerlWrapperPtr;
1300
1301 /* Structure for command table */
1302 typedef struct {
1303 const char *name;
1304 SwigPerlWrapperPtr wrapper;
1305 } swig_command_info;
1306
1307 /* Information for constant table */
1308
1309 #define SWIG_INT 1
1310 #define SWIG_FLOAT 2
1311 #define SWIG_STRING 3
1312 #define SWIG_POINTER 4
1313 #define SWIG_BINARY 5
1314
1315 /* Constant information structure */
1316 typedef struct swig_constant_info {
1317 int type;
1318 const char *name;
1319 long lvalue;
1320 double dvalue;
1321 void *pvalue;
1322 swig_type_info **ptype;
1323 } swig_constant_info;
1324
1325
1326 /* Structure for variable table */
1327 typedef struct {
1328 const char *name;
1329 SwigMagicFunc set;
1330 SwigMagicFunc get;
1331 swig_type_info **type;
1332 } swig_variable_info;
1333
1334 /* Magic variable code */
1335 #ifndef PERL_OBJECT
1336 # ifdef __cplusplus
1337 # define swig_create_magic(s,a,b,c) _swig_create_magic(s,const_cast<char*>(a),b,c)
1338 # else
1339 # define swig_create_magic(s,a,b,c) _swig_create_magic(s,(char*)(a),b,c)
1340 # endif
1341 # ifndef MULTIPLICITY
1342 SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *))
1343 # else
1344 SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *))
1345 # endif
1346 #else
1347 # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
1348 SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *))
1349 #endif
1350 {
1351 MAGIC *mg;
1352 sv_magic(sv,sv,'U',name,strlen(name));
1353 mg = mg_find(sv,'U');
1354 mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
1355 mg->mg_virtual->svt_get = (SwigMagicFunc) get;
1356 mg->mg_virtual->svt_set = (SwigMagicFunc) set;
1357 mg->mg_virtual->svt_len = 0;
1358 mg->mg_virtual->svt_clear = 0;
1359 mg->mg_virtual->svt_free = 0;
1360 }
1361
1362
1363 SWIGRUNTIME swig_module_info *
1364 SWIG_Perl_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
1365 static void *type_pointer = (void *)0;
1366 SV *pointer;
1367
1368 /* first check if pointer already created */
1369 if (!type_pointer) {
1370 pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
1371 if (pointer && SvOK(pointer)) {
1372 type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
1373 }
1374 }
1375
1376 return (swig_module_info *) type_pointer;
1377 }
1378
1379 SWIGRUNTIME void
1380 SWIG_Perl_SetModule(swig_module_info *module) {
1381 SV *pointer;
1382
1383 /* create a new pointer */
1384 pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
1385 sv_setiv(pointer, PTR2IV(module));
1386 }
1387
1388 #ifdef __cplusplus
1389 }
1390 #endif
1391
1392 /* Workaround perl5 global namespace pollution. Note that undefining library
1393 * functions like fopen will not solve the problem on all platforms as fopen
1394 * might be a macro on Windows but not necessarily on other operating systems. */
1395 #ifdef do_open
1396 #undef do_open
1397 #endif
1398 #ifdef do_close
1399 #undef do_close
1400 #endif
1401 #ifdef do_exec
1402 #undef do_exec
1403 #endif
1404 #ifdef scalar
1405 #undef scalar
1406 #endif
1407 #ifdef list
1408 #undef list
1409 #endif
1410 #ifdef apply
1411 #undef apply
1412 #endif
1413 #ifdef convert
1414 #undef convert
1415 #endif
1416 #ifdef Error
1417 #undef Error
1418 #endif
1419 #ifdef form
1420 #undef form
1421 #endif
1422 #ifdef vform
1423 #undef vform
1424 #endif
1425 #ifdef LABEL
1426 #undef LABEL
1427 #endif
1428 #ifdef METHOD
1429 #undef METHOD
1430 #endif
1431 #ifdef Move
1432 #undef Move
1433 #endif
1434 #ifdef yylex
1435 #undef yylex
1436 #endif
1437 #ifdef yyparse
1438 #undef yyparse
1439 #endif
1440 #ifdef yyerror
1441 #undef yyerror
1442 #endif
1443 #ifdef invert
1444 #undef invert
1445 #endif
1446 #ifdef ref
1447 #undef ref
1448 #endif
1449 #ifdef read
1450 #undef read
1451 #endif
1452 #ifdef write
1453 #undef write
1454 #endif
1455 #ifdef eof
1456 #undef eof
1457 #endif
1458 #ifdef close
1459 #undef close
1460 #endif
1461 #ifdef rewind
1462 #undef rewind
1463 #endif
1464 #ifdef free
1465 #undef free
1466 #endif
1467 #ifdef malloc
1468 #undef malloc
1469 #endif
1470 #ifdef calloc
1471 #undef calloc
1472 #endif
1473 #ifdef Stat
1474 #undef Stat
1475 #endif
1476 #ifdef check
1477 #undef check
1478 #endif
1479 #ifdef seekdir
1480 #undef seekdir
1481 #endif
1482 #ifdef open
1483 #undef open
1484 #endif
1485 #ifdef readdir
1486 #undef readdir
1487 #endif
1488 #ifdef bind
1489 #undef bind
1490 #endif
1491 #ifdef access
1492 #undef access
1493 #endif
1494 #ifdef stat
1495 #undef stat
1496 #endif
1497 #ifdef seed
1498 #undef seed
1499 #endif
1500
1501 #ifdef bool
1502 /* Leave if macro is from C99 stdbool.h */
1503 #ifndef __bool_true_false_are_defined
1504 #undef bool
1505 #endif
1506 #endif
1507
1508
1509
1510
1511 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1512
1513 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1514
1515
1516
1517 /* -------- TYPES TABLE (BEGIN) -------- */
1518
1519 #define SWIGTYPE_p_FILE swig_types[0]
1520 #define SWIGTYPE_p_char swig_types[1]
1521 #define SWIGTYPE_p_double swig_types[2]
1522 #define SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void swig_types[3]
1523 #define SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void swig_types[4]
1524 #define SWIGTYPE_p_float swig_types[5]
1525 #define SWIGTYPE_p_gsl_complex swig_types[6]
1526 #define SWIGTYPE_p_gsl_complex_float swig_types[7]
1527 #define SWIGTYPE_p_gsl_complex_long_double swig_types[8]
1528 #define SWIGTYPE_p_long_double swig_types[9]
1529 static swig_type_info *swig_types[11];
1530 static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0};
1531 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1532 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1533
1534 /* -------- TYPES TABLE (END) -------- */
1535
1536 #define SWIG_init boot_Math__GSL__Complex
1537
1538 #define SWIG_name "Math::GSL::Complexc::boot_Math__GSL__Complex"
1539 #define SWIG_prefix "Math::GSL::Complexc::"
1540
1541 #define SWIGVERSION 0x040001
1542 #define SWIG_VERSION SWIGVERSION
1543
1544
1545 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1546 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1547
1548
1549 #ifdef __cplusplus
1550 extern "C"
1551 #endif
1552 #ifndef PERL_OBJECT
1553 #ifndef MULTIPLICITY
1554 SWIGEXPORT void SWIG_init (CV* cv);
1555 #else
1556 SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
1557 #endif
1558 #else
1559 SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
1560 #endif
1561
1562
1563 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(double value)1564 SWIG_From_double SWIG_PERL_DECL_ARGS_1(double value)
1565 {
1566 return sv_2mortal(newSVnv(value));
1567 }
1568
1569
1570 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(long value)1571 SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value)
1572 {
1573 SV *sv;
1574 if (IVSIZE >= sizeof(value) || (value >= IV_MIN && value <= IV_MAX))
1575 sv = newSViv(value);
1576 else
1577 sv = newSVpvf("%ld", value);
1578 return sv_2mortal(sv);
1579 }
1580
1581
1582 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(int value)1583 SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value)
1584 {
1585 return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value);
1586 }
1587
1588
1589 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)1590 SWIG_pchar_descriptor(void)
1591 {
1592 static int init = 0;
1593 static swig_type_info* info = 0;
1594 if (!init) {
1595 info = SWIG_TypeQuery("_p_char");
1596 init = 1;
1597 }
1598 return info;
1599 }
1600
1601
1602 SWIGINTERN int
SWIG_AsCharPtrAndSize(SV * obj,char ** cptr,size_t * psize,int * alloc)1603 SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
1604 {
1605 if (SvMAGICAL(obj)) {
1606 SV *tmp = sv_newmortal();
1607 SvSetSV(tmp, obj);
1608 obj = tmp;
1609 }
1610 if (SvPOK(obj)) {
1611 STRLEN len = 0;
1612 char *cstr = SvPV(obj, len);
1613 size_t size = len + 1;
1614 if (cptr) {
1615 if (alloc) {
1616 if (*alloc == SWIG_NEWOBJ) {
1617 *cptr = (char *)memcpy(malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
1618 } else {
1619 *cptr = cstr;
1620 *alloc = SWIG_OLDOBJ;
1621 }
1622 }
1623 }
1624 if (psize) *psize = size;
1625 return SWIG_OK;
1626 } else {
1627 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1628 if (pchar_descriptor) {
1629 char* vptr = 0;
1630 if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
1631 if (cptr) *cptr = vptr;
1632 if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
1633 if (alloc) *alloc = SWIG_OLDOBJ;
1634 return SWIG_OK;
1635 }
1636 }
1637 }
1638 return SWIG_TypeError;
1639 }
1640
1641
1642
1643
1644
1645 #include <limits.h>
1646 #if !defined(SWIG_NO_LLONG_MAX)
1647 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1648 # define LLONG_MAX __LONG_LONG_MAX__
1649 # define LLONG_MIN (-LLONG_MAX - 1LL)
1650 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1651 # endif
1652 #endif
1653
1654
1655 #include <stdlib.h>
1656 #ifdef _MSC_VER
1657 # ifndef strtoull
1658 # define strtoull _strtoui64
1659 # endif
1660 # ifndef strtoll
1661 # define strtoll _strtoi64
1662 # endif
1663 #endif
1664
1665
1666 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,double * val)1667 SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
1668 {
1669 if (SvNIOK(obj)) {
1670 if (val) *val = SvNV(obj);
1671 return SWIG_OK;
1672 } else if (SvIOK(obj)) {
1673 if (val) *val = (double) SvIV(obj);
1674 return SWIG_AddCast(SWIG_OK);
1675 } else {
1676 const char *nptr = SvPV_nolen(obj);
1677 if (nptr) {
1678 char *endptr;
1679 double v;
1680 errno = 0;
1681 v = strtod(nptr, &endptr);
1682 if (errno == ERANGE) {
1683 errno = 0;
1684 return SWIG_OverflowError;
1685 } else {
1686 if (*endptr == '\0') {
1687 if (val) *val = v;
1688 return SWIG_Str2NumCast(SWIG_OK);
1689 }
1690 }
1691 }
1692 }
1693 return SWIG_TypeError;
1694 }
1695
1696
1697 #include <float.h>
1698
1699
1700 #include <math.h>
1701
1702
1703 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)1704 SWIG_CanCastAsInteger(double *d, double min, double max) {
1705 double x = *d;
1706 if ((min <= x && x <= max)) {
1707 double fx = floor(x);
1708 double cx = ceil(x);
1709 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
1710 if ((errno == EDOM) || (errno == ERANGE)) {
1711 errno = 0;
1712 } else {
1713 double summ, reps, diff;
1714 if (rd < x) {
1715 diff = x - rd;
1716 } else if (rd > x) {
1717 diff = rd - x;
1718 } else {
1719 return 1;
1720 }
1721 summ = rd + x;
1722 reps = diff/summ;
1723 if (reps < 8*DBL_EPSILON) {
1724 *d = rd;
1725 return 1;
1726 }
1727 }
1728 }
1729 return 0;
1730 }
1731
1732
1733 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,long * val)1734 SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
1735 {
1736 if (SvUOK(obj)) {
1737 UV v = SvUV(obj);
1738 if (UVSIZE < sizeof(*val) || v <= LONG_MAX) {
1739 if (val) *val = v;
1740 return SWIG_OK;
1741 }
1742 return SWIG_OverflowError;
1743 } else if (SvIOK(obj)) {
1744 IV v = SvIV(obj);
1745 if (IVSIZE <= sizeof(*val) || (v >= LONG_MIN && v <= LONG_MAX)) {
1746 if(val) *val = v;
1747 return SWIG_OK;
1748 }
1749 return SWIG_OverflowError;
1750 } else {
1751 int dispatch = 0;
1752 const char *nptr = SvPV_nolen(obj);
1753 if (nptr) {
1754 char *endptr;
1755 long v;
1756 errno = 0;
1757 v = strtol(nptr, &endptr,0);
1758 if (errno == ERANGE) {
1759 errno = 0;
1760 return SWIG_OverflowError;
1761 } else {
1762 if (*endptr == '\0') {
1763 if (val) *val = v;
1764 return SWIG_Str2NumCast(SWIG_OK);
1765 }
1766 }
1767 }
1768 if (!dispatch) {
1769 double d;
1770 int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
1771 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
1772 if (val) *val = (long)(d);
1773 return res;
1774 }
1775 }
1776 }
1777 return SWIG_TypeError;
1778 }
1779
1780
1781 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,int * val)1782 SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
1783 {
1784 long v;
1785 int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
1786 if (SWIG_IsOK(res)) {
1787 if ((v < INT_MIN || v > INT_MAX)) {
1788 return SWIG_OverflowError;
1789 } else {
1790 if (val) *val = (int)(v);
1791 }
1792 }
1793 return res;
1794 }
1795
1796
1797 SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)1798 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1799 {
1800 SV *obj = sv_newmortal();
1801 if (carray) {
1802 sv_setpvn(obj, carray, size);
1803 } else {
1804 sv_setsv(obj, &PL_sv_undef);
1805 }
1806 return obj;
1807 }
1808
1809
1810 SWIGINTERNINLINE SV *
SWIG_FromCharPtr(const char * cptr)1811 SWIG_FromCharPtr(const char *cptr)
1812 {
1813 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1814 }
1815
1816
1817 #include "gsl/gsl_nan.h"
1818 #include "gsl/gsl_errno.h"
1819 #include "gsl/gsl_math.h"
1820 #include "gsl/gsl_monte.h"
1821
1822
1823 struct perl_array {
1824 I32 len;
1825 AV *array;
1826 };
1827
1828
1829
1830 enum awType { awDouble, awFloat, awInt, awUnsigned };
1831
1832 typedef struct {
1833 I32 size;
1834 enum awType type;
1835 void * data;
1836 } array_wrapper;
1837
array_wrapper_alloc(int numelem,enum awType type)1838 array_wrapper * array_wrapper_alloc(int numelem, enum awType type){
1839 array_wrapper * rv = malloc(sizeof(array_wrapper));
1840
1841 if (rv == NULL)
1842 croak("array_wrapper_alloc: can't malloc wrapper\n");
1843
1844 switch (type){
1845 case awDouble:
1846 rv->data = malloc(sizeof(double) * numelem);
1847 break;
1848 case awFloat:
1849 rv->data = malloc(sizeof(float) * numelem);
1850 break;
1851 case awInt:
1852 rv->data = malloc(sizeof(int) * numelem);
1853 break;
1854 case awUnsigned:
1855 rv->data = malloc(sizeof(unsigned int) * numelem);
1856 break;
1857 default:
1858 croak("array_wrapper_alloc: type should be awDouble, awFloat, awInt, or awUnsigned");
1859 }
1860
1861 if (rv->data == NULL)
1862 croak("array_wrapper_alloc: can't malloc data");
1863
1864 rv->size = numelem;
1865 rv->type = type;
1866 return rv;
1867 }
1868
array_wrapper_free(array_wrapper * daw)1869 void array_wrapper_free(array_wrapper * daw){
1870 free(daw->data);
1871 free(daw);
1872 }
1873
1874
1875 /* structure to hold required information while the gsl function call
1876 for each callback
1877 */
1878 struct gsl_function_perl {
1879 gsl_function C_gsl_function;
1880 SV * function;
1881 SV * params;
1882 };
1883
1884 struct gsl_function_fdf_perl {
1885 gsl_function_fdf C_gsl_function_fdf;
1886 SV * f;
1887 SV * df;
1888 SV * fdf;
1889 SV * params;
1890 };
1891
1892 struct gsl_monte_function_perl {
1893 gsl_monte_function C_gsl_monte_function;
1894 SV * f;
1895 SV * dim;
1896 SV * params;
1897 };
1898
gsl_function_perl_free(struct gsl_function_perl * perl_f)1899 void gsl_function_perl_free(struct gsl_function_perl * perl_f){
1900 if (perl_f != NULL) {
1901 SvREFCNT_dec(perl_f->function);
1902 SvREFCNT_dec(perl_f->params);
1903 Safefree(perl_f);
1904 }
1905 }
1906
gsl_function_fdf_perl_free(struct gsl_function_fdf_perl * perl_fdf)1907 void gsl_function_fdf_perl_free(struct gsl_function_fdf_perl * perl_fdf){
1908 if (perl_fdf != NULL) {
1909 SvREFCNT_dec(perl_fdf->f);
1910 SvREFCNT_dec(perl_fdf->df);
1911 SvREFCNT_dec(perl_fdf->fdf);
1912 SvREFCNT_dec(perl_fdf->params);
1913 Safefree(perl_fdf);
1914 }
1915 }
1916
1917 /* These functions (C callbacks) calls the perl callbacks.
1918 Info for perl callback can be found using the 'void*params' parameter
1919 */
call_gsl_function_x_params(SV * function,double x,SV * params)1920 double call_gsl_function_x_params(SV* function, double x, SV *params){
1921 unsigned int count;
1922 double y;
1923 dSP;
1924
1925 //fprintf(stderr, "LOOKUP CALLBACK\n");
1926 ENTER;
1927 SAVETMPS;
1928
1929 PUSHMARK(SP);
1930 XPUSHs(sv_2mortal(newSVnv((double)x)));
1931 XPUSHs(params);
1932 PUTBACK; /* make local stack pointer global */
1933
1934 count = call_sv(function, G_SCALAR);
1935 SPAGAIN;
1936
1937 if (count != 1)
1938 croak("Expected to call subroutine in scalar context!");
1939
1940 y = POPn;
1941
1942 PUTBACK; /* make local stack pointer global */
1943 FREETMPS;
1944 LEAVE;
1945
1946 return y;
1947 }
1948
call_gsl_function(double x,void * params)1949 double call_gsl_function(double x , void *params){
1950 struct gsl_function_perl *F=(struct gsl_function_perl*)params;
1951 return call_gsl_function_x_params( F->function, x, F->params );
1952 }
1953
call_gsl_function_fdf_f(double x,void * params)1954 double call_gsl_function_fdf_f(double x , void *params){
1955 struct gsl_function_fdf_perl *F=(struct gsl_function_fdf_perl*)params;
1956 return call_gsl_function_x_params( F->f, x, F->params );
1957 }
1958
call_gsl_function_fdf_df(double x,void * params)1959 double call_gsl_function_fdf_df(double x , void *params){
1960 struct gsl_function_fdf_perl *F=(struct gsl_function_fdf_perl*)params;
1961 return call_gsl_function_x_params( F->df, x, F->params );
1962 }
1963
call_gsl_function_fdf_fdf(double x,void * params,double * f,double * df)1964 void call_gsl_function_fdf_fdf(double x , void *params, double *f, double *df ){
1965 struct gsl_function_fdf_perl *F=(struct gsl_function_fdf_perl*)params;
1966
1967 dSP;
1968
1969 ENTER;
1970 SAVETMPS;
1971
1972 PUSHMARK(SP);
1973 EXTEND(SP, 2);
1974 PUSHs(sv_2mortal(newSVnv((double)x)));
1975 PUSHs(F->params);
1976 PUTBACK; /* make local stack pointer global */
1977
1978 {
1979 unsigned int count = call_sv(F->fdf, G_ARRAY);
1980 SPAGAIN;
1981
1982 if (count != 2)
1983 croak( "Expected two return values, got %d", count );
1984 }
1985
1986 *df = POPn;
1987 *f = POPn;
1988
1989 PUTBACK; /* make local stack pointer global */
1990 FREETMPS;
1991 LEAVE;
1992 }
1993
call_gsl_monte_function(double * x_array,size_t dim,void * params)1994 double call_gsl_monte_function(double *x_array , size_t dim, void *params){
1995 struct gsl_monte_function_perl *F=(struct gsl_monte_function_perl*)params;
1996 unsigned int count;
1997 unsigned int i;
1998 AV* perl_array;
1999 double y;
2000 dSP;
2001
2002 //fprintf(stderr, "LOOKUP CALLBACK\n");
2003 ENTER;
2004 SAVETMPS;
2005
2006 PUSHMARK(SP);
2007 perl_array=newAV();
2008 sv_2mortal((SV*)perl_array);
2009 XPUSHs(sv_2mortal(newRV((SV *)perl_array)));
2010 for(i=0; i<dim; i++) {
2011 /* no mortal : it is referenced by the array */
2012 av_push(perl_array, newSVnv(x_array[i]));
2013 }
2014 XPUSHs(sv_2mortal(newSViv(dim)));
2015 XPUSHs(F->params);
2016 PUTBACK; /* make local stack pointer global */
2017
2018 count = call_sv(F->f, G_SCALAR);
2019 SPAGAIN;
2020
2021 if (count != 1)
2022 croak("Expected to call subroutine in scalar context!");
2023
2024 y = POPn;
2025
2026 PUTBACK; /* make local stack pointer global */
2027 FREETMPS;
2028 LEAVE;
2029
2030 return y;
2031 }
2032
2033
gsl_function_fdf_extract(char * param_name,HV * hash,SV * func[])2034 void gsl_function_fdf_extract( char* param_name, HV* hash, SV* func[] ) {
2035 static const char *keys[3] = { "f", "df", "fdf" };
2036
2037 int ikey;
2038
2039 for ( ikey = 0 ; ikey < 3 ; ++ikey ) {
2040 func[ikey] = 0;
2041 const char* key = keys[ikey];
2042 /* it just so happens that strlen(keys[ikey]) == ikey + 1 */
2043 SV** pp_sv = hv_fetch( hash, key, ikey+1, 0 );
2044 SV* function;
2045
2046 if ( !pp_sv )
2047 croak("Math::GSL : %s: missing key %s!", param_name, key);
2048
2049 function = *pp_sv;
2050
2051 if ( SvPOK(function) || ( SvROK( function ) && SvTYPE(SvRV(function)) == SVt_PVCV ) ) {
2052 /* hold on to SV after the enclosing hash goes away */
2053 SvREFCNT_inc( function );
2054 func[ikey] = function;
2055 }
2056 else {
2057 croak( "Math::GSL : %s: key %s is not a reference to code!", param_name, key);
2058 }
2059 }
2060 }
2061
2062
2063
2064 #include "gsl/gsl_inline.h"
2065 #include "gsl/gsl_complex.h"
2066 #include "gsl/gsl_complex_math.h"
2067
2068
new_doubleArray(size_t nelements)2069 static double *new_doubleArray(size_t nelements) {
2070 return (double *)calloc(nelements, sizeof(double));
2071 }
2072
delete_doubleArray(double * ary)2073 static void delete_doubleArray(double *ary) {
2074 free((char*)ary);
2075 }
2076
doubleArray_getitem(double * ary,size_t index)2077 static double doubleArray_getitem(double *ary, size_t index) {
2078 return ary[index];
2079 }
doubleArray_setitem(double * ary,size_t index,double value)2080 static void doubleArray_setitem(double *ary, size_t index, double value) {
2081 ary[index] = value;
2082 }
2083
2084
2085 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,unsigned long * val)2086 SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val)
2087 {
2088 if (SvUOK(obj)) {
2089 UV v = SvUV(obj);
2090 if (UVSIZE <= sizeof(*val) || v <= ULONG_MAX) {
2091 if (val) *val = v;
2092 return SWIG_OK;
2093 }
2094 return SWIG_OverflowError;
2095 } else if (SvIOK(obj)) {
2096 IV v = SvIV(obj);
2097 if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULONG_MAX)) {
2098 if (val) *val = v;
2099 return SWIG_OK;
2100 }
2101 return SWIG_OverflowError;
2102 } else {
2103 int dispatch = 0;
2104 const char *nptr = SvPV_nolen(obj);
2105 if (nptr) {
2106 char *endptr;
2107 unsigned long v;
2108 errno = 0;
2109 v = strtoul(nptr, &endptr,0);
2110 if (errno == ERANGE) {
2111 errno = 0;
2112 return SWIG_OverflowError;
2113 } else {
2114 if (*endptr == '\0') {
2115 if (val) *val = v;
2116 return SWIG_Str2NumCast(SWIG_OK);
2117 }
2118 }
2119 }
2120 if (!dispatch) {
2121 double d;
2122 int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
2123 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
2124 if (val) *val = (unsigned long)(d);
2125 return res;
2126 }
2127 }
2128 }
2129 return SWIG_TypeError;
2130 }
2131
2132
2133 #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
2134 # define SWIG_LONG_LONG_AVAILABLE
2135 #endif
2136
2137
2138 #ifdef SWIG_LONG_LONG_AVAILABLE
2139 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,unsigned long long * val)2140 SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long long *val)
2141 {
2142 if (SvUOK(obj)) {
2143 /* pretty sure this should be conditional on
2144 * (UVSIZE <= sizeof(*val) || v <= ULLONG_MAX) */
2145 if (val) *val = SvUV(obj);
2146 return SWIG_OK;
2147 } else if (SvIOK(obj)) {
2148 IV v = SvIV(obj);
2149 if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULLONG_MAX)) {
2150 if (val) *val = v;
2151 return SWIG_OK;
2152 } else {
2153 return SWIG_OverflowError;
2154 }
2155 } else {
2156 int dispatch = 0;
2157 const char *nptr = SvPV_nolen(obj);
2158 if (nptr) {
2159 char *endptr;
2160 unsigned long long v;
2161 errno = 0;
2162 v = strtoull(nptr, &endptr,0);
2163 if (errno == ERANGE) {
2164 errno = 0;
2165 return SWIG_OverflowError;
2166 } else {
2167 if (*endptr == '\0') {
2168 if (val) *val = v;
2169 return SWIG_Str2NumCast(SWIG_OK);
2170 }
2171 }
2172 }
2173 if (!dispatch) {
2174 const double mant_max = 1LL << DBL_MANT_DIG;
2175 double d;
2176 int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
2177 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
2178 if (val) *val = (unsigned long long)(d);
2179 return res;
2180 }
2181 }
2182 }
2183 return SWIG_TypeError;
2184 }
2185 #endif
2186
2187
2188 SWIGINTERNINLINE int
SWIG_PERL_DECL_ARGS_2(SV * obj,size_t * val)2189 SWIG_AsVal_size_t SWIG_PERL_DECL_ARGS_2(SV * obj, size_t *val)
2190 {
2191 int res = SWIG_TypeError;
2192 #ifdef SWIG_LONG_LONG_AVAILABLE
2193 if (sizeof(size_t) <= sizeof(unsigned long)) {
2194 #endif
2195 unsigned long v;
2196 res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
2197 if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2198 #ifdef SWIG_LONG_LONG_AVAILABLE
2199 } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
2200 unsigned long long v;
2201 res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
2202 if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2203 }
2204 #endif
2205 return res;
2206 }
2207
2208 #ifdef __cplusplus
2209 extern "C" {
2210 #endif
2211
2212 #ifdef PERL_OBJECT
2213 #define MAGIC_CLASS _wrap_Math__GSL__Complex_var::
2214 class _wrap_Math__GSL__Complex_var : public CPerlObj {
2215 public:
2216 #else
2217 #define MAGIC_CLASS
2218 #endif
swig_magic_readonly(pTHX_ SV * SWIGUNUSEDPARM (sv),MAGIC * SWIGUNUSEDPARM (mg))2219 SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
2220 MAGIC_PPERL
2221 croak("Value is read-only.");
2222 return 0;
2223 }
2224
2225
2226 #ifdef PERL_OBJECT
2227 };
2228 #endif
2229
2230 #ifdef __cplusplus
2231 }
2232 #endif
2233
2234 #ifdef __cplusplus
2235 extern "C" {
2236 #endif
XS(_wrap_gsl_error)2237 XS(_wrap_gsl_error) {
2238 {
2239 char *arg1 = (char *) 0 ;
2240 char *arg2 = (char *) 0 ;
2241 int arg3 ;
2242 int arg4 ;
2243 int res1 ;
2244 char *buf1 = 0 ;
2245 int alloc1 = 0 ;
2246 int res2 ;
2247 char *buf2 = 0 ;
2248 int alloc2 = 0 ;
2249 int val3 ;
2250 int ecode3 = 0 ;
2251 int val4 ;
2252 int ecode4 = 0 ;
2253 int argvi = 0;
2254 dXSARGS;
2255
2256 if ((items < 4) || (items > 4)) {
2257 SWIG_croak("Usage: gsl_error(reason,file,line,gsl_errno);");
2258 }
2259 res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2260 if (!SWIG_IsOK(res1)) {
2261 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_error" "', argument " "1"" of type '" "char const *""'");
2262 }
2263 arg1 = (char *)(buf1);
2264 res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2265 if (!SWIG_IsOK(res2)) {
2266 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_error" "', argument " "2"" of type '" "char const *""'");
2267 }
2268 arg2 = (char *)(buf2);
2269 ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
2270 if (!SWIG_IsOK(ecode3)) {
2271 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_error" "', argument " "3"" of type '" "int""'");
2272 }
2273 arg3 = (int)(val3);
2274 ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
2275 if (!SWIG_IsOK(ecode4)) {
2276 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gsl_error" "', argument " "4"" of type '" "int""'");
2277 }
2278 arg4 = (int)(val4);
2279 gsl_error((char const *)arg1,(char const *)arg2,arg3,arg4);
2280 ST(argvi) = &PL_sv_undef;
2281 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2282 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2283
2284
2285 XSRETURN(argvi);
2286 fail:
2287 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2288 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2289
2290
2291 SWIG_croak_null();
2292 }
2293 }
2294
2295
XS(_wrap_gsl_stream_printf)2296 XS(_wrap_gsl_stream_printf) {
2297 {
2298 char *arg1 = (char *) 0 ;
2299 char *arg2 = (char *) 0 ;
2300 int arg3 ;
2301 char *arg4 = (char *) 0 ;
2302 int res1 ;
2303 char *buf1 = 0 ;
2304 int alloc1 = 0 ;
2305 int res2 ;
2306 char *buf2 = 0 ;
2307 int alloc2 = 0 ;
2308 int val3 ;
2309 int ecode3 = 0 ;
2310 int res4 ;
2311 char *buf4 = 0 ;
2312 int alloc4 = 0 ;
2313 int argvi = 0;
2314 dXSARGS;
2315
2316 if ((items < 4) || (items > 4)) {
2317 SWIG_croak("Usage: gsl_stream_printf(label,file,line,reason);");
2318 }
2319 res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2320 if (!SWIG_IsOK(res1)) {
2321 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_stream_printf" "', argument " "1"" of type '" "char const *""'");
2322 }
2323 arg1 = (char *)(buf1);
2324 res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2325 if (!SWIG_IsOK(res2)) {
2326 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_stream_printf" "', argument " "2"" of type '" "char const *""'");
2327 }
2328 arg2 = (char *)(buf2);
2329 ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
2330 if (!SWIG_IsOK(ecode3)) {
2331 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_stream_printf" "', argument " "3"" of type '" "int""'");
2332 }
2333 arg3 = (int)(val3);
2334 res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
2335 if (!SWIG_IsOK(res4)) {
2336 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gsl_stream_printf" "', argument " "4"" of type '" "char const *""'");
2337 }
2338 arg4 = (char *)(buf4);
2339 gsl_stream_printf((char const *)arg1,(char const *)arg2,arg3,(char const *)arg4);
2340 ST(argvi) = &PL_sv_undef;
2341 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2342 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2343
2344 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2345 XSRETURN(argvi);
2346 fail:
2347 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2348 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2349
2350 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2351 SWIG_croak_null();
2352 }
2353 }
2354
2355
XS(_wrap_gsl_strerror)2356 XS(_wrap_gsl_strerror) {
2357 {
2358 int arg1 ;
2359 int val1 ;
2360 int ecode1 = 0 ;
2361 int argvi = 0;
2362 char *result = 0 ;
2363 dXSARGS;
2364
2365 if ((items < 1) || (items > 1)) {
2366 SWIG_croak("Usage: gsl_strerror(gsl_errno);");
2367 }
2368 ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
2369 if (!SWIG_IsOK(ecode1)) {
2370 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_strerror" "', argument " "1"" of type '" "int""'");
2371 }
2372 arg1 = (int)(val1);
2373 result = (char *)gsl_strerror(arg1);
2374 ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2375
2376 XSRETURN(argvi);
2377 fail:
2378
2379 SWIG_croak_null();
2380 }
2381 }
2382
2383
XS(_wrap_gsl_set_error_handler)2384 XS(_wrap_gsl_set_error_handler) {
2385 {
2386 gsl_error_handler_t *arg1 = (gsl_error_handler_t *) 0 ;
2387 int argvi = 0;
2388 gsl_error_handler_t *result = 0 ;
2389 dXSARGS;
2390
2391 if ((items < 1) || (items > 1)) {
2392 SWIG_croak("Usage: gsl_set_error_handler(new_handler);");
2393 }
2394 {
2395 int res = SWIG_ConvertFunctionPtr(ST(0), (void**)(&arg1), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void);
2396 if (!SWIG_IsOK(res)) {
2397 SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_set_error_handler" "', argument " "1"" of type '" "gsl_error_handler_t *""'");
2398 }
2399 }
2400 result = (gsl_error_handler_t *)gsl_set_error_handler(arg1);
2401 ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void); argvi++ ;
2402
2403 XSRETURN(argvi);
2404 fail:
2405
2406 SWIG_croak_null();
2407 }
2408 }
2409
2410
XS(_wrap_gsl_set_error_handler_off)2411 XS(_wrap_gsl_set_error_handler_off) {
2412 {
2413 int argvi = 0;
2414 gsl_error_handler_t *result = 0 ;
2415 dXSARGS;
2416
2417 if ((items < 0) || (items > 0)) {
2418 SWIG_croak("Usage: gsl_set_error_handler_off();");
2419 }
2420 result = (gsl_error_handler_t *)gsl_set_error_handler_off();
2421 ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void); argvi++ ;
2422 XSRETURN(argvi);
2423 fail:
2424 SWIG_croak_null();
2425 }
2426 }
2427
2428
XS(_wrap_gsl_set_stream_handler)2429 XS(_wrap_gsl_set_stream_handler) {
2430 {
2431 gsl_stream_handler_t *arg1 = (gsl_stream_handler_t *) 0 ;
2432 int argvi = 0;
2433 gsl_stream_handler_t *result = 0 ;
2434 dXSARGS;
2435
2436 if ((items < 1) || (items > 1)) {
2437 SWIG_croak("Usage: gsl_set_stream_handler(new_handler);");
2438 }
2439 {
2440 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);
2441 if (!SWIG_IsOK(res)) {
2442 SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_set_stream_handler" "', argument " "1"" of type '" "gsl_stream_handler_t *""'");
2443 }
2444 }
2445 result = (gsl_stream_handler_t *)gsl_set_stream_handler(arg1);
2446 ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void); argvi++ ;
2447
2448 XSRETURN(argvi);
2449 fail:
2450
2451 SWIG_croak_null();
2452 }
2453 }
2454
2455
XS(_wrap_gsl_set_stream)2456 XS(_wrap_gsl_set_stream) {
2457 {
2458 FILE *arg1 = (FILE *) 0 ;
2459 void *argp1 = 0 ;
2460 int res1 = 0 ;
2461 int argvi = 0;
2462 FILE *result = 0 ;
2463 dXSARGS;
2464
2465 if ((items < 1) || (items > 1)) {
2466 SWIG_croak("Usage: gsl_set_stream(new_stream);");
2467 }
2468 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FILE, 0 | 0 );
2469 if (!SWIG_IsOK(res1)) {
2470 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_set_stream" "', argument " "1"" of type '" "FILE *""'");
2471 }
2472 arg1 = (FILE *)(argp1);
2473 result = (FILE *)gsl_set_stream(arg1);
2474 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FILE, 0 | 0); argvi++ ;
2475
2476 XSRETURN(argvi);
2477 fail:
2478
2479 SWIG_croak_null();
2480 }
2481 }
2482
2483
XS(_wrap_gsl_complex_dat_set)2484 XS(_wrap_gsl_complex_dat_set) {
2485 {
2486 gsl_complex *arg1 = (gsl_complex *) 0 ;
2487 double *arg2 ;
2488 void *argp1 = 0 ;
2489 int res1 = 0 ;
2490 void *argp2 = 0 ;
2491 int res2 = 0 ;
2492 int argvi = 0;
2493 dXSARGS;
2494
2495 if ((items < 2) || (items > 2)) {
2496 SWIG_croak("Usage: gsl_complex_dat_set(self,dat);");
2497 }
2498 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_complex, 0 | 0 );
2499 if (!SWIG_IsOK(res1)) {
2500 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_dat_set" "', argument " "1"" of type '" "gsl_complex *""'");
2501 }
2502 arg1 = (gsl_complex *)(argp1);
2503 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_double, 0 | 0 );
2504 if (!SWIG_IsOK(res2)) {
2505 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_complex_dat_set" "', argument " "2"" of type '" "double [2]""'");
2506 }
2507 arg2 = (double *)(argp2);
2508 {
2509 if (arg2) {
2510 size_t ii = 0;
2511 for (; ii < (size_t)2; ++ii) *(double *)&arg1->dat[ii] = *((double *)arg2 + ii);
2512 } else {
2513 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""dat""' of type '""double [2]""'");
2514 }
2515 }
2516 ST(argvi) = &PL_sv_undef;
2517
2518
2519 XSRETURN(argvi);
2520 fail:
2521
2522
2523 SWIG_croak_null();
2524 }
2525 }
2526
2527
XS(_wrap_gsl_complex_dat_get)2528 XS(_wrap_gsl_complex_dat_get) {
2529 {
2530 gsl_complex *arg1 = (gsl_complex *) 0 ;
2531 void *argp1 = 0 ;
2532 int res1 = 0 ;
2533 int argvi = 0;
2534 double *result = 0 ;
2535 dXSARGS;
2536
2537 if ((items < 1) || (items > 1)) {
2538 SWIG_croak("Usage: gsl_complex_dat_get(self);");
2539 }
2540 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_complex, 0 | 0 );
2541 if (!SWIG_IsOK(res1)) {
2542 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_dat_get" "', argument " "1"" of type '" "gsl_complex *""'");
2543 }
2544 arg1 = (gsl_complex *)(argp1);
2545 result = (double *)(double *) ((arg1)->dat);
2546 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0); argvi++ ;
2547
2548 XSRETURN(argvi);
2549 fail:
2550
2551 SWIG_croak_null();
2552 }
2553 }
2554
2555
XS(_wrap_new_gsl_complex)2556 XS(_wrap_new_gsl_complex) {
2557 {
2558 int argvi = 0;
2559 gsl_complex *result = 0 ;
2560 dXSARGS;
2561
2562 if ((items < 0) || (items > 0)) {
2563 SWIG_croak("Usage: new_gsl_complex();");
2564 }
2565 result = (gsl_complex *)calloc(1, sizeof(gsl_complex));
2566 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_complex, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2567 XSRETURN(argvi);
2568 fail:
2569 SWIG_croak_null();
2570 }
2571 }
2572
2573
XS(_wrap_delete_gsl_complex)2574 XS(_wrap_delete_gsl_complex) {
2575 {
2576 gsl_complex *arg1 = (gsl_complex *) 0 ;
2577 void *argp1 = 0 ;
2578 int res1 = 0 ;
2579 int argvi = 0;
2580 dXSARGS;
2581
2582 if ((items < 1) || (items > 1)) {
2583 SWIG_croak("Usage: delete_gsl_complex(self);");
2584 }
2585 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_complex, SWIG_POINTER_DISOWN | 0 );
2586 if (!SWIG_IsOK(res1)) {
2587 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gsl_complex" "', argument " "1"" of type '" "gsl_complex *""'");
2588 }
2589 arg1 = (gsl_complex *)(argp1);
2590 free((char *) arg1);
2591 ST(argvi) = &PL_sv_undef;
2592
2593 XSRETURN(argvi);
2594 fail:
2595
2596 SWIG_croak_null();
2597 }
2598 }
2599
2600
XS(_wrap_gsl_complex_long_double_dat_set)2601 XS(_wrap_gsl_complex_long_double_dat_set) {
2602 {
2603 gsl_complex_long_double *arg1 = (gsl_complex_long_double *) 0 ;
2604 long double *arg2 ;
2605 void *argp1 = 0 ;
2606 int res1 = 0 ;
2607 void *argp2 = 0 ;
2608 int res2 = 0 ;
2609 int argvi = 0;
2610 dXSARGS;
2611
2612 if ((items < 2) || (items > 2)) {
2613 SWIG_croak("Usage: gsl_complex_long_double_dat_set(self,dat);");
2614 }
2615 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_complex_long_double, 0 | 0 );
2616 if (!SWIG_IsOK(res1)) {
2617 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_long_double_dat_set" "', argument " "1"" of type '" "gsl_complex_long_double *""'");
2618 }
2619 arg1 = (gsl_complex_long_double *)(argp1);
2620 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_long_double, 0 | 0 );
2621 if (!SWIG_IsOK(res2)) {
2622 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_complex_long_double_dat_set" "', argument " "2"" of type '" "long double [2]""'");
2623 }
2624 arg2 = (long double *)(argp2);
2625 {
2626 if (arg2) {
2627 size_t ii = 0;
2628 for (; ii < (size_t)2; ++ii) *(long double *)&arg1->dat[ii] = *((long double *)arg2 + ii);
2629 } else {
2630 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""dat""' of type '""long double [2]""'");
2631 }
2632 }
2633 ST(argvi) = &PL_sv_undef;
2634
2635
2636 XSRETURN(argvi);
2637 fail:
2638
2639
2640 SWIG_croak_null();
2641 }
2642 }
2643
2644
XS(_wrap_gsl_complex_long_double_dat_get)2645 XS(_wrap_gsl_complex_long_double_dat_get) {
2646 {
2647 gsl_complex_long_double *arg1 = (gsl_complex_long_double *) 0 ;
2648 void *argp1 = 0 ;
2649 int res1 = 0 ;
2650 int argvi = 0;
2651 long double *result = 0 ;
2652 dXSARGS;
2653
2654 if ((items < 1) || (items > 1)) {
2655 SWIG_croak("Usage: gsl_complex_long_double_dat_get(self);");
2656 }
2657 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_complex_long_double, 0 | 0 );
2658 if (!SWIG_IsOK(res1)) {
2659 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_long_double_dat_get" "', argument " "1"" of type '" "gsl_complex_long_double *""'");
2660 }
2661 arg1 = (gsl_complex_long_double *)(argp1);
2662 result = (long double *)(long double *) ((arg1)->dat);
2663 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long_double, 0 | 0); argvi++ ;
2664
2665 XSRETURN(argvi);
2666 fail:
2667
2668 SWIG_croak_null();
2669 }
2670 }
2671
2672
XS(_wrap_new_gsl_complex_long_double)2673 XS(_wrap_new_gsl_complex_long_double) {
2674 {
2675 int argvi = 0;
2676 gsl_complex_long_double *result = 0 ;
2677 dXSARGS;
2678
2679 if ((items < 0) || (items > 0)) {
2680 SWIG_croak("Usage: new_gsl_complex_long_double();");
2681 }
2682 result = (gsl_complex_long_double *)calloc(1, sizeof(gsl_complex_long_double));
2683 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_complex_long_double, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2684 XSRETURN(argvi);
2685 fail:
2686 SWIG_croak_null();
2687 }
2688 }
2689
2690
XS(_wrap_delete_gsl_complex_long_double)2691 XS(_wrap_delete_gsl_complex_long_double) {
2692 {
2693 gsl_complex_long_double *arg1 = (gsl_complex_long_double *) 0 ;
2694 void *argp1 = 0 ;
2695 int res1 = 0 ;
2696 int argvi = 0;
2697 dXSARGS;
2698
2699 if ((items < 1) || (items > 1)) {
2700 SWIG_croak("Usage: delete_gsl_complex_long_double(self);");
2701 }
2702 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_complex_long_double, SWIG_POINTER_DISOWN | 0 );
2703 if (!SWIG_IsOK(res1)) {
2704 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gsl_complex_long_double" "', argument " "1"" of type '" "gsl_complex_long_double *""'");
2705 }
2706 arg1 = (gsl_complex_long_double *)(argp1);
2707 free((char *) arg1);
2708 ST(argvi) = &PL_sv_undef;
2709
2710 XSRETURN(argvi);
2711 fail:
2712
2713 SWIG_croak_null();
2714 }
2715 }
2716
2717
XS(_wrap_gsl_complex_float_dat_set)2718 XS(_wrap_gsl_complex_float_dat_set) {
2719 {
2720 gsl_complex_float *arg1 = (gsl_complex_float *) 0 ;
2721 float *arg2 ;
2722 void *argp1 = 0 ;
2723 int res1 = 0 ;
2724 void *argp2 = 0 ;
2725 int res2 = 0 ;
2726 int argvi = 0;
2727 dXSARGS;
2728
2729 if ((items < 2) || (items > 2)) {
2730 SWIG_croak("Usage: gsl_complex_float_dat_set(self,dat);");
2731 }
2732 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_complex_float, 0 | 0 );
2733 if (!SWIG_IsOK(res1)) {
2734 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_float_dat_set" "', argument " "1"" of type '" "gsl_complex_float *""'");
2735 }
2736 arg1 = (gsl_complex_float *)(argp1);
2737 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_float, 0 | 0 );
2738 if (!SWIG_IsOK(res2)) {
2739 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_complex_float_dat_set" "', argument " "2"" of type '" "float [2]""'");
2740 }
2741 arg2 = (float *)(argp2);
2742 {
2743 if (arg2) {
2744 size_t ii = 0;
2745 for (; ii < (size_t)2; ++ii) *(float *)&arg1->dat[ii] = *((float *)arg2 + ii);
2746 } else {
2747 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""dat""' of type '""float [2]""'");
2748 }
2749 }
2750 ST(argvi) = &PL_sv_undef;
2751
2752
2753 XSRETURN(argvi);
2754 fail:
2755
2756
2757 SWIG_croak_null();
2758 }
2759 }
2760
2761
XS(_wrap_gsl_complex_float_dat_get)2762 XS(_wrap_gsl_complex_float_dat_get) {
2763 {
2764 gsl_complex_float *arg1 = (gsl_complex_float *) 0 ;
2765 void *argp1 = 0 ;
2766 int res1 = 0 ;
2767 int argvi = 0;
2768 float *result = 0 ;
2769 dXSARGS;
2770
2771 if ((items < 1) || (items > 1)) {
2772 SWIG_croak("Usage: gsl_complex_float_dat_get(self);");
2773 }
2774 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_complex_float, 0 | 0 );
2775 if (!SWIG_IsOK(res1)) {
2776 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_float_dat_get" "', argument " "1"" of type '" "gsl_complex_float *""'");
2777 }
2778 arg1 = (gsl_complex_float *)(argp1);
2779 result = (float *)(float *) ((arg1)->dat);
2780 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0); argvi++ ;
2781
2782 XSRETURN(argvi);
2783 fail:
2784
2785 SWIG_croak_null();
2786 }
2787 }
2788
2789
XS(_wrap_new_gsl_complex_float)2790 XS(_wrap_new_gsl_complex_float) {
2791 {
2792 int argvi = 0;
2793 gsl_complex_float *result = 0 ;
2794 dXSARGS;
2795
2796 if ((items < 0) || (items > 0)) {
2797 SWIG_croak("Usage: new_gsl_complex_float();");
2798 }
2799 result = (gsl_complex_float *)calloc(1, sizeof(gsl_complex_float));
2800 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_complex_float, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2801 XSRETURN(argvi);
2802 fail:
2803 SWIG_croak_null();
2804 }
2805 }
2806
2807
XS(_wrap_delete_gsl_complex_float)2808 XS(_wrap_delete_gsl_complex_float) {
2809 {
2810 gsl_complex_float *arg1 = (gsl_complex_float *) 0 ;
2811 void *argp1 = 0 ;
2812 int res1 = 0 ;
2813 int argvi = 0;
2814 dXSARGS;
2815
2816 if ((items < 1) || (items > 1)) {
2817 SWIG_croak("Usage: delete_gsl_complex_float(self);");
2818 }
2819 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_complex_float, SWIG_POINTER_DISOWN | 0 );
2820 if (!SWIG_IsOK(res1)) {
2821 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gsl_complex_float" "', argument " "1"" of type '" "gsl_complex_float *""'");
2822 }
2823 arg1 = (gsl_complex_float *)(argp1);
2824 free((char *) arg1);
2825 ST(argvi) = &PL_sv_undef;
2826
2827 XSRETURN(argvi);
2828 fail:
2829
2830 SWIG_croak_null();
2831 }
2832 }
2833
2834
XS(_wrap_gsl_complex_polar)2835 XS(_wrap_gsl_complex_polar) {
2836 {
2837 double arg1 ;
2838 double arg2 ;
2839 double val1 ;
2840 int ecode1 = 0 ;
2841 double val2 ;
2842 int ecode2 = 0 ;
2843 int argvi = 0;
2844 gsl_complex result;
2845 dXSARGS;
2846
2847 if ((items < 2) || (items > 2)) {
2848 SWIG_croak("Usage: gsl_complex_polar(r,theta);");
2849 }
2850 ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
2851 if (!SWIG_IsOK(ecode1)) {
2852 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_complex_polar" "', argument " "1"" of type '" "double""'");
2853 }
2854 arg1 = (double)(val1);
2855 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2856 if (!SWIG_IsOK(ecode2)) {
2857 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_polar" "', argument " "2"" of type '" "double""'");
2858 }
2859 arg2 = (double)(val2);
2860 result = gsl_complex_polar(arg1,arg2);
2861 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
2862
2863
2864 XSRETURN(argvi);
2865 fail:
2866
2867
2868 SWIG_croak_null();
2869 }
2870 }
2871
2872
XS(_wrap_gsl_complex_rect)2873 XS(_wrap_gsl_complex_rect) {
2874 {
2875 double arg1 ;
2876 double arg2 ;
2877 double val1 ;
2878 int ecode1 = 0 ;
2879 double val2 ;
2880 int ecode2 = 0 ;
2881 int argvi = 0;
2882 gsl_complex result;
2883 dXSARGS;
2884
2885 if ((items < 2) || (items > 2)) {
2886 SWIG_croak("Usage: gsl_complex_rect(x,y);");
2887 }
2888 ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
2889 if (!SWIG_IsOK(ecode1)) {
2890 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_complex_rect" "', argument " "1"" of type '" "double""'");
2891 }
2892 arg1 = (double)(val1);
2893 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2894 if (!SWIG_IsOK(ecode2)) {
2895 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_rect" "', argument " "2"" of type '" "double""'");
2896 }
2897 arg2 = (double)(val2);
2898 result = gsl_complex_rect(arg1,arg2);
2899 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
2900
2901
2902 XSRETURN(argvi);
2903 fail:
2904
2905
2906 SWIG_croak_null();
2907 }
2908 }
2909
2910
XS(_wrap_gsl_complex_arg)2911 XS(_wrap_gsl_complex_arg) {
2912 {
2913 gsl_complex arg1 ;
2914 void *argp1 ;
2915 int res1 = 0 ;
2916 int argvi = 0;
2917 double result;
2918 dXSARGS;
2919
2920 if ((items < 1) || (items > 1)) {
2921 SWIG_croak("Usage: gsl_complex_arg(z);");
2922 }
2923 {
2924 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
2925 if (!SWIG_IsOK(res1)) {
2926 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arg" "', argument " "1"" of type '" "gsl_complex""'");
2927 }
2928 if (!argp1) {
2929 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arg" "', argument " "1"" of type '" "gsl_complex""'");
2930 } else {
2931 arg1 = *((gsl_complex *)(argp1));
2932 }
2933 }
2934 result = (double)gsl_complex_arg(arg1);
2935 ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
2936 XSRETURN(argvi);
2937 fail:
2938 SWIG_croak_null();
2939 }
2940 }
2941
2942
XS(_wrap_gsl_complex_abs)2943 XS(_wrap_gsl_complex_abs) {
2944 {
2945 gsl_complex arg1 ;
2946 void *argp1 ;
2947 int res1 = 0 ;
2948 int argvi = 0;
2949 double result;
2950 dXSARGS;
2951
2952 if ((items < 1) || (items > 1)) {
2953 SWIG_croak("Usage: gsl_complex_abs(z);");
2954 }
2955 {
2956 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
2957 if (!SWIG_IsOK(res1)) {
2958 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_abs" "', argument " "1"" of type '" "gsl_complex""'");
2959 }
2960 if (!argp1) {
2961 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_abs" "', argument " "1"" of type '" "gsl_complex""'");
2962 } else {
2963 arg1 = *((gsl_complex *)(argp1));
2964 }
2965 }
2966 result = (double)gsl_complex_abs(arg1);
2967 ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
2968 XSRETURN(argvi);
2969 fail:
2970 SWIG_croak_null();
2971 }
2972 }
2973
2974
XS(_wrap_gsl_complex_abs2)2975 XS(_wrap_gsl_complex_abs2) {
2976 {
2977 gsl_complex arg1 ;
2978 void *argp1 ;
2979 int res1 = 0 ;
2980 int argvi = 0;
2981 double result;
2982 dXSARGS;
2983
2984 if ((items < 1) || (items > 1)) {
2985 SWIG_croak("Usage: gsl_complex_abs2(z);");
2986 }
2987 {
2988 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
2989 if (!SWIG_IsOK(res1)) {
2990 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_abs2" "', argument " "1"" of type '" "gsl_complex""'");
2991 }
2992 if (!argp1) {
2993 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_abs2" "', argument " "1"" of type '" "gsl_complex""'");
2994 } else {
2995 arg1 = *((gsl_complex *)(argp1));
2996 }
2997 }
2998 result = (double)gsl_complex_abs2(arg1);
2999 ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
3000 XSRETURN(argvi);
3001 fail:
3002 SWIG_croak_null();
3003 }
3004 }
3005
3006
XS(_wrap_gsl_complex_logabs)3007 XS(_wrap_gsl_complex_logabs) {
3008 {
3009 gsl_complex arg1 ;
3010 void *argp1 ;
3011 int res1 = 0 ;
3012 int argvi = 0;
3013 double result;
3014 dXSARGS;
3015
3016 if ((items < 1) || (items > 1)) {
3017 SWIG_croak("Usage: gsl_complex_logabs(z);");
3018 }
3019 {
3020 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3021 if (!SWIG_IsOK(res1)) {
3022 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_logabs" "', argument " "1"" of type '" "gsl_complex""'");
3023 }
3024 if (!argp1) {
3025 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_logabs" "', argument " "1"" of type '" "gsl_complex""'");
3026 } else {
3027 arg1 = *((gsl_complex *)(argp1));
3028 }
3029 }
3030 result = (double)gsl_complex_logabs(arg1);
3031 ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
3032 XSRETURN(argvi);
3033 fail:
3034 SWIG_croak_null();
3035 }
3036 }
3037
3038
XS(_wrap_gsl_complex_add)3039 XS(_wrap_gsl_complex_add) {
3040 {
3041 gsl_complex arg1 ;
3042 gsl_complex arg2 ;
3043 void *argp1 ;
3044 int res1 = 0 ;
3045 void *argp2 ;
3046 int res2 = 0 ;
3047 int argvi = 0;
3048 gsl_complex result;
3049 dXSARGS;
3050
3051 if ((items < 2) || (items > 2)) {
3052 SWIG_croak("Usage: gsl_complex_add(a,b);");
3053 }
3054 {
3055 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3056 if (!SWIG_IsOK(res1)) {
3057 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_add" "', argument " "1"" of type '" "gsl_complex""'");
3058 }
3059 if (!argp1) {
3060 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_add" "', argument " "1"" of type '" "gsl_complex""'");
3061 } else {
3062 arg1 = *((gsl_complex *)(argp1));
3063 }
3064 }
3065 {
3066 res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_gsl_complex, 0 );
3067 if (!SWIG_IsOK(res2)) {
3068 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_complex_add" "', argument " "2"" of type '" "gsl_complex""'");
3069 }
3070 if (!argp2) {
3071 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_add" "', argument " "2"" of type '" "gsl_complex""'");
3072 } else {
3073 arg2 = *((gsl_complex *)(argp2));
3074 }
3075 }
3076 result = gsl_complex_add(arg1,arg2);
3077 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3078 XSRETURN(argvi);
3079 fail:
3080 SWIG_croak_null();
3081 }
3082 }
3083
3084
XS(_wrap_gsl_complex_sub)3085 XS(_wrap_gsl_complex_sub) {
3086 {
3087 gsl_complex arg1 ;
3088 gsl_complex arg2 ;
3089 void *argp1 ;
3090 int res1 = 0 ;
3091 void *argp2 ;
3092 int res2 = 0 ;
3093 int argvi = 0;
3094 gsl_complex result;
3095 dXSARGS;
3096
3097 if ((items < 2) || (items > 2)) {
3098 SWIG_croak("Usage: gsl_complex_sub(a,b);");
3099 }
3100 {
3101 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3102 if (!SWIG_IsOK(res1)) {
3103 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_sub" "', argument " "1"" of type '" "gsl_complex""'");
3104 }
3105 if (!argp1) {
3106 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_sub" "', argument " "1"" of type '" "gsl_complex""'");
3107 } else {
3108 arg1 = *((gsl_complex *)(argp1));
3109 }
3110 }
3111 {
3112 res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_gsl_complex, 0 );
3113 if (!SWIG_IsOK(res2)) {
3114 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_complex_sub" "', argument " "2"" of type '" "gsl_complex""'");
3115 }
3116 if (!argp2) {
3117 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_sub" "', argument " "2"" of type '" "gsl_complex""'");
3118 } else {
3119 arg2 = *((gsl_complex *)(argp2));
3120 }
3121 }
3122 result = gsl_complex_sub(arg1,arg2);
3123 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3124 XSRETURN(argvi);
3125 fail:
3126 SWIG_croak_null();
3127 }
3128 }
3129
3130
XS(_wrap_gsl_complex_mul)3131 XS(_wrap_gsl_complex_mul) {
3132 {
3133 gsl_complex arg1 ;
3134 gsl_complex arg2 ;
3135 void *argp1 ;
3136 int res1 = 0 ;
3137 void *argp2 ;
3138 int res2 = 0 ;
3139 int argvi = 0;
3140 gsl_complex result;
3141 dXSARGS;
3142
3143 if ((items < 2) || (items > 2)) {
3144 SWIG_croak("Usage: gsl_complex_mul(a,b);");
3145 }
3146 {
3147 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3148 if (!SWIG_IsOK(res1)) {
3149 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_mul" "', argument " "1"" of type '" "gsl_complex""'");
3150 }
3151 if (!argp1) {
3152 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_mul" "', argument " "1"" of type '" "gsl_complex""'");
3153 } else {
3154 arg1 = *((gsl_complex *)(argp1));
3155 }
3156 }
3157 {
3158 res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_gsl_complex, 0 );
3159 if (!SWIG_IsOK(res2)) {
3160 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_complex_mul" "', argument " "2"" of type '" "gsl_complex""'");
3161 }
3162 if (!argp2) {
3163 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_mul" "', argument " "2"" of type '" "gsl_complex""'");
3164 } else {
3165 arg2 = *((gsl_complex *)(argp2));
3166 }
3167 }
3168 result = gsl_complex_mul(arg1,arg2);
3169 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3170 XSRETURN(argvi);
3171 fail:
3172 SWIG_croak_null();
3173 }
3174 }
3175
3176
XS(_wrap_gsl_complex_div)3177 XS(_wrap_gsl_complex_div) {
3178 {
3179 gsl_complex arg1 ;
3180 gsl_complex arg2 ;
3181 void *argp1 ;
3182 int res1 = 0 ;
3183 void *argp2 ;
3184 int res2 = 0 ;
3185 int argvi = 0;
3186 gsl_complex result;
3187 dXSARGS;
3188
3189 if ((items < 2) || (items > 2)) {
3190 SWIG_croak("Usage: gsl_complex_div(a,b);");
3191 }
3192 {
3193 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3194 if (!SWIG_IsOK(res1)) {
3195 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_div" "', argument " "1"" of type '" "gsl_complex""'");
3196 }
3197 if (!argp1) {
3198 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_div" "', argument " "1"" of type '" "gsl_complex""'");
3199 } else {
3200 arg1 = *((gsl_complex *)(argp1));
3201 }
3202 }
3203 {
3204 res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_gsl_complex, 0 );
3205 if (!SWIG_IsOK(res2)) {
3206 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_complex_div" "', argument " "2"" of type '" "gsl_complex""'");
3207 }
3208 if (!argp2) {
3209 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_div" "', argument " "2"" of type '" "gsl_complex""'");
3210 } else {
3211 arg2 = *((gsl_complex *)(argp2));
3212 }
3213 }
3214 result = gsl_complex_div(arg1,arg2);
3215 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3216 XSRETURN(argvi);
3217 fail:
3218 SWIG_croak_null();
3219 }
3220 }
3221
3222
XS(_wrap_gsl_complex_add_real)3223 XS(_wrap_gsl_complex_add_real) {
3224 {
3225 gsl_complex arg1 ;
3226 double arg2 ;
3227 void *argp1 ;
3228 int res1 = 0 ;
3229 double val2 ;
3230 int ecode2 = 0 ;
3231 int argvi = 0;
3232 gsl_complex result;
3233 dXSARGS;
3234
3235 if ((items < 2) || (items > 2)) {
3236 SWIG_croak("Usage: gsl_complex_add_real(a,x);");
3237 }
3238 {
3239 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3240 if (!SWIG_IsOK(res1)) {
3241 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_add_real" "', argument " "1"" of type '" "gsl_complex""'");
3242 }
3243 if (!argp1) {
3244 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_add_real" "', argument " "1"" of type '" "gsl_complex""'");
3245 } else {
3246 arg1 = *((gsl_complex *)(argp1));
3247 }
3248 }
3249 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3250 if (!SWIG_IsOK(ecode2)) {
3251 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_add_real" "', argument " "2"" of type '" "double""'");
3252 }
3253 arg2 = (double)(val2);
3254 result = gsl_complex_add_real(arg1,arg2);
3255 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3256
3257 XSRETURN(argvi);
3258 fail:
3259
3260 SWIG_croak_null();
3261 }
3262 }
3263
3264
XS(_wrap_gsl_complex_sub_real)3265 XS(_wrap_gsl_complex_sub_real) {
3266 {
3267 gsl_complex arg1 ;
3268 double arg2 ;
3269 void *argp1 ;
3270 int res1 = 0 ;
3271 double val2 ;
3272 int ecode2 = 0 ;
3273 int argvi = 0;
3274 gsl_complex result;
3275 dXSARGS;
3276
3277 if ((items < 2) || (items > 2)) {
3278 SWIG_croak("Usage: gsl_complex_sub_real(a,x);");
3279 }
3280 {
3281 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3282 if (!SWIG_IsOK(res1)) {
3283 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_sub_real" "', argument " "1"" of type '" "gsl_complex""'");
3284 }
3285 if (!argp1) {
3286 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_sub_real" "', argument " "1"" of type '" "gsl_complex""'");
3287 } else {
3288 arg1 = *((gsl_complex *)(argp1));
3289 }
3290 }
3291 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3292 if (!SWIG_IsOK(ecode2)) {
3293 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_sub_real" "', argument " "2"" of type '" "double""'");
3294 }
3295 arg2 = (double)(val2);
3296 result = gsl_complex_sub_real(arg1,arg2);
3297 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3298
3299 XSRETURN(argvi);
3300 fail:
3301
3302 SWIG_croak_null();
3303 }
3304 }
3305
3306
XS(_wrap_gsl_complex_mul_real)3307 XS(_wrap_gsl_complex_mul_real) {
3308 {
3309 gsl_complex arg1 ;
3310 double arg2 ;
3311 void *argp1 ;
3312 int res1 = 0 ;
3313 double val2 ;
3314 int ecode2 = 0 ;
3315 int argvi = 0;
3316 gsl_complex result;
3317 dXSARGS;
3318
3319 if ((items < 2) || (items > 2)) {
3320 SWIG_croak("Usage: gsl_complex_mul_real(a,x);");
3321 }
3322 {
3323 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3324 if (!SWIG_IsOK(res1)) {
3325 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_mul_real" "', argument " "1"" of type '" "gsl_complex""'");
3326 }
3327 if (!argp1) {
3328 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_mul_real" "', argument " "1"" of type '" "gsl_complex""'");
3329 } else {
3330 arg1 = *((gsl_complex *)(argp1));
3331 }
3332 }
3333 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3334 if (!SWIG_IsOK(ecode2)) {
3335 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_mul_real" "', argument " "2"" of type '" "double""'");
3336 }
3337 arg2 = (double)(val2);
3338 result = gsl_complex_mul_real(arg1,arg2);
3339 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3340
3341 XSRETURN(argvi);
3342 fail:
3343
3344 SWIG_croak_null();
3345 }
3346 }
3347
3348
XS(_wrap_gsl_complex_div_real)3349 XS(_wrap_gsl_complex_div_real) {
3350 {
3351 gsl_complex arg1 ;
3352 double arg2 ;
3353 void *argp1 ;
3354 int res1 = 0 ;
3355 double val2 ;
3356 int ecode2 = 0 ;
3357 int argvi = 0;
3358 gsl_complex result;
3359 dXSARGS;
3360
3361 if ((items < 2) || (items > 2)) {
3362 SWIG_croak("Usage: gsl_complex_div_real(a,x);");
3363 }
3364 {
3365 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3366 if (!SWIG_IsOK(res1)) {
3367 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_div_real" "', argument " "1"" of type '" "gsl_complex""'");
3368 }
3369 if (!argp1) {
3370 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_div_real" "', argument " "1"" of type '" "gsl_complex""'");
3371 } else {
3372 arg1 = *((gsl_complex *)(argp1));
3373 }
3374 }
3375 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3376 if (!SWIG_IsOK(ecode2)) {
3377 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_div_real" "', argument " "2"" of type '" "double""'");
3378 }
3379 arg2 = (double)(val2);
3380 result = gsl_complex_div_real(arg1,arg2);
3381 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3382
3383 XSRETURN(argvi);
3384 fail:
3385
3386 SWIG_croak_null();
3387 }
3388 }
3389
3390
XS(_wrap_gsl_complex_add_imag)3391 XS(_wrap_gsl_complex_add_imag) {
3392 {
3393 gsl_complex arg1 ;
3394 double arg2 ;
3395 void *argp1 ;
3396 int res1 = 0 ;
3397 double val2 ;
3398 int ecode2 = 0 ;
3399 int argvi = 0;
3400 gsl_complex result;
3401 dXSARGS;
3402
3403 if ((items < 2) || (items > 2)) {
3404 SWIG_croak("Usage: gsl_complex_add_imag(a,y);");
3405 }
3406 {
3407 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3408 if (!SWIG_IsOK(res1)) {
3409 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_add_imag" "', argument " "1"" of type '" "gsl_complex""'");
3410 }
3411 if (!argp1) {
3412 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_add_imag" "', argument " "1"" of type '" "gsl_complex""'");
3413 } else {
3414 arg1 = *((gsl_complex *)(argp1));
3415 }
3416 }
3417 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3418 if (!SWIG_IsOK(ecode2)) {
3419 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_add_imag" "', argument " "2"" of type '" "double""'");
3420 }
3421 arg2 = (double)(val2);
3422 result = gsl_complex_add_imag(arg1,arg2);
3423 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3424
3425 XSRETURN(argvi);
3426 fail:
3427
3428 SWIG_croak_null();
3429 }
3430 }
3431
3432
XS(_wrap_gsl_complex_sub_imag)3433 XS(_wrap_gsl_complex_sub_imag) {
3434 {
3435 gsl_complex arg1 ;
3436 double arg2 ;
3437 void *argp1 ;
3438 int res1 = 0 ;
3439 double val2 ;
3440 int ecode2 = 0 ;
3441 int argvi = 0;
3442 gsl_complex result;
3443 dXSARGS;
3444
3445 if ((items < 2) || (items > 2)) {
3446 SWIG_croak("Usage: gsl_complex_sub_imag(a,y);");
3447 }
3448 {
3449 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3450 if (!SWIG_IsOK(res1)) {
3451 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_sub_imag" "', argument " "1"" of type '" "gsl_complex""'");
3452 }
3453 if (!argp1) {
3454 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_sub_imag" "', argument " "1"" of type '" "gsl_complex""'");
3455 } else {
3456 arg1 = *((gsl_complex *)(argp1));
3457 }
3458 }
3459 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3460 if (!SWIG_IsOK(ecode2)) {
3461 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_sub_imag" "', argument " "2"" of type '" "double""'");
3462 }
3463 arg2 = (double)(val2);
3464 result = gsl_complex_sub_imag(arg1,arg2);
3465 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3466
3467 XSRETURN(argvi);
3468 fail:
3469
3470 SWIG_croak_null();
3471 }
3472 }
3473
3474
XS(_wrap_gsl_complex_mul_imag)3475 XS(_wrap_gsl_complex_mul_imag) {
3476 {
3477 gsl_complex arg1 ;
3478 double arg2 ;
3479 void *argp1 ;
3480 int res1 = 0 ;
3481 double val2 ;
3482 int ecode2 = 0 ;
3483 int argvi = 0;
3484 gsl_complex result;
3485 dXSARGS;
3486
3487 if ((items < 2) || (items > 2)) {
3488 SWIG_croak("Usage: gsl_complex_mul_imag(a,y);");
3489 }
3490 {
3491 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3492 if (!SWIG_IsOK(res1)) {
3493 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_mul_imag" "', argument " "1"" of type '" "gsl_complex""'");
3494 }
3495 if (!argp1) {
3496 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_mul_imag" "', argument " "1"" of type '" "gsl_complex""'");
3497 } else {
3498 arg1 = *((gsl_complex *)(argp1));
3499 }
3500 }
3501 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3502 if (!SWIG_IsOK(ecode2)) {
3503 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_mul_imag" "', argument " "2"" of type '" "double""'");
3504 }
3505 arg2 = (double)(val2);
3506 result = gsl_complex_mul_imag(arg1,arg2);
3507 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3508
3509 XSRETURN(argvi);
3510 fail:
3511
3512 SWIG_croak_null();
3513 }
3514 }
3515
3516
XS(_wrap_gsl_complex_div_imag)3517 XS(_wrap_gsl_complex_div_imag) {
3518 {
3519 gsl_complex arg1 ;
3520 double arg2 ;
3521 void *argp1 ;
3522 int res1 = 0 ;
3523 double val2 ;
3524 int ecode2 = 0 ;
3525 int argvi = 0;
3526 gsl_complex result;
3527 dXSARGS;
3528
3529 if ((items < 2) || (items > 2)) {
3530 SWIG_croak("Usage: gsl_complex_div_imag(a,y);");
3531 }
3532 {
3533 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3534 if (!SWIG_IsOK(res1)) {
3535 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_div_imag" "', argument " "1"" of type '" "gsl_complex""'");
3536 }
3537 if (!argp1) {
3538 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_div_imag" "', argument " "1"" of type '" "gsl_complex""'");
3539 } else {
3540 arg1 = *((gsl_complex *)(argp1));
3541 }
3542 }
3543 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3544 if (!SWIG_IsOK(ecode2)) {
3545 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_div_imag" "', argument " "2"" of type '" "double""'");
3546 }
3547 arg2 = (double)(val2);
3548 result = gsl_complex_div_imag(arg1,arg2);
3549 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3550
3551 XSRETURN(argvi);
3552 fail:
3553
3554 SWIG_croak_null();
3555 }
3556 }
3557
3558
XS(_wrap_gsl_complex_conjugate)3559 XS(_wrap_gsl_complex_conjugate) {
3560 {
3561 gsl_complex arg1 ;
3562 void *argp1 ;
3563 int res1 = 0 ;
3564 int argvi = 0;
3565 gsl_complex result;
3566 dXSARGS;
3567
3568 if ((items < 1) || (items > 1)) {
3569 SWIG_croak("Usage: gsl_complex_conjugate(z);");
3570 }
3571 {
3572 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3573 if (!SWIG_IsOK(res1)) {
3574 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_conjugate" "', argument " "1"" of type '" "gsl_complex""'");
3575 }
3576 if (!argp1) {
3577 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_conjugate" "', argument " "1"" of type '" "gsl_complex""'");
3578 } else {
3579 arg1 = *((gsl_complex *)(argp1));
3580 }
3581 }
3582 result = gsl_complex_conjugate(arg1);
3583 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3584 XSRETURN(argvi);
3585 fail:
3586 SWIG_croak_null();
3587 }
3588 }
3589
3590
XS(_wrap_gsl_complex_inverse)3591 XS(_wrap_gsl_complex_inverse) {
3592 {
3593 gsl_complex arg1 ;
3594 void *argp1 ;
3595 int res1 = 0 ;
3596 int argvi = 0;
3597 gsl_complex result;
3598 dXSARGS;
3599
3600 if ((items < 1) || (items > 1)) {
3601 SWIG_croak("Usage: gsl_complex_inverse(a);");
3602 }
3603 {
3604 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3605 if (!SWIG_IsOK(res1)) {
3606 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_inverse" "', argument " "1"" of type '" "gsl_complex""'");
3607 }
3608 if (!argp1) {
3609 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_inverse" "', argument " "1"" of type '" "gsl_complex""'");
3610 } else {
3611 arg1 = *((gsl_complex *)(argp1));
3612 }
3613 }
3614 result = gsl_complex_inverse(arg1);
3615 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3616 XSRETURN(argvi);
3617 fail:
3618 SWIG_croak_null();
3619 }
3620 }
3621
3622
XS(_wrap_gsl_complex_negative)3623 XS(_wrap_gsl_complex_negative) {
3624 {
3625 gsl_complex arg1 ;
3626 void *argp1 ;
3627 int res1 = 0 ;
3628 int argvi = 0;
3629 gsl_complex result;
3630 dXSARGS;
3631
3632 if ((items < 1) || (items > 1)) {
3633 SWIG_croak("Usage: gsl_complex_negative(a);");
3634 }
3635 {
3636 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3637 if (!SWIG_IsOK(res1)) {
3638 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_negative" "', argument " "1"" of type '" "gsl_complex""'");
3639 }
3640 if (!argp1) {
3641 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_negative" "', argument " "1"" of type '" "gsl_complex""'");
3642 } else {
3643 arg1 = *((gsl_complex *)(argp1));
3644 }
3645 }
3646 result = gsl_complex_negative(arg1);
3647 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3648 XSRETURN(argvi);
3649 fail:
3650 SWIG_croak_null();
3651 }
3652 }
3653
3654
XS(_wrap_gsl_complex_sqrt)3655 XS(_wrap_gsl_complex_sqrt) {
3656 {
3657 gsl_complex arg1 ;
3658 void *argp1 ;
3659 int res1 = 0 ;
3660 int argvi = 0;
3661 gsl_complex result;
3662 dXSARGS;
3663
3664 if ((items < 1) || (items > 1)) {
3665 SWIG_croak("Usage: gsl_complex_sqrt(z);");
3666 }
3667 {
3668 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3669 if (!SWIG_IsOK(res1)) {
3670 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_sqrt" "', argument " "1"" of type '" "gsl_complex""'");
3671 }
3672 if (!argp1) {
3673 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_sqrt" "', argument " "1"" of type '" "gsl_complex""'");
3674 } else {
3675 arg1 = *((gsl_complex *)(argp1));
3676 }
3677 }
3678 result = gsl_complex_sqrt(arg1);
3679 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3680 XSRETURN(argvi);
3681 fail:
3682 SWIG_croak_null();
3683 }
3684 }
3685
3686
XS(_wrap_gsl_complex_sqrt_real)3687 XS(_wrap_gsl_complex_sqrt_real) {
3688 {
3689 double arg1 ;
3690 double val1 ;
3691 int ecode1 = 0 ;
3692 int argvi = 0;
3693 gsl_complex result;
3694 dXSARGS;
3695
3696 if ((items < 1) || (items > 1)) {
3697 SWIG_croak("Usage: gsl_complex_sqrt_real(x);");
3698 }
3699 ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
3700 if (!SWIG_IsOK(ecode1)) {
3701 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_complex_sqrt_real" "', argument " "1"" of type '" "double""'");
3702 }
3703 arg1 = (double)(val1);
3704 result = gsl_complex_sqrt_real(arg1);
3705 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3706
3707 XSRETURN(argvi);
3708 fail:
3709
3710 SWIG_croak_null();
3711 }
3712 }
3713
3714
XS(_wrap_gsl_complex_pow)3715 XS(_wrap_gsl_complex_pow) {
3716 {
3717 gsl_complex arg1 ;
3718 gsl_complex arg2 ;
3719 void *argp1 ;
3720 int res1 = 0 ;
3721 void *argp2 ;
3722 int res2 = 0 ;
3723 int argvi = 0;
3724 gsl_complex result;
3725 dXSARGS;
3726
3727 if ((items < 2) || (items > 2)) {
3728 SWIG_croak("Usage: gsl_complex_pow(a,b);");
3729 }
3730 {
3731 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3732 if (!SWIG_IsOK(res1)) {
3733 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_pow" "', argument " "1"" of type '" "gsl_complex""'");
3734 }
3735 if (!argp1) {
3736 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_pow" "', argument " "1"" of type '" "gsl_complex""'");
3737 } else {
3738 arg1 = *((gsl_complex *)(argp1));
3739 }
3740 }
3741 {
3742 res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_gsl_complex, 0 );
3743 if (!SWIG_IsOK(res2)) {
3744 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_complex_pow" "', argument " "2"" of type '" "gsl_complex""'");
3745 }
3746 if (!argp2) {
3747 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_pow" "', argument " "2"" of type '" "gsl_complex""'");
3748 } else {
3749 arg2 = *((gsl_complex *)(argp2));
3750 }
3751 }
3752 result = gsl_complex_pow(arg1,arg2);
3753 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3754 XSRETURN(argvi);
3755 fail:
3756 SWIG_croak_null();
3757 }
3758 }
3759
3760
XS(_wrap_gsl_complex_pow_real)3761 XS(_wrap_gsl_complex_pow_real) {
3762 {
3763 gsl_complex arg1 ;
3764 double arg2 ;
3765 void *argp1 ;
3766 int res1 = 0 ;
3767 double val2 ;
3768 int ecode2 = 0 ;
3769 int argvi = 0;
3770 gsl_complex result;
3771 dXSARGS;
3772
3773 if ((items < 2) || (items > 2)) {
3774 SWIG_croak("Usage: gsl_complex_pow_real(a,b);");
3775 }
3776 {
3777 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3778 if (!SWIG_IsOK(res1)) {
3779 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_pow_real" "', argument " "1"" of type '" "gsl_complex""'");
3780 }
3781 if (!argp1) {
3782 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_pow_real" "', argument " "1"" of type '" "gsl_complex""'");
3783 } else {
3784 arg1 = *((gsl_complex *)(argp1));
3785 }
3786 }
3787 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3788 if (!SWIG_IsOK(ecode2)) {
3789 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_complex_pow_real" "', argument " "2"" of type '" "double""'");
3790 }
3791 arg2 = (double)(val2);
3792 result = gsl_complex_pow_real(arg1,arg2);
3793 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3794
3795 XSRETURN(argvi);
3796 fail:
3797
3798 SWIG_croak_null();
3799 }
3800 }
3801
3802
XS(_wrap_gsl_complex_exp)3803 XS(_wrap_gsl_complex_exp) {
3804 {
3805 gsl_complex arg1 ;
3806 void *argp1 ;
3807 int res1 = 0 ;
3808 int argvi = 0;
3809 gsl_complex result;
3810 dXSARGS;
3811
3812 if ((items < 1) || (items > 1)) {
3813 SWIG_croak("Usage: gsl_complex_exp(a);");
3814 }
3815 {
3816 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3817 if (!SWIG_IsOK(res1)) {
3818 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_exp" "', argument " "1"" of type '" "gsl_complex""'");
3819 }
3820 if (!argp1) {
3821 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_exp" "', argument " "1"" of type '" "gsl_complex""'");
3822 } else {
3823 arg1 = *((gsl_complex *)(argp1));
3824 }
3825 }
3826 result = gsl_complex_exp(arg1);
3827 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3828 XSRETURN(argvi);
3829 fail:
3830 SWIG_croak_null();
3831 }
3832 }
3833
3834
XS(_wrap_gsl_complex_log)3835 XS(_wrap_gsl_complex_log) {
3836 {
3837 gsl_complex arg1 ;
3838 void *argp1 ;
3839 int res1 = 0 ;
3840 int argvi = 0;
3841 gsl_complex result;
3842 dXSARGS;
3843
3844 if ((items < 1) || (items > 1)) {
3845 SWIG_croak("Usage: gsl_complex_log(a);");
3846 }
3847 {
3848 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3849 if (!SWIG_IsOK(res1)) {
3850 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_log" "', argument " "1"" of type '" "gsl_complex""'");
3851 }
3852 if (!argp1) {
3853 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_log" "', argument " "1"" of type '" "gsl_complex""'");
3854 } else {
3855 arg1 = *((gsl_complex *)(argp1));
3856 }
3857 }
3858 result = gsl_complex_log(arg1);
3859 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3860 XSRETURN(argvi);
3861 fail:
3862 SWIG_croak_null();
3863 }
3864 }
3865
3866
XS(_wrap_gsl_complex_log10)3867 XS(_wrap_gsl_complex_log10) {
3868 {
3869 gsl_complex arg1 ;
3870 void *argp1 ;
3871 int res1 = 0 ;
3872 int argvi = 0;
3873 gsl_complex result;
3874 dXSARGS;
3875
3876 if ((items < 1) || (items > 1)) {
3877 SWIG_croak("Usage: gsl_complex_log10(a);");
3878 }
3879 {
3880 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3881 if (!SWIG_IsOK(res1)) {
3882 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_log10" "', argument " "1"" of type '" "gsl_complex""'");
3883 }
3884 if (!argp1) {
3885 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_log10" "', argument " "1"" of type '" "gsl_complex""'");
3886 } else {
3887 arg1 = *((gsl_complex *)(argp1));
3888 }
3889 }
3890 result = gsl_complex_log10(arg1);
3891 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3892 XSRETURN(argvi);
3893 fail:
3894 SWIG_croak_null();
3895 }
3896 }
3897
3898
XS(_wrap_gsl_complex_log_b)3899 XS(_wrap_gsl_complex_log_b) {
3900 {
3901 gsl_complex arg1 ;
3902 gsl_complex arg2 ;
3903 void *argp1 ;
3904 int res1 = 0 ;
3905 void *argp2 ;
3906 int res2 = 0 ;
3907 int argvi = 0;
3908 gsl_complex result;
3909 dXSARGS;
3910
3911 if ((items < 2) || (items > 2)) {
3912 SWIG_croak("Usage: gsl_complex_log_b(a,b);");
3913 }
3914 {
3915 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3916 if (!SWIG_IsOK(res1)) {
3917 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_log_b" "', argument " "1"" of type '" "gsl_complex""'");
3918 }
3919 if (!argp1) {
3920 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_log_b" "', argument " "1"" of type '" "gsl_complex""'");
3921 } else {
3922 arg1 = *((gsl_complex *)(argp1));
3923 }
3924 }
3925 {
3926 res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_gsl_complex, 0 );
3927 if (!SWIG_IsOK(res2)) {
3928 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_complex_log_b" "', argument " "2"" of type '" "gsl_complex""'");
3929 }
3930 if (!argp2) {
3931 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_log_b" "', argument " "2"" of type '" "gsl_complex""'");
3932 } else {
3933 arg2 = *((gsl_complex *)(argp2));
3934 }
3935 }
3936 result = gsl_complex_log_b(arg1,arg2);
3937 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3938 XSRETURN(argvi);
3939 fail:
3940 SWIG_croak_null();
3941 }
3942 }
3943
3944
XS(_wrap_gsl_complex_sin)3945 XS(_wrap_gsl_complex_sin) {
3946 {
3947 gsl_complex arg1 ;
3948 void *argp1 ;
3949 int res1 = 0 ;
3950 int argvi = 0;
3951 gsl_complex result;
3952 dXSARGS;
3953
3954 if ((items < 1) || (items > 1)) {
3955 SWIG_croak("Usage: gsl_complex_sin(a);");
3956 }
3957 {
3958 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3959 if (!SWIG_IsOK(res1)) {
3960 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_sin" "', argument " "1"" of type '" "gsl_complex""'");
3961 }
3962 if (!argp1) {
3963 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_sin" "', argument " "1"" of type '" "gsl_complex""'");
3964 } else {
3965 arg1 = *((gsl_complex *)(argp1));
3966 }
3967 }
3968 result = gsl_complex_sin(arg1);
3969 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3970 XSRETURN(argvi);
3971 fail:
3972 SWIG_croak_null();
3973 }
3974 }
3975
3976
XS(_wrap_gsl_complex_cos)3977 XS(_wrap_gsl_complex_cos) {
3978 {
3979 gsl_complex arg1 ;
3980 void *argp1 ;
3981 int res1 = 0 ;
3982 int argvi = 0;
3983 gsl_complex result;
3984 dXSARGS;
3985
3986 if ((items < 1) || (items > 1)) {
3987 SWIG_croak("Usage: gsl_complex_cos(a);");
3988 }
3989 {
3990 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
3991 if (!SWIG_IsOK(res1)) {
3992 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_cos" "', argument " "1"" of type '" "gsl_complex""'");
3993 }
3994 if (!argp1) {
3995 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_cos" "', argument " "1"" of type '" "gsl_complex""'");
3996 } else {
3997 arg1 = *((gsl_complex *)(argp1));
3998 }
3999 }
4000 result = gsl_complex_cos(arg1);
4001 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4002 XSRETURN(argvi);
4003 fail:
4004 SWIG_croak_null();
4005 }
4006 }
4007
4008
XS(_wrap_gsl_complex_sec)4009 XS(_wrap_gsl_complex_sec) {
4010 {
4011 gsl_complex arg1 ;
4012 void *argp1 ;
4013 int res1 = 0 ;
4014 int argvi = 0;
4015 gsl_complex result;
4016 dXSARGS;
4017
4018 if ((items < 1) || (items > 1)) {
4019 SWIG_croak("Usage: gsl_complex_sec(a);");
4020 }
4021 {
4022 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4023 if (!SWIG_IsOK(res1)) {
4024 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_sec" "', argument " "1"" of type '" "gsl_complex""'");
4025 }
4026 if (!argp1) {
4027 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_sec" "', argument " "1"" of type '" "gsl_complex""'");
4028 } else {
4029 arg1 = *((gsl_complex *)(argp1));
4030 }
4031 }
4032 result = gsl_complex_sec(arg1);
4033 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4034 XSRETURN(argvi);
4035 fail:
4036 SWIG_croak_null();
4037 }
4038 }
4039
4040
XS(_wrap_gsl_complex_csc)4041 XS(_wrap_gsl_complex_csc) {
4042 {
4043 gsl_complex arg1 ;
4044 void *argp1 ;
4045 int res1 = 0 ;
4046 int argvi = 0;
4047 gsl_complex result;
4048 dXSARGS;
4049
4050 if ((items < 1) || (items > 1)) {
4051 SWIG_croak("Usage: gsl_complex_csc(a);");
4052 }
4053 {
4054 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4055 if (!SWIG_IsOK(res1)) {
4056 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_csc" "', argument " "1"" of type '" "gsl_complex""'");
4057 }
4058 if (!argp1) {
4059 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_csc" "', argument " "1"" of type '" "gsl_complex""'");
4060 } else {
4061 arg1 = *((gsl_complex *)(argp1));
4062 }
4063 }
4064 result = gsl_complex_csc(arg1);
4065 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4066 XSRETURN(argvi);
4067 fail:
4068 SWIG_croak_null();
4069 }
4070 }
4071
4072
XS(_wrap_gsl_complex_tan)4073 XS(_wrap_gsl_complex_tan) {
4074 {
4075 gsl_complex arg1 ;
4076 void *argp1 ;
4077 int res1 = 0 ;
4078 int argvi = 0;
4079 gsl_complex result;
4080 dXSARGS;
4081
4082 if ((items < 1) || (items > 1)) {
4083 SWIG_croak("Usage: gsl_complex_tan(a);");
4084 }
4085 {
4086 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4087 if (!SWIG_IsOK(res1)) {
4088 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_tan" "', argument " "1"" of type '" "gsl_complex""'");
4089 }
4090 if (!argp1) {
4091 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_tan" "', argument " "1"" of type '" "gsl_complex""'");
4092 } else {
4093 arg1 = *((gsl_complex *)(argp1));
4094 }
4095 }
4096 result = gsl_complex_tan(arg1);
4097 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4098 XSRETURN(argvi);
4099 fail:
4100 SWIG_croak_null();
4101 }
4102 }
4103
4104
XS(_wrap_gsl_complex_cot)4105 XS(_wrap_gsl_complex_cot) {
4106 {
4107 gsl_complex arg1 ;
4108 void *argp1 ;
4109 int res1 = 0 ;
4110 int argvi = 0;
4111 gsl_complex result;
4112 dXSARGS;
4113
4114 if ((items < 1) || (items > 1)) {
4115 SWIG_croak("Usage: gsl_complex_cot(a);");
4116 }
4117 {
4118 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4119 if (!SWIG_IsOK(res1)) {
4120 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_cot" "', argument " "1"" of type '" "gsl_complex""'");
4121 }
4122 if (!argp1) {
4123 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_cot" "', argument " "1"" of type '" "gsl_complex""'");
4124 } else {
4125 arg1 = *((gsl_complex *)(argp1));
4126 }
4127 }
4128 result = gsl_complex_cot(arg1);
4129 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4130 XSRETURN(argvi);
4131 fail:
4132 SWIG_croak_null();
4133 }
4134 }
4135
4136
XS(_wrap_gsl_complex_arcsin)4137 XS(_wrap_gsl_complex_arcsin) {
4138 {
4139 gsl_complex arg1 ;
4140 void *argp1 ;
4141 int res1 = 0 ;
4142 int argvi = 0;
4143 gsl_complex result;
4144 dXSARGS;
4145
4146 if ((items < 1) || (items > 1)) {
4147 SWIG_croak("Usage: gsl_complex_arcsin(a);");
4148 }
4149 {
4150 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4151 if (!SWIG_IsOK(res1)) {
4152 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arcsin" "', argument " "1"" of type '" "gsl_complex""'");
4153 }
4154 if (!argp1) {
4155 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arcsin" "', argument " "1"" of type '" "gsl_complex""'");
4156 } else {
4157 arg1 = *((gsl_complex *)(argp1));
4158 }
4159 }
4160 result = gsl_complex_arcsin(arg1);
4161 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4162 XSRETURN(argvi);
4163 fail:
4164 SWIG_croak_null();
4165 }
4166 }
4167
4168
XS(_wrap_gsl_complex_arcsin_real)4169 XS(_wrap_gsl_complex_arcsin_real) {
4170 {
4171 double arg1 ;
4172 double val1 ;
4173 int ecode1 = 0 ;
4174 int argvi = 0;
4175 gsl_complex result;
4176 dXSARGS;
4177
4178 if ((items < 1) || (items > 1)) {
4179 SWIG_croak("Usage: gsl_complex_arcsin_real(a);");
4180 }
4181 ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
4182 if (!SWIG_IsOK(ecode1)) {
4183 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_complex_arcsin_real" "', argument " "1"" of type '" "double""'");
4184 }
4185 arg1 = (double)(val1);
4186 result = gsl_complex_arcsin_real(arg1);
4187 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4188
4189 XSRETURN(argvi);
4190 fail:
4191
4192 SWIG_croak_null();
4193 }
4194 }
4195
4196
XS(_wrap_gsl_complex_arccos)4197 XS(_wrap_gsl_complex_arccos) {
4198 {
4199 gsl_complex arg1 ;
4200 void *argp1 ;
4201 int res1 = 0 ;
4202 int argvi = 0;
4203 gsl_complex result;
4204 dXSARGS;
4205
4206 if ((items < 1) || (items > 1)) {
4207 SWIG_croak("Usage: gsl_complex_arccos(a);");
4208 }
4209 {
4210 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4211 if (!SWIG_IsOK(res1)) {
4212 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arccos" "', argument " "1"" of type '" "gsl_complex""'");
4213 }
4214 if (!argp1) {
4215 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arccos" "', argument " "1"" of type '" "gsl_complex""'");
4216 } else {
4217 arg1 = *((gsl_complex *)(argp1));
4218 }
4219 }
4220 result = gsl_complex_arccos(arg1);
4221 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4222 XSRETURN(argvi);
4223 fail:
4224 SWIG_croak_null();
4225 }
4226 }
4227
4228
XS(_wrap_gsl_complex_arccos_real)4229 XS(_wrap_gsl_complex_arccos_real) {
4230 {
4231 double arg1 ;
4232 double val1 ;
4233 int ecode1 = 0 ;
4234 int argvi = 0;
4235 gsl_complex result;
4236 dXSARGS;
4237
4238 if ((items < 1) || (items > 1)) {
4239 SWIG_croak("Usage: gsl_complex_arccos_real(a);");
4240 }
4241 ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
4242 if (!SWIG_IsOK(ecode1)) {
4243 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_complex_arccos_real" "', argument " "1"" of type '" "double""'");
4244 }
4245 arg1 = (double)(val1);
4246 result = gsl_complex_arccos_real(arg1);
4247 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4248
4249 XSRETURN(argvi);
4250 fail:
4251
4252 SWIG_croak_null();
4253 }
4254 }
4255
4256
XS(_wrap_gsl_complex_arcsec)4257 XS(_wrap_gsl_complex_arcsec) {
4258 {
4259 gsl_complex arg1 ;
4260 void *argp1 ;
4261 int res1 = 0 ;
4262 int argvi = 0;
4263 gsl_complex result;
4264 dXSARGS;
4265
4266 if ((items < 1) || (items > 1)) {
4267 SWIG_croak("Usage: gsl_complex_arcsec(a);");
4268 }
4269 {
4270 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4271 if (!SWIG_IsOK(res1)) {
4272 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arcsec" "', argument " "1"" of type '" "gsl_complex""'");
4273 }
4274 if (!argp1) {
4275 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arcsec" "', argument " "1"" of type '" "gsl_complex""'");
4276 } else {
4277 arg1 = *((gsl_complex *)(argp1));
4278 }
4279 }
4280 result = gsl_complex_arcsec(arg1);
4281 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4282 XSRETURN(argvi);
4283 fail:
4284 SWIG_croak_null();
4285 }
4286 }
4287
4288
XS(_wrap_gsl_complex_arcsec_real)4289 XS(_wrap_gsl_complex_arcsec_real) {
4290 {
4291 double arg1 ;
4292 double val1 ;
4293 int ecode1 = 0 ;
4294 int argvi = 0;
4295 gsl_complex result;
4296 dXSARGS;
4297
4298 if ((items < 1) || (items > 1)) {
4299 SWIG_croak("Usage: gsl_complex_arcsec_real(a);");
4300 }
4301 ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
4302 if (!SWIG_IsOK(ecode1)) {
4303 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_complex_arcsec_real" "', argument " "1"" of type '" "double""'");
4304 }
4305 arg1 = (double)(val1);
4306 result = gsl_complex_arcsec_real(arg1);
4307 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4308
4309 XSRETURN(argvi);
4310 fail:
4311
4312 SWIG_croak_null();
4313 }
4314 }
4315
4316
XS(_wrap_gsl_complex_arccsc)4317 XS(_wrap_gsl_complex_arccsc) {
4318 {
4319 gsl_complex arg1 ;
4320 void *argp1 ;
4321 int res1 = 0 ;
4322 int argvi = 0;
4323 gsl_complex result;
4324 dXSARGS;
4325
4326 if ((items < 1) || (items > 1)) {
4327 SWIG_croak("Usage: gsl_complex_arccsc(a);");
4328 }
4329 {
4330 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4331 if (!SWIG_IsOK(res1)) {
4332 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arccsc" "', argument " "1"" of type '" "gsl_complex""'");
4333 }
4334 if (!argp1) {
4335 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arccsc" "', argument " "1"" of type '" "gsl_complex""'");
4336 } else {
4337 arg1 = *((gsl_complex *)(argp1));
4338 }
4339 }
4340 result = gsl_complex_arccsc(arg1);
4341 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4342 XSRETURN(argvi);
4343 fail:
4344 SWIG_croak_null();
4345 }
4346 }
4347
4348
XS(_wrap_gsl_complex_arccsc_real)4349 XS(_wrap_gsl_complex_arccsc_real) {
4350 {
4351 double arg1 ;
4352 double val1 ;
4353 int ecode1 = 0 ;
4354 int argvi = 0;
4355 gsl_complex result;
4356 dXSARGS;
4357
4358 if ((items < 1) || (items > 1)) {
4359 SWIG_croak("Usage: gsl_complex_arccsc_real(a);");
4360 }
4361 ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
4362 if (!SWIG_IsOK(ecode1)) {
4363 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_complex_arccsc_real" "', argument " "1"" of type '" "double""'");
4364 }
4365 arg1 = (double)(val1);
4366 result = gsl_complex_arccsc_real(arg1);
4367 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4368
4369 XSRETURN(argvi);
4370 fail:
4371
4372 SWIG_croak_null();
4373 }
4374 }
4375
4376
XS(_wrap_gsl_complex_arctan)4377 XS(_wrap_gsl_complex_arctan) {
4378 {
4379 gsl_complex arg1 ;
4380 void *argp1 ;
4381 int res1 = 0 ;
4382 int argvi = 0;
4383 gsl_complex result;
4384 dXSARGS;
4385
4386 if ((items < 1) || (items > 1)) {
4387 SWIG_croak("Usage: gsl_complex_arctan(a);");
4388 }
4389 {
4390 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4391 if (!SWIG_IsOK(res1)) {
4392 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arctan" "', argument " "1"" of type '" "gsl_complex""'");
4393 }
4394 if (!argp1) {
4395 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arctan" "', argument " "1"" of type '" "gsl_complex""'");
4396 } else {
4397 arg1 = *((gsl_complex *)(argp1));
4398 }
4399 }
4400 result = gsl_complex_arctan(arg1);
4401 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4402 XSRETURN(argvi);
4403 fail:
4404 SWIG_croak_null();
4405 }
4406 }
4407
4408
XS(_wrap_gsl_complex_arccot)4409 XS(_wrap_gsl_complex_arccot) {
4410 {
4411 gsl_complex arg1 ;
4412 void *argp1 ;
4413 int res1 = 0 ;
4414 int argvi = 0;
4415 gsl_complex result;
4416 dXSARGS;
4417
4418 if ((items < 1) || (items > 1)) {
4419 SWIG_croak("Usage: gsl_complex_arccot(a);");
4420 }
4421 {
4422 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4423 if (!SWIG_IsOK(res1)) {
4424 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arccot" "', argument " "1"" of type '" "gsl_complex""'");
4425 }
4426 if (!argp1) {
4427 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arccot" "', argument " "1"" of type '" "gsl_complex""'");
4428 } else {
4429 arg1 = *((gsl_complex *)(argp1));
4430 }
4431 }
4432 result = gsl_complex_arccot(arg1);
4433 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4434 XSRETURN(argvi);
4435 fail:
4436 SWIG_croak_null();
4437 }
4438 }
4439
4440
XS(_wrap_gsl_complex_sinh)4441 XS(_wrap_gsl_complex_sinh) {
4442 {
4443 gsl_complex arg1 ;
4444 void *argp1 ;
4445 int res1 = 0 ;
4446 int argvi = 0;
4447 gsl_complex result;
4448 dXSARGS;
4449
4450 if ((items < 1) || (items > 1)) {
4451 SWIG_croak("Usage: gsl_complex_sinh(a);");
4452 }
4453 {
4454 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4455 if (!SWIG_IsOK(res1)) {
4456 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_sinh" "', argument " "1"" of type '" "gsl_complex""'");
4457 }
4458 if (!argp1) {
4459 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_sinh" "', argument " "1"" of type '" "gsl_complex""'");
4460 } else {
4461 arg1 = *((gsl_complex *)(argp1));
4462 }
4463 }
4464 result = gsl_complex_sinh(arg1);
4465 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4466 XSRETURN(argvi);
4467 fail:
4468 SWIG_croak_null();
4469 }
4470 }
4471
4472
XS(_wrap_gsl_complex_cosh)4473 XS(_wrap_gsl_complex_cosh) {
4474 {
4475 gsl_complex arg1 ;
4476 void *argp1 ;
4477 int res1 = 0 ;
4478 int argvi = 0;
4479 gsl_complex result;
4480 dXSARGS;
4481
4482 if ((items < 1) || (items > 1)) {
4483 SWIG_croak("Usage: gsl_complex_cosh(a);");
4484 }
4485 {
4486 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4487 if (!SWIG_IsOK(res1)) {
4488 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_cosh" "', argument " "1"" of type '" "gsl_complex""'");
4489 }
4490 if (!argp1) {
4491 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_cosh" "', argument " "1"" of type '" "gsl_complex""'");
4492 } else {
4493 arg1 = *((gsl_complex *)(argp1));
4494 }
4495 }
4496 result = gsl_complex_cosh(arg1);
4497 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4498 XSRETURN(argvi);
4499 fail:
4500 SWIG_croak_null();
4501 }
4502 }
4503
4504
XS(_wrap_gsl_complex_sech)4505 XS(_wrap_gsl_complex_sech) {
4506 {
4507 gsl_complex arg1 ;
4508 void *argp1 ;
4509 int res1 = 0 ;
4510 int argvi = 0;
4511 gsl_complex result;
4512 dXSARGS;
4513
4514 if ((items < 1) || (items > 1)) {
4515 SWIG_croak("Usage: gsl_complex_sech(a);");
4516 }
4517 {
4518 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4519 if (!SWIG_IsOK(res1)) {
4520 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_sech" "', argument " "1"" of type '" "gsl_complex""'");
4521 }
4522 if (!argp1) {
4523 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_sech" "', argument " "1"" of type '" "gsl_complex""'");
4524 } else {
4525 arg1 = *((gsl_complex *)(argp1));
4526 }
4527 }
4528 result = gsl_complex_sech(arg1);
4529 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4530 XSRETURN(argvi);
4531 fail:
4532 SWIG_croak_null();
4533 }
4534 }
4535
4536
XS(_wrap_gsl_complex_csch)4537 XS(_wrap_gsl_complex_csch) {
4538 {
4539 gsl_complex arg1 ;
4540 void *argp1 ;
4541 int res1 = 0 ;
4542 int argvi = 0;
4543 gsl_complex result;
4544 dXSARGS;
4545
4546 if ((items < 1) || (items > 1)) {
4547 SWIG_croak("Usage: gsl_complex_csch(a);");
4548 }
4549 {
4550 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4551 if (!SWIG_IsOK(res1)) {
4552 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_csch" "', argument " "1"" of type '" "gsl_complex""'");
4553 }
4554 if (!argp1) {
4555 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_csch" "', argument " "1"" of type '" "gsl_complex""'");
4556 } else {
4557 arg1 = *((gsl_complex *)(argp1));
4558 }
4559 }
4560 result = gsl_complex_csch(arg1);
4561 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4562 XSRETURN(argvi);
4563 fail:
4564 SWIG_croak_null();
4565 }
4566 }
4567
4568
XS(_wrap_gsl_complex_tanh)4569 XS(_wrap_gsl_complex_tanh) {
4570 {
4571 gsl_complex arg1 ;
4572 void *argp1 ;
4573 int res1 = 0 ;
4574 int argvi = 0;
4575 gsl_complex result;
4576 dXSARGS;
4577
4578 if ((items < 1) || (items > 1)) {
4579 SWIG_croak("Usage: gsl_complex_tanh(a);");
4580 }
4581 {
4582 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4583 if (!SWIG_IsOK(res1)) {
4584 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_tanh" "', argument " "1"" of type '" "gsl_complex""'");
4585 }
4586 if (!argp1) {
4587 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_tanh" "', argument " "1"" of type '" "gsl_complex""'");
4588 } else {
4589 arg1 = *((gsl_complex *)(argp1));
4590 }
4591 }
4592 result = gsl_complex_tanh(arg1);
4593 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4594 XSRETURN(argvi);
4595 fail:
4596 SWIG_croak_null();
4597 }
4598 }
4599
4600
XS(_wrap_gsl_complex_coth)4601 XS(_wrap_gsl_complex_coth) {
4602 {
4603 gsl_complex arg1 ;
4604 void *argp1 ;
4605 int res1 = 0 ;
4606 int argvi = 0;
4607 gsl_complex result;
4608 dXSARGS;
4609
4610 if ((items < 1) || (items > 1)) {
4611 SWIG_croak("Usage: gsl_complex_coth(a);");
4612 }
4613 {
4614 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4615 if (!SWIG_IsOK(res1)) {
4616 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_coth" "', argument " "1"" of type '" "gsl_complex""'");
4617 }
4618 if (!argp1) {
4619 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_coth" "', argument " "1"" of type '" "gsl_complex""'");
4620 } else {
4621 arg1 = *((gsl_complex *)(argp1));
4622 }
4623 }
4624 result = gsl_complex_coth(arg1);
4625 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4626 XSRETURN(argvi);
4627 fail:
4628 SWIG_croak_null();
4629 }
4630 }
4631
4632
XS(_wrap_gsl_complex_arcsinh)4633 XS(_wrap_gsl_complex_arcsinh) {
4634 {
4635 gsl_complex arg1 ;
4636 void *argp1 ;
4637 int res1 = 0 ;
4638 int argvi = 0;
4639 gsl_complex result;
4640 dXSARGS;
4641
4642 if ((items < 1) || (items > 1)) {
4643 SWIG_croak("Usage: gsl_complex_arcsinh(a);");
4644 }
4645 {
4646 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4647 if (!SWIG_IsOK(res1)) {
4648 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arcsinh" "', argument " "1"" of type '" "gsl_complex""'");
4649 }
4650 if (!argp1) {
4651 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arcsinh" "', argument " "1"" of type '" "gsl_complex""'");
4652 } else {
4653 arg1 = *((gsl_complex *)(argp1));
4654 }
4655 }
4656 result = gsl_complex_arcsinh(arg1);
4657 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4658 XSRETURN(argvi);
4659 fail:
4660 SWIG_croak_null();
4661 }
4662 }
4663
4664
XS(_wrap_gsl_complex_arccosh)4665 XS(_wrap_gsl_complex_arccosh) {
4666 {
4667 gsl_complex arg1 ;
4668 void *argp1 ;
4669 int res1 = 0 ;
4670 int argvi = 0;
4671 gsl_complex result;
4672 dXSARGS;
4673
4674 if ((items < 1) || (items > 1)) {
4675 SWIG_croak("Usage: gsl_complex_arccosh(a);");
4676 }
4677 {
4678 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4679 if (!SWIG_IsOK(res1)) {
4680 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arccosh" "', argument " "1"" of type '" "gsl_complex""'");
4681 }
4682 if (!argp1) {
4683 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arccosh" "', argument " "1"" of type '" "gsl_complex""'");
4684 } else {
4685 arg1 = *((gsl_complex *)(argp1));
4686 }
4687 }
4688 result = gsl_complex_arccosh(arg1);
4689 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4690 XSRETURN(argvi);
4691 fail:
4692 SWIG_croak_null();
4693 }
4694 }
4695
4696
XS(_wrap_gsl_complex_arccosh_real)4697 XS(_wrap_gsl_complex_arccosh_real) {
4698 {
4699 double arg1 ;
4700 double val1 ;
4701 int ecode1 = 0 ;
4702 int argvi = 0;
4703 gsl_complex result;
4704 dXSARGS;
4705
4706 if ((items < 1) || (items > 1)) {
4707 SWIG_croak("Usage: gsl_complex_arccosh_real(a);");
4708 }
4709 ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
4710 if (!SWIG_IsOK(ecode1)) {
4711 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_complex_arccosh_real" "', argument " "1"" of type '" "double""'");
4712 }
4713 arg1 = (double)(val1);
4714 result = gsl_complex_arccosh_real(arg1);
4715 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4716
4717 XSRETURN(argvi);
4718 fail:
4719
4720 SWIG_croak_null();
4721 }
4722 }
4723
4724
XS(_wrap_gsl_complex_arcsech)4725 XS(_wrap_gsl_complex_arcsech) {
4726 {
4727 gsl_complex arg1 ;
4728 void *argp1 ;
4729 int res1 = 0 ;
4730 int argvi = 0;
4731 gsl_complex result;
4732 dXSARGS;
4733
4734 if ((items < 1) || (items > 1)) {
4735 SWIG_croak("Usage: gsl_complex_arcsech(a);");
4736 }
4737 {
4738 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4739 if (!SWIG_IsOK(res1)) {
4740 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arcsech" "', argument " "1"" of type '" "gsl_complex""'");
4741 }
4742 if (!argp1) {
4743 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arcsech" "', argument " "1"" of type '" "gsl_complex""'");
4744 } else {
4745 arg1 = *((gsl_complex *)(argp1));
4746 }
4747 }
4748 result = gsl_complex_arcsech(arg1);
4749 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4750 XSRETURN(argvi);
4751 fail:
4752 SWIG_croak_null();
4753 }
4754 }
4755
4756
XS(_wrap_gsl_complex_arccsch)4757 XS(_wrap_gsl_complex_arccsch) {
4758 {
4759 gsl_complex arg1 ;
4760 void *argp1 ;
4761 int res1 = 0 ;
4762 int argvi = 0;
4763 gsl_complex result;
4764 dXSARGS;
4765
4766 if ((items < 1) || (items > 1)) {
4767 SWIG_croak("Usage: gsl_complex_arccsch(a);");
4768 }
4769 {
4770 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4771 if (!SWIG_IsOK(res1)) {
4772 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arccsch" "', argument " "1"" of type '" "gsl_complex""'");
4773 }
4774 if (!argp1) {
4775 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arccsch" "', argument " "1"" of type '" "gsl_complex""'");
4776 } else {
4777 arg1 = *((gsl_complex *)(argp1));
4778 }
4779 }
4780 result = gsl_complex_arccsch(arg1);
4781 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4782 XSRETURN(argvi);
4783 fail:
4784 SWIG_croak_null();
4785 }
4786 }
4787
4788
XS(_wrap_gsl_complex_arctanh)4789 XS(_wrap_gsl_complex_arctanh) {
4790 {
4791 gsl_complex arg1 ;
4792 void *argp1 ;
4793 int res1 = 0 ;
4794 int argvi = 0;
4795 gsl_complex result;
4796 dXSARGS;
4797
4798 if ((items < 1) || (items > 1)) {
4799 SWIG_croak("Usage: gsl_complex_arctanh(a);");
4800 }
4801 {
4802 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4803 if (!SWIG_IsOK(res1)) {
4804 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arctanh" "', argument " "1"" of type '" "gsl_complex""'");
4805 }
4806 if (!argp1) {
4807 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arctanh" "', argument " "1"" of type '" "gsl_complex""'");
4808 } else {
4809 arg1 = *((gsl_complex *)(argp1));
4810 }
4811 }
4812 result = gsl_complex_arctanh(arg1);
4813 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4814 XSRETURN(argvi);
4815 fail:
4816 SWIG_croak_null();
4817 }
4818 }
4819
4820
XS(_wrap_gsl_complex_arctanh_real)4821 XS(_wrap_gsl_complex_arctanh_real) {
4822 {
4823 double arg1 ;
4824 double val1 ;
4825 int ecode1 = 0 ;
4826 int argvi = 0;
4827 gsl_complex result;
4828 dXSARGS;
4829
4830 if ((items < 1) || (items > 1)) {
4831 SWIG_croak("Usage: gsl_complex_arctanh_real(a);");
4832 }
4833 ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
4834 if (!SWIG_IsOK(ecode1)) {
4835 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_complex_arctanh_real" "', argument " "1"" of type '" "double""'");
4836 }
4837 arg1 = (double)(val1);
4838 result = gsl_complex_arctanh_real(arg1);
4839 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4840
4841 XSRETURN(argvi);
4842 fail:
4843
4844 SWIG_croak_null();
4845 }
4846 }
4847
4848
XS(_wrap_gsl_complex_arccoth)4849 XS(_wrap_gsl_complex_arccoth) {
4850 {
4851 gsl_complex arg1 ;
4852 void *argp1 ;
4853 int res1 = 0 ;
4854 int argvi = 0;
4855 gsl_complex result;
4856 dXSARGS;
4857
4858 if ((items < 1) || (items > 1)) {
4859 SWIG_croak("Usage: gsl_complex_arccoth(a);");
4860 }
4861 {
4862 res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_gsl_complex, 0 );
4863 if (!SWIG_IsOK(res1)) {
4864 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_complex_arccoth" "', argument " "1"" of type '" "gsl_complex""'");
4865 }
4866 if (!argp1) {
4867 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gsl_complex_arccoth" "', argument " "1"" of type '" "gsl_complex""'");
4868 } else {
4869 arg1 = *((gsl_complex *)(argp1));
4870 }
4871 }
4872 result = gsl_complex_arccoth(arg1);
4873 ST(argvi) = SWIG_NewPointerObj((gsl_complex *)memcpy((gsl_complex *)calloc(1,sizeof(gsl_complex)),&result,sizeof(gsl_complex)), SWIGTYPE_p_gsl_complex, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
4874 XSRETURN(argvi);
4875 fail:
4876 SWIG_croak_null();
4877 }
4878 }
4879
4880
XS(_wrap_new_doubleArray)4881 XS(_wrap_new_doubleArray) {
4882 {
4883 size_t arg1 ;
4884 size_t val1 ;
4885 int ecode1 = 0 ;
4886 int argvi = 0;
4887 double *result = 0 ;
4888 dXSARGS;
4889
4890 if ((items < 1) || (items > 1)) {
4891 SWIG_croak("Usage: new_doubleArray(nelements);");
4892 }
4893 ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
4894 if (!SWIG_IsOK(ecode1)) {
4895 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_doubleArray" "', argument " "1"" of type '" "size_t""'");
4896 }
4897 arg1 = (size_t)(val1);
4898 result = (double *)new_doubleArray(arg1);
4899 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0); argvi++ ;
4900
4901 XSRETURN(argvi);
4902 fail:
4903
4904 SWIG_croak_null();
4905 }
4906 }
4907
4908
XS(_wrap_delete_doubleArray)4909 XS(_wrap_delete_doubleArray) {
4910 {
4911 double *arg1 = (double *) 0 ;
4912 void *argp1 = 0 ;
4913 int res1 = 0 ;
4914 int argvi = 0;
4915 dXSARGS;
4916
4917 if ((items < 1) || (items > 1)) {
4918 SWIG_croak("Usage: delete_doubleArray(ary);");
4919 }
4920 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_double, 0 | 0 );
4921 if (!SWIG_IsOK(res1)) {
4922 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_doubleArray" "', argument " "1"" of type '" "double *""'");
4923 }
4924 arg1 = (double *)(argp1);
4925 delete_doubleArray(arg1);
4926 ST(argvi) = &PL_sv_undef;
4927
4928 XSRETURN(argvi);
4929 fail:
4930
4931 SWIG_croak_null();
4932 }
4933 }
4934
4935
XS(_wrap_doubleArray_getitem)4936 XS(_wrap_doubleArray_getitem) {
4937 {
4938 double *arg1 = (double *) 0 ;
4939 size_t arg2 ;
4940 void *argp1 = 0 ;
4941 int res1 = 0 ;
4942 size_t val2 ;
4943 int ecode2 = 0 ;
4944 int argvi = 0;
4945 double result;
4946 dXSARGS;
4947
4948 if ((items < 2) || (items > 2)) {
4949 SWIG_croak("Usage: doubleArray_getitem(ary,index);");
4950 }
4951 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_double, 0 | 0 );
4952 if (!SWIG_IsOK(res1)) {
4953 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray_getitem" "', argument " "1"" of type '" "double *""'");
4954 }
4955 arg1 = (double *)(argp1);
4956 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
4957 if (!SWIG_IsOK(ecode2)) {
4958 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doubleArray_getitem" "', argument " "2"" of type '" "size_t""'");
4959 }
4960 arg2 = (size_t)(val2);
4961 result = (double)doubleArray_getitem(arg1,arg2);
4962 ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
4963
4964
4965 XSRETURN(argvi);
4966 fail:
4967
4968
4969 SWIG_croak_null();
4970 }
4971 }
4972
4973
XS(_wrap_doubleArray_setitem)4974 XS(_wrap_doubleArray_setitem) {
4975 {
4976 double *arg1 = (double *) 0 ;
4977 size_t arg2 ;
4978 double arg3 ;
4979 void *argp1 = 0 ;
4980 int res1 = 0 ;
4981 size_t val2 ;
4982 int ecode2 = 0 ;
4983 double val3 ;
4984 int ecode3 = 0 ;
4985 int argvi = 0;
4986 dXSARGS;
4987
4988 if ((items < 3) || (items > 3)) {
4989 SWIG_croak("Usage: doubleArray_setitem(ary,index,value);");
4990 }
4991 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_double, 0 | 0 );
4992 if (!SWIG_IsOK(res1)) {
4993 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray_setitem" "', argument " "1"" of type '" "double *""'");
4994 }
4995 arg1 = (double *)(argp1);
4996 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
4997 if (!SWIG_IsOK(ecode2)) {
4998 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doubleArray_setitem" "', argument " "2"" of type '" "size_t""'");
4999 }
5000 arg2 = (size_t)(val2);
5001 ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
5002 if (!SWIG_IsOK(ecode3)) {
5003 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "doubleArray_setitem" "', argument " "3"" of type '" "double""'");
5004 }
5005 arg3 = (double)(val3);
5006 doubleArray_setitem(arg1,arg2,arg3);
5007 ST(argvi) = &PL_sv_undef;
5008
5009
5010
5011 XSRETURN(argvi);
5012 fail:
5013
5014
5015
5016 SWIG_croak_null();
5017 }
5018 }
5019
5020
5021
5022 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
5023
5024 static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0};
5025 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
5026 static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
5027 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};
5028 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};
5029 static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
5030 static swig_type_info _swigt__p_gsl_complex = {"_p_gsl_complex", "gsl_complex *", 0, 0, (void*)"Math::GSL::Complex::gsl_complex", 0};
5031 static swig_type_info _swigt__p_gsl_complex_float = {"_p_gsl_complex_float", "gsl_complex_float *", 0, 0, (void*)"Math::GSL::Complex::gsl_complex_float", 0};
5032 static swig_type_info _swigt__p_gsl_complex_long_double = {"_p_gsl_complex_long_double", "gsl_complex_long_double *", 0, 0, (void*)"Math::GSL::Complex::gsl_complex_long_double", 0};
5033 static swig_type_info _swigt__p_long_double = {"_p_long_double", "long double *", 0, 0, (void*)0, 0};
5034
5035 static swig_type_info *swig_type_initial[] = {
5036 &_swigt__p_FILE,
5037 &_swigt__p_char,
5038 &_swigt__p_double,
5039 &_swigt__p_f_p_q_const__char_p_q_const__char_int_int__void,
5040 &_swigt__p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void,
5041 &_swigt__p_float,
5042 &_swigt__p_gsl_complex,
5043 &_swigt__p_gsl_complex_float,
5044 &_swigt__p_gsl_complex_long_double,
5045 &_swigt__p_long_double,
5046 };
5047
5048 static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
5049 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
5050 static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
5051 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}};
5052 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}};
5053 static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
5054 static swig_cast_info _swigc__p_gsl_complex[] = { {&_swigt__p_gsl_complex, 0, 0, 0},{0, 0, 0, 0}};
5055 static swig_cast_info _swigc__p_gsl_complex_float[] = { {&_swigt__p_gsl_complex_float, 0, 0, 0},{0, 0, 0, 0}};
5056 static swig_cast_info _swigc__p_gsl_complex_long_double[] = { {&_swigt__p_gsl_complex_long_double, 0, 0, 0},{0, 0, 0, 0}};
5057 static swig_cast_info _swigc__p_long_double[] = { {&_swigt__p_long_double, 0, 0, 0},{0, 0, 0, 0}};
5058
5059 static swig_cast_info *swig_cast_initial[] = {
5060 _swigc__p_FILE,
5061 _swigc__p_char,
5062 _swigc__p_double,
5063 _swigc__p_f_p_q_const__char_p_q_const__char_int_int__void,
5064 _swigc__p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void,
5065 _swigc__p_float,
5066 _swigc__p_gsl_complex,
5067 _swigc__p_gsl_complex_float,
5068 _swigc__p_gsl_complex_long_double,
5069 _swigc__p_long_double,
5070 };
5071
5072
5073 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
5074
5075 static swig_constant_info swig_constants[] = {
5076 {0,0,0,0,0,0}
5077 };
5078 #ifdef __cplusplus
5079 }
5080 #endif
5081 static swig_variable_info swig_variables[] = {
5082 {0,0,0,0}
5083 };
5084 static swig_command_info swig_commands[] = {
5085 {"Math::GSL::Complexc::gsl_error", _wrap_gsl_error},
5086 {"Math::GSL::Complexc::gsl_stream_printf", _wrap_gsl_stream_printf},
5087 {"Math::GSL::Complexc::gsl_strerror", _wrap_gsl_strerror},
5088 {"Math::GSL::Complexc::gsl_set_error_handler", _wrap_gsl_set_error_handler},
5089 {"Math::GSL::Complexc::gsl_set_error_handler_off", _wrap_gsl_set_error_handler_off},
5090 {"Math::GSL::Complexc::gsl_set_stream_handler", _wrap_gsl_set_stream_handler},
5091 {"Math::GSL::Complexc::gsl_set_stream", _wrap_gsl_set_stream},
5092 {"Math::GSL::Complexc::gsl_complex_dat_set", _wrap_gsl_complex_dat_set},
5093 {"Math::GSL::Complexc::gsl_complex_dat_get", _wrap_gsl_complex_dat_get},
5094 {"Math::GSL::Complexc::new_gsl_complex", _wrap_new_gsl_complex},
5095 {"Math::GSL::Complexc::delete_gsl_complex", _wrap_delete_gsl_complex},
5096 {"Math::GSL::Complexc::gsl_complex_long_double_dat_set", _wrap_gsl_complex_long_double_dat_set},
5097 {"Math::GSL::Complexc::gsl_complex_long_double_dat_get", _wrap_gsl_complex_long_double_dat_get},
5098 {"Math::GSL::Complexc::new_gsl_complex_long_double", _wrap_new_gsl_complex_long_double},
5099 {"Math::GSL::Complexc::delete_gsl_complex_long_double", _wrap_delete_gsl_complex_long_double},
5100 {"Math::GSL::Complexc::gsl_complex_float_dat_set", _wrap_gsl_complex_float_dat_set},
5101 {"Math::GSL::Complexc::gsl_complex_float_dat_get", _wrap_gsl_complex_float_dat_get},
5102 {"Math::GSL::Complexc::new_gsl_complex_float", _wrap_new_gsl_complex_float},
5103 {"Math::GSL::Complexc::delete_gsl_complex_float", _wrap_delete_gsl_complex_float},
5104 {"Math::GSL::Complexc::gsl_complex_polar", _wrap_gsl_complex_polar},
5105 {"Math::GSL::Complexc::gsl_complex_rect", _wrap_gsl_complex_rect},
5106 {"Math::GSL::Complexc::gsl_complex_arg", _wrap_gsl_complex_arg},
5107 {"Math::GSL::Complexc::gsl_complex_abs", _wrap_gsl_complex_abs},
5108 {"Math::GSL::Complexc::gsl_complex_abs2", _wrap_gsl_complex_abs2},
5109 {"Math::GSL::Complexc::gsl_complex_logabs", _wrap_gsl_complex_logabs},
5110 {"Math::GSL::Complexc::gsl_complex_add", _wrap_gsl_complex_add},
5111 {"Math::GSL::Complexc::gsl_complex_sub", _wrap_gsl_complex_sub},
5112 {"Math::GSL::Complexc::gsl_complex_mul", _wrap_gsl_complex_mul},
5113 {"Math::GSL::Complexc::gsl_complex_div", _wrap_gsl_complex_div},
5114 {"Math::GSL::Complexc::gsl_complex_add_real", _wrap_gsl_complex_add_real},
5115 {"Math::GSL::Complexc::gsl_complex_sub_real", _wrap_gsl_complex_sub_real},
5116 {"Math::GSL::Complexc::gsl_complex_mul_real", _wrap_gsl_complex_mul_real},
5117 {"Math::GSL::Complexc::gsl_complex_div_real", _wrap_gsl_complex_div_real},
5118 {"Math::GSL::Complexc::gsl_complex_add_imag", _wrap_gsl_complex_add_imag},
5119 {"Math::GSL::Complexc::gsl_complex_sub_imag", _wrap_gsl_complex_sub_imag},
5120 {"Math::GSL::Complexc::gsl_complex_mul_imag", _wrap_gsl_complex_mul_imag},
5121 {"Math::GSL::Complexc::gsl_complex_div_imag", _wrap_gsl_complex_div_imag},
5122 {"Math::GSL::Complexc::gsl_complex_conjugate", _wrap_gsl_complex_conjugate},
5123 {"Math::GSL::Complexc::gsl_complex_inverse", _wrap_gsl_complex_inverse},
5124 {"Math::GSL::Complexc::gsl_complex_negative", _wrap_gsl_complex_negative},
5125 {"Math::GSL::Complexc::gsl_complex_sqrt", _wrap_gsl_complex_sqrt},
5126 {"Math::GSL::Complexc::gsl_complex_sqrt_real", _wrap_gsl_complex_sqrt_real},
5127 {"Math::GSL::Complexc::gsl_complex_pow", _wrap_gsl_complex_pow},
5128 {"Math::GSL::Complexc::gsl_complex_pow_real", _wrap_gsl_complex_pow_real},
5129 {"Math::GSL::Complexc::gsl_complex_exp", _wrap_gsl_complex_exp},
5130 {"Math::GSL::Complexc::gsl_complex_log", _wrap_gsl_complex_log},
5131 {"Math::GSL::Complexc::gsl_complex_log10", _wrap_gsl_complex_log10},
5132 {"Math::GSL::Complexc::gsl_complex_log_b", _wrap_gsl_complex_log_b},
5133 {"Math::GSL::Complexc::gsl_complex_sin", _wrap_gsl_complex_sin},
5134 {"Math::GSL::Complexc::gsl_complex_cos", _wrap_gsl_complex_cos},
5135 {"Math::GSL::Complexc::gsl_complex_sec", _wrap_gsl_complex_sec},
5136 {"Math::GSL::Complexc::gsl_complex_csc", _wrap_gsl_complex_csc},
5137 {"Math::GSL::Complexc::gsl_complex_tan", _wrap_gsl_complex_tan},
5138 {"Math::GSL::Complexc::gsl_complex_cot", _wrap_gsl_complex_cot},
5139 {"Math::GSL::Complexc::gsl_complex_arcsin", _wrap_gsl_complex_arcsin},
5140 {"Math::GSL::Complexc::gsl_complex_arcsin_real", _wrap_gsl_complex_arcsin_real},
5141 {"Math::GSL::Complexc::gsl_complex_arccos", _wrap_gsl_complex_arccos},
5142 {"Math::GSL::Complexc::gsl_complex_arccos_real", _wrap_gsl_complex_arccos_real},
5143 {"Math::GSL::Complexc::gsl_complex_arcsec", _wrap_gsl_complex_arcsec},
5144 {"Math::GSL::Complexc::gsl_complex_arcsec_real", _wrap_gsl_complex_arcsec_real},
5145 {"Math::GSL::Complexc::gsl_complex_arccsc", _wrap_gsl_complex_arccsc},
5146 {"Math::GSL::Complexc::gsl_complex_arccsc_real", _wrap_gsl_complex_arccsc_real},
5147 {"Math::GSL::Complexc::gsl_complex_arctan", _wrap_gsl_complex_arctan},
5148 {"Math::GSL::Complexc::gsl_complex_arccot", _wrap_gsl_complex_arccot},
5149 {"Math::GSL::Complexc::gsl_complex_sinh", _wrap_gsl_complex_sinh},
5150 {"Math::GSL::Complexc::gsl_complex_cosh", _wrap_gsl_complex_cosh},
5151 {"Math::GSL::Complexc::gsl_complex_sech", _wrap_gsl_complex_sech},
5152 {"Math::GSL::Complexc::gsl_complex_csch", _wrap_gsl_complex_csch},
5153 {"Math::GSL::Complexc::gsl_complex_tanh", _wrap_gsl_complex_tanh},
5154 {"Math::GSL::Complexc::gsl_complex_coth", _wrap_gsl_complex_coth},
5155 {"Math::GSL::Complexc::gsl_complex_arcsinh", _wrap_gsl_complex_arcsinh},
5156 {"Math::GSL::Complexc::gsl_complex_arccosh", _wrap_gsl_complex_arccosh},
5157 {"Math::GSL::Complexc::gsl_complex_arccosh_real", _wrap_gsl_complex_arccosh_real},
5158 {"Math::GSL::Complexc::gsl_complex_arcsech", _wrap_gsl_complex_arcsech},
5159 {"Math::GSL::Complexc::gsl_complex_arccsch", _wrap_gsl_complex_arccsch},
5160 {"Math::GSL::Complexc::gsl_complex_arctanh", _wrap_gsl_complex_arctanh},
5161 {"Math::GSL::Complexc::gsl_complex_arctanh_real", _wrap_gsl_complex_arctanh_real},
5162 {"Math::GSL::Complexc::gsl_complex_arccoth", _wrap_gsl_complex_arccoth},
5163 {"Math::GSL::Complexc::new_doubleArray", _wrap_new_doubleArray},
5164 {"Math::GSL::Complexc::delete_doubleArray", _wrap_delete_doubleArray},
5165 {"Math::GSL::Complexc::doubleArray_getitem", _wrap_doubleArray_getitem},
5166 {"Math::GSL::Complexc::doubleArray_setitem", _wrap_doubleArray_setitem},
5167 {0,0}
5168 };
5169 /* -----------------------------------------------------------------------------
5170 * Type initialization:
5171 * This problem is tough by the requirement that no dynamic
5172 * memory is used. Also, since swig_type_info structures store pointers to
5173 * swig_cast_info structures and swig_cast_info structures store pointers back
5174 * to swig_type_info structures, we need some lookup code at initialization.
5175 * The idea is that swig generates all the structures that are needed.
5176 * The runtime then collects these partially filled structures.
5177 * The SWIG_InitializeModule function takes these initial arrays out of
5178 * swig_module, and does all the lookup, filling in the swig_module.types
5179 * array with the correct data and linking the correct swig_cast_info
5180 * structures together.
5181 *
5182 * The generated swig_type_info structures are assigned statically to an initial
5183 * array. We just loop through that array, and handle each type individually.
5184 * First we lookup if this type has been already loaded, and if so, use the
5185 * loaded structure instead of the generated one. Then we have to fill in the
5186 * cast linked list. The cast data is initially stored in something like a
5187 * two-dimensional array. Each row corresponds to a type (there are the same
5188 * number of rows as there are in the swig_type_initial array). Each entry in
5189 * a column is one of the swig_cast_info structures for that type.
5190 * The cast_initial array is actually an array of arrays, because each row has
5191 * a variable number of columns. So to actually build the cast linked list,
5192 * we find the array of casts associated with the type, and loop through it
5193 * adding the casts to the list. The one last trick we need to do is making
5194 * sure the type pointer in the swig_cast_info struct is correct.
5195 *
5196 * First off, we lookup the cast->type name to see if it is already loaded.
5197 * There are three cases to handle:
5198 * 1) If the cast->type has already been loaded AND the type we are adding
5199 * casting info to has not been loaded (it is in this module), THEN we
5200 * replace the cast->type pointer with the type pointer that has already
5201 * been loaded.
5202 * 2) If BOTH types (the one we are adding casting info to, and the
5203 * cast->type) are loaded, THEN the cast info has already been loaded by
5204 * the previous module so we just ignore it.
5205 * 3) Finally, if cast->type has not already been loaded, then we add that
5206 * swig_cast_info to the linked list (because the cast->type) pointer will
5207 * be correct.
5208 * ----------------------------------------------------------------------------- */
5209
5210 #ifdef __cplusplus
5211 extern "C" {
5212 #if 0
5213 } /* c-mode */
5214 #endif
5215 #endif
5216
5217 #if 0
5218 #define SWIGRUNTIME_DEBUG
5219 #endif
5220
5221
5222 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)5223 SWIG_InitializeModule(void *clientdata) {
5224 size_t i;
5225 swig_module_info *module_head, *iter;
5226 int init;
5227
5228 /* check to see if the circular list has been setup, if not, set it up */
5229 if (swig_module.next==0) {
5230 /* Initialize the swig_module */
5231 swig_module.type_initial = swig_type_initial;
5232 swig_module.cast_initial = swig_cast_initial;
5233 swig_module.next = &swig_module;
5234 init = 1;
5235 } else {
5236 init = 0;
5237 }
5238
5239 /* Try and load any already created modules */
5240 module_head = SWIG_GetModule(clientdata);
5241 if (!module_head) {
5242 /* This is the first module loaded for this interpreter */
5243 /* so set the swig module into the interpreter */
5244 SWIG_SetModule(clientdata, &swig_module);
5245 } else {
5246 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
5247 iter=module_head;
5248 do {
5249 if (iter==&swig_module) {
5250 /* Our module is already in the list, so there's nothing more to do. */
5251 return;
5252 }
5253 iter=iter->next;
5254 } while (iter!= module_head);
5255
5256 /* otherwise we must add our module into the list */
5257 swig_module.next = module_head->next;
5258 module_head->next = &swig_module;
5259 }
5260
5261 /* When multiple interpreters are used, a module could have already been initialized in
5262 a different interpreter, but not yet have a pointer in this interpreter.
5263 In this case, we do not want to continue adding types... everything should be
5264 set up already */
5265 if (init == 0) return;
5266
5267 /* Now work on filling in swig_module.types */
5268 #ifdef SWIGRUNTIME_DEBUG
5269 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
5270 #endif
5271 for (i = 0; i < swig_module.size; ++i) {
5272 swig_type_info *type = 0;
5273 swig_type_info *ret;
5274 swig_cast_info *cast;
5275
5276 #ifdef SWIGRUNTIME_DEBUG
5277 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
5278 #endif
5279
5280 /* if there is another module already loaded */
5281 if (swig_module.next != &swig_module) {
5282 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
5283 }
5284 if (type) {
5285 /* Overwrite clientdata field */
5286 #ifdef SWIGRUNTIME_DEBUG
5287 printf("SWIG_InitializeModule: found type %s\n", type->name);
5288 #endif
5289 if (swig_module.type_initial[i]->clientdata) {
5290 type->clientdata = swig_module.type_initial[i]->clientdata;
5291 #ifdef SWIGRUNTIME_DEBUG
5292 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
5293 #endif
5294 }
5295 } else {
5296 type = swig_module.type_initial[i];
5297 }
5298
5299 /* Insert casting types */
5300 cast = swig_module.cast_initial[i];
5301 while (cast->type) {
5302 /* Don't need to add information already in the list */
5303 ret = 0;
5304 #ifdef SWIGRUNTIME_DEBUG
5305 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
5306 #endif
5307 if (swig_module.next != &swig_module) {
5308 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
5309 #ifdef SWIGRUNTIME_DEBUG
5310 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
5311 #endif
5312 }
5313 if (ret) {
5314 if (type == swig_module.type_initial[i]) {
5315 #ifdef SWIGRUNTIME_DEBUG
5316 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
5317 #endif
5318 cast->type = ret;
5319 ret = 0;
5320 } else {
5321 /* Check for casting already in the list */
5322 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
5323 #ifdef SWIGRUNTIME_DEBUG
5324 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
5325 #endif
5326 if (!ocast) ret = 0;
5327 }
5328 }
5329
5330 if (!ret) {
5331 #ifdef SWIGRUNTIME_DEBUG
5332 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
5333 #endif
5334 if (type->cast) {
5335 type->cast->prev = cast;
5336 cast->next = type->cast;
5337 }
5338 type->cast = cast;
5339 }
5340 cast++;
5341 }
5342 /* Set entry in modules->types array equal to the type */
5343 swig_module.types[i] = type;
5344 }
5345 swig_module.types[i] = 0;
5346
5347 #ifdef SWIGRUNTIME_DEBUG
5348 printf("**** SWIG_InitializeModule: Cast List ******\n");
5349 for (i = 0; i < swig_module.size; ++i) {
5350 int j = 0;
5351 swig_cast_info *cast = swig_module.cast_initial[i];
5352 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
5353 while (cast->type) {
5354 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
5355 cast++;
5356 ++j;
5357 }
5358 printf("---- Total casts: %d\n",j);
5359 }
5360 printf("**** SWIG_InitializeModule: Cast List ******\n");
5361 #endif
5362 }
5363
5364 /* This function will propagate the clientdata field of type to
5365 * any new swig_type_info structures that have been added into the list
5366 * of equivalent types. It is like calling
5367 * SWIG_TypeClientData(type, clientdata) a second time.
5368 */
5369 SWIGRUNTIME void
SWIG_PropagateClientData(void)5370 SWIG_PropagateClientData(void) {
5371 size_t i;
5372 swig_cast_info *equiv;
5373 static int init_run = 0;
5374
5375 if (init_run) return;
5376 init_run = 1;
5377
5378 for (i = 0; i < swig_module.size; i++) {
5379 if (swig_module.types[i]->clientdata) {
5380 equiv = swig_module.types[i]->cast;
5381 while (equiv) {
5382 if (!equiv->converter) {
5383 if (equiv->type && !equiv->type->clientdata)
5384 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
5385 }
5386 equiv = equiv->next;
5387 }
5388 }
5389 }
5390 }
5391
5392 #ifdef __cplusplus
5393 #if 0
5394 {
5395 /* c-mode */
5396 #endif
5397 }
5398 #endif
5399
5400
5401
5402 #if defined(__cplusplus) && ! defined(XSPROTO)
5403 extern "C"
5404 #endif
5405
XS(SWIG_init)5406 XS(SWIG_init) {
5407 dXSARGS;
5408 int i;
5409 (void)items;
5410
5411 SWIG_InitializeModule(0);
5412
5413 /* Install commands */
5414 for (i = 0; swig_commands[i].name; i++) {
5415 /* Casts only needed for Perl < 5.10. */
5416 #ifdef __cplusplus
5417 newXS(const_cast<char*>(swig_commands[i].name), swig_commands[i].wrapper, const_cast<char*>(__FILE__));
5418 #else
5419 newXS((char*)swig_commands[i].name, swig_commands[i].wrapper, (char*)__FILE__);
5420 #endif
5421 }
5422
5423 /* Install variables */
5424 for (i = 0; swig_variables[i].name; i++) {
5425 SV *sv;
5426 sv = get_sv(swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
5427 if (swig_variables[i].type) {
5428 SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
5429 } else {
5430 sv_setiv(sv,(IV) 0);
5431 }
5432 swig_create_magic(sv, swig_variables[i].name, swig_variables[i].set, swig_variables[i].get);
5433 }
5434
5435 /* Install constant */
5436 for (i = 0; swig_constants[i].type; i++) {
5437 SV *sv;
5438 sv = get_sv(swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
5439 switch(swig_constants[i].type) {
5440 case SWIG_INT:
5441 sv_setiv(sv, (IV) swig_constants[i].lvalue);
5442 break;
5443 case SWIG_FLOAT:
5444 sv_setnv(sv, (double) swig_constants[i].dvalue);
5445 break;
5446 case SWIG_STRING:
5447 sv_setpv(sv, (const char *) swig_constants[i].pvalue);
5448 break;
5449 case SWIG_POINTER:
5450 SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
5451 break;
5452 case SWIG_BINARY:
5453 SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
5454 break;
5455 default:
5456 break;
5457 }
5458 SvREADONLY_on(sv);
5459 }
5460
5461 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5462 SV *sv = get_sv((char*) SWIG_prefix "GSL_VERSION", TRUE | 0x2 | GV_ADDMULTI);
5463 sv_setsv(sv, SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)(2.7)));
5464 SvREADONLY_on(sv);
5465 } while(0) /*@SWIG@*/;
5466 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5467 SV *sv = get_sv((char*) SWIG_prefix "GSL_MAJOR_VERSION", TRUE | 0x2 | GV_ADDMULTI);
5468 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(2)));
5469 SvREADONLY_on(sv);
5470 } while(0) /*@SWIG@*/;
5471 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5472 SV *sv = get_sv((char*) SWIG_prefix "GSL_MINOR_VERSION", TRUE | 0x2 | GV_ADDMULTI);
5473 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(7)));
5474 SvREADONLY_on(sv);
5475 } while(0) /*@SWIG@*/;
5476 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5477 SV *sv = get_sv((char*) SWIG_prefix "GSL_POSZERO", TRUE | 0x2 | GV_ADDMULTI);
5478 sv_setsv(sv, SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)((+0.0))));
5479 SvREADONLY_on(sv);
5480 } while(0) /*@SWIG@*/;
5481 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5482 SV *sv = get_sv((char*) SWIG_prefix "GSL_NEGZERO", TRUE | 0x2 | GV_ADDMULTI);
5483 sv_setsv(sv, SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)((-0.0))));
5484 SvREADONLY_on(sv);
5485 } while(0) /*@SWIG@*/;
5486 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5487 SV *sv = get_sv((char*) SWIG_prefix "GSL_SUCCESS", TRUE | 0x2 | GV_ADDMULTI);
5488 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_SUCCESS)));
5489 SvREADONLY_on(sv);
5490 } while(0) /*@SWIG@*/;
5491 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5492 SV *sv = get_sv((char*) SWIG_prefix "GSL_FAILURE", TRUE | 0x2 | GV_ADDMULTI);
5493 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_FAILURE)));
5494 SvREADONLY_on(sv);
5495 } while(0) /*@SWIG@*/;
5496 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5497 SV *sv = get_sv((char*) SWIG_prefix "GSL_CONTINUE", TRUE | 0x2 | GV_ADDMULTI);
5498 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_CONTINUE)));
5499 SvREADONLY_on(sv);
5500 } while(0) /*@SWIG@*/;
5501 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5502 SV *sv = get_sv((char*) SWIG_prefix "GSL_EDOM", TRUE | 0x2 | GV_ADDMULTI);
5503 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EDOM)));
5504 SvREADONLY_on(sv);
5505 } while(0) /*@SWIG@*/;
5506 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5507 SV *sv = get_sv((char*) SWIG_prefix "GSL_ERANGE", TRUE | 0x2 | GV_ADDMULTI);
5508 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ERANGE)));
5509 SvREADONLY_on(sv);
5510 } while(0) /*@SWIG@*/;
5511 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5512 SV *sv = get_sv((char*) SWIG_prefix "GSL_EFAULT", TRUE | 0x2 | GV_ADDMULTI);
5513 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EFAULT)));
5514 SvREADONLY_on(sv);
5515 } while(0) /*@SWIG@*/;
5516 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5517 SV *sv = get_sv((char*) SWIG_prefix "GSL_EINVAL", TRUE | 0x2 | GV_ADDMULTI);
5518 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EINVAL)));
5519 SvREADONLY_on(sv);
5520 } while(0) /*@SWIG@*/;
5521 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5522 SV *sv = get_sv((char*) SWIG_prefix "GSL_EFAILED", TRUE | 0x2 | GV_ADDMULTI);
5523 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EFAILED)));
5524 SvREADONLY_on(sv);
5525 } while(0) /*@SWIG@*/;
5526 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5527 SV *sv = get_sv((char*) SWIG_prefix "GSL_EFACTOR", TRUE | 0x2 | GV_ADDMULTI);
5528 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EFACTOR)));
5529 SvREADONLY_on(sv);
5530 } while(0) /*@SWIG@*/;
5531 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5532 SV *sv = get_sv((char*) SWIG_prefix "GSL_ESANITY", TRUE | 0x2 | GV_ADDMULTI);
5533 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ESANITY)));
5534 SvREADONLY_on(sv);
5535 } while(0) /*@SWIG@*/;
5536 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5537 SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOMEM", TRUE | 0x2 | GV_ADDMULTI);
5538 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOMEM)));
5539 SvREADONLY_on(sv);
5540 } while(0) /*@SWIG@*/;
5541 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5542 SV *sv = get_sv((char*) SWIG_prefix "GSL_EBADFUNC", TRUE | 0x2 | GV_ADDMULTI);
5543 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EBADFUNC)));
5544 SvREADONLY_on(sv);
5545 } while(0) /*@SWIG@*/;
5546 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5547 SV *sv = get_sv((char*) SWIG_prefix "GSL_ERUNAWAY", TRUE | 0x2 | GV_ADDMULTI);
5548 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ERUNAWAY)));
5549 SvREADONLY_on(sv);
5550 } while(0) /*@SWIG@*/;
5551 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5552 SV *sv = get_sv((char*) SWIG_prefix "GSL_EMAXITER", TRUE | 0x2 | GV_ADDMULTI);
5553 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EMAXITER)));
5554 SvREADONLY_on(sv);
5555 } while(0) /*@SWIG@*/;
5556 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5557 SV *sv = get_sv((char*) SWIG_prefix "GSL_EZERODIV", TRUE | 0x2 | GV_ADDMULTI);
5558 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EZERODIV)));
5559 SvREADONLY_on(sv);
5560 } while(0) /*@SWIG@*/;
5561 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5562 SV *sv = get_sv((char*) SWIG_prefix "GSL_EBADTOL", TRUE | 0x2 | GV_ADDMULTI);
5563 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EBADTOL)));
5564 SvREADONLY_on(sv);
5565 } while(0) /*@SWIG@*/;
5566 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5567 SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOL", TRUE | 0x2 | GV_ADDMULTI);
5568 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOL)));
5569 SvREADONLY_on(sv);
5570 } while(0) /*@SWIG@*/;
5571 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5572 SV *sv = get_sv((char*) SWIG_prefix "GSL_EUNDRFLW", TRUE | 0x2 | GV_ADDMULTI);
5573 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EUNDRFLW)));
5574 SvREADONLY_on(sv);
5575 } while(0) /*@SWIG@*/;
5576 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5577 SV *sv = get_sv((char*) SWIG_prefix "GSL_EOVRFLW", TRUE | 0x2 | GV_ADDMULTI);
5578 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EOVRFLW)));
5579 SvREADONLY_on(sv);
5580 } while(0) /*@SWIG@*/;
5581 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5582 SV *sv = get_sv((char*) SWIG_prefix "GSL_ELOSS", TRUE | 0x2 | GV_ADDMULTI);
5583 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ELOSS)));
5584 SvREADONLY_on(sv);
5585 } while(0) /*@SWIG@*/;
5586 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5587 SV *sv = get_sv((char*) SWIG_prefix "GSL_EROUND", TRUE | 0x2 | GV_ADDMULTI);
5588 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EROUND)));
5589 SvREADONLY_on(sv);
5590 } while(0) /*@SWIG@*/;
5591 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5592 SV *sv = get_sv((char*) SWIG_prefix "GSL_EBADLEN", TRUE | 0x2 | GV_ADDMULTI);
5593 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EBADLEN)));
5594 SvREADONLY_on(sv);
5595 } while(0) /*@SWIG@*/;
5596 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5597 SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOTSQR", TRUE | 0x2 | GV_ADDMULTI);
5598 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOTSQR)));
5599 SvREADONLY_on(sv);
5600 } while(0) /*@SWIG@*/;
5601 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5602 SV *sv = get_sv((char*) SWIG_prefix "GSL_ESING", TRUE | 0x2 | GV_ADDMULTI);
5603 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ESING)));
5604 SvREADONLY_on(sv);
5605 } while(0) /*@SWIG@*/;
5606 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5607 SV *sv = get_sv((char*) SWIG_prefix "GSL_EDIVERGE", TRUE | 0x2 | GV_ADDMULTI);
5608 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EDIVERGE)));
5609 SvREADONLY_on(sv);
5610 } while(0) /*@SWIG@*/;
5611 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5612 SV *sv = get_sv((char*) SWIG_prefix "GSL_EUNSUP", TRUE | 0x2 | GV_ADDMULTI);
5613 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EUNSUP)));
5614 SvREADONLY_on(sv);
5615 } while(0) /*@SWIG@*/;
5616 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5617 SV *sv = get_sv((char*) SWIG_prefix "GSL_EUNIMPL", TRUE | 0x2 | GV_ADDMULTI);
5618 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EUNIMPL)));
5619 SvREADONLY_on(sv);
5620 } while(0) /*@SWIG@*/;
5621 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5622 SV *sv = get_sv((char*) SWIG_prefix "GSL_ECACHE", TRUE | 0x2 | GV_ADDMULTI);
5623 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ECACHE)));
5624 SvREADONLY_on(sv);
5625 } while(0) /*@SWIG@*/;
5626 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5627 SV *sv = get_sv((char*) SWIG_prefix "GSL_ETABLE", TRUE | 0x2 | GV_ADDMULTI);
5628 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ETABLE)));
5629 SvREADONLY_on(sv);
5630 } while(0) /*@SWIG@*/;
5631 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5632 SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOPROG", TRUE | 0x2 | GV_ADDMULTI);
5633 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOPROG)));
5634 SvREADONLY_on(sv);
5635 } while(0) /*@SWIG@*/;
5636 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5637 SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOPROGJ", TRUE | 0x2 | GV_ADDMULTI);
5638 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOPROGJ)));
5639 SvREADONLY_on(sv);
5640 } while(0) /*@SWIG@*/;
5641 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5642 SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOLF", TRUE | 0x2 | GV_ADDMULTI);
5643 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOLF)));
5644 SvREADONLY_on(sv);
5645 } while(0) /*@SWIG@*/;
5646 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5647 SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOLX", TRUE | 0x2 | GV_ADDMULTI);
5648 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOLX)));
5649 SvREADONLY_on(sv);
5650 } while(0) /*@SWIG@*/;
5651 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5652 SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOLG", TRUE | 0x2 | GV_ADDMULTI);
5653 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOLG)));
5654 SvREADONLY_on(sv);
5655 } while(0) /*@SWIG@*/;
5656 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5657 SV *sv = get_sv((char*) SWIG_prefix "GSL_EOF", TRUE | 0x2 | GV_ADDMULTI);
5658 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EOF)));
5659 SvREADONLY_on(sv);
5660 } while(0) /*@SWIG@*/;
5661 SWIG_TypeClientData(SWIGTYPE_p_gsl_complex, (void*) "Math::GSL::Complex::gsl_complex");
5662 SWIG_TypeClientData(SWIGTYPE_p_gsl_complex_long_double, (void*) "Math::GSL::Complex::gsl_complex_long_double");
5663 SWIG_TypeClientData(SWIGTYPE_p_gsl_complex_float, (void*) "Math::GSL::Complex::gsl_complex_float");
5664 ST(0) = &PL_sv_yes;
5665 XSRETURN(1);
5666 }
5667
5668