1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
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 * ----------------------------------------------------------------------------- */
12 #define SWIG_CASTRANK_MODE
16 /* SwigValueWrapper is described in swig.swg */
17 template<typename T
> class SwigValueWrapper
{
18 struct SwigMovePointer
{
20 SwigMovePointer(T
*p
) : ptr(p
) { }
21 ~SwigMovePointer() { delete ptr
; }
22 SwigMovePointer
& operator=(SwigMovePointer
& rhs
) { T
* oldptr
= ptr
; ptr
= 0; delete oldptr
; ptr
= rhs
.ptr
; rhs
.ptr
= 0; return *this; }
24 SwigValueWrapper
& operator=(const SwigValueWrapper
<T
>& rhs
);
25 SwigValueWrapper(const SwigValueWrapper
<T
>& rhs
);
27 SwigValueWrapper() : pointer(0) { }
28 SwigValueWrapper
& operator=(const T
& t
) { SwigMovePointer
tmp(new T(t
)); pointer
= tmp
; return *this; }
29 operator T
&() const { return *pointer
.ptr
; }
30 T
*operator&() { return pointer
.ptr
; }
33 template <typename T
> T
SwigValueInit() {
38 /* -----------------------------------------------------------------------------
39 * This section contains generic SWIG labels for method/variable
40 * declarations/attributes, and other compiler dependent labels.
41 * ----------------------------------------------------------------------------- */
43 /* template workaround for compilers that cannot correctly implement the C++ standard */
44 #ifndef SWIGTEMPLATEDISAMBIGUATOR
45 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
46 # define SWIGTEMPLATEDISAMBIGUATOR template
47 # elif defined(__HP_aCC)
48 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
49 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
50 # define SWIGTEMPLATEDISAMBIGUATOR template
52 # define SWIGTEMPLATEDISAMBIGUATOR
56 /* inline attribute */
58 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
59 # define SWIGINLINE inline
65 /* attribute recognised by some compilers to avoid 'unused' warnings */
67 # if defined(__GNUC__)
68 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
69 # define SWIGUNUSED __attribute__ ((__unused__))
74 # define SWIGUNUSED __attribute__ ((__unused__))
80 #ifndef SWIG_MSC_UNSUPPRESS_4505
81 # if defined(_MSC_VER)
82 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
86 #ifndef SWIGUNUSEDPARM
88 # define SWIGUNUSEDPARM(p)
90 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
94 /* internal SWIG method */
96 # define SWIGINTERN static SWIGUNUSED
99 /* internal inline SWIG method */
100 #ifndef SWIGINTERNINLINE
101 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
104 /* exporting methods */
105 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
106 # ifndef GCC_HASCLASSVISIBILITY
107 # define GCC_HASCLASSVISIBILITY
112 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
113 # if defined(STATIC_LINKED)
116 # define SWIGEXPORT __declspec(dllexport)
119 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
120 # define SWIGEXPORT __attribute__ ((visibility("default")))
127 /* calling conventions for Windows */
129 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
130 # define SWIGSTDCALL __stdcall
136 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
137 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
138 # define _CRT_SECURE_NO_DEPRECATE
141 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
142 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
143 # define _SCL_SECURE_NO_DEPRECATE
147 /* -----------------------------------------------------------------------------
150 * This file contains generic C API SWIG runtime support for pointer
152 * ----------------------------------------------------------------------------- */
154 /* This should only be incremented when either the layout of swig_type_info changes,
155 or for whatever reason, the runtime changes incompatibly */
156 #define SWIG_RUNTIME_VERSION "4"
158 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
159 #ifdef SWIG_TYPE_TABLE
160 # define SWIG_QUOTE_STRING(x) #x
161 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
162 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
164 # define SWIG_TYPE_TABLE_NAME
168 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
169 creating a static or dynamic library from the SWIG runtime code.
170 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
172 But only do this if strictly necessary, ie, if you have problems
173 with your compiler or suchlike.
177 # define SWIGRUNTIME SWIGINTERN
180 #ifndef SWIGRUNTIMEINLINE
181 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
184 /* Generic buffer size */
185 #ifndef SWIG_BUFFER_SIZE
186 # define SWIG_BUFFER_SIZE 1024
189 /* Flags for pointer conversions */
190 #define SWIG_POINTER_DISOWN 0x1
191 #define SWIG_CAST_NEW_MEMORY 0x2
193 /* Flags for new pointer objects */
194 #define SWIG_POINTER_OWN 0x1
198 Flags/methods for returning states.
200 The SWIG conversion methods, as ConvertPtr, return an integer
201 that tells if the conversion was successful or not. And if not,
202 an error code can be returned (see swigerrors.swg for the codes).
204 Use the following macros/flags to set or process the returning
207 In old versions of SWIG, code such as the following was usually written:
209 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
215 Now you can be more explicit:
217 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
218 if (SWIG_IsOK(res)) {
224 which is the same really, but now you can also do
227 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
228 if (SWIG_IsOK(res)) {
230 if (SWIG_IsNewObj(res) {
240 I.e., now SWIG_ConvertPtr can return new objects and you can
241 identify the case and take care of the deallocation. Of course that
242 also requires SWIG_ConvertPtr to return new result values, such as
244 int SWIG_ConvertPtr(obj, ptr,...) {
246 if (<need new object>) {
247 *ptr = <ptr to new allocated object>;
250 *ptr = <ptr to old object>;
258 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
259 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
262 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
263 allows to return the 'cast rank', for example, if you have this
270 food(1) // cast rank '1' (1 -> 1.0)
271 fooi(1) // cast rank '0'
273 just use the SWIG_AddCast()/SWIG_CheckState()
277 #define SWIG_ERROR (-1)
278 #define SWIG_IsOK(r) (r >= 0)
279 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
281 /* The CastRankLimit says how many bits are used for the cast rank */
282 #define SWIG_CASTRANKLIMIT (1 << 8)
283 /* The NewMask denotes the object was created (using new/malloc) */
284 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
285 /* The TmpMask is for in/out typemaps that use temporal objects */
286 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
287 /* Simple returning values */
288 #define SWIG_BADOBJ (SWIG_ERROR)
289 #define SWIG_OLDOBJ (SWIG_OK)
290 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
291 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
292 /* Check, add and del mask methods */
293 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
294 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
295 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
296 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
297 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
298 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
301 #if defined(SWIG_CASTRANK_MODE)
302 # ifndef SWIG_TypeRank
303 # define SWIG_TypeRank unsigned long
305 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
306 # define SWIG_MAXCASTRANK (2)
308 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
309 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
310 SWIGINTERNINLINE
int SWIG_AddCast(int r
) {
311 return SWIG_IsOK(r
) ? ((SWIG_CastRank(r
) < SWIG_MAXCASTRANK
) ? (r
+ 1) : SWIG_ERROR
) : r
;
313 SWIGINTERNINLINE
int SWIG_CheckState(int r
) {
314 return SWIG_IsOK(r
) ? SWIG_CastRank(r
) + 1 : 0;
316 #else /* no cast-rank mode */
317 # define SWIG_AddCast
318 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
328 typedef void *(*swig_converter_func
)(void *, int *);
329 typedef struct swig_type_info
*(*swig_dycast_func
)(void **);
331 /* Structure to store information on one type */
332 typedef struct swig_type_info
{
333 const char *name
; /* mangled name of this type */
334 const char *str
; /* human readable name of this type */
335 swig_dycast_func dcast
; /* dynamic cast function down a hierarchy */
336 struct swig_cast_info
*cast
; /* linked list of types that can cast into this type */
337 void *clientdata
; /* language specific type data */
338 int owndata
; /* flag if the structure owns the clientdata */
341 /* Structure to store a type and conversion function used for casting */
342 typedef struct swig_cast_info
{
343 swig_type_info
*type
; /* pointer to type that is equivalent to this type */
344 swig_converter_func converter
; /* function to cast the void pointers */
345 struct swig_cast_info
*next
; /* pointer to next cast in linked list */
346 struct swig_cast_info
*prev
; /* pointer to the previous cast */
349 /* Structure used to store module information
350 * Each module generates one structure like this, and the runtime collects
351 * all of these structures and stores them in a circularly linked list.*/
352 typedef struct swig_module_info
{
353 swig_type_info
**types
; /* Array of pointers to swig_type_info structures that are in this module */
354 size_t size
; /* Number of types in this module */
355 struct swig_module_info
*next
; /* Pointer to next element in circularly linked list */
356 swig_type_info
**type_initial
; /* Array of initially generated type structures */
357 swig_cast_info
**cast_initial
; /* Array of initially generated casting structures */
358 void *clientdata
; /* Language specific module data */
362 Compare two type names skipping the space characters, therefore
363 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
365 Return 0 when the two name types are equivalent, as in
366 strncmp, but skipping ' '.
369 SWIG_TypeNameComp(const char *f1
, const char *l1
,
370 const char *f2
, const char *l2
) {
371 for (;(f1
!= l1
) && (f2
!= l2
); ++f1
, ++f2
) {
372 while ((*f1
== ' ') && (f1
!= l1
)) ++f1
;
373 while ((*f2
== ' ') && (f2
!= l2
)) ++f2
;
374 if (*f1
!= *f2
) return (*f1
> *f2
) ? 1 : -1;
376 return (int)((l1
- f1
) - (l2
- f2
));
380 Check type equivalence in a name list like <name1>|<name2>|...
381 Return 0 if not equal, 1 if equal
384 SWIG_TypeEquiv(const char *nb
, const char *tb
) {
386 const char* te
= tb
+ strlen(tb
);
388 while (!equiv
&& *ne
) {
389 for (nb
= ne
; *ne
; ++ne
) {
390 if (*ne
== '|') break;
392 equiv
= (SWIG_TypeNameComp(nb
, ne
, tb
, te
) == 0) ? 1 : 0;
399 Check type equivalence in a name list like <name1>|<name2>|...
400 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
403 SWIG_TypeCompare(const char *nb
, const char *tb
) {
405 const char* te
= tb
+ strlen(tb
);
407 while (!equiv
&& *ne
) {
408 for (nb
= ne
; *ne
; ++ne
) {
409 if (*ne
== '|') break;
411 equiv
= (SWIG_TypeNameComp(nb
, ne
, tb
, te
) == 0) ? 1 : 0;
421 SWIGRUNTIME swig_cast_info
*
422 SWIG_TypeCheck(const char *c
, swig_type_info
*ty
) {
424 swig_cast_info
*iter
= ty
->cast
;
426 if (strcmp(iter
->type
->name
, c
) == 0) {
427 if (iter
== ty
->cast
)
429 /* Move iter to the top of the linked list */
430 iter
->prev
->next
= iter
->next
;
432 iter
->next
->prev
= iter
->prev
;
433 iter
->next
= ty
->cast
;
435 if (ty
->cast
) ty
->cast
->prev
= iter
;
446 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
448 SWIGRUNTIME swig_cast_info
*
449 SWIG_TypeCheckStruct(swig_type_info
*from
, swig_type_info
*ty
) {
451 swig_cast_info
*iter
= ty
->cast
;
453 if (iter
->type
== from
) {
454 if (iter
== ty
->cast
)
456 /* Move iter to the top of the linked list */
457 iter
->prev
->next
= iter
->next
;
459 iter
->next
->prev
= iter
->prev
;
460 iter
->next
= ty
->cast
;
462 if (ty
->cast
) ty
->cast
->prev
= iter
;
473 Cast a pointer up an inheritance hierarchy
475 SWIGRUNTIMEINLINE
void *
476 SWIG_TypeCast(swig_cast_info
*ty
, void *ptr
, int *newmemory
) {
477 return ((!ty
) || (!ty
->converter
)) ? ptr
: (*ty
->converter
)(ptr
, newmemory
);
481 Dynamic pointer casting. Down an inheritance hierarchy
483 SWIGRUNTIME swig_type_info
*
484 SWIG_TypeDynamicCast(swig_type_info
*ty
, void **ptr
) {
485 swig_type_info
*lastty
= ty
;
486 if (!ty
|| !ty
->dcast
) return ty
;
487 while (ty
&& (ty
->dcast
)) {
488 ty
= (*ty
->dcast
)(ptr
);
495 Return the name associated with this type
497 SWIGRUNTIMEINLINE
const char *
498 SWIG_TypeName(const swig_type_info
*ty
) {
503 Return the pretty name associated with this type,
504 that is an unmangled type name in a form presentable to the user.
506 SWIGRUNTIME
const char *
507 SWIG_TypePrettyName(const swig_type_info
*type
) {
508 /* The "str" field contains the equivalent pretty names of the
509 type, separated by vertical-bar characters. We choose
510 to print the last name, as it is often (?) the most
512 if (!type
) return NULL
;
513 if (type
->str
!= NULL
) {
514 const char *last_name
= type
->str
;
516 for (s
= type
->str
; *s
; s
++)
517 if (*s
== '|') last_name
= s
+1;
525 Set the clientdata field for a type
528 SWIG_TypeClientData(swig_type_info
*ti
, void *clientdata
) {
529 swig_cast_info
*cast
= ti
->cast
;
530 /* if (ti->clientdata == clientdata) return; */
531 ti
->clientdata
= clientdata
;
534 if (!cast
->converter
) {
535 swig_type_info
*tc
= cast
->type
;
536 if (!tc
->clientdata
) {
537 SWIG_TypeClientData(tc
, clientdata
);
544 SWIG_TypeNewClientData(swig_type_info
*ti
, void *clientdata
) {
545 SWIG_TypeClientData(ti
, clientdata
);
550 Search for a swig_type_info structure only by mangled name
551 Search is a O(log #types)
553 We start searching at module start, and finish searching when start == end.
554 Note: if start == end at the beginning of the function, we go all the way around
557 SWIGRUNTIME swig_type_info
*
558 SWIG_MangledTypeQueryModule(swig_module_info
*start
,
559 swig_module_info
*end
,
561 swig_module_info
*iter
= start
;
564 register size_t l
= 0;
565 register size_t r
= iter
->size
- 1;
567 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
568 register size_t i
= (l
+ r
) >> 1;
569 const char *iname
= iter
->types
[i
]->name
;
571 register int compare
= strcmp(name
, iname
);
573 return iter
->types
[i
];
574 } else if (compare
< 0) {
580 } else if (compare
> 0) {
584 break; /* should never happen */
589 } while (iter
!= end
);
594 Search for a swig_type_info structure for either a mangled name or a human readable name.
595 It first searches the mangled names of the types, which is a O(log #types)
596 If a type is not found it then searches the human readable names, which is O(#types).
598 We start searching at module start, and finish searching when start == end.
599 Note: if start == end at the beginning of the function, we go all the way around
602 SWIGRUNTIME swig_type_info
*
603 SWIG_TypeQueryModule(swig_module_info
*start
,
604 swig_module_info
*end
,
606 /* STEP 1: Search the name field using binary search */
607 swig_type_info
*ret
= SWIG_MangledTypeQueryModule(start
, end
, name
);
611 /* STEP 2: If the type hasn't been found, do a complete search
612 of the str field (the human readable name) */
613 swig_module_info
*iter
= start
;
615 register size_t i
= 0;
616 for (; i
< iter
->size
; ++i
) {
617 if (iter
->types
[i
]->str
&& (SWIG_TypeEquiv(iter
->types
[i
]->str
, name
)))
618 return iter
->types
[i
];
621 } while (iter
!= end
);
624 /* neither found a match */
629 Pack binary data into a string
632 SWIG_PackData(char *c
, void *ptr
, size_t sz
) {
633 static const char hex
[17] = "0123456789abcdef";
634 register const unsigned char *u
= (unsigned char *) ptr
;
635 register const unsigned char *eu
= u
+ sz
;
636 for (; u
!= eu
; ++u
) {
637 register unsigned char uu
= *u
;
638 *(c
++) = hex
[(uu
& 0xf0) >> 4];
639 *(c
++) = hex
[uu
& 0xf];
645 Unpack binary data from a string
647 SWIGRUNTIME
const char *
648 SWIG_UnpackData(const char *c
, void *ptr
, size_t sz
) {
649 register unsigned char *u
= (unsigned char *) ptr
;
650 register const unsigned char *eu
= u
+ sz
;
651 for (; u
!= eu
; ++u
) {
652 register char d
= *(c
++);
653 register unsigned char uu
;
654 if ((d
>= '0') && (d
<= '9'))
655 uu
= ((d
- '0') << 4);
656 else if ((d
>= 'a') && (d
<= 'f'))
657 uu
= ((d
- ('a'-10)) << 4);
661 if ((d
>= '0') && (d
<= '9'))
663 else if ((d
>= 'a') && (d
<= 'f'))
664 uu
|= (d
- ('a'-10));
673 Pack 'void *' into a string buffer.
676 SWIG_PackVoidPtr(char *buff
, void *ptr
, const char *name
, size_t bsz
) {
678 if ((2*sizeof(void *) + 2) > bsz
) return 0;
680 r
= SWIG_PackData(r
,&ptr
,sizeof(void *));
681 if (strlen(name
) + 1 > (bsz
- (r
- buff
))) return 0;
686 SWIGRUNTIME
const char *
687 SWIG_UnpackVoidPtr(const char *c
, void **ptr
, const char *name
) {
689 if (strcmp(c
,"NULL") == 0) {
696 return SWIG_UnpackData(++c
,ptr
,sizeof(void *));
700 SWIG_PackDataName(char *buff
, void *ptr
, size_t sz
, const char *name
, size_t bsz
) {
702 size_t lname
= (name
? strlen(name
) : 0);
703 if ((2*sz
+ 2 + lname
) > bsz
) return 0;
705 r
= SWIG_PackData(r
,ptr
,sz
);
707 strncpy(r
,name
,lname
+1);
714 SWIGRUNTIME
const char *
715 SWIG_UnpackDataName(const char *c
, void *ptr
, size_t sz
, const char *name
) {
717 if (strcmp(c
,"NULL") == 0) {
724 return SWIG_UnpackData(++c
,ptr
,sz
);
732 #define SWIG_UnknownError -1
733 #define SWIG_IOError -2
734 #define SWIG_RuntimeError -3
735 #define SWIG_IndexError -4
736 #define SWIG_TypeError -5
737 #define SWIG_DivisionByZero -6
738 #define SWIG_OverflowError -7
739 #define SWIG_SyntaxError -8
740 #define SWIG_ValueError -9
741 #define SWIG_SystemError -10
742 #define SWIG_AttributeError -11
743 #define SWIG_MemoryError -12
744 #define SWIG_NullReferenceError -13
749 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
758 /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
760 /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
761 #ifndef PERL_REVISION
762 # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
763 # define PERL_PATCHLEVEL_H_IMPLICIT
764 # include <patchlevel.h>
766 # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
767 # include <could_not_find_Perl_patchlevel.h>
769 # ifndef PERL_REVISION
770 # define PERL_REVISION (5)
771 # define PERL_VERSION PATCHLEVEL
772 # define PERL_SUBVERSION SUBVERSION
776 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
777 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
781 # define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
785 # define SvUOK(sv) SvIOK_UV(sv)
788 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
789 # define PL_sv_undef sv_undef
791 # define PL_errgv errgv
792 # define PL_sv_no sv_no
793 # define PL_sv_yes sv_yes
794 # define PL_markstack_ptr markstack_ptr
799 # define IVSIZE LONGSIZE
801 # define IVSIZE 4 /* A bold guess, but the best we can make. */
806 # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
808 # define INT2PTR(any,d) (any)(d)
810 # if PTRSIZE == LONGSIZE
811 # define PTRV unsigned long
813 # define PTRV unsigned
815 # define INT2PTR(any,d) (any)(PTRV)(d)
818 # define NUM2PTR(any,d) (any)(PTRV)(d)
819 # define PTR2IV(p) INT2PTR(IV,p)
820 # define PTR2UV(p) INT2PTR(UV,p)
821 # define PTR2NV(p) NUM2PTR(NV,p)
823 # if PTRSIZE == LONGSIZE
824 # define PTR2ul(p) (unsigned long)(p)
826 # define PTR2ul(p) INT2PTR(unsigned long,p)
828 #endif /* !INT2PTR */
831 # define SvPV_nolen(x) SvPV(x,PL_na)
835 # define get_sv perl_get_sv
839 # define ERRSV get_sv("@",FALSE)
851 /* -----------------------------------------------------------------------------
853 * ----------------------------------------------------------------------------- */
855 SWIGINTERN
const char*
856 SWIG_Perl_ErrorType(int code
) {
857 const char* type
= 0;
859 case SWIG_MemoryError
:
860 type
= "MemoryError";
865 case SWIG_RuntimeError
:
866 type
= "RuntimeError";
868 case SWIG_IndexError
:
874 case SWIG_DivisionByZero
:
875 type
= "ZeroDivisionError";
877 case SWIG_OverflowError
:
878 type
= "OverflowError";
880 case SWIG_SyntaxError
:
881 type
= "SyntaxError";
883 case SWIG_ValueError
:
886 case SWIG_SystemError
:
887 type
= "SystemError";
889 case SWIG_AttributeError
:
890 type
= "AttributeError";
893 type
= "RuntimeError";
901 /* -----------------------------------------------------------------------------
904 * This file contains the runtime support for Perl modules
905 * and includes code for managing global variables and pointer
907 * ----------------------------------------------------------------------------- */
910 #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
911 #define SWIG_PERL_OBJECT_CALL pPerl,
913 #define SWIG_PERL_OBJECT_DECL
914 #define SWIG_PERL_OBJECT_CALL
917 /* Common SWIG API */
919 /* for raw pointers */
920 #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
921 #define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own)
922 #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
924 /* for raw packed data */
925 #define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
926 #define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
928 /* for class or struct pointers */
929 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
930 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
932 /* for C or C++ function pointers */
933 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
934 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
936 /* for C++ member pointers, ie, member methods */
937 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty)
938 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type)
943 #define SWIG_GetModule(clientdata) SWIG_Perl_GetModule()
944 #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer)
947 /* Error manipulation */
949 #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code)
950 #define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg)
951 #define SWIG_fail goto fail
953 /* Perl-specific SWIG API */
955 #define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
956 #define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
957 #define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str)
960 #define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1)
961 #define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1)
962 #define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2)
963 #define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2)
965 /* -----------------------------------------------------------------------------
966 * pointers/data manipulation
967 * ----------------------------------------------------------------------------- */
969 /* For backward compatibility only */
970 #define SWIG_POINTER_EXCEPTION 0
976 #define SWIG_OWNER SWIG_POINTER_OWN
977 #define SWIG_SHADOW SWIG_OWNER << 1
979 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
981 /* SWIG Perl macros */
983 /* Macro to declare an XS function */
985 # define XSPROTO(name) void name(pTHX_ CV* cv)
988 /* Macro to call an XS function */
990 # define SWIG_CALLXS(_name) _name(cv,pPerl)
992 # ifndef MULTIPLICITY
993 # define SWIG_CALLXS(_name) _name(cv)
995 # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
1000 #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
1005 typedef int (CPerlObj::*SwigMagicFunc
)(SV
*, MAGIC
*);
1010 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
1011 #define SWIGCLASS_STATIC
1013 #else /* PERL_OBJECT */
1016 #define SWIGCLASS_STATIC static SWIGUNUSED
1018 #ifndef MULTIPLICITY
1019 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
1024 typedef int (*SwigMagicFunc
)(SV
*, MAGIC
*);
1029 #else /* MULTIPLICITY */
1031 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
1036 typedef int (*SwigMagicFunc
)(struct interpreter
*, SV
*, MAGIC
*);
1041 #endif /* MULTIPLICITY */
1042 #endif /* PERL_OBJECT */
1044 /* Workaround for bug in perl 5.6.x croak and earlier */
1045 #if (PERL_VERSION < 8)
1047 # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
1048 static void SWIG_Perl_croak_null(CPerlObj
*pPerl
)
1050 static void SWIG_croak_null()
1054 # if (PERL_VERSION < 6)
1057 if (SvOK(err
) && !SvROK(err
)) croak("%_", err
);
1062 # define SWIG_croak_null() croak(Nullch)
1067 Define how strict is the cast between strings and integers/doubles
1068 when overloading between these types occurs.
1070 The default is making it as strict as possible by using SWIG_AddCast
1073 You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
1074 disable the SWIG_AddCast, making the casting between string and
1075 numbers less strict.
1077 In the end, we try to solve the overloading between strings and
1078 numerical types in the more natural way, but if you can avoid it,
1079 well, avoid it using %rename, for example.
1081 #ifndef SWIG_PERL_NO_STRICT_STR2NUM
1082 # ifndef SWIG_PERL_STRICT_STR2NUM
1083 # define SWIG_PERL_STRICT_STR2NUM
1086 #ifdef SWIG_PERL_STRICT_STR2NUM
1087 /* string takes precedence */
1088 #define SWIG_Str2NumCast(x) SWIG_AddCast(x)
1090 /* number takes precedence */
1091 #define SWIG_Str2NumCast(x) x
1098 SWIGRUNTIME
const char *
1099 SWIG_Perl_TypeProxyName(const swig_type_info
*type
) {
1100 if (!type
) return NULL
;
1101 if (type
->clientdata
!= NULL
) {
1102 return (const char*) type
->clientdata
;
1109 /* Identical to SWIG_TypeCheck, except for strcmp comparison */
1110 SWIGRUNTIME swig_cast_info
*
1111 SWIG_TypeProxyCheck(const char *c
, swig_type_info
*ty
) {
1113 swig_cast_info
*iter
= ty
->cast
;
1115 if ( (!iter
->type
->clientdata
&& (strcmp(iter
->type
->name
, c
) == 0)) ||
1116 (iter
->type
->clientdata
&& (strcmp((char*)iter
->type
->clientdata
, c
) == 0)) ) {
1117 if (iter
== ty
->cast
)
1119 /* Move iter to the top of the linked list */
1120 iter
->prev
->next
= iter
->next
;
1122 iter
->next
->prev
= iter
->prev
;
1123 iter
->next
= ty
->cast
;
1125 if (ty
->cast
) ty
->cast
->prev
= iter
;
1135 /* Function for getting a pointer value */
1138 SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV
*sv
, void **ptr
, swig_type_info
*_t
, int flags
, int *own
) {
1140 void *voidptr
= (void *)0;
1146 /* If magical, apply more magic */
1150 /* Check to see if this is an object */
1151 if (sv_isobject(sv
)) {
1153 tsv
= (SV
*) SvRV(sv
);
1154 if ((SvTYPE(tsv
) == SVt_PVHV
)) {
1156 if (SvMAGICAL(tsv
)) {
1157 mg
= mg_find(tsv
,'P');
1160 if (sv_isobject(sv
)) {
1161 tsv
= (SV
*)SvRV(sv
);
1171 voidptr
= INT2PTR(void *,tmp
);
1172 } else if (! SvOK(sv
)) { /* Check for undef */
1173 *(ptr
) = (void *) 0;
1175 } else if (SvTYPE(sv
) == SVt_RV
) { /* Check for NULL pointer */
1177 *(ptr
) = (void *) 0;
1182 } else { /* Don't know what it is */
1186 /* Now see if the types match */
1187 char *_c
= HvNAME(SvSTASH(SvRV(sv
)));
1188 tc
= SWIG_TypeProxyCheck(_c
,_t
);
1194 *ptr
= SWIG_TypeCast(tc
,voidptr
,&newmemory
);
1195 if (newmemory
== SWIG_CAST_NEW_MEMORY
) {
1196 assert(own
); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
1198 *own
= *own
| SWIG_CAST_NEW_MEMORY
;
1206 * DISOWN implementation: we need a perl guru to check this one.
1208 if (tsv
&& (flags
& SWIG_POINTER_DISOWN
)) {
1210 * almost copy paste code from below SWIG_POINTER_OWN setting
1213 HV
*stash
= SvSTASH(SvRV(obj
));
1214 GV
*gv
= *(GV
**)hv_fetch(stash
, "OWNER", 5, TRUE
);
1218 * To set ownership (see below), a newSViv(1) entry is added.
1219 * Hence, to remove ownership, we delete the entry.
1221 if (hv_exists_ent(hv
, obj
, 0)) {
1222 hv_delete_ent(hv
, obj
, 0, 0);
1230 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV
*sv
, void **ptr
, swig_type_info
*_t
, int flags
) {
1231 return SWIG_Perl_ConvertPtrAndOwn(sv
, ptr
, _t
, flags
, 0);
1235 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV
*sv
, void *ptr
, swig_type_info
*t
, int flags
) {
1236 if (ptr
&& (flags
& (SWIG_SHADOW
| SWIG_POINTER_OWN
))) {
1241 sv_setref_pv(obj
, (char *) SWIG_Perl_TypeProxyName(t
), ptr
);
1242 stash
=SvSTASH(SvRV(obj
));
1243 if (flags
& SWIG_POINTER_OWN
) {
1245 GV
*gv
= *(GV
**)hv_fetch(stash
, "OWNER", 5, TRUE
);
1247 gv_init(gv
, stash
, "OWNER", 5, FALSE
);
1249 hv_store_ent(hv
, obj
, newSViv(1), 0);
1251 sv_magic((SV
*)hash
, (SV
*)obj
, 'P', Nullch
, 0);
1253 self
=newRV_noinc((SV
*)hash
);
1255 SvREFCNT_dec((SV
*)self
);
1256 sv_bless(sv
, stash
);
1259 sv_setref_pv(sv
, (char *) SWIG_Perl_TypeProxyName(t
), ptr
);
1263 SWIGRUNTIMEINLINE SV
*
1264 SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT
void *ptr
, swig_type_info
*t
, int flags
) {
1265 SV
*result
= sv_newmortal();
1266 SWIG_MakePtr(result
, ptr
, t
, flags
);
1271 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV
*sv
, void *ptr
, int sz
, swig_type_info
*type
) {
1274 if ((2*sz
+ 1 + strlen(SWIG_Perl_TypeProxyName(type
))) > 1000) return;
1276 r
= SWIG_PackData(r
,ptr
,sz
);
1277 strcpy(r
,SWIG_Perl_TypeProxyName(type
));
1278 sv_setpv(sv
, result
);
1282 SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT
void *ptr
, int sz
, swig_type_info
*type
) {
1283 SV
*result
= sv_newmortal();
1284 SWIG_Perl_MakePackedObj(result
, ptr
, sz
, type
);
1288 /* Convert a packed value value */
1290 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV
*obj
, void *ptr
, int sz
, swig_type_info
*ty
) {
1294 if ((!obj
) || (!SvOK(obj
))) return SWIG_ERROR
;
1295 c
= SvPV_nolen(obj
);
1296 /* Pointer values must start with leading underscore */
1297 if (*c
!= '_') return SWIG_ERROR
;
1299 c
= SWIG_UnpackData(c
,ptr
,sz
);
1301 tc
= SWIG_TypeCheck(c
,ty
);
1302 if (!tc
) return SWIG_ERROR
;
1308 /* Macros for low-level exception handling */
1309 #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
1312 typedef XSPROTO(SwigPerlWrapper
);
1313 typedef SwigPerlWrapper
*SwigPerlWrapperPtr
;
1315 /* Structure for command table */
1318 SwigPerlWrapperPtr wrapper
;
1319 } swig_command_info
;
1321 /* Information for constant table */
1324 #define SWIG_FLOAT 2
1325 #define SWIG_STRING 3
1326 #define SWIG_POINTER 4
1327 #define SWIG_BINARY 5
1329 /* Constant information structure */
1330 typedef struct swig_constant_info
{
1336 swig_type_info
**ptype
;
1337 } swig_constant_info
;
1340 /* Structure for variable table */
1345 swig_type_info
**type
;
1346 } swig_variable_info
;
1348 /* Magic variable code */
1350 #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
1351 #ifndef MULTIPLICITY
1352 SWIGRUNTIME
void _swig_create_magic(SV
*sv
, char *name
, int (*set
)(SV
*, MAGIC
*), int (*get
)(SV
*,MAGIC
*))
1354 SWIGRUNTIME
void _swig_create_magic(SV
*sv
, char *name
, int (*set
)(struct interpreter
*, SV
*, MAGIC
*), int (*get
)(struct interpreter
*, SV
*,MAGIC
*))
1357 # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
1358 SWIGRUNTIME
void _swig_create_magic(CPerlObj
*pPerl
, SV
*sv
, const char *name
, int (CPerlObj::*set
)(SV
*, MAGIC
*), int (CPerlObj::*get
)(SV
*, MAGIC
*))
1362 sv_magic(sv
,sv
,'U',(char *) name
,strlen(name
));
1363 mg
= mg_find(sv
,'U');
1364 mg
->mg_virtual
= (MGVTBL
*) malloc(sizeof(MGVTBL
));
1365 mg
->mg_virtual
->svt_get
= (SwigMagicFunc
) get
;
1366 mg
->mg_virtual
->svt_set
= (SwigMagicFunc
) set
;
1367 mg
->mg_virtual
->svt_len
= 0;
1368 mg
->mg_virtual
->svt_clear
= 0;
1369 mg
->mg_virtual
->svt_free
= 0;
1373 SWIGRUNTIME swig_module_info
*
1374 SWIG_Perl_GetModule(void) {
1375 static void *type_pointer
= (void *)0;
1378 /* first check if pointer already created */
1379 if (!type_pointer
) {
1380 pointer
= get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME
, FALSE
| GV_ADDMULTI
);
1381 if (pointer
&& SvOK(pointer
)) {
1382 type_pointer
= INT2PTR(swig_type_info
**, SvIV(pointer
));
1386 return (swig_module_info
*) type_pointer
;
1390 SWIG_Perl_SetModule(swig_module_info
*module
) {
1393 /* create a new pointer */
1394 pointer
= get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME
, TRUE
| GV_ADDMULTI
);
1395 sv_setiv(pointer
, PTR2IV(module
));
1402 /* Workaround perl5 global namespace pollution. Note that undefining library
1403 * functions like fopen will not solve the problem on all platforms as fopen
1404 * might be a macro on Windows but not necessarily on other operating systems. */
1507 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1509 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1513 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
1516 /* -------- TYPES TABLE (BEGIN) -------- */
1518 #define SWIGTYPE_p_Link swig_types[0]
1519 #define SWIGTYPE_p_Options swig_types[1]
1520 #define SWIGTYPE_p_Query swig_types[2]
1521 #define SWIGTYPE_p_Video swig_types[3]
1522 #define SWIGTYPE_p_char swig_types[4]
1523 #define SWIGTYPE_p_quviCode swig_types[5]
1524 #define SWIGTYPE_p_quviVersion swig_types[6]
1525 #define SWIGTYPE_p_std__string swig_types[7]
1526 static swig_type_info
*swig_types
[9];
1527 static swig_module_info swig_module
= {swig_types
, 8, 0, 0, 0, 0};
1528 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1529 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1531 /* -------- TYPES TABLE (END) -------- */
1533 #define SWIG_init boot_WWW__Quvi
1535 #define SWIG_name "WWW::Quvic::boot_WWW__Quvi"
1536 #define SWIG_prefix "WWW::Quvic::"
1538 #define SWIGVERSION 0x020001
1539 #define SWIG_VERSION SWIGVERSION
1542 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
1543 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
1546 #include <stdexcept>
1553 #ifndef MULTIPLICITY
1554 SWIGEXPORT
void SWIG_init (CV
* cv
);
1556 SWIGEXPORT
void SWIG_init (pTHXo_ CV
* cv
);
1559 SWIGEXPORT
void SWIG_init (CV
*cv
, CPerlObj
*);
1570 char *_VERSION
= VERSION
;
1573 libquviVersion
= QUVI_VERSION
,
1574 libquviVersionLong
= QUVI_VERSION_LONG
,
1578 static char* version (quviVersion n
=ModuleVersion
) {
1579 if (n
== ModuleVersion
) return _VERSION
;
1580 return quvi_version ((QUVIversion
)n
);
1584 * A manual copy of QUVIcode. If there's a better way to do this,
1585 * I'd like to know it too. This will need to be maintained manually
1586 * if there are any changes to the QUVIcode enum list in quvi.h file.
1588 * The reason we don't simply "%include <quvi/quvi.h>" and
1589 * get the constants is because that would clutter the wrapper.
1591 * We have renamed the constants to avoid any conflicts with those
1592 * defined in <quvi/quvi.h> which is included by the wrapper.
1605 PcreError
= 0x40, /* QUVI_PCRE */
1607 CurlError
, /* QUVI_CURL */
1608 IconvError
, /* QUVI_ICONV */
1609 LuaError
, /* QUVI_LUA */
1614 SWIGINTERN swig_type_info
*
1615 SWIG_pchar_descriptor(void)
1617 static int init
= 0;
1618 static swig_type_info
* info
= 0;
1620 info
= SWIG_TypeQuery("_p_char");
1628 SWIG_AsCharPtrAndSize(SV
*obj
, char** cptr
, size_t* psize
, int *alloc
)
1630 if (SvMAGICAL(obj
)) {
1631 SV
*tmp
= sv_newmortal();
1637 char *cstr
= SvPV(obj
, len
);
1638 size_t size
= len
+ 1;
1641 if (*alloc
== SWIG_NEWOBJ
) {
1642 *cptr
= reinterpret_cast< char* >(memcpy((new char[size
]), cstr
, sizeof(char)*(size
)));
1645 *alloc
= SWIG_OLDOBJ
;
1649 if (psize
) *psize
= size
;
1652 swig_type_info
* pchar_descriptor
= SWIG_pchar_descriptor();
1653 if (pchar_descriptor
) {
1655 if (SWIG_ConvertPtr(obj
, (void**)&vptr
, pchar_descriptor
, 0) == SWIG_OK
) {
1656 if (cptr
) *cptr
= vptr
;
1657 if (psize
) *psize
= vptr
? (strlen(vptr
) + 1) : 0;
1658 if (alloc
) *alloc
= SWIG_OLDOBJ
;
1663 return SWIG_TypeError
;
1667 SWIGINTERNINLINE SV
*
1668 SWIG_FromCharPtrAndSize(const char* carray
, size_t size
)
1670 SV
*obj
= sv_newmortal();
1672 sv_setpvn(obj
, carray
, size
);
1674 sv_setsv(obj
, &PL_sv_undef
);
1680 SWIGINTERNINLINE SV
*
1681 SWIG_FromCharPtr(const char *cptr
)
1683 return SWIG_FromCharPtrAndSize(cptr
, (cptr
? strlen(cptr
) : 0));
1687 SWIGINTERNINLINE SV
*
1688 SWIG_From_long
SWIG_PERL_DECL_ARGS_1(long value
)
1690 SV
*obj
= sv_newmortal();
1691 sv_setiv(obj
, (IV
) value
);
1696 SWIGINTERNINLINE SV
*
1697 SWIG_From_int
SWIG_PERL_DECL_ARGS_1(int value
)
1699 return SWIG_From_long
SWIG_PERL_CALL_ARGS_1(value
);
1704 #if !defined(SWIG_NO_LLONG_MAX)
1705 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1706 # define LLONG_MAX __LONG_LONG_MAX__
1707 # define LLONG_MIN (-LLONG_MAX - 1LL)
1708 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1714 SWIG_AsVal_double
SWIG_PERL_DECL_ARGS_2(SV
*obj
, double *val
)
1717 if (val
) *val
= SvNV(obj
);
1719 } else if (SvIOK(obj
)) {
1720 if (val
) *val
= (double) SvIV(obj
);
1721 return SWIG_AddCast(SWIG_OK
);
1723 const char *nptr
= SvPV_nolen(obj
);
1728 v
= strtod(nptr
, &endptr
);
1729 if (errno
== ERANGE
) {
1731 return SWIG_OverflowError
;
1733 if (*endptr
== '\0') {
1735 return SWIG_Str2NumCast(SWIG_OK
);
1740 return SWIG_TypeError
;
1750 SWIGINTERNINLINE
int
1751 SWIG_CanCastAsInteger(double *d
, double min
, double max
) {
1753 if ((min
<= x
&& x
<= max
)) {
1754 double fx
= floor(x
);
1755 double cx
= ceil(x
);
1756 double rd
= ((x
- fx
) < 0.5) ? fx
: cx
; /* simple rint */
1757 if ((errno
== EDOM
) || (errno
== ERANGE
)) {
1760 double summ
, reps
, diff
;
1763 } else if (rd
> x
) {
1770 if (reps
< 8*DBL_EPSILON
) {
1781 SWIG_AsVal_long
SWIG_PERL_DECL_ARGS_2(SV
*obj
, long* val
)
1784 if (val
) *val
= SvIV(obj
);
1788 const char *nptr
= SvPV_nolen(obj
);
1793 v
= strtol(nptr
, &endptr
,0);
1794 if (errno
== ERANGE
) {
1796 return SWIG_OverflowError
;
1798 if (*endptr
== '\0') {
1800 return SWIG_Str2NumCast(SWIG_OK
);
1806 int res
= SWIG_AddCast(SWIG_AsVal_double
SWIG_PERL_CALL_ARGS_2(obj
,&d
));
1807 if (SWIG_IsOK(res
) && SWIG_CanCastAsInteger(&d
, LONG_MIN
, LONG_MAX
)) {
1808 if (val
) *val
= (long)(d
);
1813 return SWIG_TypeError
;
1818 SWIG_AsVal_int
SWIG_PERL_DECL_ARGS_2(SV
* obj
, int *val
)
1821 int res
= SWIG_AsVal_long
SWIG_PERL_CALL_ARGS_2(obj
, &v
);
1822 if (SWIG_IsOK(res
)) {
1823 if ((v
< INT_MIN
|| v
> INT_MAX
)) {
1824 return SWIG_OverflowError
;
1826 if (val
) *val
= static_cast< int >(v
);
1834 SWIG_AsPtr_std_string
SWIG_PERL_DECL_ARGS_2(SV
* obj
, std::string
**val
)
1836 char* buf
= 0 ; size_t size
= 0; int alloc
= SWIG_OLDOBJ
;
1837 if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj
, &buf
, &size
, &alloc
)))) {
1839 if (val
) *val
= new std::string(buf
, size
- 1);
1840 if (alloc
== SWIG_NEWOBJ
) delete[] buf
;
1847 static int init
= 0;
1848 static swig_type_info
* descriptor
= 0;
1850 descriptor
= SWIG_TypeQuery("std::string" " *");
1855 int res
= SWIG_ConvertPtr(obj
, (void**)&vptr
, descriptor
, 0);
1856 if (SWIG_IsOK(res
) && val
) *val
= vptr
;
1864 SWIGINTERNINLINE SV
*
1865 SWIG_From_std_string
SWIG_PERL_DECL_ARGS_1(const std::string
& s
)
1868 return SWIG_FromCharPtrAndSize(s
.data(), s
.size());
1870 return SWIG_FromCharPtrAndSize(s
.c_str(), 0);
1876 SWIG_AsVal_bool
SWIG_PERL_DECL_ARGS_2(SV
*obj
, bool* val
)
1878 if (obj
== &PL_sv_yes
) {
1879 if (val
) *val
= true;
1881 } else if (obj
== &PL_sv_no
) {
1882 if (val
) *val
= false;
1885 if (val
) *val
= SvTRUE(obj
) ? true: false;
1886 return SWIG_AddCast(SWIG_OK
);
1888 return SWIG_TypeError
;
1892 SWIGINTERNINLINE SV
*
1893 SWIG_From_bool
SWIG_PERL_DECL_ARGS_1(bool value
)
1895 SV
*obj
= sv_newmortal();
1897 sv_setsv(obj
, &PL_sv_yes
);
1899 sv_setsv(obj
, &PL_sv_no
);
1905 SWIGINTERNINLINE SV
*
1906 SWIG_From_double
SWIG_PERL_DECL_ARGS_1(double value
)
1908 SV
*obj
= sv_newmortal();
1909 sv_setnv(obj
, value
);
1918 #define MAGIC_CLASS _wrap_WWW__Quvi_var::
1919 class _wrap_WWW__Quvi_var
: public CPerlObj
{
1924 SWIGCLASS_STATIC
int swig_magic_readonly(pTHX_ SV
*SWIGUNUSEDPARM(sv
), MAGIC
*SWIGUNUSEDPARM(mg
)) {
1926 croak("Value is read-only.");
1929 SWIGCLASS_STATIC
int _wrap__VERSION_set(pTHX_ SV
* sv
, MAGIC
* SWIGUNUSEDPARM(mg
)) {
1932 char *cptr
= 0; size_t csize
= 0; int alloc
= SWIG_NEWOBJ
;
1933 int res
= SWIG_AsCharPtrAndSize(sv
, &cptr
, &csize
, &alloc
);
1934 if (!SWIG_IsOK(res
)) {
1935 SWIG_exception_fail(SWIG_ArgError(res
), "in variable '""_VERSION""' of type '""char *""'");
1937 if (_VERSION
) delete[] _VERSION
;
1938 if (alloc
== SWIG_NEWOBJ
) {
1941 _VERSION
= csize
? (char *)reinterpret_cast< char* >(memcpy((new char[csize
]), cptr
, sizeof(char)*(csize
))) : 0;
1949 SWIGCLASS_STATIC
int _wrap__VERSION_get(pTHX_ SV
*sv
, MAGIC
*SWIGUNUSEDPARM(mg
)) {
1951 sv_setsv(sv
,SWIG_FromCharPtr(_VERSION
)) ;
1969 XS(_wrap_version__SWIG_0
) {
1978 if ((items
< 1) || (items
> 1)) {
1979 SWIG_croak("Usage: version(n);");
1981 ecode1
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(0), &val1
);
1982 if (!SWIG_IsOK(ecode1
)) {
1983 SWIG_exception_fail(SWIG_ArgError(ecode1
), "in method '" "version" "', argument " "1"" of type '" "quviVersion""'");
1985 arg1
= static_cast< quviVersion
>(val1
);
1986 result
= (char *)version(arg1
);
1987 ST(argvi
) = SWIG_FromCharPtr((const char *)result
); argvi
++ ;
1997 XS(_wrap_version__SWIG_1
) {
2003 if ((items
< 0) || (items
> 0)) {
2004 SWIG_croak("Usage: version();");
2006 result
= (char *)version();
2007 ST(argvi
) = SWIG_FromCharPtr((const char *)result
); argvi
++ ;
2019 unsigned long _index
= 0;
2020 SWIG_TypeRank _rank
= 0;
2022 SWIG_TypeRank _ranki
= 0;
2023 SWIG_TypeRank _rankm
= 0;
2024 if (!_index
|| (_ranki
< _rank
)) {
2025 _rank
= _ranki
; _index
= 1;
2026 if (_rank
== _rankm
) goto dispatch
;
2030 SWIG_TypeRank _ranki
= 0;
2031 SWIG_TypeRank _rankm
= 0;
2032 SWIG_TypeRank _pi
= 1;
2036 int res
= SWIG_AsVal_int
SWIG_PERL_CALL_ARGS_2(ST(0), NULL
);
2037 _v
= SWIG_CheckState(res
);
2040 if (!_v
) goto check_2
;
2043 _pi
*= SWIG_MAXCASTRANK
;
2044 if (!_index
|| (_ranki
< _rank
)) {
2045 _rank
= _ranki
; _index
= 2;
2046 if (_rank
== _rankm
) goto dispatch
;
2054 ++PL_markstack_ptr
; SWIG_CALLXS(_wrap_version__SWIG_1
); return;
2056 ++PL_markstack_ptr
; SWIG_CALLXS(_wrap_version__SWIG_0
); return;
2060 croak("No matching function for overloaded 'version'");
2065 XS(_wrap_new_Options
) {
2068 Options
*result
= 0 ;
2071 if ((items
< 0) || (items
> 0)) {
2072 SWIG_croak("Usage: new_Options();");
2074 result
= (Options
*)new Options();
2075 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_Options
, SWIG_OWNER
| SWIG_SHADOW
); argvi
++ ;
2083 XS(_wrap_Options_user_agent_set
) {
2085 Options
*arg1
= (Options
*) 0 ;
2086 std::string
*arg2
= 0 ;
2089 int res2
= SWIG_OLDOBJ
;
2093 if ((items
< 2) || (items
> 2)) {
2094 SWIG_croak("Usage: Options_user_agent_set(self,user_agent);");
2096 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, 0 | 0 );
2097 if (!SWIG_IsOK(res1
)) {
2098 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Options_user_agent_set" "', argument " "1"" of type '" "Options *""'");
2100 arg1
= reinterpret_cast< Options
* >(argp1
);
2102 std::string
*ptr
= (std::string
*)0;
2103 res2
= SWIG_AsPtr_std_string
SWIG_PERL_CALL_ARGS_2(ST(1), &ptr
);
2104 if (!SWIG_IsOK(res2
)) {
2105 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Options_user_agent_set" "', argument " "2"" of type '" "std::string const &""'");
2108 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "Options_user_agent_set" "', argument " "2"" of type '" "std::string const &""'");
2112 if (arg1
) (arg1
)->user_agent
= *arg2
;
2113 ST(argvi
) = sv_newmortal();
2115 if (SWIG_IsNewObj(res2
)) delete arg2
;
2119 if (SWIG_IsNewObj(res2
)) delete arg2
;
2125 XS(_wrap_Options_user_agent_get
) {
2127 Options
*arg1
= (Options
*) 0 ;
2131 std::string
*result
= 0 ;
2134 if ((items
< 1) || (items
> 1)) {
2135 SWIG_croak("Usage: Options_user_agent_get(self);");
2137 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, 0 | 0 );
2138 if (!SWIG_IsOK(res1
)) {
2139 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Options_user_agent_get" "', argument " "1"" of type '" "Options *""'");
2141 arg1
= reinterpret_cast< Options
* >(argp1
);
2142 result
= (std::string
*) & ((arg1
)->user_agent
);
2143 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
2153 XS(_wrap_Options_http_proxy_set
) {
2155 Options
*arg1
= (Options
*) 0 ;
2156 std::string
*arg2
= 0 ;
2159 int res2
= SWIG_OLDOBJ
;
2163 if ((items
< 2) || (items
> 2)) {
2164 SWIG_croak("Usage: Options_http_proxy_set(self,http_proxy);");
2166 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, 0 | 0 );
2167 if (!SWIG_IsOK(res1
)) {
2168 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Options_http_proxy_set" "', argument " "1"" of type '" "Options *""'");
2170 arg1
= reinterpret_cast< Options
* >(argp1
);
2172 std::string
*ptr
= (std::string
*)0;
2173 res2
= SWIG_AsPtr_std_string
SWIG_PERL_CALL_ARGS_2(ST(1), &ptr
);
2174 if (!SWIG_IsOK(res2
)) {
2175 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Options_http_proxy_set" "', argument " "2"" of type '" "std::string const &""'");
2178 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "Options_http_proxy_set" "', argument " "2"" of type '" "std::string const &""'");
2182 if (arg1
) (arg1
)->http_proxy
= *arg2
;
2183 ST(argvi
) = sv_newmortal();
2185 if (SWIG_IsNewObj(res2
)) delete arg2
;
2189 if (SWIG_IsNewObj(res2
)) delete arg2
;
2195 XS(_wrap_Options_http_proxy_get
) {
2197 Options
*arg1
= (Options
*) 0 ;
2201 std::string
*result
= 0 ;
2204 if ((items
< 1) || (items
> 1)) {
2205 SWIG_croak("Usage: Options_http_proxy_get(self);");
2207 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, 0 | 0 );
2208 if (!SWIG_IsOK(res1
)) {
2209 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Options_http_proxy_get" "', argument " "1"" of type '" "Options *""'");
2211 arg1
= reinterpret_cast< Options
* >(argp1
);
2212 result
= (std::string
*) & ((arg1
)->http_proxy
);
2213 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
2223 XS(_wrap_Options_verbose_libcurl_set
) {
2225 Options
*arg1
= (Options
*) 0 ;
2234 if ((items
< 2) || (items
> 2)) {
2235 SWIG_croak("Usage: Options_verbose_libcurl_set(self,verbose_libcurl);");
2237 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, 0 | 0 );
2238 if (!SWIG_IsOK(res1
)) {
2239 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Options_verbose_libcurl_set" "', argument " "1"" of type '" "Options *""'");
2241 arg1
= reinterpret_cast< Options
* >(argp1
);
2242 ecode2
= SWIG_AsVal_bool
SWIG_PERL_CALL_ARGS_2(ST(1), &val2
);
2243 if (!SWIG_IsOK(ecode2
)) {
2244 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "Options_verbose_libcurl_set" "', argument " "2"" of type '" "bool""'");
2246 arg2
= static_cast< bool >(val2
);
2247 if (arg1
) (arg1
)->verbose_libcurl
= arg2
;
2248 ST(argvi
) = sv_newmortal();
2260 XS(_wrap_Options_verbose_libcurl_get
) {
2262 Options
*arg1
= (Options
*) 0 ;
2269 if ((items
< 1) || (items
> 1)) {
2270 SWIG_croak("Usage: Options_verbose_libcurl_get(self);");
2272 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, 0 | 0 );
2273 if (!SWIG_IsOK(res1
)) {
2274 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Options_verbose_libcurl_get" "', argument " "1"" of type '" "Options *""'");
2276 arg1
= reinterpret_cast< Options
* >(argp1
);
2277 result
= (bool) ((arg1
)->verbose_libcurl
);
2278 ST(argvi
) = SWIG_From_bool
SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result
)); argvi
++ ;
2288 XS(_wrap_Options_format_set
) {
2290 Options
*arg1
= (Options
*) 0 ;
2291 std::string
*arg2
= 0 ;
2294 int res2
= SWIG_OLDOBJ
;
2298 if ((items
< 2) || (items
> 2)) {
2299 SWIG_croak("Usage: Options_format_set(self,format);");
2301 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, 0 | 0 );
2302 if (!SWIG_IsOK(res1
)) {
2303 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Options_format_set" "', argument " "1"" of type '" "Options *""'");
2305 arg1
= reinterpret_cast< Options
* >(argp1
);
2307 std::string
*ptr
= (std::string
*)0;
2308 res2
= SWIG_AsPtr_std_string
SWIG_PERL_CALL_ARGS_2(ST(1), &ptr
);
2309 if (!SWIG_IsOK(res2
)) {
2310 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Options_format_set" "', argument " "2"" of type '" "std::string const &""'");
2313 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "Options_format_set" "', argument " "2"" of type '" "std::string const &""'");
2317 if (arg1
) (arg1
)->format
= *arg2
;
2318 ST(argvi
) = sv_newmortal();
2320 if (SWIG_IsNewObj(res2
)) delete arg2
;
2324 if (SWIG_IsNewObj(res2
)) delete arg2
;
2330 XS(_wrap_Options_format_get
) {
2332 Options
*arg1
= (Options
*) 0 ;
2336 std::string
*result
= 0 ;
2339 if ((items
< 1) || (items
> 1)) {
2340 SWIG_croak("Usage: Options_format_get(self);");
2342 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, 0 | 0 );
2343 if (!SWIG_IsOK(res1
)) {
2344 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Options_format_get" "', argument " "1"" of type '" "Options *""'");
2346 arg1
= reinterpret_cast< Options
* >(argp1
);
2347 result
= (std::string
*) & ((arg1
)->format
);
2348 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
2358 XS(_wrap_Options_verify_set
) {
2360 Options
*arg1
= (Options
*) 0 ;
2369 if ((items
< 2) || (items
> 2)) {
2370 SWIG_croak("Usage: Options_verify_set(self,verify);");
2372 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, 0 | 0 );
2373 if (!SWIG_IsOK(res1
)) {
2374 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Options_verify_set" "', argument " "1"" of type '" "Options *""'");
2376 arg1
= reinterpret_cast< Options
* >(argp1
);
2377 ecode2
= SWIG_AsVal_bool
SWIG_PERL_CALL_ARGS_2(ST(1), &val2
);
2378 if (!SWIG_IsOK(ecode2
)) {
2379 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "Options_verify_set" "', argument " "2"" of type '" "bool""'");
2381 arg2
= static_cast< bool >(val2
);
2382 if (arg1
) (arg1
)->verify
= arg2
;
2383 ST(argvi
) = sv_newmortal();
2395 XS(_wrap_Options_verify_get
) {
2397 Options
*arg1
= (Options
*) 0 ;
2404 if ((items
< 1) || (items
> 1)) {
2405 SWIG_croak("Usage: Options_verify_get(self);");
2407 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, 0 | 0 );
2408 if (!SWIG_IsOK(res1
)) {
2409 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Options_verify_get" "', argument " "1"" of type '" "Options *""'");
2411 arg1
= reinterpret_cast< Options
* >(argp1
);
2412 result
= (bool) ((arg1
)->verify
);
2413 ST(argvi
) = SWIG_From_bool
SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result
)); argvi
++ ;
2423 XS(_wrap_delete_Options
) {
2425 Options
*arg1
= (Options
*) 0 ;
2431 if ((items
< 1) || (items
> 1)) {
2432 SWIG_croak("Usage: delete_Options(self);");
2434 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Options
, SWIG_POINTER_DISOWN
| 0 );
2435 if (!SWIG_IsOK(res1
)) {
2436 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_Options" "', argument " "1"" of type '" "Options *""'");
2438 arg1
= reinterpret_cast< Options
* >(argp1
);
2440 ST(argvi
) = sv_newmortal();
2450 XS(_wrap_new_Link
) {
2456 if ((items
< 0) || (items
> 0)) {
2457 SWIG_croak("Usage: new_Link();");
2459 result
= (Link
*)new Link();
2460 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_Link
, SWIG_OWNER
| SWIG_SHADOW
); argvi
++ ;
2468 XS(_wrap_Link_content_type_get
) {
2470 Link
*arg1
= (Link
*) 0 ;
2474 std::string
*result
= 0 ;
2477 if ((items
< 1) || (items
> 1)) {
2478 SWIG_croak("Usage: Link_content_type_get(self);");
2480 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Link
, 0 | 0 );
2481 if (!SWIG_IsOK(res1
)) {
2482 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Link_content_type_get" "', argument " "1"" of type '" "Link *""'");
2484 arg1
= reinterpret_cast< Link
* >(argp1
);
2485 result
= (std::string
*) & ((arg1
)->content_type
);
2486 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
2496 XS(_wrap_Link_file_suffix_get
) {
2498 Link
*arg1
= (Link
*) 0 ;
2502 std::string
*result
= 0 ;
2505 if ((items
< 1) || (items
> 1)) {
2506 SWIG_croak("Usage: Link_file_suffix_get(self);");
2508 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Link
, 0 | 0 );
2509 if (!SWIG_IsOK(res1
)) {
2510 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Link_file_suffix_get" "', argument " "1"" of type '" "Link *""'");
2512 arg1
= reinterpret_cast< Link
* >(argp1
);
2513 result
= (std::string
*) & ((arg1
)->file_suffix
);
2514 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
2524 XS(_wrap_Link_length_bytes_get
) {
2526 Link
*arg1
= (Link
*) 0 ;
2533 if ((items
< 1) || (items
> 1)) {
2534 SWIG_croak("Usage: Link_length_bytes_get(self);");
2536 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Link
, 0 | 0 );
2537 if (!SWIG_IsOK(res1
)) {
2538 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Link_length_bytes_get" "', argument " "1"" of type '" "Link *""'");
2540 arg1
= reinterpret_cast< Link
* >(argp1
);
2541 result
= (double) ((arg1
)->length_bytes
);
2542 ST(argvi
) = SWIG_From_double
SWIG_PERL_CALL_ARGS_1(static_cast< double >(result
)); argvi
++ ;
2552 XS(_wrap_Link_url_get
) {
2554 Link
*arg1
= (Link
*) 0 ;
2558 std::string
*result
= 0 ;
2561 if ((items
< 1) || (items
> 1)) {
2562 SWIG_croak("Usage: Link_url_get(self);");
2564 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Link
, 0 | 0 );
2565 if (!SWIG_IsOK(res1
)) {
2566 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Link_url_get" "', argument " "1"" of type '" "Link *""'");
2568 arg1
= reinterpret_cast< Link
* >(argp1
);
2569 result
= (std::string
*) & ((arg1
)->url
);
2570 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
2580 XS(_wrap_delete_Link
) {
2582 Link
*arg1
= (Link
*) 0 ;
2588 if ((items
< 1) || (items
> 1)) {
2589 SWIG_croak("Usage: delete_Link(self);");
2591 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Link
, SWIG_POINTER_DISOWN
| 0 );
2592 if (!SWIG_IsOK(res1
)) {
2593 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_Link" "', argument " "1"" of type '" "Link *""'");
2595 arg1
= reinterpret_cast< Link
* >(argp1
);
2597 ST(argvi
) = sv_newmortal();
2607 XS(_wrap_new_Video
) {
2613 if ((items
< 0) || (items
> 0)) {
2614 SWIG_croak("Usage: new_Video();");
2616 result
= (Video
*)new Video();
2617 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_Video
, SWIG_OWNER
| SWIG_SHADOW
); argvi
++ ;
2625 XS(_wrap_Video_title_get
) {
2627 Video
*arg1
= (Video
*) 0 ;
2631 std::string
*result
= 0 ;
2634 if ((items
< 1) || (items
> 1)) {
2635 SWIG_croak("Usage: Video_title_get(self);");
2637 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Video
, 0 | 0 );
2638 if (!SWIG_IsOK(res1
)) {
2639 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Video_title_get" "', argument " "1"" of type '" "Video *""'");
2641 arg1
= reinterpret_cast< Video
* >(argp1
);
2642 result
= (std::string
*) & ((arg1
)->title
);
2643 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
2653 XS(_wrap_Video_host_get
) {
2655 Video
*arg1
= (Video
*) 0 ;
2659 std::string
*result
= 0 ;
2662 if ((items
< 1) || (items
> 1)) {
2663 SWIG_croak("Usage: Video_host_get(self);");
2665 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Video
, 0 | 0 );
2666 if (!SWIG_IsOK(res1
)) {
2667 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Video_host_get" "', argument " "1"" of type '" "Video *""'");
2669 arg1
= reinterpret_cast< Video
* >(argp1
);
2670 result
= (std::string
*) & ((arg1
)->host
);
2671 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
2681 XS(_wrap_Video_url_get
) {
2683 Video
*arg1
= (Video
*) 0 ;
2687 std::string
*result
= 0 ;
2690 if ((items
< 1) || (items
> 1)) {
2691 SWIG_croak("Usage: Video_url_get(self);");
2693 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Video
, 0 | 0 );
2694 if (!SWIG_IsOK(res1
)) {
2695 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Video_url_get" "', argument " "1"" of type '" "Video *""'");
2697 arg1
= reinterpret_cast< Video
* >(argp1
);
2698 result
= (std::string
*) & ((arg1
)->url
);
2699 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
2709 XS(_wrap_Video_id_get
) {
2711 Video
*arg1
= (Video
*) 0 ;
2715 std::string
*result
= 0 ;
2718 if ((items
< 1) || (items
> 1)) {
2719 SWIG_croak("Usage: Video_id_get(self);");
2721 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Video
, 0 | 0 );
2722 if (!SWIG_IsOK(res1
)) {
2723 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Video_id_get" "', argument " "1"" of type '" "Video *""'");
2725 arg1
= reinterpret_cast< Video
* >(argp1
);
2726 result
= (std::string
*) & ((arg1
)->id
);
2727 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
2737 XS(_wrap_Video_link_get
) {
2739 Video
*arg1
= (Video
*) 0 ;
2746 if ((items
< 1) || (items
> 1)) {
2747 SWIG_croak("Usage: Video_link_get(self);");
2749 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Video
, 0 | 0 );
2750 if (!SWIG_IsOK(res1
)) {
2751 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Video_link_get" "', argument " "1"" of type '" "Video *""'");
2753 arg1
= reinterpret_cast< Video
* >(argp1
);
2754 result
= (Link
*)& ((arg1
)->link
);
2755 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_Link
, 0 | SWIG_SHADOW
); argvi
++ ;
2765 XS(_wrap_Video_ok_get
) {
2767 Video
*arg1
= (Video
*) 0 ;
2774 if ((items
< 1) || (items
> 1)) {
2775 SWIG_croak("Usage: Video_ok_get(self);");
2777 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Video
, 0 | 0 );
2778 if (!SWIG_IsOK(res1
)) {
2779 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Video_ok_get" "', argument " "1"" of type '" "Video *""'");
2781 arg1
= reinterpret_cast< Video
* >(argp1
);
2782 result
= (bool) ((arg1
)->ok
);
2783 ST(argvi
) = SWIG_From_bool
SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result
)); argvi
++ ;
2793 XS(_wrap_delete_Video
) {
2795 Video
*arg1
= (Video
*) 0 ;
2801 if ((items
< 1) || (items
> 1)) {
2802 SWIG_croak("Usage: delete_Video(self);");
2804 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Video
, SWIG_POINTER_DISOWN
| 0 );
2805 if (!SWIG_IsOK(res1
)) {
2806 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_Video" "', argument " "1"" of type '" "Video *""'");
2808 arg1
= reinterpret_cast< Video
* >(argp1
);
2810 ST(argvi
) = sv_newmortal();
2820 XS(_wrap_new_Query
) {
2826 if ((items
< 0) || (items
> 0)) {
2827 SWIG_croak("Usage: new_Query();");
2832 result
= (Query
*)new Query();
2834 catch (const std::runtime_error
& e
)
2836 SWIG_exception (SWIG_RuntimeError
, e
.what ());
2839 ST(argvi
) = SWIG_NewPointerObj(SWIG_as_voidptr(result
), SWIGTYPE_p_Query
, SWIG_OWNER
| SWIG_SHADOW
); argvi
++ ;
2847 XS(_wrap_delete_Query
) {
2849 Query
*arg1
= (Query
*) 0 ;
2855 if ((items
< 1) || (items
> 1)) {
2856 SWIG_croak("Usage: delete_Query(self);");
2858 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Query
, SWIG_POINTER_DISOWN
| 0 );
2859 if (!SWIG_IsOK(res1
)) {
2860 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_Query" "', argument " "1"" of type '" "Query *""'");
2862 arg1
= reinterpret_cast< Query
* >(argp1
);
2868 catch (const std::runtime_error
& e
)
2870 SWIG_exception (SWIG_RuntimeError
, e
.what ());
2873 ST(argvi
) = sv_newmortal();
2883 XS(_wrap_Query_parse
) {
2885 Query
*arg1
= (Query
*) 0 ;
2886 std::string
*arg2
= 0 ;
2890 int res2
= SWIG_OLDOBJ
;
2897 if ((items
< 3) || (items
> 3)) {
2898 SWIG_croak("Usage: Query_parse(self,std::string const &,Options const &);");
2900 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Query
, 0 | 0 );
2901 if (!SWIG_IsOK(res1
)) {
2902 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Query_parse" "', argument " "1"" of type '" "Query *""'");
2904 arg1
= reinterpret_cast< Query
* >(argp1
);
2906 std::string
*ptr
= (std::string
*)0;
2907 res2
= SWIG_AsPtr_std_string
SWIG_PERL_CALL_ARGS_2(ST(1), &ptr
);
2908 if (!SWIG_IsOK(res2
)) {
2909 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "Query_parse" "', argument " "2"" of type '" "std::string const &""'");
2912 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "Query_parse" "', argument " "2"" of type '" "std::string const &""'");
2916 res3
= SWIG_ConvertPtr(ST(2), &argp3
, SWIGTYPE_p_Options
, 0 );
2917 if (!SWIG_IsOK(res3
)) {
2918 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "Query_parse" "', argument " "3"" of type '" "Options const &""'");
2921 SWIG_exception_fail(SWIG_ValueError
, "invalid null reference " "in method '" "Query_parse" "', argument " "3"" of type '" "Options const &""'");
2923 arg3
= reinterpret_cast< Options
* >(argp3
);
2927 result
= (arg1
)->parse((std::string
const &)*arg2
,(Options
const &)*arg3
);
2929 catch (const std::runtime_error
& e
)
2931 SWIG_exception (SWIG_RuntimeError
, e
.what ());
2934 ST(argvi
) = SWIG_NewPointerObj((new Video(static_cast< const Video
& >(result
))), SWIGTYPE_p_Video
, SWIG_POINTER_OWN
| SWIG_SHADOW
); argvi
++ ;
2936 if (SWIG_IsNewObj(res2
)) delete arg2
;
2941 if (SWIG_IsNewObj(res2
)) delete arg2
;
2948 XS(_wrap_Query_next_website
) {
2950 Query
*arg1
= (Query
*) 0 ;
2951 std::string
*arg2
= 0 ;
2952 std::string
*arg3
= 0 ;
2956 int res2
= SWIG_TMPOBJ
;
2958 int res3
= SWIG_TMPOBJ
;
2965 if ((items
< 1) || (items
> 1)) {
2966 SWIG_croak("Usage: Query_next_website(self);");
2968 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Query
, 0 | 0 );
2969 if (!SWIG_IsOK(res1
)) {
2970 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Query_next_website" "', argument " "1"" of type '" "Query *""'");
2972 arg1
= reinterpret_cast< Query
* >(argp1
);
2976 result
= (int)(arg1
)->next_website(*arg2
,*arg3
);
2978 catch (const std::runtime_error
& e
)
2980 SWIG_exception (SWIG_RuntimeError
, e
.what ());
2983 ST(argvi
) = SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(result
)); argvi
++ ;
2984 if (SWIG_IsTmpObj(res2
)) {
2985 if (argvi
>= items
) EXTEND(sp
,1); ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1((*arg2
)); argvi
++ ;
2987 int new_flags
= SWIG_IsNewObj(res2
) ? (SWIG_POINTER_OWN
| 0) : 0;
2988 if (argvi
>= items
) EXTEND(sp
,1); ST(argvi
) = SWIG_NewPointerObj((void*)(arg2
), SWIGTYPE_p_std__string
, new_flags
); argvi
++ ;
2990 if (SWIG_IsTmpObj(res3
)) {
2991 if (argvi
>= items
) EXTEND(sp
,1); ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1((*arg3
)); argvi
++ ;
2993 int new_flags
= SWIG_IsNewObj(res3
) ? (SWIG_POINTER_OWN
| 0) : 0;
2994 if (argvi
>= items
) EXTEND(sp
,1); ST(argvi
) = SWIG_NewPointerObj((void*)(arg3
), SWIGTYPE_p_std__string
, new_flags
); argvi
++ ;
3009 XS(_wrap_Query_last_error_get
) {
3011 Query
*arg1
= (Query
*) 0 ;
3015 std::string
*result
= 0 ;
3018 if ((items
< 1) || (items
> 1)) {
3019 SWIG_croak("Usage: Query_last_error_get(self);");
3021 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Query
, 0 | 0 );
3022 if (!SWIG_IsOK(res1
)) {
3023 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Query_last_error_get" "', argument " "1"" of type '" "Query *""'");
3025 arg1
= reinterpret_cast< Query
* >(argp1
);
3026 result
= (std::string
*) & ((arg1
)->last_error
);
3027 ST(argvi
) = SWIG_From_std_string
SWIG_PERL_CALL_ARGS_1(static_cast< std::string
>(*result
)); argvi
++ ;
3037 XS(_wrap_Query_quvi_code_get
) {
3039 Query
*arg1
= (Query
*) 0 ;
3046 if ((items
< 1) || (items
> 1)) {
3047 SWIG_croak("Usage: Query_quvi_code_get(self);");
3049 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Query
, 0 | 0 );
3050 if (!SWIG_IsOK(res1
)) {
3051 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Query_quvi_code_get" "', argument " "1"" of type '" "Query *""'");
3053 arg1
= reinterpret_cast< Query
* >(argp1
);
3054 result
= (long) ((arg1
)->quvi_code
);
3055 ST(argvi
) = SWIG_From_long
SWIG_PERL_CALL_ARGS_1(static_cast< long >(result
)); argvi
++ ;
3065 XS(_wrap_Query_resp_code_get
) {
3067 Query
*arg1
= (Query
*) 0 ;
3074 if ((items
< 1) || (items
> 1)) {
3075 SWIG_croak("Usage: Query_resp_code_get(self);");
3077 res1
= SWIG_ConvertPtr(ST(0), &argp1
,SWIGTYPE_p_Query
, 0 | 0 );
3078 if (!SWIG_IsOK(res1
)) {
3079 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "Query_resp_code_get" "', argument " "1"" of type '" "Query *""'");
3081 arg1
= reinterpret_cast< Query
* >(argp1
);
3082 result
= (long) ((arg1
)->resp_code
);
3083 ST(argvi
) = SWIG_From_long
SWIG_PERL_CALL_ARGS_1(static_cast< long >(result
)); argvi
++ ;
3094 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3096 static swig_type_info _swigt__p_Link
= {"_p_Link", "Link *", 0, 0, (void*)"WWW::Quvi::Link", 0};
3097 static swig_type_info _swigt__p_Options
= {"_p_Options", "Options *", 0, 0, (void*)"WWW::Quvi::Options", 0};
3098 static swig_type_info _swigt__p_Query
= {"_p_Query", "Query *", 0, 0, (void*)"WWW::Quvi::Query", 0};
3099 static swig_type_info _swigt__p_Video
= {"_p_Video", "Video *", 0, 0, (void*)"WWW::Quvi::Video", 0};
3100 static swig_type_info _swigt__p_char
= {"_p_char", "char *", 0, 0, (void*)0, 0};
3101 static swig_type_info _swigt__p_quviCode
= {"_p_quviCode", "enum quviCode *|quviCode *", 0, 0, (void*)0, 0};
3102 static swig_type_info _swigt__p_quviVersion
= {"_p_quviVersion", "enum quviVersion *|quviVersion *", 0, 0, (void*)0, 0};
3103 static swig_type_info _swigt__p_std__string
= {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
3105 static swig_type_info
*swig_type_initial
[] = {
3111 &_swigt__p_quviCode
,
3112 &_swigt__p_quviVersion
,
3113 &_swigt__p_std__string
,
3116 static swig_cast_info _swigc__p_Link
[] = { {&_swigt__p_Link
, 0, 0, 0},{0, 0, 0, 0}};
3117 static swig_cast_info _swigc__p_Options
[] = { {&_swigt__p_Options
, 0, 0, 0},{0, 0, 0, 0}};
3118 static swig_cast_info _swigc__p_Query
[] = { {&_swigt__p_Query
, 0, 0, 0},{0, 0, 0, 0}};
3119 static swig_cast_info _swigc__p_Video
[] = { {&_swigt__p_Video
, 0, 0, 0},{0, 0, 0, 0}};
3120 static swig_cast_info _swigc__p_char
[] = { {&_swigt__p_char
, 0, 0, 0},{0, 0, 0, 0}};
3121 static swig_cast_info _swigc__p_quviCode
[] = { {&_swigt__p_quviCode
, 0, 0, 0},{0, 0, 0, 0}};
3122 static swig_cast_info _swigc__p_quviVersion
[] = { {&_swigt__p_quviVersion
, 0, 0, 0},{0, 0, 0, 0}};
3123 static swig_cast_info _swigc__p_std__string
[] = { {&_swigt__p_std__string
, 0, 0, 0},{0, 0, 0, 0}};
3125 static swig_cast_info
*swig_cast_initial
[] = {
3132 _swigc__p_quviVersion
,
3133 _swigc__p_std__string
,
3137 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3139 static swig_constant_info swig_constants
[] = {
3145 static swig_variable_info swig_variables
[] = {
3146 { "WWW::Quvic::_VERSION", MAGIC_CLASS _wrap__VERSION_set
, MAGIC_CLASS _wrap__VERSION_get
,0 },
3149 static swig_command_info swig_commands
[] = {
3150 {"WWW::Quvic::version", _wrap_version
},
3151 {"WWW::Quvic::new_Options", _wrap_new_Options
},
3152 {"WWW::Quvic::Options_user_agent_set", _wrap_Options_user_agent_set
},
3153 {"WWW::Quvic::Options_user_agent_get", _wrap_Options_user_agent_get
},
3154 {"WWW::Quvic::Options_http_proxy_set", _wrap_Options_http_proxy_set
},
3155 {"WWW::Quvic::Options_http_proxy_get", _wrap_Options_http_proxy_get
},
3156 {"WWW::Quvic::Options_verbose_libcurl_set", _wrap_Options_verbose_libcurl_set
},
3157 {"WWW::Quvic::Options_verbose_libcurl_get", _wrap_Options_verbose_libcurl_get
},
3158 {"WWW::Quvic::Options_format_set", _wrap_Options_format_set
},
3159 {"WWW::Quvic::Options_format_get", _wrap_Options_format_get
},
3160 {"WWW::Quvic::Options_verify_set", _wrap_Options_verify_set
},
3161 {"WWW::Quvic::Options_verify_get", _wrap_Options_verify_get
},
3162 {"WWW::Quvic::delete_Options", _wrap_delete_Options
},
3163 {"WWW::Quvic::new_Link", _wrap_new_Link
},
3164 {"WWW::Quvic::Link_content_type_get", _wrap_Link_content_type_get
},
3165 {"WWW::Quvic::Link_file_suffix_get", _wrap_Link_file_suffix_get
},
3166 {"WWW::Quvic::Link_length_bytes_get", _wrap_Link_length_bytes_get
},
3167 {"WWW::Quvic::Link_url_get", _wrap_Link_url_get
},
3168 {"WWW::Quvic::delete_Link", _wrap_delete_Link
},
3169 {"WWW::Quvic::new_Video", _wrap_new_Video
},
3170 {"WWW::Quvic::Video_title_get", _wrap_Video_title_get
},
3171 {"WWW::Quvic::Video_host_get", _wrap_Video_host_get
},
3172 {"WWW::Quvic::Video_url_get", _wrap_Video_url_get
},
3173 {"WWW::Quvic::Video_id_get", _wrap_Video_id_get
},
3174 {"WWW::Quvic::Video_link_get", _wrap_Video_link_get
},
3175 {"WWW::Quvic::Video_ok_get", _wrap_Video_ok_get
},
3176 {"WWW::Quvic::delete_Video", _wrap_delete_Video
},
3177 {"WWW::Quvic::new_Query", _wrap_new_Query
},
3178 {"WWW::Quvic::delete_Query", _wrap_delete_Query
},
3179 {"WWW::Quvic::Query_parse", _wrap_Query_parse
},
3180 {"WWW::Quvic::Query_next_website", _wrap_Query_next_website
},
3181 {"WWW::Quvic::Query_last_error_get", _wrap_Query_last_error_get
},
3182 {"WWW::Quvic::Query_quvi_code_get", _wrap_Query_quvi_code_get
},
3183 {"WWW::Quvic::Query_resp_code_get", _wrap_Query_resp_code_get
},
3186 /* -----------------------------------------------------------------------------
3187 * Type initialization:
3188 * This problem is tough by the requirement that no dynamic
3189 * memory is used. Also, since swig_type_info structures store pointers to
3190 * swig_cast_info structures and swig_cast_info structures store pointers back
3191 * to swig_type_info structures, we need some lookup code at initialization.
3192 * The idea is that swig generates all the structures that are needed.
3193 * The runtime then collects these partially filled structures.
3194 * The SWIG_InitializeModule function takes these initial arrays out of
3195 * swig_module, and does all the lookup, filling in the swig_module.types
3196 * array with the correct data and linking the correct swig_cast_info
3197 * structures together.
3199 * The generated swig_type_info structures are assigned staticly to an initial
3200 * array. We just loop through that array, and handle each type individually.
3201 * First we lookup if this type has been already loaded, and if so, use the
3202 * loaded structure instead of the generated one. Then we have to fill in the
3203 * cast linked list. The cast data is initially stored in something like a
3204 * two-dimensional array. Each row corresponds to a type (there are the same
3205 * number of rows as there are in the swig_type_initial array). Each entry in
3206 * a column is one of the swig_cast_info structures for that type.
3207 * The cast_initial array is actually an array of arrays, because each row has
3208 * a variable number of columns. So to actually build the cast linked list,
3209 * we find the array of casts associated with the type, and loop through it
3210 * adding the casts to the list. The one last trick we need to do is making
3211 * sure the type pointer in the swig_cast_info struct is correct.
3213 * First off, we lookup the cast->type name to see if it is already loaded.
3214 * There are three cases to handle:
3215 * 1) If the cast->type has already been loaded AND the type we are adding
3216 * casting info to has not been loaded (it is in this module), THEN we
3217 * replace the cast->type pointer with the type pointer that has already
3219 * 2) If BOTH types (the one we are adding casting info to, and the
3220 * cast->type) are loaded, THEN the cast info has already been loaded by
3221 * the previous module so we just ignore it.
3222 * 3) Finally, if cast->type has not already been loaded, then we add that
3223 * swig_cast_info to the linked list (because the cast->type) pointer will
3225 * ----------------------------------------------------------------------------- */
3235 #define SWIGRUNTIME_DEBUG
3240 SWIG_InitializeModule(void *clientdata
) {
3242 swig_module_info
*module_head
, *iter
;
3245 clientdata
= clientdata
;
3247 /* check to see if the circular list has been setup, if not, set it up */
3248 if (swig_module
.next
==0) {
3249 /* Initialize the swig_module */
3250 swig_module
.type_initial
= swig_type_initial
;
3251 swig_module
.cast_initial
= swig_cast_initial
;
3252 swig_module
.next
= &swig_module
;
3258 /* Try and load any already created modules */
3259 module_head
= SWIG_GetModule(clientdata
);
3261 /* This is the first module loaded for this interpreter */
3262 /* so set the swig module into the interpreter */
3263 SWIG_SetModule(clientdata
, &swig_module
);
3264 module_head
= &swig_module
;
3266 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3270 if (iter
==&swig_module
) {
3275 } while (iter
!= module_head
);
3277 /* if the is found in the list, then all is done and we may leave */
3279 /* otherwise we must add out module into the list */
3280 swig_module
.next
= module_head
->next
;
3281 module_head
->next
= &swig_module
;
3284 /* When multiple interpeters are used, a module could have already been initialized in
3285 a different interpreter, but not yet have a pointer in this interpreter.
3286 In this case, we do not want to continue adding types... everything should be
3288 if (init
== 0) return;
3290 /* Now work on filling in swig_module.types */
3291 #ifdef SWIGRUNTIME_DEBUG
3292 printf("SWIG_InitializeModule: size %d\n", swig_module
.size
);
3294 for (i
= 0; i
< swig_module
.size
; ++i
) {
3295 swig_type_info
*type
= 0;
3296 swig_type_info
*ret
;
3297 swig_cast_info
*cast
;
3299 #ifdef SWIGRUNTIME_DEBUG
3300 printf("SWIG_InitializeModule: type %d %s\n", i
, swig_module
.type_initial
[i
]->name
);
3303 /* if there is another module already loaded */
3304 if (swig_module
.next
!= &swig_module
) {
3305 type
= SWIG_MangledTypeQueryModule(swig_module
.next
, &swig_module
, swig_module
.type_initial
[i
]->name
);
3308 /* Overwrite clientdata field */
3309 #ifdef SWIGRUNTIME_DEBUG
3310 printf("SWIG_InitializeModule: found type %s\n", type
->name
);
3312 if (swig_module
.type_initial
[i
]->clientdata
) {
3313 type
->clientdata
= swig_module
.type_initial
[i
]->clientdata
;
3314 #ifdef SWIGRUNTIME_DEBUG
3315 printf("SWIG_InitializeModule: found and overwrite type %s \n", type
->name
);
3319 type
= swig_module
.type_initial
[i
];
3322 /* Insert casting types */
3323 cast
= swig_module
.cast_initial
[i
];
3324 while (cast
->type
) {
3325 /* Don't need to add information already in the list */
3327 #ifdef SWIGRUNTIME_DEBUG
3328 printf("SWIG_InitializeModule: look cast %s\n", cast
->type
->name
);
3330 if (swig_module
.next
!= &swig_module
) {
3331 ret
= SWIG_MangledTypeQueryModule(swig_module
.next
, &swig_module
, cast
->type
->name
);
3332 #ifdef SWIGRUNTIME_DEBUG
3333 if (ret
) printf("SWIG_InitializeModule: found cast %s\n", ret
->name
);
3337 if (type
== swig_module
.type_initial
[i
]) {
3338 #ifdef SWIGRUNTIME_DEBUG
3339 printf("SWIG_InitializeModule: skip old type %s\n", ret
->name
);
3344 /* Check for casting already in the list */
3345 swig_cast_info
*ocast
= SWIG_TypeCheck(ret
->name
, type
);
3346 #ifdef SWIGRUNTIME_DEBUG
3347 if (ocast
) printf("SWIG_InitializeModule: skip old cast %s\n", ret
->name
);
3349 if (!ocast
) ret
= 0;
3354 #ifdef SWIGRUNTIME_DEBUG
3355 printf("SWIG_InitializeModule: adding cast %s\n", cast
->type
->name
);
3358 type
->cast
->prev
= cast
;
3359 cast
->next
= type
->cast
;
3365 /* Set entry in modules->types array equal to the type */
3366 swig_module
.types
[i
] = type
;
3368 swig_module
.types
[i
] = 0;
3370 #ifdef SWIGRUNTIME_DEBUG
3371 printf("**** SWIG_InitializeModule: Cast List ******\n");
3372 for (i
= 0; i
< swig_module
.size
; ++i
) {
3374 swig_cast_info
*cast
= swig_module
.cast_initial
[i
];
3375 printf("SWIG_InitializeModule: type %d %s\n", i
, swig_module
.type_initial
[i
]->name
);
3376 while (cast
->type
) {
3377 printf("SWIG_InitializeModule: cast type %s\n", cast
->type
->name
);
3381 printf("---- Total casts: %d\n",j
);
3383 printf("**** SWIG_InitializeModule: Cast List ******\n");
3387 /* This function will propagate the clientdata field of type to
3388 * any new swig_type_info structures that have been added into the list
3389 * of equivalent types. It is like calling
3390 * SWIG_TypeClientData(type, clientdata) a second time.
3393 SWIG_PropagateClientData(void) {
3395 swig_cast_info
*equiv
;
3396 static int init_run
= 0;
3398 if (init_run
) return;
3401 for (i
= 0; i
< swig_module
.size
; i
++) {
3402 if (swig_module
.types
[i
]->clientdata
) {
3403 equiv
= swig_module
.types
[i
]->cast
;
3405 if (!equiv
->converter
) {
3406 if (equiv
->type
&& !equiv
->type
->clientdata
)
3407 SWIG_TypeClientData(equiv
->type
, swig_module
.types
[i
]->clientdata
);
3409 equiv
= equiv
->next
;
3433 SWIG_InitializeModule(0);
3435 /* Install commands */
3436 for (i
= 0; swig_commands
[i
].name
; i
++) {
3437 newXS((char*) swig_commands
[i
].name
,swig_commands
[i
].wrapper
, (char*)__FILE__
);
3440 /* Install variables */
3441 for (i
= 0; swig_variables
[i
].name
; i
++) {
3443 sv
= get_sv((char*) swig_variables
[i
].name
, TRUE
| 0x2 | GV_ADDMULTI
);
3444 if (swig_variables
[i
].type
) {
3445 SWIG_MakePtr(sv
,(void *)1, *swig_variables
[i
].type
,0);
3447 sv_setiv(sv
,(IV
) 0);
3449 swig_create_magic(sv
, (char *) swig_variables
[i
].name
, swig_variables
[i
].set
, swig_variables
[i
].get
);
3452 /* Install constant */
3453 for (i
= 0; swig_constants
[i
].type
; i
++) {
3455 sv
= get_sv((char*)swig_constants
[i
].name
, TRUE
| 0x2 | GV_ADDMULTI
);
3456 switch(swig_constants
[i
].type
) {
3458 sv_setiv(sv
, (IV
) swig_constants
[i
].lvalue
);
3461 sv_setnv(sv
, (double) swig_constants
[i
].dvalue
);
3464 sv_setpv(sv
, (char *) swig_constants
[i
].pvalue
);
3467 SWIG_MakePtr(sv
, swig_constants
[i
].pvalue
, *(swig_constants
[i
].ptype
),0);
3470 SWIG_MakePackedObj(sv
, swig_constants
[i
].pvalue
, swig_constants
[i
].lvalue
, *(swig_constants
[i
].ptype
));
3478 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3479 SV
*sv
= get_sv((char*) SWIG_prefix
"libquviVersion", TRUE
| 0x2 | GV_ADDMULTI
);
3480 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(libquviVersion
)));
3482 } while(0) /*@SWIG@*/;
3483 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3484 SV
*sv
= get_sv((char*) SWIG_prefix
"libquviVersionLong", TRUE
| 0x2 | GV_ADDMULTI
);
3485 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(libquviVersionLong
)));
3487 } while(0) /*@SWIG@*/;
3488 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3489 SV
*sv
= get_sv((char*) SWIG_prefix
"ModuleVersion", TRUE
| 0x2 | GV_ADDMULTI
);
3490 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(ModuleVersion
)));
3492 } while(0) /*@SWIG@*/;
3493 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3494 SV
*sv
= get_sv((char*) SWIG_prefix
"OK", TRUE
| 0x2 | GV_ADDMULTI
);
3495 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(OK
)));
3497 } while(0) /*@SWIG@*/;
3498 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3499 SV
*sv
= get_sv((char*) SWIG_prefix
"Mem", TRUE
| 0x2 | GV_ADDMULTI
);
3500 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(Mem
)));
3502 } while(0) /*@SWIG@*/;
3503 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3504 SV
*sv
= get_sv((char*) SWIG_prefix
"BadHandle", TRUE
| 0x2 | GV_ADDMULTI
);
3505 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(BadHandle
)));
3507 } while(0) /*@SWIG@*/;
3508 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3509 SV
*sv
= get_sv((char*) SWIG_prefix
"InvArg", TRUE
| 0x2 | GV_ADDMULTI
);
3510 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(InvArg
)));
3512 } while(0) /*@SWIG@*/;
3513 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3514 SV
*sv
= get_sv((char*) SWIG_prefix
"CurlInit", TRUE
| 0x2 | GV_ADDMULTI
);
3515 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(CurlInit
)));
3517 } while(0) /*@SWIG@*/;
3518 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3519 SV
*sv
= get_sv((char*) SWIG_prefix
"Last", TRUE
| 0x2 | GV_ADDMULTI
);
3520 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(Last
)));
3522 } while(0) /*@SWIG@*/;
3523 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3524 SV
*sv
= get_sv((char*) SWIG_prefix
"AbortedByCallback", TRUE
| 0x2 | GV_ADDMULTI
);
3525 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(AbortedByCallback
)));
3527 } while(0) /*@SWIG@*/;
3528 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3529 SV
*sv
= get_sv((char*) SWIG_prefix
"LuaInit", TRUE
| 0x2 | GV_ADDMULTI
);
3530 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(LuaInit
)));
3532 } while(0) /*@SWIG@*/;
3533 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3534 SV
*sv
= get_sv((char*) SWIG_prefix
"NoLuaWebsite", TRUE
| 0x2 | GV_ADDMULTI
);
3535 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(NoLuaWebsite
)));
3537 } while(0) /*@SWIG@*/;
3538 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3539 SV
*sv
= get_sv((char*) SWIG_prefix
"NoLuaUtil", TRUE
| 0x2 | GV_ADDMULTI
);
3540 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(NoLuaUtil
)));
3542 } while(0) /*@SWIG@*/;
3543 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3544 SV
*sv
= get_sv((char*) SWIG_prefix
"PcreError", TRUE
| 0x2 | GV_ADDMULTI
);
3545 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(PcreError
)));
3547 } while(0) /*@SWIG@*/;
3548 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3549 SV
*sv
= get_sv((char*) SWIG_prefix
"NoSupport", TRUE
| 0x2 | GV_ADDMULTI
);
3550 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(NoSupport
)));
3552 } while(0) /*@SWIG@*/;
3553 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3554 SV
*sv
= get_sv((char*) SWIG_prefix
"CurlError", TRUE
| 0x2 | GV_ADDMULTI
);
3555 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(CurlError
)));
3557 } while(0) /*@SWIG@*/;
3558 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3559 SV
*sv
= get_sv((char*) SWIG_prefix
"IconvError", TRUE
| 0x2 | GV_ADDMULTI
);
3560 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(IconvError
)));
3562 } while(0) /*@SWIG@*/;
3563 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3564 SV
*sv
= get_sv((char*) SWIG_prefix
"LuaError", TRUE
| 0x2 | GV_ADDMULTI
);
3565 sv_setsv(sv
, SWIG_From_int
SWIG_PERL_CALL_ARGS_1(static_cast< int >(LuaError
)));
3567 } while(0) /*@SWIG@*/;
3568 SWIG_TypeClientData(SWIGTYPE_p_Options
, (void*) "WWW::Quvi::Options");
3569 SWIG_TypeClientData(SWIGTYPE_p_Link
, (void*) "WWW::Quvi::Link");
3570 SWIG_TypeClientData(SWIGTYPE_p_Video
, (void*) "WWW::Quvi::Video");
3571 SWIG_TypeClientData(SWIGTYPE_p_Query
, (void*) "WWW::Quvi::Query");