diff --git a/conf/autoload_configs/xml_rpc.conf.xml b/conf/autoload_configs/xml_rpc.conf.xml index 57f790506c..714a909907 100644 --- a/conf/autoload_configs/xml_rpc.conf.xml +++ b/conf/autoload_configs/xml_rpc.conf.xml @@ -3,8 +3,8 @@ - - - + + + diff --git a/libs/esl/perl/ESL.pm b/libs/esl/perl/ESL.pm index ba08d1881d..aa523997f7 100644 --- a/libs/esl/perl/ESL.pm +++ b/libs/esl/perl/ESL.pm @@ -1,5 +1,8 @@ -# This file was created automatically by SWIG 1.3.29. +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 1.3.35 +# # Don't modify this file, modify the SWIG interface instead. + package ESL; require Exporter; require DynaLoader; diff --git a/libs/esl/perl/esl_wrap.cpp b/libs/esl/perl/esl_wrap.cpp index 86d8e0160b..5dbf3cd7a1 100644 --- a/libs/esl/perl/esl_wrap.cpp +++ b/libs/esl/perl/esl_wrap.cpp @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.29 + * Version 1.3.35 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make @@ -12,7 +12,7 @@ #define SWIG_CASTRANK_MODE #ifdef __cplusplus -template class SwigValueWrapper { +template class SwigValueWrapper { T *tt; public: SwigValueWrapper() : tt(0) { } @@ -25,6 +25,10 @@ public: private: SwigValueWrapper& operator=(const SwigValueWrapper& rhs); }; + +template T SwigValueInit() { + return T(); +} #endif /* ----------------------------------------------------------------------------- @@ -34,14 +38,14 @@ private: /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) -# if (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template # else -# define SWIGTEMPLATEDISAMBIGUATOR +# define SWIGTEMPLATEDISAMBIGUATOR # endif #endif @@ -120,10 +124,16 @@ private: #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE #endif +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + /* ----------------------------------------------------------------------------- * swigrun.swg * @@ -133,7 +143,7 @@ private: /* This should only be incremented when either the layout of swig_type_info changes, or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "2" +#define SWIG_RUNTIME_VERSION "4" /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ #ifdef SWIG_TYPE_TABLE @@ -168,6 +178,7 @@ private: /* Flags for pointer conversions */ #define SWIG_POINTER_DISOWN 0x1 +#define SWIG_CAST_NEW_MEMORY 0x2 /* Flags for new pointer objects */ #define SWIG_POINTER_OWN 0x1 @@ -308,10 +319,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { extern "C" { #endif -typedef void *(*swig_converter_func)(void *); +typedef void *(*swig_converter_func)(void *, int *); typedef struct swig_type_info *(*swig_dycast_func)(void **); -/* Structure to store inforomation on one type */ +/* Structure to store information on one type */ typedef struct swig_type_info { const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ @@ -356,7 +367,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1, while ((*f2 == ' ') && (f2 != l2)) ++f2; if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; } - return (l1 - f1) - (l2 - f2); + return (int)((l1 - f1) - (l2 - f2)); } /* @@ -438,8 +449,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { Cast a pointer up an inheritance hierarchy */ SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr); +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } /* @@ -792,6 +803,10 @@ extern "C" { # endif #endif /* !INT2PTR */ +#ifndef SvPV_nolen +# define SvPV_nolen(x) SvPV(x,PL_na) +#endif + #ifndef get_sv # define get_sv perl_get_sv #endif @@ -940,6 +955,11 @@ extern "C" { /* SWIG Perl macros */ +/* Macro to declare an XS function */ +#ifndef XSPROTO +# define XSPROTO(name) void name(pTHX_ CV* cv) +#endif + /* Macro to call an XS function */ #ifdef PERL_OBJECT # define SWIG_CALLXS(_name) _name(cv,pPerl) @@ -951,51 +971,50 @@ extern "C" { # endif #endif -/* Note: SwigMagicFuncHack is a typedef used to get the C++ compiler to just shut up already */ - #ifdef PERL_OBJECT #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; -typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); #ifdef __cplusplus extern "C" { #endif -typedef int (CPerlObj::*SwigMagicFuncHack)(SV *, MAGIC *); +typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); #ifdef __cplusplus } #endif #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) #define SWIGCLASS_STATIC -#else + +#else /* PERL_OBJECT */ + #define MAGIC_PPERL #define SWIGCLASS_STATIC static SWIGUNUSED + #ifndef MULTIPLICITY #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) -typedef int (*SwigMagicFunc)(SV *, MAGIC *); #ifdef __cplusplus extern "C" { #endif -typedef int (*SwigMagicFuncHack)(SV *, MAGIC *); +typedef int (*SwigMagicFunc)(SV *, MAGIC *); #ifdef __cplusplus } #endif +#else /* MULTIPLICITY */ -#else #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) + +#ifdef __cplusplus +extern "C" { +#endif typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); #ifdef __cplusplus -extern "C" { -#endif -typedef int (*SwigMagicFuncHack)(struct interpreter *, SV *, MAGIC *); -#ifdef __cplusplus } #endif -#endif -#endif +#endif /* MULTIPLICITY */ +#endif /* PERL_OBJECT */ /* Workaround for bug in perl 5.6.x croak and earlier */ #if (PERL_VERSION < 8) @@ -1019,6 +1038,35 @@ static void SWIG_croak_null() #endif +/* + Define how strict is the cast between strings and integers/doubles + when overloading between these types occurs. + + The default is making it as strict as possible by using SWIG_AddCast + when needed. + + You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to + disable the SWIG_AddCast, making the casting between string and + numbers less strict. + + In the end, we try to solve the overloading between strings and + numerical types in the more natural way, but if you can avoid it, + well, avoid it using %rename, for example. +*/ +#ifndef SWIG_PERL_NO_STRICT_STR2NUM +# ifndef SWIG_PERL_STRICT_STR2NUM +# define SWIG_PERL_STRICT_STR2NUM +# endif +#endif +#ifdef SWIG_PERL_STRICT_STR2NUM +/* string takes precedence */ +#define SWIG_Str2NumCast(x) SWIG_AddCast(x) +#else +/* number takes precedence */ +#define SWIG_Str2NumCast(x) x +#endif + + #include @@ -1035,7 +1083,7 @@ SWIG_Perl_TypeProxyName(const swig_type_info *type) { SWIGRUNTIME swig_cast_info * SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { - SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp((char*)iter->type->name, c) == 0)) + SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0))), ty); } @@ -1093,7 +1141,11 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info * if (!tc) { return SWIG_ERROR; } - *ptr = SWIG_TypeCast(tc,voidptr); + { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } } else { *ptr = voidptr; } @@ -1183,7 +1235,7 @@ SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_ const char *c = 0; if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; - c = SvPV(obj, PL_na); + c = SvPV_nolen(obj); /* Pointer values must start with leading underscore */ if (*c != '_') return SWIG_ERROR; c++; @@ -1200,7 +1252,7 @@ SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_ #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } -typedef XS(SwigPerlWrapper); +typedef XSPROTO(SwigPerlWrapper); typedef SwigPerlWrapper *SwigPerlWrapperPtr; /* Structure for command table */ @@ -1253,8 +1305,8 @@ SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, i sv_magic(sv,sv,'U',(char *) name,strlen(name)); mg = mg_find(sv,'U'); mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); - mg->mg_virtual->svt_get = (SwigMagicFuncHack) get; - mg->mg_virtual->svt_set = (SwigMagicFuncHack) set; + mg->mg_virtual->svt_get = (SwigMagicFunc) get; + mg->mg_virtual->svt_set = (SwigMagicFunc) set; mg->mg_virtual->svt_len = 0; mg->mg_virtual->svt_clear = 0; mg->mg_virtual->svt_free = 0; @@ -1268,7 +1320,7 @@ SWIG_Perl_GetModule(void) { /* first check if pointer already created */ if (!type_pointer) { - pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE); + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); if (pointer && SvOK(pointer)) { type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); } @@ -1282,7 +1334,7 @@ SWIG_Perl_SetModule(swig_module_info *module) { SV *pointer; /* create a new pointer */ - pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE); + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); sv_setiv(pointer, PTR2IV(module)); } @@ -1377,6 +1429,12 @@ SWIG_Perl_SetModule(swig_module_info *module) { #ifdef check #undef check #endif +#ifdef seekdir + #undef seekdir +#endif +#ifdef open + #undef open +#endif @@ -1405,7 +1463,8 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0}; #define SWIG_name "ESLc::boot_ESL" #define SWIG_prefix "ESLc::" -#define SWIGVERSION 0x010329 +#define SWIGVERSION 0x010335 +#define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) @@ -1434,7 +1493,7 @@ SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *); SWIGINTERN swig_type_info* -SWIG_pchar_descriptor() +SWIG_pchar_descriptor(void) { static int init = 0; static swig_type_info* info = 0; @@ -1488,16 +1547,8 @@ SWIGINTERNINLINE SV * SWIG_FromCharPtrAndSize(const char* carray, size_t size) { SV *obj = sv_newmortal(); - if (size && carray) { - if (carray[size - 1] == 0) { - sv_setpv(obj, carray); - } else { - char *tmp = (new char[size + 1]); - memcpy(tmp, carray, size); - tmp[size] = 0; - sv_setpv(obj, tmp); - delete[] tmp; - } + if (carray) { + sv_setpvn(obj, carray, size); } else { sv_setsv(obj, &PL_sv_undef); } @@ -1513,14 +1564,12 @@ SWIG_FromCharPtr(const char *cptr) #include -#ifndef LLONG_MIN -# define LLONG_MIN LONG_LONG_MIN -#endif -#ifndef LLONG_MAX -# define LLONG_MAX LONG_LONG_MAX -#endif -#ifndef ULLONG_MAX -# define ULLONG_MAX ULONG_LONG_MAX +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif #endif @@ -1534,7 +1583,7 @@ SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val) if (val) *val = (double) SvIV(obj); return SWIG_AddCast(SWIG_OK); } else { - const char *nptr = SvPV(obj, PL_na); + const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; double v = strtod(nptr, &endptr); @@ -1544,7 +1593,7 @@ SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val) } else { if (*endptr == '\0') { if (val) *val = v; - return SWIG_AddCast(SWIG_OK); + return SWIG_Str2NumCast(SWIG_OK); } } } @@ -1597,17 +1646,19 @@ SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val) return SWIG_OK; } else { int dispatch = 0; - const char *nptr = SvPV(obj, PL_na); + const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; - long v = strtol(nptr, &endptr,0); + long v; + errno = 0; + v = strtol(nptr, &endptr,0); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; } else { if (*endptr == '\0') { if (val) *val = v; - return SWIG_AddCast(SWIG_OK); + return SWIG_Str2NumCast(SWIG_OK); } } } @@ -1668,6 +1719,10 @@ SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value) return obj; } +#ifdef __cplusplus +extern "C" { +#endif + #ifdef PERL_OBJECT #define MAGIC_CLASS _wrap_ESL_var:: class _wrap_ESL_var : public CPerlObj { @@ -1686,6 +1741,10 @@ SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SW }; #endif +#ifdef __cplusplus +} +#endif + #ifdef __cplusplus extern "C" { #endif @@ -1779,11 +1838,11 @@ XS(_wrap_ESLevent_serialized_string_set) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_serialized_string_set" "', argument " "2"" of type '" "char *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); if (arg1->serialized_string) delete[] arg1->serialized_string; if (arg2) { - size_t size = strlen(arg2) + 1; - arg1->serialized_string = reinterpret_cast< char* >(memcpy((new char[size]), arg2, sizeof(char)*(size))); + size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1; + arg1->serialized_string = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size))); } else { arg1->serialized_string = 0; } @@ -1817,7 +1876,7 @@ XS(_wrap_ESLevent_serialized_string_get) { } arg1 = reinterpret_cast< ESLevent * >(argp1); result = (char *) ((arg1)->serialized_string); - ST(argvi) = SWIG_FromCharPtr(result); argvi++ ; + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: @@ -1914,13 +1973,13 @@ XS(_wrap_new_ESLevent__SWIG_0) { if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLevent" "', argument " "1"" of type '" "char const *""'"); } - arg1 = buf1; + arg1 = reinterpret_cast< char * >(buf1); if (items > 1) { res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLevent" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); } result = (ESLevent *)new ESLevent((char const *)arg1,(char const *)arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_OWNER | SWIG_SHADOW); argvi++ ; @@ -2163,10 +2222,10 @@ XS(_wrap_ESLevent_serialize) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_serialize" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); } result = (char *)(arg1)->serialize((char const *)arg2); - ST(argvi) = SWIG_FromCharPtr(result); argvi++ ; + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; XSRETURN(argvi); @@ -2247,9 +2306,9 @@ XS(_wrap_ESLevent_getHeader) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_getHeader" "', argument " "2"" of type '" "char *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); result = (char *)(arg1)->getHeader(arg2); - ST(argvi) = SWIG_FromCharPtr(result); argvi++ ; + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; XSRETURN(argvi); @@ -2279,7 +2338,7 @@ XS(_wrap_ESLevent_getBody) { } arg1 = reinterpret_cast< ESLevent * >(argp1); result = (char *)(arg1)->getBody(); - ST(argvi) = SWIG_FromCharPtr(result); argvi++ ; + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: @@ -2307,7 +2366,7 @@ XS(_wrap_ESLevent_getType) { } arg1 = reinterpret_cast< ESLevent * >(argp1); result = (char *)(arg1)->getType(); - ST(argvi) = SWIG_FromCharPtr(result); argvi++ ; + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; XSRETURN(argvi); fail: @@ -2342,7 +2401,7 @@ XS(_wrap_ESLevent_addBody) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_addBody" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); result = (bool)(arg1)->addBody((char const *)arg2); ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; @@ -2385,12 +2444,12 @@ XS(_wrap_ESLevent_addHeader) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_addHeader" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLevent_addHeader" "', argument " "3"" of type '" "char const *""'"); } - arg3 = buf3; + arg3 = reinterpret_cast< char * >(buf3); result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3); ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; @@ -2431,7 +2490,7 @@ XS(_wrap_ESLevent_delHeader) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLevent_delHeader" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); result = (bool)(arg1)->delHeader((char const *)arg2); ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; @@ -2526,17 +2585,17 @@ XS(_wrap_new_ESLconnection__SWIG_0) { if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESLconnection" "', argument " "1"" of type '" "char const *""'"); } - arg1 = buf1; + arg1 = reinterpret_cast< char * >(buf1); res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ESLconnection" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ESLconnection" "', argument " "3"" of type '" "char const *""'"); } - arg3 = buf3; + arg3 = reinterpret_cast< char * >(buf3); result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ; if (alloc1 == SWIG_NEWOBJ) delete[] buf1; @@ -2767,7 +2826,7 @@ XS(_wrap_ESLconnection_send) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_send" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); result = (int)(arg1)->send((char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; @@ -2806,7 +2865,7 @@ XS(_wrap_ESLconnection_sendRecv) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_sendRecv" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); result = (ESLevent *)(arg1)->sendRecv((char const *)arg2); ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, 0 | SWIG_SHADOW); argvi++ ; @@ -3057,12 +3116,12 @@ XS(_wrap_ESLconnection_filter) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_filter" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_filter" "', argument " "3"" of type '" "char const *""'"); } - arg3 = buf3; + arg3 = reinterpret_cast< char * >(buf3); result = (int)(arg1)->filter((char const *)arg2,(char const *)arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; @@ -3107,12 +3166,12 @@ XS(_wrap_ESLconnection_events) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_events" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_events" "', argument " "3"" of type '" "char const *""'"); } - arg3 = buf3; + arg3 = reinterpret_cast< char * >(buf3); result = (int)(arg1)->events((char const *)arg2,(char const *)arg3); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; @@ -3161,20 +3220,20 @@ XS(_wrap_ESLconnection_execute) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_execute" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); if (items > 2) { res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); if (!SWIG_IsOK(res3)) { SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ESLconnection_execute" "', argument " "3"" of type '" "char const *""'"); } - arg3 = buf3; + arg3 = reinterpret_cast< char * >(buf3); } if (items > 3) { res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); if (!SWIG_IsOK(res4)) { SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ESLconnection_execute" "', argument " "4"" of type '" "char const *""'"); } - arg4 = buf4; + arg4 = reinterpret_cast< char * >(buf4); } result = (int)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; @@ -3218,7 +3277,7 @@ XS(_wrap_ESLconnection_setBlockingExecute) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_setBlockingExecute" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); result = (int)(arg1)->setBlockingExecute((char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; @@ -3257,7 +3316,7 @@ XS(_wrap_ESLconnection_setEventLock) { if (!SWIG_IsOK(res2)) { SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESLconnection_setEventLock" "', argument " "2"" of type '" "char const *""'"); } - arg2 = buf2; + arg2 = reinterpret_cast< char * >(buf2); result = (int)(arg1)->setEventLock((char const *)arg2); ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; @@ -3393,7 +3452,7 @@ static swig_command_info swig_commands[] = { * structures together. * * The generated swig_type_info structures are assigned staticly to an initial - * array. We just loop though that array, and handle each type individually. + * array. We just loop through that array, and handle each type individually. * First we lookup if this type has been already loaded, and if so, use the * loaded structure instead of the generated one. Then we have to fill in the * cast linked list. The cast data is initially stored in something like a @@ -3431,32 +3490,58 @@ extern "C" { #define SWIGRUNTIME_DEBUG #endif + SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { size_t i; - swig_module_info *module_head; - static int init_run = 0; + swig_module_info *module_head, *iter; + int found, init; clientdata = clientdata; - if (init_run) return; - init_run = 1; - - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } /* Try and load any already created modules */ module_head = SWIG_GetModule(clientdata); - if (module_head) { + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; + do { + if (iter==&swig_module) { + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); + + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; - } else { - /* This is the first module loaded */ - swig_module.next = &swig_module; - SWIG_SetModule(clientdata, &swig_module); } + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: size %d\n", swig_module.size); @@ -3610,7 +3695,7 @@ XS(SWIG_init) { /* Install variables */ for (i = 0; swig_variables[i].name; i++) { SV *sv; - sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2); + sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI); if (swig_variables[i].type) { SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0); } else { @@ -3622,7 +3707,7 @@ XS(SWIG_init) { /* Install constant */ for (i = 0; swig_constants[i].type; i++) { SV *sv; - sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2); + sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI); switch(swig_constants[i].type) { case SWIG_INT: sv_setiv(sv, (IV) swig_constants[i].lvalue);