diff --git a/libs/esl/java/Makefile b/libs/esl/java/Makefile index 8738ff93f9..80064b380b 100644 --- a/libs/esl/java/Makefile +++ b/libs/esl/java/Makefile @@ -5,7 +5,7 @@ CLASSES=org/freeswitch/esl/* all: esl.jar esl_wrap.cpp: - swig -module esl -java -c++ $(LOCAL_CFLAGS) -package org.freeswitch.esl -outdir org/freeswitch/esl -o esl_wrap.cpp ../ESL.i + swig2.0 -module esl -java -c++ $(LOCAL_CFLAGS) -package org.freeswitch.esl -outdir org/freeswitch/esl -o esl_wrap.cpp ../ESL.i esl_wrap.o: esl_wrap.cpp $(CXX) $(CXX_CFLAGS) $(LOCAL_CFLAGS) $(CXXFLAGS) $(GCC_WARNING_JUNK) $(PERL_INC) -c esl_wrap.cpp -o esl_wrap.o diff --git a/libs/esl/java/esl_wrap.cpp b/libs/esl/java/esl_wrap.cpp index c5c4fa60c2..b31f7d216b 100644 --- a/libs/esl/java/esl_wrap.cpp +++ b/libs/esl/java/esl_wrap.cpp @@ -1,27 +1,32 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.12 + * + * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ +#define SWIGJAVA + #ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { - T *tt; + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); public: - SwigValueWrapper() : tt(0) { } - SwigValueWrapper(const SwigValueWrapper& rhs) : tt(new T(*rhs.tt)) { } - SwigValueWrapper(const T& t) : tt(new T(t)) { } - ~SwigValueWrapper() { delete tt; } - SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; } - operator T&() const { return *tt; } - T *operator&() { return tt; } -private: - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { @@ -60,14 +65,20 @@ template T SwigValueInit() { #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif @@ -75,7 +86,7 @@ template T SwigValueInit() { # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -118,7 +129,7 @@ template T SwigValueInit() { # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -134,7 +145,7 @@ template T SwigValueInit() { /* Fix for jlong on some versions of gcc on Windows */ -#if defined(__GNUC__) && !defined(__INTELC__) +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) typedef long long __int64; #endif @@ -181,7 +192,8 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, { SWIG_JavaUnknownError, "java/lang/UnknownError" }, - { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } }; + { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } + }; const SWIG_JavaExceptions_t *except_ptr = java_exceptions; while (except_ptr->code != code && except_ptr->code) @@ -217,7 +229,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1event_1set(JNIE arg1 = *(ESLevent **)&jarg1; arg2 = *(esl_event_t **)&jarg2; if (arg1) (arg1)->event = arg2; - } @@ -250,7 +261,7 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialized_1str if (!arg2) return ; } { - if (arg1->serialized_string) delete [] arg1->serialized_string; + delete [] arg1->serialized_string; if (arg2) { arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]); strcpy((char *)arg1->serialized_string, (const char *)arg2); @@ -272,7 +283,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialized_1 (void)jarg1_; arg1 = *(ESLevent **)&jarg1; result = (char *) ((arg1)->serialized_string); - if(result) jresult = jenv->NewStringUTF((const char *)result); + if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -287,7 +298,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1mine_1set(JNIEn arg1 = *(ESLevent **)&jarg1; arg2 = (int)jarg2; if (arg1) (arg1)->mine = arg2; - } @@ -370,7 +380,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_delete_1ESLevent(JNIEnv * (void)jcls; arg1 = *(ESLevent **)&jarg1; delete arg1; - } @@ -390,7 +399,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialize(JN if (!arg2) return 0; } result = (char *)(arg1)->serialize((char const *)arg2); - if(result) jresult = jenv->NewStringUTF((const char *)result); + if (result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); return jresult; } @@ -400,8 +409,8 @@ SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1setPriority jboolean jresult = 0 ; ESLevent *arg1 = (ESLevent *) 0 ; esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ; - bool result; esl_priority_t *argp2 ; + bool result; (void)jenv; (void)jcls; @@ -437,7 +446,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getHeader(JN } arg3 = (int)jarg3; result = (char *)(arg1)->getHeader((char const *)arg2,arg3); - if(result) jresult = jenv->NewStringUTF((const char *)result); + if (result) jresult = jenv->NewStringUTF((const char *)result); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2); return jresult; } @@ -453,7 +462,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getBody(JNIE (void)jarg1_; arg1 = *(ESLevent **)&jarg1; result = (char *)(arg1)->getBody(); - if(result) jresult = jenv->NewStringUTF((const char *)result); + if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -468,7 +477,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getType(JNIE (void)jarg1_; arg1 = *(ESLevent **)&jarg1; result = (char *)(arg1)->getType(); - if(result) jresult = jenv->NewStringUTF((const char *)result); + if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -614,7 +623,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1firstHeader( (void)jarg1_; arg1 = *(ESLevent **)&jarg1; result = (char *)(arg1)->firstHeader(); - if(result) jresult = jenv->NewStringUTF((const char *)result); + if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -629,7 +638,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1nextHeader(J (void)jarg1_; arg1 = *(ESLevent **)&jarg1; result = (char *)(arg1)->nextHeader(); - if(result) jresult = jenv->NewStringUTF((const char *)result); + if (result) jresult = jenv->NewStringUTF((const char *)result); return jresult; } @@ -791,7 +800,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_delete_1ESLconnection(JNI (void)jcls; arg1 = *(ESLconnection **)&jarg1; delete arg1; - } diff --git a/libs/esl/java/org/freeswitch/esl/ESLconnection.java b/libs/esl/java/org/freeswitch/esl/ESLconnection.java index a45613473d..364dcb3f82 100644 --- a/libs/esl/java/org/freeswitch/esl/ESLconnection.java +++ b/libs/esl/java/org/freeswitch/esl/ESLconnection.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class ESLconnection { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - eslJNI.delete_ESLconnection(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + eslJNI.delete_ESLconnection(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } public ESLconnection(String host, int port, String user, String password) { diff --git a/libs/esl/java/org/freeswitch/esl/ESLevent.java b/libs/esl/java/org/freeswitch/esl/ESLevent.java index d3bbbf88b4..9e95fbd2ab 100644 --- a/libs/esl/java/org/freeswitch/esl/ESLevent.java +++ b/libs/esl/java/org/freeswitch/esl/ESLevent.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -26,11 +26,13 @@ public class ESLevent { } public synchronized void delete() { - if(swigCPtr != 0 && swigCMemOwn) { - swigCMemOwn = false; - eslJNI.delete_ESLevent(swigCPtr); + if (swigCPtr != 0) { + if (swigCMemOwn) { + swigCMemOwn = false; + eslJNI.delete_ESLevent(swigCPtr); + } + swigCPtr = 0; } - swigCPtr = 0; } public void setEvent(SWIGTYPE_p_esl_event_t value) { diff --git a/libs/esl/java/org/freeswitch/esl/SWIGTYPE_p_esl_event_t.java b/libs/esl/java/org/freeswitch/esl/SWIGTYPE_p_esl_event_t.java index 40c3151980..6b1dcbbc3a 100644 --- a/libs/esl/java/org/freeswitch/esl/SWIGTYPE_p_esl_event_t.java +++ b/libs/esl/java/org/freeswitch/esl/SWIGTYPE_p_esl_event_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/libs/esl/java/org/freeswitch/esl/SWIGTYPE_p_esl_priority_t.java b/libs/esl/java/org/freeswitch/esl/SWIGTYPE_p_esl_priority_t.java index 94894fb98f..04bd5e1b4f 100644 --- a/libs/esl/java/org/freeswitch/esl/SWIGTYPE_p_esl_priority_t.java +++ b/libs/esl/java/org/freeswitch/esl/SWIGTYPE_p_esl_priority_t.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/libs/esl/java/org/freeswitch/esl/esl.java b/libs/esl/java/org/freeswitch/esl/esl.java index af59bf65f2..d314ef90f5 100644 --- a/libs/esl/java/org/freeswitch/esl/esl.java +++ b/libs/esl/java/org/freeswitch/esl/esl.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/libs/esl/java/org/freeswitch/esl/eslJNI.java b/libs/esl/java/org/freeswitch/esl/eslJNI.java index e7da6f5fdf..38bc0dca46 100644 --- a/libs/esl/java/org/freeswitch/esl/eslJNI.java +++ b/libs/esl/java/org/freeswitch/esl/eslJNI.java @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -8,7 +8,7 @@ package org.freeswitch.esl; -class eslJNI { +public class eslJNI { public final static native void ESLevent_event_set(long jarg1, ESLevent jarg1_, long jarg2); public final static native long ESLevent_event_get(long jarg1, ESLevent jarg1_); public final static native void ESLevent_serialized_string_set(long jarg1, ESLevent jarg1_, String jarg2); diff --git a/libs/esl/lua/esl_wrap.cpp b/libs/esl/lua/esl_wrap.cpp index 8d781383fd..bb7a41a933 100644 --- a/libs/esl/lua/esl_wrap.cpp +++ b/libs/esl/lua/esl_wrap.cpp @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.7 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.12 + * + * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGLUA @@ -67,28 +67,28 @@ template T SwigValueInit() { #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -131,7 +131,7 @@ template T SwigValueInit() { # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -169,7 +169,7 @@ template T SwigValueInit() { You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. - + But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ @@ -195,16 +195,16 @@ template T SwigValueInit() { #define SWIG_POINTER_OWN 0x1 -/* +/* Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer + + The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). - + Use the following macros/flags to set or process the returning states. - + In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { @@ -237,23 +237,23 @@ template T SwigValueInit() { } else { // fail code } - + I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be @@ -267,17 +267,17 @@ template T SwigValueInit() { int fooi(int); and you call - + food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ -#define SWIG_OK (0) +#define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) @@ -308,14 +308,14 @@ template T SwigValueInit() { # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { +SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ -# define SWIG_AddCast +# define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif @@ -359,7 +359,7 @@ typedef struct swig_module_info { void *clientdata; /* Language specific module data */ } swig_module_info; -/* +/* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. @@ -379,18 +379,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, /* Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal + Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; - while (!equiv && *ne) { + while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; @@ -398,24 +398,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { /* Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb + Return 0 if not equal, 1 if equal */ SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } - /* Check the typename */ @@ -443,7 +432,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) { return 0; } -/* +/* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * @@ -478,7 +467,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } -/* +/* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * @@ -522,7 +511,7 @@ SWIG_TypePrettyName(const swig_type_info *type) { return type->name; } -/* +/* Set the clientdata field for a type */ SWIGRUNTIME void @@ -530,14 +519,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; - + while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } - } + } cast = cast->next; } } @@ -546,18 +535,18 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } - + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { swig_module_info *iter = start; do { @@ -566,11 +555,11 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; + register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); - if (compare == 0) { + if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { @@ -595,14 +584,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); @@ -621,12 +610,12 @@ SWIG_TypeQueryModule(swig_module_info *start, iter = iter->next; } while (iter != end); } - + /* neither found a match */ return 0; } -/* +/* Pack binary data into a string */ SWIGRUNTIME char * @@ -642,7 +631,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) { return c; } -/* +/* Unpack binary data from a string */ SWIGRUNTIME const char * @@ -656,21 +645,21 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); - else + else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); - else + else return (char *) 0; *u = uu; } return c; } -/* +/* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * @@ -802,6 +791,36 @@ extern "C" { #endif +/* -------------------------------------------------------------------------- + * Helper functions for error handling + * -------------------------------------------------------------------------- */ + +/* Push the string STR on the Lua stack, like lua_pushstring, but + prefixed with the the location of the innermost Lua call-point + (as formated by luaL_where). */ +SWIGRUNTIME void +SWIG_Lua_pusherrstring (lua_State *L, const char *str) +{ + luaL_where (L, 1); + lua_pushstring (L, str); + lua_concat (L, 2); +} + +/* Push a formatted string generated from FMT and following args on + the Lua stack, like lua_pushfstring, but prefixed with the the + location of the innermost Lua call-point (as formated by luaL_where). */ +SWIGRUNTIME void +SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...) +{ + va_list argp; + va_start(argp, fmt); + luaL_where(L, 1); + lua_pushvfstring(L, fmt, argp); + va_end(argp); + lua_concat(L, 2); +} + + /* ----------------------------------------------------------------------------- * global swig types * ----------------------------------------------------------------------------- */ @@ -841,6 +860,15 @@ typedef struct { lua_CFunction setmethod; } swig_lua_attribute; +// Can be used to create namespaces. Currently used to +// wrap class static methods/variables/constants +typedef struct { + const char *name; + swig_lua_method *ns_methods; + swig_lua_attribute *ns_attributes; + swig_lua_const_info *ns_constants; +} swig_lua_namespace; + typedef struct swig_lua_class { const char *name; swig_type_info **type; @@ -848,11 +876,12 @@ typedef struct swig_lua_class { void (*destructor)(void *); swig_lua_method *methods; swig_lua_attribute *attributes; + swig_lua_namespace cls_static; struct swig_lua_class **bases; const char **base_names; } swig_lua_class; -/* this is the struct for wrappering all pointers in SwigLua +/* this is the struct for wrapping all pointers in SwigLua */ typedef struct { swig_type_info *type; @@ -860,7 +889,7 @@ typedef struct { void *ptr; } swig_lua_userdata; -/* this is the struct for wrapping arbitary packed binary data +/* this is the struct for wrapping arbitrary packed binary data (currently it is only used for member function pointers) the data ordering is similar to swig_lua_userdata, but it is currently not possible to tell the two structures apart within SWIG, other than by looking at the type @@ -886,19 +915,20 @@ typedef struct { /* Contract support */ #define SWIG_contract_assert(expr, msg) \ - if (!(expr)) { lua_pushstring(L, (char *) msg); goto fail; } else + if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } else + /* helper #defines */ #define SWIG_fail {goto fail;} #define SWIG_fail_arg(func_name,argnum,type) \ - {lua_pushfstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\ + {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\ func_name,argnum,type,SWIG_Lua_typename(L,argnum));\ goto fail;} #define SWIG_fail_ptr(func_name,argnum,type) \ SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*") #define SWIG_check_num_args(func_name,a,b) \ if (lua_gettop(L)b) \ - {lua_pushfstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\ + {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\ goto fail;} @@ -944,15 +974,14 @@ SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) { * ----------------------------------------------------------------------------- */ /* this function is called when trying to set an immutable. -default value is to print an error. +default action is to print an error. This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */ SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L) { /* there should be 1 param passed in: the new value */ #ifndef SWIGLUA_IGNORE_SET_IMMUTABLE lua_pop(L,1); /* remove it */ - lua_pushstring(L,"This variable is immutable"); - lua_error(L); + luaL_error(L,"This variable is immutable"); #endif return 0; /* should not return anything */ } @@ -1116,6 +1145,138 @@ SWIGINTERN void SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_ SWIG_Lua_add_function(L,name,fn); } +/* ----------------------------------------------------------------------------- + * global variable support code: namespaces + * ----------------------------------------------------------------------------- */ + +SWIGINTERN int SWIG_Lua_namespace_get(lua_State* L) +{ +/* there should be 2 params passed in + (1) table (not the meta table) + (2) string name of the attribute +*/ + assert(lua_istable(L,-2)); /* just in case */ + lua_getmetatable(L,-2); + assert(lua_istable(L,-1)); + SWIG_Lua_get_table(L,".get"); /* find the .get table */ + assert(lua_istable(L,-1)); + /* look for the key in the .get table */ + lua_pushvalue(L,2); /* key */ + lua_rawget(L,-2); + lua_remove(L,-2); /* stack tidy, remove .get table */ + if (lua_iscfunction(L,-1)) + { /* found it so call the fn & return its value */ + lua_call(L,0,1); /* 1 value in (userdata),1 out (result) */ + lua_remove(L,-2); /* stack tidy, remove metatable */ + return 1; + } + lua_pop(L,1); /* remove whatever was there */ + /* ok, so try the .fn table */ + SWIG_Lua_get_table(L,".fn"); /* find the .get table */ + assert(lua_istable(L,-1)); /* just in case */ + lua_pushvalue(L,2); /* key */ + lua_rawget(L,-2); /* look for the fn */ + lua_remove(L,-2); /* stack tidy, remove .fn table */ + if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */ + { /* found it so return the fn & let lua call it */ + lua_remove(L,-2); /* stack tidy, remove metatable */ + return 1; + } + lua_pop(L,1); /* remove whatever was there */ + return 0; +} + +SWIGINTERN int SWIG_Lua_namespace_set(lua_State* L) +{ +/* there should be 3 params passed in + (1) table (not the meta table) + (2) string name of the attribute + (3) any for the new value +*/ + + assert(lua_istable(L,1)); + lua_getmetatable(L,1); /* get the meta table */ + assert(lua_istable(L,-1)); + + SWIG_Lua_get_table(L,".set"); /* find the .set table */ + if (lua_istable(L,-1)) + { + /* look for the key in the .set table */ + lua_pushvalue(L,2); /* key */ + lua_rawget(L,-2); + if (lua_iscfunction(L,-1)) + { /* found it so call the fn & return its value */ + lua_pushvalue(L,3); /* value */ + lua_call(L,1,0); + return 0; + } + lua_pop(L,1); /* remove the value */ + } + lua_pop(L,1); /* remove the value .set table */ + return 0; +} + +SWIGINTERN void SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]); // forward declaration +SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn); // forward declaration + +/* helper function - register namespace methods and attributes into namespace */ +SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State* L, swig_lua_namespace* ns) +{ + int i = 0; + assert(lua_istable(L,-1)); + /* There must be table at the top of the stack */ + SWIG_Lua_InstallConstants(L, ns->ns_constants); + + lua_getmetatable(L,-1); + + /* add fns */ + for(i=0;ns->ns_attributes[i].name;i++){ + SWIG_Lua_add_class_variable(L,ns->ns_attributes[i].name,ns->ns_attributes[i].getmethod,ns->ns_attributes[i].setmethod); + } + + /* add methods to the metatable */ + SWIG_Lua_get_table(L,".fn"); /* find the .fn table */ + assert(lua_istable(L,-1)); /* just in case */ + for(i=0;ns->ns_methods[i].name;i++){ + SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].method); + } + lua_pop(L,1); + + /* clear stack - remove metatble */ + lua_pop(L,1); + return 0; +} + +/* helper function. creates namespace table and add it to module table */ +SWIGINTERN int SWIG_Lua_namespace_register(lua_State* L, swig_lua_namespace* ns) +{ + assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table */ + lua_checkstack(L,5); + lua_pushstring(L, ns->name); + lua_newtable(L); /* namespace itself */ + lua_newtable(L); /* metatable for namespace */ + + /* add a table called ".get" */ + lua_pushstring(L,".get"); + lua_newtable(L); + lua_rawset(L,-3); + /* add a table called ".set" */ + lua_pushstring(L,".set"); + lua_newtable(L); + lua_rawset(L,-3); + /* add a table called ".fn" */ + lua_pushstring(L,".fn"); + lua_newtable(L); + lua_rawset(L,-3); + + /* add accessor fns for using the .get,.set&.fn */ + SWIG_Lua_add_function(L,"__index",SWIG_Lua_namespace_get); + SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_namespace_set); + + lua_setmetatable(L,-2); /* set metatable */ + lua_rawset(L,-3); /* add namespace to module table */ + return 0; +} /* ----------------------------------------------------------------------------- * global variable support code: classes * ----------------------------------------------------------------------------- */ @@ -1271,6 +1432,23 @@ SWIGINTERN int SWIG_Lua_class_disown(lua_State* L) return 0; } +/* Constructor proxy. Used when class name entry in module is not class constructor, +but special table instead. */ +SWIGINTERN int SWIG_Lua_constructor_proxy(lua_State* L) +{ + /* unlimited number of parameters + First one is our proxy table and we should remove it + Other we should pass to real constructor + */ + assert(lua_istable(L,1)); + lua_pushstring(L,".constructor"); + lua_rawget(L,1); + assert(!lua_isnil(L,-1)); + lua_replace(L,1); /* replace our table with real constructor */ + lua_call(L,lua_gettop(L)-1,1); + return 1; +} + /* gets the swig class registry (or creates it) */ SWIGINTERN void SWIG_Lua_get_class_registry(lua_State* L) { @@ -1315,6 +1493,21 @@ SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_C } } +/* helper to recursively add class static details (static attributes, operations and constants) */ +SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State* L, swig_lua_class* clss) +{ + int i = 0; + /* The class namespace table must be on the top of the stack */ + assert(lua_istable(L,-1)); + /* call all the base classes first: we can then override these later: */ + for(i=0;clss->bases[i];i++) + { + SWIG_Lua_add_class_static_details(L,clss->bases[i]); + } + + SWIG_Lua_add_namespace_details(L, &clss->cls_static); +} + /* helper to recursively add class details (attributes & operations) */ SWIGINTERN void SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss) { @@ -1365,18 +1558,45 @@ SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss) swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]); if (info) clss->bases[i] = (swig_lua_class *) info->clientdata; } - } + } } -/* performs the entire class registration process */ -SWIGINTERN void SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss) +/* Register class static methods,attributes etc as well as constructor proxy */ +SWIGINTERN void SWIG_Lua_class_register_static(lua_State* L, swig_lua_class* clss) { + lua_checkstack(L,5); /* just in case */ + assert(lua_istable(L,-1)); /* just in case */ + assert(strcmp(clss->name, clss->cls_static.name) == 0); /* in class those 2 must be equal */ + + SWIG_Lua_namespace_register(L,&clss->cls_static); + + SWIG_Lua_get_table(L,clss->name); // Get namespace table back + assert(lua_istable(L,-1)); /* just in case */ + /* add its constructor to module with the name of the class so you can do MyClass(...) as well as new_MyClass(...) BUT only if a constructor is defined (this overcomes the problem of pure virtual classes without constructors)*/ if (clss->constructor) - SWIG_Lua_add_function(L,clss->name,clss->constructor); + { + SWIG_Lua_add_function(L,".constructor", clss->constructor); + lua_getmetatable(L,-1); + assert(lua_istable(L,-1)); /* just in case */ + SWIG_Lua_add_function(L,"__call", SWIG_Lua_constructor_proxy); + lua_pop(L,1); + } + + assert(lua_istable(L,-1)); /* just in case */ + SWIG_Lua_add_class_static_details(L, clss); + + /* clear stack */ + lua_pop(L,1); +} + +/* performs the entire class registration process */ +SWIGINTERN void SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss) +{ + SWIG_Lua_class_register_static(L,clss); SWIG_Lua_get_class_registry(L); /* get the registry */ lua_pushstring(L,clss->name); /* get the name */ @@ -1487,9 +1707,8 @@ SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *typ int argnum,const char* func_name){ void* result; if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){ - lua_pushfstring(L,"Error in %s, expected a %s at argument number %d\n", - func_name,(type && type->str)?type->str:"void*",argnum); - lua_error(L); + luaL_error (L,"Error in %s, expected a %s at argument number %d\n", + func_name,(type && type->str)?type->str:"void*",argnum); } return result; } @@ -1613,8 +1832,8 @@ SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) { #ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */ #define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S) #endif -/* Executes a C string in Lua a really simple way of calling lua from C -Unfortunately lua keeps changing its API's, so we need a conditional compile +/* Executes a C string in Lua which is a really simple way of calling lua from C +Unfortunately lua keeps changing its APIs, so we need a conditional compile In lua 5.0.X its lua_dostring() In lua 5.1.X its luaL_dostring() */ @@ -1981,7 +2200,7 @@ static int _wrap_new_ESLevent(lua_State* L) { } } - lua_pushstring(L,"Wrong arguments for overloaded function 'new_ESLevent'\n" + SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_ESLevent'\n" " Possible C/C++ prototypes are:\n" " ESLevent::ESLevent(char const *,char const *)\n" " ESLevent::ESLevent(esl_event_t *,int)\n" @@ -2349,9 +2568,18 @@ static swig_lua_attribute swig_ESLevent_attributes[] = { { "mine", _wrap_ESLevent_mine_get, _wrap_ESLevent_mine_set}, {0,0,0} }; +static swig_lua_attribute swig_ESLevent_cls_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_ESLevent_cls_methods[] = { + {0,0} +}; +static swig_lua_const_info swig_ESLevent_cls_constants[] = { + {0,0,0,0,0,0} +}; static swig_lua_class *swig_ESLevent_bases[] = {0}; static const char *swig_ESLevent_base_names[] = {0}; -static swig_lua_class _wrap_class_ESLevent = { "ESLevent", &SWIGTYPE_p_ESLevent,_wrap_new_ESLevent, swig_delete_ESLevent, swig_ESLevent_methods, swig_ESLevent_attributes, swig_ESLevent_bases, swig_ESLevent_base_names }; +static swig_lua_class _wrap_class_ESLevent = { "ESLevent", &SWIGTYPE_p_ESLevent,_wrap_new_ESLevent, swig_delete_ESLevent, swig_ESLevent_methods, swig_ESLevent_attributes, { "ESLevent", swig_ESLevent_cls_methods, swig_ESLevent_cls_attributes, swig_ESLevent_cls_constants }, swig_ESLevent_bases, swig_ESLevent_base_names }; static int _wrap_new_ESLconnection__SWIG_0(lua_State* L) { int SWIG_arg = 0; @@ -2586,7 +2814,7 @@ static int _wrap_new_ESLconnection(lua_State* L) { } } - lua_pushstring(L,"Wrong arguments for overloaded function 'new_ESLconnection'\n" + SWIG_Lua_pusherrstring(L,"Wrong arguments for overloaded function 'new_ESLconnection'\n" " Possible C/C++ prototypes are:\n" " ESLconnection::ESLconnection(char const *,int const,char const *,char const *)\n" " ESLconnection::ESLconnection(char const *,int const,char const *)\n" @@ -3150,9 +3378,18 @@ static swig_lua_method swig_ESLconnection_methods[] = { static swig_lua_attribute swig_ESLconnection_attributes[] = { {0,0,0} }; +static swig_lua_attribute swig_ESLconnection_cls_attributes[] = { + {0,0,0} +}; +static swig_lua_method swig_ESLconnection_cls_methods[] = { + {0,0} +}; +static swig_lua_const_info swig_ESLconnection_cls_constants[] = { + {0,0,0,0,0,0} +}; static swig_lua_class *swig_ESLconnection_bases[] = {0}; static const char *swig_ESLconnection_base_names[] = {0}; -static swig_lua_class _wrap_class_ESLconnection = { "ESLconnection", &SWIGTYPE_p_ESLconnection,_wrap_new_ESLconnection, swig_delete_ESLconnection, swig_ESLconnection_methods, swig_ESLconnection_attributes, swig_ESLconnection_bases, swig_ESLconnection_base_names }; +static swig_lua_class _wrap_class_ESLconnection = { "ESLconnection", &SWIGTYPE_p_ESLconnection,_wrap_new_ESLconnection, swig_delete_ESLconnection, swig_ESLconnection_methods, swig_ESLconnection_attributes, { "ESLconnection", swig_ESLconnection_cls_methods, swig_ESLconnection_cls_attributes, swig_ESLconnection_cls_constants }, swig_ESLconnection_bases, swig_ESLconnection_base_names }; static int _wrap_eslSetLogLevel(lua_State* L) { int SWIG_arg = 0; @@ -3221,18 +3458,18 @@ static swig_cast_info *swig_cast_initial[] = { /* ----------------------------------------------------------------------------- * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * - * The generated swig_type_info structures are assigned staticly to an initial + * The generated swig_type_info structures are assigned staticly to an initial * 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 @@ -3242,17 +3479,17 @@ static swig_cast_info *swig_cast_initial[] = { * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it + * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * - * First off, we lookup the cast->type name to see if it is already loaded. + * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the + * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that @@ -3278,8 +3515,6 @@ SWIG_InitializeModule(void *clientdata) { swig_module_info *module_head, *iter; int found, init; - clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ @@ -3317,7 +3552,7 @@ SWIG_InitializeModule(void *clientdata) { module_head->next = &swig_module; } - /* When multiple interpeters are used, a module could have already been initialized in + /* When multiple interpreters 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 */ @@ -3331,7 +3566,7 @@ SWIG_InitializeModule(void *clientdata) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; - + #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif @@ -3358,7 +3593,7 @@ SWIG_InitializeModule(void *clientdata) { /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { - + /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG diff --git a/libs/esl/managed/ESL.cs b/libs/esl/managed/ESL.cs index 160026d1e2..55955ccf9c 100644 --- a/libs/esl/managed/ESL.cs +++ b/libs/esl/managed/ESL.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/libs/esl/managed/ESLPINVOKE.cs b/libs/esl/managed/ESLPINVOKE.cs index 749ebeabfe..8613a4a322 100644 --- a/libs/esl/managed/ESLPINVOKE.cs +++ b/libs/esl/managed/ESLPINVOKE.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -184,6 +184,10 @@ class ESLPINVOKE { static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper(); + static ESLPINVOKE() { + } + + [DllImport("ESL", EntryPoint="CSharp_ESLevent_Event_set")] public static extern void ESLevent_Event_set(HandleRef jarg1, HandleRef jarg2); diff --git a/libs/esl/managed/ESLconnection.cs b/libs/esl/managed/ESLconnection.cs index 82efb907ed..c199528f6c 100644 --- a/libs/esl/managed/ESLconnection.cs +++ b/libs/esl/managed/ESLconnection.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,11 +29,13 @@ public class ESLconnection : IDisposable { public virtual void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - ESLPINVOKE.delete_ESLconnection(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + ESLPINVOKE.delete_ESLconnection(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/libs/esl/managed/ESLevent.cs b/libs/esl/managed/ESLevent.cs index 65cd24d98c..f7f464f8dc 100644 --- a/libs/esl/managed/ESLevent.cs +++ b/libs/esl/managed/ESLevent.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. @@ -29,11 +29,13 @@ public class ESLevent : IDisposable { public virtual void Dispose() { lock(this) { - if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { - swigCMemOwn = false; - ESLPINVOKE.delete_ESLevent(swigCPtr); + if (swigCPtr.Handle != IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + ESLPINVOKE.delete_ESLevent(swigCPtr); + } + swigCPtr = new HandleRef(null, IntPtr.Zero); } - swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); } } diff --git a/libs/esl/managed/Makefile b/libs/esl/managed/Makefile index 8ce9a9890e..0b2e0d28fc 100644 --- a/libs/esl/managed/Makefile +++ b/libs/esl/managed/Makefile @@ -5,7 +5,7 @@ WRAP_GCC_WARNING_SILENCE=-Wno-unused-function all: ESL.so esl_wrap.cpp: - swig -module ESL -csharp -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i + swig2.0 -module ESL -csharp -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i esl_wrap.o: esl_wrap.cpp $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) $(WRAP_GCC_WARNING_SILENCE) -c esl_wrap.cpp -o esl_wrap.o diff --git a/libs/esl/managed/SWIGTYPE_p_esl_event_t.cs b/libs/esl/managed/SWIGTYPE_p_esl_event_t.cs index b20f2d8785..137b989bcf 100644 --- a/libs/esl/managed/SWIGTYPE_p_esl_event_t.cs +++ b/libs/esl/managed/SWIGTYPE_p_esl_event_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/libs/esl/managed/SWIGTYPE_p_esl_priority_t.cs b/libs/esl/managed/SWIGTYPE_p_esl_priority_t.cs index e6e1ed55cd..9adb170e80 100644 --- a/libs/esl/managed/SWIGTYPE_p_esl_priority_t.cs +++ b/libs/esl/managed/SWIGTYPE_p_esl_priority_t.cs @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 + * Version 2.0.12 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. diff --git a/libs/esl/managed/esl_wrap.2010.cpp b/libs/esl/managed/esl_wrap.2010.cpp deleted file mode 100644 index 69a777a1e3..0000000000 --- a/libs/esl/managed/esl_wrap.2010.cpp +++ /dev/null @@ -1,947 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.1 - * - * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - -#define SWIGCSHARP - - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template class SwigValueWrapper { - struct SwigMovePointer { - T *ptr; - SwigMovePointer(T *p) : ptr(p) { } - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); -public: - SwigValueWrapper() : pointer(0) { } - SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } - operator T&() const { return *pointer.ptr; } - T *operator&() { return pointer.ptr; } -}; - -template T SwigValueInit() { - return T(); -} -#endif - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# 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 -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#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 - - - -#include -#include -#include - - -/* Support for throwing C# exceptions from C/C++. There are two types: - * Exceptions that take a message and ArgumentExceptions that take a message and a parameter name. */ -typedef enum { - SWIG_CSharpApplicationException, - SWIG_CSharpArithmeticException, - SWIG_CSharpDivideByZeroException, - SWIG_CSharpIndexOutOfRangeException, - SWIG_CSharpInvalidCastException, - SWIG_CSharpInvalidOperationException, - SWIG_CSharpIOException, - SWIG_CSharpNullReferenceException, - SWIG_CSharpOutOfMemoryException, - SWIG_CSharpOverflowException, - SWIG_CSharpSystemException -} SWIG_CSharpExceptionCodes; - -typedef enum { - SWIG_CSharpArgumentException, - SWIG_CSharpArgumentNullException, - SWIG_CSharpArgumentOutOfRangeException -} SWIG_CSharpExceptionArgumentCodes; - -typedef void (SWIGSTDCALL* SWIG_CSharpExceptionCallback_t)(const char *); -typedef void (SWIGSTDCALL* SWIG_CSharpExceptionArgumentCallback_t)(const char *, const char *); - -typedef struct { - SWIG_CSharpExceptionCodes code; - SWIG_CSharpExceptionCallback_t callback; -} SWIG_CSharpException_t; - -typedef struct { - SWIG_CSharpExceptionArgumentCodes code; - SWIG_CSharpExceptionArgumentCallback_t callback; -} SWIG_CSharpExceptionArgument_t; - -static SWIG_CSharpException_t SWIG_csharp_exceptions[] = { - { SWIG_CSharpApplicationException, NULL }, - { SWIG_CSharpArithmeticException, NULL }, - { SWIG_CSharpDivideByZeroException, NULL }, - { SWIG_CSharpIndexOutOfRangeException, NULL }, - { SWIG_CSharpInvalidCastException, NULL }, - { SWIG_CSharpInvalidOperationException, NULL }, - { SWIG_CSharpIOException, NULL }, - { SWIG_CSharpNullReferenceException, NULL }, - { SWIG_CSharpOutOfMemoryException, NULL }, - { SWIG_CSharpOverflowException, NULL }, - { SWIG_CSharpSystemException, NULL } -}; - -static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = { - { SWIG_CSharpArgumentException, NULL }, - { SWIG_CSharpArgumentNullException, NULL }, - { SWIG_CSharpArgumentOutOfRangeException, NULL } -}; - -static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) { - SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback; - if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) { - callback = SWIG_csharp_exceptions[code].callback; - } - callback(msg); -} - -static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) { - SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback; - if ((size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) { - callback = SWIG_csharp_exceptions_argument[code].callback; - } - callback(msg, param_name); -} - - -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionCallbacks_ESL( - SWIG_CSharpExceptionCallback_t applicationCallback, - SWIG_CSharpExceptionCallback_t arithmeticCallback, - SWIG_CSharpExceptionCallback_t divideByZeroCallback, - SWIG_CSharpExceptionCallback_t indexOutOfRangeCallback, - SWIG_CSharpExceptionCallback_t invalidCastCallback, - SWIG_CSharpExceptionCallback_t invalidOperationCallback, - SWIG_CSharpExceptionCallback_t ioCallback, - SWIG_CSharpExceptionCallback_t nullReferenceCallback, - SWIG_CSharpExceptionCallback_t outOfMemoryCallback, - SWIG_CSharpExceptionCallback_t overflowCallback, - SWIG_CSharpExceptionCallback_t systemCallback) { - SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback = applicationCallback; - SWIG_csharp_exceptions[SWIG_CSharpArithmeticException].callback = arithmeticCallback; - SWIG_csharp_exceptions[SWIG_CSharpDivideByZeroException].callback = divideByZeroCallback; - SWIG_csharp_exceptions[SWIG_CSharpIndexOutOfRangeException].callback = indexOutOfRangeCallback; - SWIG_csharp_exceptions[SWIG_CSharpInvalidCastException].callback = invalidCastCallback; - SWIG_csharp_exceptions[SWIG_CSharpInvalidOperationException].callback = invalidOperationCallback; - SWIG_csharp_exceptions[SWIG_CSharpIOException].callback = ioCallback; - SWIG_csharp_exceptions[SWIG_CSharpNullReferenceException].callback = nullReferenceCallback; - SWIG_csharp_exceptions[SWIG_CSharpOutOfMemoryException].callback = outOfMemoryCallback; - SWIG_csharp_exceptions[SWIG_CSharpOverflowException].callback = overflowCallback; - SWIG_csharp_exceptions[SWIG_CSharpSystemException].callback = systemCallback; -} - -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_ESL( - SWIG_CSharpExceptionArgumentCallback_t argumentCallback, - SWIG_CSharpExceptionArgumentCallback_t argumentNullCallback, - SWIG_CSharpExceptionArgumentCallback_t argumentOutOfRangeCallback) { - SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback = argumentCallback; - SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentNullException].callback = argumentNullCallback; - SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentOutOfRangeException].callback = argumentOutOfRangeCallback; -} - - -/* Callback for returning strings to C# without leaking memory */ -typedef char * (SWIGSTDCALL* SWIG_CSharpStringHelperCallback)(const char *); -static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL; - - -#ifdef __cplusplus -extern "C" -#endif -SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_ESL(SWIG_CSharpStringHelperCallback callback) { - SWIG_csharp_string_callback = callback; -} - - -/* Contract support */ - -#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentOutOfRangeException, msg, ""); return nullreturn; } else - - -#include "esl.h" -#include "esl_oop.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_Event_set(void * jarg1, void * jarg2) { - ESLevent *arg1 = (ESLevent *) 0 ; - esl_event_t *arg2 = (esl_event_t *) 0 ; - - arg1 = (ESLevent *)jarg1; - arg2 = (esl_event_t *)jarg2; - if (arg1) (arg1)->event = arg2; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLevent_Event_get(void * jarg1) { - void * jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - esl_event_t *result = 0 ; - - arg1 = (ESLevent *)jarg1; - result = (esl_event_t *) ((arg1)->event); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_SerializedString_set(void * jarg1, char * jarg2) { - ESLevent *arg1 = (ESLevent *) 0 ; - char *arg2 = (char *) 0 ; - - arg1 = (ESLevent *)jarg1; - arg2 = (char *)jarg2; - { - if (arg1->serialized_string) delete [] arg1->serialized_string; - if (arg2) { - arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]); - strcpy((char *)arg1->serialized_string, (const char *)arg2); - } else { - arg1->serialized_string = 0; - } - } -} - - -SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_SerializedString_get(void * jarg1) { - char * jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; - - arg1 = (ESLevent *)jarg1; - result = (char *) ((arg1)->serialized_string); - jresult = SWIG_csharp_string_callback((const char *)result); - return jresult; -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_Mine_set(void * jarg1, int jarg2) { - ESLevent *arg1 = (ESLevent *) 0 ; - int arg2 ; - - arg1 = (ESLevent *)jarg1; - arg2 = (int)jarg2; - if (arg1) (arg1)->mine = arg2; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_ESLevent_Mine_get(void * jarg1) { - int jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - int result; - - arg1 = (ESLevent *)jarg1; - result = (int) ((arg1)->mine); - jresult = result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLevent__SWIG_0(char * jarg1, char * jarg2) { - void * jresult ; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) NULL ; - ESLevent *result = 0 ; - - arg1 = (char *)jarg1; - arg2 = (char *)jarg2; - result = (ESLevent *)new ESLevent((char const *)arg1,(char const *)arg2); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLevent__SWIG_1(void * jarg1, int jarg2) { - void * jresult ; - esl_event_t *arg1 = (esl_event_t *) 0 ; - int arg2 = (int) 0 ; - ESLevent *result = 0 ; - - arg1 = (esl_event_t *)jarg1; - arg2 = (int)jarg2; - result = (ESLevent *)new ESLevent(arg1,arg2); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLevent__SWIG_2(void * jarg1) { - void * jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - ESLevent *result = 0 ; - - arg1 = (ESLevent *)jarg1; - result = (ESLevent *)new ESLevent(arg1); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_delete_ESLevent(void * jarg1) { - ESLevent *arg1 = (ESLevent *) 0 ; - - arg1 = (ESLevent *)jarg1; - delete arg1; -} - - -SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_Serialize(void * jarg1, char * jarg2) { - char * jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *arg2 = (char *) NULL ; - char *result = 0 ; - - arg1 = (ESLevent *)jarg1; - arg2 = (char *)jarg2; - result = (char *)(arg1)->serialize((char const *)arg2); - jresult = SWIG_csharp_string_callback((const char *)result); - return jresult; -} - - -SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_SetPriority(void * jarg1, void * jarg2) { - unsigned int jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ; - esl_priority_t *argp2 ; - bool result; - - arg1 = (ESLevent *)jarg1; - argp2 = (esl_priority_t *)jarg2; - if (!argp2) { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null esl_priority_t", 0); - return 0; - } - arg2 = *argp2; - result = (bool)(arg1)->setPriority(arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_GetHeader(void * jarg1, char * jarg2, int jarg3) { - char * jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *arg2 = (char *) 0 ; - int arg3 = (int) -1 ; - char *result = 0 ; - - arg1 = (ESLevent *)jarg1; - arg2 = (char *)jarg2; - arg3 = (int)jarg3; - result = (char *)(arg1)->getHeader((char const *)arg2,arg3); - jresult = SWIG_csharp_string_callback((const char *)result); - return jresult; -} - - -SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_GetBody(void * jarg1) { - char * jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; - - arg1 = (ESLevent *)jarg1; - result = (char *)(arg1)->getBody(); - jresult = SWIG_csharp_string_callback((const char *)result); - return jresult; -} - - -SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_getType(void * jarg1) { - char * jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; - - arg1 = (ESLevent *)jarg1; - result = (char *)(arg1)->getType(); - jresult = SWIG_csharp_string_callback((const char *)result); - return jresult; -} - - -SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_AddBody(void * jarg1, char * jarg2) { - unsigned int jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *arg2 = (char *) 0 ; - bool result; - - arg1 = (ESLevent *)jarg1; - arg2 = (char *)jarg2; - result = (bool)(arg1)->addBody((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_AddHeader(void * jarg1, char * jarg2, char * jarg3) { - unsigned int jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - bool result; - - arg1 = (ESLevent *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3); - jresult = result; - return jresult; -} - - -SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_pushHeader(void * jarg1, char * jarg2, char * jarg3) { - unsigned int jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - bool result; - - arg1 = (ESLevent *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - result = (bool)(arg1)->pushHeader((char const *)arg2,(char const *)arg3); - jresult = result; - return jresult; -} - - -SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_unshiftHeader(void * jarg1, char * jarg2, char * jarg3) { - unsigned int jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - bool result; - - arg1 = (ESLevent *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - result = (bool)(arg1)->unshiftHeader((char const *)arg2,(char const *)arg3); - jresult = result; - return jresult; -} - - -SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_DelHeader(void * jarg1, char * jarg2) { - unsigned int jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *arg2 = (char *) 0 ; - bool result; - - arg1 = (ESLevent *)jarg1; - arg2 = (char *)jarg2; - result = (bool)(arg1)->delHeader((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_FirstHeader(void * jarg1) { - char * jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; - - arg1 = (ESLevent *)jarg1; - result = (char *)(arg1)->firstHeader(); - jresult = SWIG_csharp_string_callback((const char *)result); - return jresult; -} - - -SWIGEXPORT char * SWIGSTDCALL CSharp_ESLevent_NextHeader(void * jarg1) { - char * jresult ; - ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; - - arg1 = (ESLevent *)jarg1; - result = (char *)(arg1)->nextHeader(); - jresult = SWIG_csharp_string_callback((const char *)result); - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_0(char * jarg1, int jarg2, char * jarg3, char * jarg4) { - void * jresult ; - char *arg1 = (char *) 0 ; - int arg2 ; - char *arg3 = (char *) 0 ; - char *arg4 = (char *) 0 ; - ESLconnection *result = 0 ; - - arg1 = (char *)jarg1; - arg2 = (int)jarg2; - arg3 = (char *)jarg3; - arg4 = (char *)jarg4; - result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3,(char const *)arg4); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_1(char * jarg1, int jarg2, char * jarg3) { - void * jresult ; - char *arg1 = (char *) 0 ; - int arg2 ; - char *arg3 = (char *) 0 ; - ESLconnection *result = 0 ; - - arg1 = (char *)jarg1; - arg2 = (int)jarg2; - arg3 = (char *)jarg3; - result = (ESLconnection *)new ESLconnection((char const *)arg1,arg2,(char const *)arg3); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_2(char * jarg1, char * jarg2, char * jarg3, char * jarg4) { - void * jresult ; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - char *arg4 = (char *) 0 ; - ESLconnection *result = 0 ; - - arg1 = (char *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - arg4 = (char *)jarg4; - result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_3(char * jarg1, char * jarg2, char * jarg3) { - void * jresult ; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - ESLconnection *result = 0 ; - - arg1 = (char *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - result = (ESLconnection *)new ESLconnection((char const *)arg1,(char const *)arg2,(char const *)arg3); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESLconnection__SWIG_4(int jarg1) { - void * jresult ; - int arg1 ; - ESLconnection *result = 0 ; - - arg1 = (int)jarg1; - result = (ESLconnection *)new ESLconnection(arg1); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_delete_ESLconnection(void * jarg1) { - ESLconnection *arg1 = (ESLconnection *) 0 ; - - arg1 = (ESLconnection *)jarg1; - delete arg1; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_SocketDescriptor(void * jarg1) { - int jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; - - arg1 = (ESLconnection *)jarg1; - result = (int)(arg1)->socketDescriptor(); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_Connected(void * jarg1) { - int jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; - - arg1 = (ESLconnection *)jarg1; - result = (int)(arg1)->connected(); - jresult = result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_GetInfo(void * jarg1) { - void * jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - ESLevent *result = 0 ; - - arg1 = (ESLconnection *)jarg1; - result = (ESLevent *)(arg1)->getInfo(); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_Send(void * jarg1, char * jarg2) { - int jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (ESLconnection *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->send((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_SendRecv(void * jarg1, char * jarg2) { - void * jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - char *arg2 = (char *) 0 ; - ESLevent *result = 0 ; - - arg1 = (ESLconnection *)jarg1; - arg2 = (char *)jarg2; - result = (ESLevent *)(arg1)->sendRecv((char const *)arg2); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_Api(void * jarg1, char * jarg2, char * jarg3) { - void * jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) NULL ; - ESLevent *result = 0 ; - - arg1 = (ESLconnection *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - result = (ESLevent *)(arg1)->api((char const *)arg2,(char const *)arg3); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_Bgapi(void * jarg1, char * jarg2, char * jarg3, char * jarg4) { - void * jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) NULL ; - char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; - - arg1 = (ESLconnection *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - arg4 = (char *)jarg4; - result = (ESLevent *)(arg1)->bgapi((char const *)arg2,(char const *)arg3,(char const *)arg4); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_SendEvent(void * jarg1, void * jarg2) { - void * jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - ESLevent *arg2 = (ESLevent *) 0 ; - ESLevent *result = 0 ; - - arg1 = (ESLconnection *)jarg1; - arg2 = (ESLevent *)jarg2; - result = (ESLevent *)(arg1)->sendEvent(arg2); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_sendMSG(void * jarg1, void * jarg2, char * jarg3) { - int jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - ESLevent *arg2 = (ESLevent *) 0 ; - char *arg3 = (char *) NULL ; - int result; - - arg1 = (ESLconnection *)jarg1; - arg2 = (ESLevent *)jarg2; - arg3 = (char *)jarg3; - result = (int)(arg1)->sendMSG(arg2,(char const *)arg3); - jresult = result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_RecvEvent(void * jarg1) { - void * jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - ESLevent *result = 0 ; - - arg1 = (ESLconnection *)jarg1; - result = (ESLevent *)(arg1)->recvEvent(); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_RecvEventTimed(void * jarg1, int jarg2) { - void * jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - int arg2 ; - ESLevent *result = 0 ; - - arg1 = (ESLconnection *)jarg1; - arg2 = (int)jarg2; - result = (ESLevent *)(arg1)->recvEventTimed(arg2); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_Filter(void * jarg1, char * jarg2, char * jarg3) { - void * jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - ESLevent *result = 0 ; - - arg1 = (ESLconnection *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - result = (ESLevent *)(arg1)->filter((char const *)arg2,(char const *)arg3); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_Events(void * jarg1, char * jarg2, char * jarg3) { - int jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - int result; - - arg1 = (ESLconnection *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - result = (int)(arg1)->events((char const *)arg2,(char const *)arg3); - jresult = result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_Execute(void * jarg1, char * jarg2, char * jarg3, char * jarg4) { - void * jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) NULL ; - char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; - - arg1 = (ESLconnection *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - arg4 = (char *)jarg4; - result = (ESLevent *)(arg1)->execute((char const *)arg2,(char const *)arg3,(char const *)arg4); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT void * SWIGSTDCALL CSharp_ESLconnection_ExecuteAsync(void * jarg1, char * jarg2, char * jarg3, char * jarg4) { - void * jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) NULL ; - char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; - - arg1 = (ESLconnection *)jarg1; - arg2 = (char *)jarg2; - arg3 = (char *)jarg3; - arg4 = (char *)jarg4; - result = (ESLevent *)(arg1)->executeAsync((char const *)arg2,(char const *)arg3,(char const *)arg4); - jresult = (void *)result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_SetAsyncExecute(void * jarg1, char * jarg2) { - int jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (ESLconnection *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->setAsyncExecute((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_SetEventLock(void * jarg1, char * jarg2) { - int jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - char *arg2 = (char *) 0 ; - int result; - - arg1 = (ESLconnection *)jarg1; - arg2 = (char *)jarg2; - result = (int)(arg1)->setEventLock((char const *)arg2); - jresult = result; - return jresult; -} - - -SWIGEXPORT int SWIGSTDCALL CSharp_ESLconnection_Disconnect(void * jarg1) { - int jresult ; - ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; - - arg1 = (ESLconnection *)jarg1; - result = (int)(arg1)->disconnect(); - jresult = result; - return jresult; -} - - -SWIGEXPORT void SWIGSTDCALL CSharp_eslSetLogLevel(int jarg1) { - int arg1 ; - - arg1 = (int)jarg1; - eslSetLogLevel(arg1); -} - - -#ifdef __cplusplus -} -#endif diff --git a/libs/esl/managed/esl_wrap.cpp b/libs/esl/managed/esl_wrap.cpp index 010ece83e2..8ca19a8de3 100644 --- a/libs/esl/managed/esl_wrap.cpp +++ b/libs/esl/managed/esl_wrap.cpp @@ -1,27 +1,32 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.12 + * + * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ +#define SWIGCSHARP + #ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { - T *tt; + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); public: - SwigValueWrapper() : tt(0) { } - SwigValueWrapper(const SwigValueWrapper& rhs) : tt(new T(*rhs.tt)) { } - SwigValueWrapper(const T& t) : tt(new T(t)) { } - ~SwigValueWrapper() { delete tt; } - SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; } - operator T&() const { return *tt; } - T *operator&() { return tt; } -private: - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { @@ -60,14 +65,20 @@ template T SwigValueInit() { #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif @@ -75,7 +86,7 @@ template T SwigValueInit() { # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -118,7 +129,7 @@ template T SwigValueInit() { # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -190,12 +201,12 @@ static SWIG_CSharpException_t SWIG_csharp_exceptions[] = { static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = { { SWIG_CSharpArgumentException, NULL }, { SWIG_CSharpArgumentNullException, NULL }, - { SWIG_CSharpArgumentOutOfRangeException, NULL }, + { SWIG_CSharpArgumentOutOfRangeException, NULL } }; static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) { SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback; - if (code >=0 && (size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) { + if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) { callback = SWIG_csharp_exceptions[code].callback; } callback(msg); @@ -203,7 +214,7 @@ static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) { SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback; - if (code >=0 && (size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) { + if ((size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) { callback = SWIG_csharp_exceptions_argument[code].callback; } callback(msg, param_name); @@ -284,7 +295,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_Event_set(void * jarg1, void * jarg2 arg1 = (ESLevent *)jarg1; arg2 = (esl_event_t *)jarg2; if (arg1) (arg1)->event = arg2; - } @@ -307,7 +317,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_SerializedString_set(void * jarg1, c arg1 = (ESLevent *)jarg1; arg2 = (char *)jarg2; { - if (arg1->serialized_string) delete [] arg1->serialized_string; + delete [] arg1->serialized_string; if (arg2) { arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]); strcpy((char *)arg1->serialized_string, (const char *)arg2); @@ -337,7 +347,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_Mine_set(void * jarg1, int jarg2) { arg1 = (ESLevent *)jarg1; arg2 = (int)jarg2; if (arg1) (arg1)->mine = arg2; - } @@ -398,7 +407,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_ESLevent(void * jarg1) { arg1 = (ESLevent *)jarg1; delete arg1; - } @@ -420,8 +428,8 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_SetPriority(void * jarg1, vo unsigned int jresult ; ESLevent *arg1 = (ESLevent *) 0 ; esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ; - bool result; esl_priority_t *argp2 ; + bool result; arg1 = (ESLevent *)jarg1; argp2 = (esl_priority_t *)jarg2; @@ -661,7 +669,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_ESLconnection(void * jarg1) { arg1 = (ESLconnection *)jarg1; delete arg1; - } diff --git a/libs/esl/perl/ESL.pm b/libs/esl/perl/ESL.pm index 69c012a577..c114f98a37 100644 --- a/libs/esl/perl/ESL.pm +++ b/libs/esl/perl/ESL.pm @@ -1,16 +1,16 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.35 +# Version 2.0.12 # -# Don't modify this file, modify the SWIG interface instead. +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. package ESL; -require Exporter; -require DynaLoader; -@ISA = qw(Exporter DynaLoader); +use base qw(Exporter); +use base qw(DynaLoader); package ESLc; bootstrap ESL; package ESL; -@EXPORT = qw( ); +@EXPORT = qw(); # ---------- BASE METHODS ------------- diff --git a/libs/esl/perl/Makefile.am b/libs/esl/perl/Makefile.am index 8a3fb39517..f300320952 100644 --- a/libs/esl/perl/Makefile.am +++ b/libs/esl/perl/Makefile.am @@ -18,7 +18,7 @@ perlmod-install: install-perlLTLIBRARIES endif esl_wrap.cpp: - swig -module ESL -shadow -perl5 -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i + swig2.0 -module ESL -shadow -perl5 -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i perlxsi.c: $(PERL) -MExtUtils::Embed -e xsinit -- -o perlxsi.c diff --git a/libs/esl/perl/esl_wrap.cpp b/libs/esl/perl/esl_wrap.cpp index e2b7eec88c..e10b0682bc 100644 --- a/libs/esl/perl/esl_wrap.cpp +++ b/libs/esl/perl/esl_wrap.cpp @@ -1,29 +1,33 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.12 + * + * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPERL #define SWIG_CASTRANK_MODE + #ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { - T *tt; + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); public: - SwigValueWrapper() : tt(0) { } - SwigValueWrapper(const SwigValueWrapper& rhs) : tt(new T(*rhs.tt)) { } - SwigValueWrapper(const T& t) : tt(new T(t)) { } - ~SwigValueWrapper() { delete tt; } - SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; } - operator T&() const { return *tt; } - T *operator&() { return tt; } -private: - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { @@ -62,14 +66,20 @@ template T SwigValueInit() { #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif @@ -77,7 +87,7 @@ template T SwigValueInit() { # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -120,7 +130,7 @@ template T SwigValueInit() { # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -137,7 +147,7 @@ template T SwigValueInit() { /* ----------------------------------------------------------------------------- * swigrun.swg * - * This file contains generic CAPI SWIG runtime support for pointer + * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ @@ -156,11 +166,11 @@ template T SwigValueInit() { /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the swig runtime code. - In 99.9% of the cases, swig just needs to declare them as 'static'. - - But only do this if is strictly necessary, ie, if you have problems - with your compiler or so. + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. */ #ifndef SWIGRUNTIME @@ -184,17 +194,17 @@ template T SwigValueInit() { #define SWIG_POINTER_OWN 0x1 -/* +/* Flags/methods for returning states. - - The swig conversion methods, as ConvertPtr, return and integer + + The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). - + Use the following macros/flags to set or process the returning states. - - In old swig versions, you usually write code as: + + In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code @@ -202,7 +212,7 @@ template T SwigValueInit() { //fail code } - Now you can be more explicit as: + Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { @@ -211,7 +221,7 @@ template T SwigValueInit() { // fail code } - that seems to be the same, but now you can also do + which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); @@ -226,28 +236,28 @@ template T SwigValueInit() { } else { // fail code } - + I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that - requires also to SWIG_ConvertPtr to return new result values, as + also requires SWIG_ConvertPtr to return new result values, such as - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - swig errors code. + SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this @@ -256,18 +266,17 @@ template T SwigValueInit() { int fooi(int); and you call - + food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() +*/ - - */ -#define SWIG_OK (0) +#define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) @@ -288,7 +297,6 @@ template T SwigValueInit() { #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank @@ -299,20 +307,18 @@ template T SwigValueInit() { # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { +SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ -# define SWIG_AddCast +# define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif - - #include #ifdef __cplusplus @@ -352,7 +358,7 @@ typedef struct swig_module_info { void *clientdata; /* Language specific module data */ } swig_module_info; -/* +/* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. @@ -372,18 +378,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, /* Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal + Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; - while (!equiv && *ne) { + while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; @@ -391,58 +397,65 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { /* Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb + Return 0 if not equal, 1 if equal */ SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } - -/* think of this as a c++ template<> or a scheme macro */ -#define SWIG_TypeCheck_Template(comparison, ty) \ - if (ty) { \ - swig_cast_info *iter = ty->cast; \ - while (iter) { \ - if (comparison) { \ - if (iter == ty->cast) return iter; \ - /* Move iter to the top of the linked list */ \ - iter->prev->next = iter->next; \ - if (iter->next) \ - iter->next->prev = iter->prev; \ - iter->next = ty->cast; \ - iter->prev = 0; \ - if (ty->cast) ty->cast->prev = iter; \ - ty->cast = iter; \ - return iter; \ - } \ - iter = iter->next; \ - } \ - } \ - return 0 - /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { - SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; } -/* Same as previous function, except strcmp is replaced with a pointer comparison */ +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { - SWIG_TypeCheck_Template(iter->type == from, into); +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; } /* @@ -453,7 +466,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } -/* +/* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * @@ -497,7 +510,7 @@ SWIG_TypePrettyName(const swig_type_info *type) { return type->name; } -/* +/* Set the clientdata field for a type */ SWIGRUNTIME void @@ -505,14 +518,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; - + while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } - } + } cast = cast->next; } } @@ -521,18 +534,18 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } - + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { swig_module_info *iter = start; do { @@ -541,11 +554,11 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; + register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); - if (compare == 0) { + if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { @@ -570,14 +583,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); @@ -596,12 +609,12 @@ SWIG_TypeQueryModule(swig_module_info *start, iter = iter->next; } while (iter != end); } - + /* neither found a match */ return 0; } -/* +/* Pack binary data into a string */ SWIGRUNTIME char * @@ -617,7 +630,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) { return c; } -/* +/* Unpack binary data from a string */ SWIGRUNTIME const char * @@ -631,21 +644,21 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); - else + else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); - else + else return (char *) 0; *u = uu; } return c; } -/* +/* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * @@ -705,18 +718,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #endif /* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 +#define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 @@ -830,50 +843,35 @@ extern "C" { SWIGINTERN const char* SWIG_Perl_ErrorType(int code) { - const char* type = 0; switch(code) { case SWIG_MemoryError: - type = "MemoryError"; - break; + return "MemoryError"; case SWIG_IOError: - type = "IOError"; - break; + return "IOError"; case SWIG_RuntimeError: - type = "RuntimeError"; - break; + return "RuntimeError"; case SWIG_IndexError: - type = "IndexError"; - break; + return "IndexError"; case SWIG_TypeError: - type = "TypeError"; - break; + return "TypeError"; case SWIG_DivisionByZero: - type = "ZeroDivisionError"; - break; + return "ZeroDivisionError"; case SWIG_OverflowError: - type = "OverflowError"; - break; + return "OverflowError"; case SWIG_SyntaxError: - type = "SyntaxError"; - break; + return "SyntaxError"; case SWIG_ValueError: - type = "ValueError"; - break; + return "ValueError"; case SWIG_SystemError: - type = "SystemError"; - break; + return "SystemError"; case SWIG_AttributeError: - type = "AttributeError"; - break; + return "AttributeError"; default: - type = "RuntimeError"; + return "RuntimeError"; } - return type; } - - /* ----------------------------------------------------------------------------- * perlrun.swg * @@ -894,6 +892,7 @@ SWIG_Perl_ErrorType(int code) { /* for raw pointers */ #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags) +#define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own) #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags) /* for raw packed data */ @@ -915,14 +914,14 @@ SWIG_Perl_ErrorType(int code) { /* Runtime API */ -#define SWIG_GetModule(clientdata) SWIG_Perl_GetModule() +#define SWIG_GetModule(clientdata) SWIG_Perl_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer) /* Error manipulation */ #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) -#define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) +#define SWIG_Error(code, msg) sv_setpvf(get_sv("@", GV_ADD), "%s %s", SWIG_ErrorType(code), msg) #define SWIG_fail goto fail /* Perl-specific SWIG API */ @@ -1016,8 +1015,6 @@ typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); #endif /* MULTIPLICITY */ #endif /* PERL_OBJECT */ -/* Workaround for bug in perl 5.6.x croak and earlier */ -#if (PERL_VERSION < 8) # ifdef PERL_OBJECT # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) static void SWIG_Perl_croak_null(CPerlObj *pPerl) @@ -1025,17 +1022,16 @@ static void SWIG_Perl_croak_null(CPerlObj *pPerl) static void SWIG_croak_null() # endif { - SV *err=ERRSV; + SV *err = get_sv("@", GV_ADD); # if (PERL_VERSION < 6) croak("%_", err); # else - if (SvOK(err) && !SvROK(err)) croak("%_", err); - croak(Nullch); + if (sv_isobject(err)) + croak(0); + else + croak("%s", SvPV_nolen(err)); # endif } -#else -# define SWIG_croak_null() croak(Nullch) -#endif /* @@ -1081,20 +1077,42 @@ SWIG_Perl_TypeProxyName(const swig_type_info *type) { } } +/* Identical to SWIG_TypeCheck, except for strcmp comparison */ SWIGRUNTIME swig_cast_info * SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { - SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) - || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0))), ty); + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(SWIG_Perl_TypeProxyName(iter->type), c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; } - /* Function for getting a pointer value */ SWIGRUNTIME int -SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { +SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) { swig_cast_info *tc; void *voidptr = (void *)0; SV *tsv = 0; + + if (own) + *own = 0; + /* If magical, apply more magic */ if (SvGMAGICAL(sv)) mg_get(sv); @@ -1126,8 +1144,14 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info * return SWIG_OK; } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ if (!SvROK(sv)) { - *(ptr) = (void *) 0; - return SWIG_OK; + /* In Perl 5.12 and later, SVt_RV == SVt_IV, so sv could be a valid integer value. */ + if (SvIOK(sv)) { + return SWIG_ERROR; + } else { + /* NULL pointer (reference to undef). */ + *(ptr) = (void *) 0; + return SWIG_OK; + } } else { return SWIG_ERROR; } @@ -1144,7 +1168,11 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info * { int newmemory = 0; *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } } } else { *ptr = voidptr; @@ -1159,7 +1187,7 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info * */ SV *obj = sv; HV *stash = SvSTASH(SvRV(obj)); - GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE); + GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE); if (isGV(gv)) { HV *hv = GvHVn(gv); /* @@ -1174,18 +1202,23 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info * return SWIG_OK; } +SWIGRUNTIME int +SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { + return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0); +} + SWIGRUNTIME void SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { - if (ptr && (flags & SWIG_SHADOW)) { + if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) { SV *self; SV *obj=newSV(0); HV *hash=newHV(); HV *stash; - sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); + sv_setref_pv(obj, SWIG_Perl_TypeProxyName(t), ptr); stash=SvSTASH(SvRV(obj)); if (flags & SWIG_POINTER_OWN) { HV *hv; - GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE); + GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE); if (!isGV(gv)) gv_init(gv, stash, "OWNER", 5, FALSE); hv=GvHVn(gv); @@ -1199,7 +1232,7 @@ SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, i sv_bless(sv, stash); } else { - sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); + sv_setref_pv(sv, SWIG_Perl_TypeProxyName(t), ptr); } } @@ -1290,19 +1323,23 @@ typedef struct { /* Magic variable code */ #ifndef PERL_OBJECT -#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) - #ifndef MULTIPLICITY - SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) - #else - SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) - #endif +# ifdef __cplusplus +# define swig_create_magic(s,a,b,c) _swig_create_magic(s,const_cast(a),b,c) +# else +# define swig_create_magic(s,a,b,c) _swig_create_magic(s,(char*)(a),b,c) +# endif +# ifndef MULTIPLICITY +SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) +# else +SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) +# endif #else # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) #endif { MAGIC *mg; - sv_magic(sv,sv,'U',(char *) name,strlen(name)); + sv_magic(sv,sv,'U',name,strlen(name)); mg = mg_find(sv,'U'); mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); mg->mg_virtual->svt_get = (SwigMagicFunc) get; @@ -1314,7 +1351,7 @@ SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, i SWIGRUNTIME swig_module_info * -SWIG_Perl_GetModule(void) { +SWIG_Perl_GetModule(void *SWIGUNUSEDPARM(clientdata)) { static void *type_pointer = (void *)0; SV *pointer; @@ -1351,6 +1388,9 @@ SWIG_Perl_SetModule(swig_module_info *module) { #ifdef do_close #undef do_close #endif +#ifdef do_exec + #undef do_exec +#endif #ifdef scalar #undef scalar #endif @@ -1405,9 +1445,6 @@ SWIG_Perl_SetModule(swig_module_info *module) { #ifdef eof #undef eof #endif -#ifdef bool - #undef bool -#endif #ifdef close #undef close #endif @@ -1435,6 +1472,26 @@ SWIG_Perl_SetModule(swig_module_info *module) { #ifdef open #undef open #endif +#ifdef readdir + #undef readdir +#endif +#ifdef bind + #undef bind +#endif +#ifdef access + #undef access +#endif +#ifdef stat + #undef stat +#endif + +#ifdef bool + /* Leave if macro is from C99 stdbool.h */ + #ifndef __bool_true_false_are_defined + #undef bool + #endif +#endif + @@ -1463,7 +1520,7 @@ 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 0x010335 +#define SWIGVERSION 0x020012 #define SWIG_VERSION SWIGVERSION @@ -1508,6 +1565,11 @@ SWIG_pchar_descriptor(void) SWIGINTERN int SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc) { + if (SvMAGICAL(obj)) { + SV *tmp = sv_newmortal(); + SvSetSV(tmp, obj); + obj = tmp; + } if (SvPOK(obj)) { STRLEN len = 0; char *cstr = SvPV(obj, len); @@ -1586,7 +1648,9 @@ SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val) const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; - double v = strtod(nptr, &endptr); + double v; + errno = 0; + v = strtod(nptr, &endptr); if (errno == ERANGE) { errno = 0; return SWIG_OverflowError; @@ -1641,9 +1705,20 @@ SWIG_CanCastAsInteger(double *d, double min, double max) { SWIGINTERN int SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val) { - if (SvIOK(obj)) { - if (val) *val = SvIV(obj); - return SWIG_OK; + if (SvUOK(obj)) { + UV v = SvUV(obj); + if (v <= LONG_MAX) { + if (val) *val = v; + return SWIG_OK; + } + return SWIG_OverflowError; + } else if (SvIOK(obj)) { + IV v = SvIV(obj); + if (v >= LONG_MIN && v <= LONG_MAX) { + if(val) *val = v; + return SWIG_OK; + } + return SWIG_OverflowError; } else { int dispatch = 0; const char *nptr = SvPV_nolen(obj); @@ -1693,10 +1768,13 @@ SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val) SWIGINTERNINLINE SV * SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value) -{ - SV *obj = sv_newmortal(); - sv_setiv(obj, (IV) value); - return obj; +{ + SV *sv; + if (value >= IV_MIN && value <= IV_MAX) + sv = newSViv(value); + else + sv = newSVpvf("%ld", value); + return sv_2mortal(sv); } @@ -1709,14 +1787,8 @@ SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value) SWIGINTERNINLINE SV * SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value) -{ - SV *obj = sv_newmortal(); - if (value) { - sv_setsv(obj, &PL_sv_yes); - } else { - sv_setsv(obj, &PL_sv_no); - } - return obj; +{ + return boolSV(value); } #ifdef __cplusplus @@ -1773,8 +1845,7 @@ XS(_wrap_ESLevent_event_set) { } arg2 = reinterpret_cast< esl_event_t * >(argp2); if (arg1) (arg1)->event = arg2; - - + ST(argvi) = sv_newmortal(); XSRETURN(argvi); @@ -1789,10 +1860,10 @@ XS(_wrap_ESLevent_event_set) { XS(_wrap_ESLevent_event_get) { { ESLevent *arg1 = (ESLevent *) 0 ; - esl_event_t *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + esl_event_t *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { @@ -1846,7 +1917,7 @@ XS(_wrap_ESLevent_serialized_string_set) { } else { arg1->serialized_string = 0; } - + ST(argvi) = sv_newmortal(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; XSRETURN(argvi); @@ -1861,10 +1932,10 @@ XS(_wrap_ESLevent_serialized_string_set) { XS(_wrap_ESLevent_serialized_string_get) { { ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { @@ -1911,8 +1982,7 @@ XS(_wrap_ESLevent_mine_set) { } arg2 = static_cast< int >(val2); if (arg1) (arg1)->mine = arg2; - - + ST(argvi) = sv_newmortal(); XSRETURN(argvi); @@ -1927,10 +1997,10 @@ XS(_wrap_ESLevent_mine_set) { XS(_wrap_ESLevent_mine_get) { { ESLevent *arg1 = (ESLevent *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + int result; dXSARGS; if ((items < 1) || (items > 1)) { @@ -1956,7 +2026,6 @@ XS(_wrap_new_ESLevent__SWIG_0) { { char *arg1 = (char *) 0 ; char *arg2 = (char *) NULL ; - ESLevent *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -1964,6 +2033,7 @@ XS(_wrap_new_ESLevent__SWIG_0) { char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 1) || (items > 2)) { @@ -1998,12 +2068,12 @@ XS(_wrap_new_ESLevent__SWIG_1) { { esl_event_t *arg1 = (esl_event_t *) 0 ; int arg2 = (int) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 1) || (items > 2)) { @@ -2037,10 +2107,10 @@ XS(_wrap_new_ESLevent__SWIG_1) { XS(_wrap_new_ESLevent__SWIG_2) { { ESLevent *arg1 = (ESLevent *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { @@ -2155,11 +2225,11 @@ XS(_wrap_new_ESLevent) { dispatch: switch(_index) { case 1: - ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLevent__SWIG_1); return; + PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ESLevent__SWIG_1); return; case 2: - ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLevent__SWIG_2); return; + PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ESLevent__SWIG_2); return; case 3: - ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLevent__SWIG_0); return; + PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ESLevent__SWIG_0); return; } } @@ -2185,8 +2255,7 @@ XS(_wrap_delete_ESLevent) { } arg1 = reinterpret_cast< ESLevent * >(argp1); delete arg1; - - + ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: @@ -2200,13 +2269,13 @@ XS(_wrap_ESLevent_serialize) { { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) NULL ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; + char *result = 0 ; dXSARGS; if ((items < 1) || (items > 2)) { @@ -2241,12 +2310,12 @@ XS(_wrap_ESLevent_setPriority) { { ESLevent *arg1 = (ESLevent *) 0 ; esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ; - bool result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; int argvi = 0; + bool result; dXSARGS; if ((items < 1) || (items > 2)) { @@ -2286,7 +2355,6 @@ XS(_wrap_ESLevent_getHeader) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; int arg3 = (int) -1 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -2295,6 +2363,7 @@ XS(_wrap_ESLevent_getHeader) { int val3 ; int ecode3 = 0 ; int argvi = 0; + char *result = 0 ; dXSARGS; if ((items < 2) || (items > 3)) { @@ -2335,10 +2404,10 @@ XS(_wrap_ESLevent_getHeader) { XS(_wrap_ESLevent_getBody) { { ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { @@ -2363,10 +2432,10 @@ XS(_wrap_ESLevent_getBody) { XS(_wrap_ESLevent_getType) { { ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { @@ -2392,13 +2461,13 @@ XS(_wrap_ESLevent_addBody) { { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; + bool result; dXSARGS; if ((items < 2) || (items > 2)) { @@ -2432,7 +2501,6 @@ XS(_wrap_ESLevent_addHeader) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -2442,6 +2510,7 @@ XS(_wrap_ESLevent_addHeader) { char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; + bool result; dXSARGS; if ((items < 3) || (items > 3)) { @@ -2482,7 +2551,6 @@ XS(_wrap_ESLevent_pushHeader) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -2492,6 +2560,7 @@ XS(_wrap_ESLevent_pushHeader) { char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; + bool result; dXSARGS; if ((items < 3) || (items > 3)) { @@ -2532,7 +2601,6 @@ XS(_wrap_ESLevent_unshiftHeader) { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -2542,6 +2610,7 @@ XS(_wrap_ESLevent_unshiftHeader) { char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; + bool result; dXSARGS; if ((items < 3) || (items > 3)) { @@ -2581,13 +2650,13 @@ XS(_wrap_ESLevent_delHeader) { { ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; + bool result; dXSARGS; if ((items < 2) || (items > 2)) { @@ -2619,10 +2688,10 @@ XS(_wrap_ESLevent_delHeader) { XS(_wrap_ESLevent_firstHeader) { { ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { @@ -2647,10 +2716,10 @@ XS(_wrap_ESLevent_firstHeader) { XS(_wrap_ESLevent_nextHeader) { { ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + char *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { @@ -2678,7 +2747,6 @@ XS(_wrap_new_ESLconnection__SWIG_0) { int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -2691,6 +2759,7 @@ XS(_wrap_new_ESLconnection__SWIG_0) { char *buf4 = 0 ; int alloc4 = 0 ; int argvi = 0; + ESLconnection *result = 0 ; dXSARGS; if ((items < 4) || (items > 4)) { @@ -2738,7 +2807,6 @@ XS(_wrap_new_ESLconnection__SWIG_1) { char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -2748,6 +2816,7 @@ XS(_wrap_new_ESLconnection__SWIG_1) { char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; + ESLconnection *result = 0 ; dXSARGS; if ((items < 3) || (items > 3)) { @@ -2789,7 +2858,6 @@ XS(_wrap_new_ESLconnection__SWIG_2) { char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -2803,6 +2871,7 @@ XS(_wrap_new_ESLconnection__SWIG_2) { char *buf4 = 0 ; int alloc4 = 0 ; int argvi = 0; + ESLconnection *result = 0 ; dXSARGS; if ((items < 4) || (items > 4)) { @@ -2850,7 +2919,6 @@ XS(_wrap_new_ESLconnection__SWIG_3) { char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -2861,6 +2929,7 @@ XS(_wrap_new_ESLconnection__SWIG_3) { char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; + ESLconnection *result = 0 ; dXSARGS; if ((items < 3) || (items > 3)) { @@ -2899,10 +2968,10 @@ XS(_wrap_new_ESLconnection__SWIG_3) { XS(_wrap_new_ESLconnection__SWIG_4) { { int arg1 ; - ESLconnection *result = 0 ; int val1 ; int ecode1 = 0 ; int argvi = 0; + ESLconnection *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { @@ -3119,15 +3188,15 @@ XS(_wrap_new_ESLconnection) { dispatch: switch(_index) { case 1: - ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_4); return; + PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_4); return; case 2: - ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_1); return; + PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_1); return; case 3: - ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_3); return; + PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_3); return; case 4: - ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_0); return; + PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_0); return; case 5: - ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_2); return; + PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ESLconnection__SWIG_2); return; } } @@ -3153,8 +3222,7 @@ XS(_wrap_delete_ESLconnection) { } arg1 = reinterpret_cast< ESLconnection * >(argp1); delete arg1; - - + ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: @@ -3167,10 +3235,10 @@ XS(_wrap_delete_ESLconnection) { XS(_wrap_ESLconnection_socketDescriptor) { { ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + int result; dXSARGS; if ((items < 1) || (items > 1)) { @@ -3195,10 +3263,10 @@ XS(_wrap_ESLconnection_socketDescriptor) { XS(_wrap_ESLconnection_connected) { { ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + int result; dXSARGS; if ((items < 1) || (items > 1)) { @@ -3223,10 +3291,10 @@ XS(_wrap_ESLconnection_connected) { XS(_wrap_ESLconnection_getInfo) { { ESLconnection *arg1 = (ESLconnection *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { @@ -3252,13 +3320,13 @@ XS(_wrap_ESLconnection_send) { { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; + int result; dXSARGS; if ((items < 2) || (items > 2)) { @@ -3291,13 +3359,13 @@ XS(_wrap_ESLconnection_sendRecv) { { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { @@ -3331,7 +3399,6 @@ XS(_wrap_ESLconnection_api) { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3341,6 +3408,7 @@ XS(_wrap_ESLconnection_api) { char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 2) || (items > 3)) { @@ -3384,7 +3452,6 @@ XS(_wrap_ESLconnection_bgapi) { char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3397,6 +3464,7 @@ XS(_wrap_ESLconnection_bgapi) { char *buf4 = 0 ; int alloc4 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 2) || (items > 4)) { @@ -3447,12 +3515,12 @@ XS(_wrap_ESLconnection_sendEvent) { { ESLconnection *arg1 = (ESLconnection *) 0 ; ESLevent *arg2 = (ESLevent *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { @@ -3486,7 +3554,6 @@ XS(_wrap_ESLconnection_sendMSG) { ESLconnection *arg1 = (ESLconnection *) 0 ; ESLevent *arg2 = (ESLevent *) 0 ; char *arg3 = (char *) NULL ; - int result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -3495,6 +3562,7 @@ XS(_wrap_ESLconnection_sendMSG) { char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; + int result; dXSARGS; if ((items < 2) || (items > 3)) { @@ -3535,10 +3603,10 @@ XS(_wrap_ESLconnection_sendMSG) { XS(_wrap_ESLconnection_recvEvent) { { ESLconnection *arg1 = (ESLconnection *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 1) || (items > 1)) { @@ -3564,12 +3632,12 @@ XS(_wrap_ESLconnection_recvEventTimed) { { ESLconnection *arg1 = (ESLconnection *) 0 ; int arg2 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 2) || (items > 2)) { @@ -3603,7 +3671,6 @@ XS(_wrap_ESLconnection_filter) { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3613,6 +3680,7 @@ XS(_wrap_ESLconnection_filter) { char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 3) || (items > 3)) { @@ -3653,7 +3721,6 @@ XS(_wrap_ESLconnection_events) { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3663,6 +3730,7 @@ XS(_wrap_ESLconnection_events) { char *buf3 = 0 ; int alloc3 = 0 ; int argvi = 0; + int result; dXSARGS; if ((items < 3) || (items > 3)) { @@ -3704,7 +3772,6 @@ XS(_wrap_ESLconnection_execute) { char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3717,6 +3784,7 @@ XS(_wrap_ESLconnection_execute) { char *buf4 = 0 ; int alloc4 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 2) || (items > 4)) { @@ -3769,7 +3837,6 @@ XS(_wrap_ESLconnection_executeAsync) { char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3782,6 +3849,7 @@ XS(_wrap_ESLconnection_executeAsync) { char *buf4 = 0 ; int alloc4 = 0 ; int argvi = 0; + ESLevent *result = 0 ; dXSARGS; if ((items < 2) || (items > 4)) { @@ -3832,13 +3900,13 @@ XS(_wrap_ESLconnection_setAsyncExecute) { { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; + int result; dXSARGS; if ((items < 2) || (items > 2)) { @@ -3871,13 +3939,13 @@ XS(_wrap_ESLconnection_setEventLock) { { ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; char *buf2 = 0 ; int alloc2 = 0 ; int argvi = 0; + int result; dXSARGS; if ((items < 2) || (items > 2)) { @@ -3909,10 +3977,10 @@ XS(_wrap_ESLconnection_setEventLock) { XS(_wrap_ESLconnection_disconnect) { { ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int argvi = 0; + int result; dXSARGS; if ((items < 1) || (items > 1)) { @@ -3951,7 +4019,7 @@ XS(_wrap_eslSetLogLevel) { } arg1 = static_cast< int >(val1); eslSetLogLevel(arg1); - + ST(argvi) = sv_newmortal(); XSRETURN(argvi); fail: @@ -4050,18 +4118,18 @@ static swig_command_info swig_commands[] = { }; /* ----------------------------------------------------------------------------- * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * - * The generated swig_type_info structures are assigned staticly to an initial + * The generated swig_type_info structures are assigned staticly to an initial * 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 @@ -4071,17 +4139,17 @@ static swig_command_info swig_commands[] = { * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it + * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * - * First off, we lookup the cast->type name to see if it is already loaded. + * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the + * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that @@ -4107,8 +4175,6 @@ SWIG_InitializeModule(void *clientdata) { swig_module_info *module_head, *iter; int found, init; - clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ @@ -4146,7 +4212,7 @@ SWIG_InitializeModule(void *clientdata) { module_head->next = &swig_module; } - /* When multiple interpeters are used, a module could have already been initialized in + /* When multiple interpreters 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 */ @@ -4299,25 +4365,30 @@ XS(SWIG_init) { /* Install commands */ for (i = 0; swig_commands[i].name; i++) { - newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__); + /* Casts only needed for Perl < 5.10. */ +#ifdef __cplusplus + newXS(const_cast(swig_commands[i].name), swig_commands[i].wrapper, const_cast(__FILE__)); +#else + newXS((char*)swig_commands[i].name, swig_commands[i].wrapper, (char*)__FILE__); +#endif } /* Install variables */ for (i = 0; swig_variables[i].name; i++) { SV *sv; - sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI); + sv = get_sv(swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI); if (swig_variables[i].type) { SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0); } else { sv_setiv(sv,(IV) 0); } - swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); + swig_create_magic(sv, swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); } /* Install constant */ for (i = 0; swig_constants[i].type; i++) { SV *sv; - sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI); + sv = get_sv(swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI); switch(swig_constants[i].type) { case SWIG_INT: sv_setiv(sv, (IV) swig_constants[i].lvalue); @@ -4326,7 +4397,7 @@ XS(SWIG_init) { sv_setnv(sv, (double) swig_constants[i].dvalue); break; case SWIG_STRING: - sv_setpv(sv, (char *) swig_constants[i].pvalue); + sv_setpv(sv, (const char *) swig_constants[i].pvalue); break; case SWIG_POINTER: SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0); diff --git a/libs/esl/perl/perlxsi.c b/libs/esl/perl/perlxsi.c index 9ca8fc1fb1..f11b766af5 100644 --- a/libs/esl/perl/perlxsi.c +++ b/libs/esl/perl/perlxsi.c @@ -1,5 +1,6 @@ -#include -#include +#include "EXTERN.h" +#include "perl.h" +#include "XSUB.h" EXTERN_C void xs_init (pTHX); @@ -8,9 +9,10 @@ EXTERN_C void boot_DynaLoader (pTHX_ CV* cv); EXTERN_C void xs_init(pTHX) { - char *file = __FILE__; - dXSUB_SYS; + static const char file[] = __FILE__; + dXSUB_SYS; + PERL_UNUSED_CONTEXT; - /* DynaLoader is a special case */ - newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); + /* DynaLoader is a special case */ + newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); } diff --git a/libs/esl/php/ESL.php b/libs/esl/php/ESL.php index b18fd7d1d4..3a4258a1ab 100644 --- a/libs/esl/php/ESL.php +++ b/libs/esl/php/ESL.php @@ -2,12 +2,12 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.7 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.12 + * + * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ // Try to load our extension if it's not already loaded. diff --git a/libs/esl/php/esl_wrap.cpp b/libs/esl/php/esl_wrap.cpp index 83304bb226..e78b05ca9e 100644 --- a/libs/esl/php/esl_wrap.cpp +++ b/libs/esl/php/esl_wrap.cpp @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.7 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.12 + * + * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPHP @@ -67,28 +67,28 @@ template T SwigValueInit() { #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -131,7 +131,7 @@ template T SwigValueInit() { # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -169,7 +169,7 @@ template T SwigValueInit() { You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. - + But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ @@ -195,16 +195,16 @@ template T SwigValueInit() { #define SWIG_POINTER_OWN 0x1 -/* +/* Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer + + The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). - + Use the following macros/flags to set or process the returning states. - + In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { @@ -237,23 +237,23 @@ template T SwigValueInit() { } else { // fail code } - + I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be @@ -267,17 +267,17 @@ template T SwigValueInit() { int fooi(int); and you call - + food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ -#define SWIG_OK (0) +#define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) @@ -308,14 +308,14 @@ template T SwigValueInit() { # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { +SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ -# define SWIG_AddCast +# define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif @@ -359,7 +359,7 @@ typedef struct swig_module_info { void *clientdata; /* Language specific module data */ } swig_module_info; -/* +/* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. @@ -379,18 +379,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, /* Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal + Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; - while (!equiv && *ne) { + while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; @@ -398,24 +398,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { /* Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb + Return 0 if not equal, 1 if equal */ SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } - /* Check the typename */ @@ -443,7 +432,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) { return 0; } -/* +/* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * @@ -478,7 +467,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } -/* +/* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * @@ -522,7 +511,7 @@ SWIG_TypePrettyName(const swig_type_info *type) { return type->name; } -/* +/* Set the clientdata field for a type */ SWIGRUNTIME void @@ -530,14 +519,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; - + while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } - } + } cast = cast->next; } } @@ -546,18 +535,18 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } - + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { swig_module_info *iter = start; do { @@ -566,11 +555,11 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; + register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); - if (compare == 0) { + if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { @@ -595,14 +584,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); @@ -621,12 +610,12 @@ SWIG_TypeQueryModule(swig_module_info *start, iter = iter->next; } while (iter != end); } - + /* neither found a match */ return 0; } -/* +/* Pack binary data into a string */ SWIGRUNTIME char * @@ -642,7 +631,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) { return c; } -/* +/* Unpack binary data from a string */ SWIGRUNTIME const char * @@ -656,21 +645,21 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); - else + else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); - else + else return (char *) 0; *u = uu; } return c; } -/* +/* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * @@ -810,7 +799,7 @@ static int default_error_code = E_ERROR; if (!(expr) ) { zend_printf("Contract Assert Failed %s\n",msg ); } else /* Standard SWIG API */ -#define SWIG_GetModule(clientdata) SWIG_Php_GetModule() +#define SWIG_GetModule(clientdata) SWIG_Php_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Php_SetModule(pointer) /* used to wrap returned objects in so we know whether they are newobject @@ -940,11 +929,11 @@ SWIG_ZTS_ConvertResourcePtr(zval *z, swig_type_info *ty, int flags TSRMLS_DC) { const char *type_name; value = (swig_object_wrapper *) zend_list_find(z->value.lval, &type); - if ( flags & SWIG_POINTER_DISOWN ) { + if (type==-1) return NULL; + if (flags & SWIG_POINTER_DISOWN) { value->newobject = 0; } p = value->ptr; - if (type==-1) return NULL; type_name=zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC); @@ -983,14 +972,13 @@ SWIG_ZTS_ConvertPtr(zval *z, void **ptr, swig_type_info *ty, int flags TSRMLS_DC } static char const_name[] = "swig_runtime_data_type_pointer"; -static swig_module_info *SWIG_Php_GetModule() { +static swig_module_info *SWIG_Php_GetModule(void *SWIGUNUSEDPARM(clientdata)) { zval *pointer; swig_module_info *ret = 0; + TSRMLS_FETCH(); MAKE_STD_ZVAL(pointer); - TSRMLS_FETCH(); - if (zend_get_constant(const_name, sizeof(const_name) - 1, pointer TSRMLS_CC)) { if (pointer->type == IS_LONG) { ret = (swig_module_info *) pointer->value.lval; @@ -1038,6 +1026,7 @@ static void SWIG_FAIL() __attribute__ ((__noreturn__)); #endif static void SWIG_FAIL() { + TSRMLS_FETCH(); zend_error(SWIG_ErrorCode(), "%s", SWIG_ErrorMsg()); abort(); } @@ -3156,18 +3145,18 @@ SWIGEXPORT zend_module_entry *get_module(void) { return &ESL_module_entry; } #define SWIG_php_minit PHP_MINIT_FUNCTION(ESL) /* ----------------------------------------------------------------------------- * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * - * The generated swig_type_info structures are assigned staticly to an initial + * The generated swig_type_info structures are assigned staticly to an initial * 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 @@ -3177,17 +3166,17 @@ SWIGEXPORT zend_module_entry *get_module(void) { return &ESL_module_entry; } * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it + * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * - * First off, we lookup the cast->type name to see if it is already loaded. + * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the + * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that @@ -3213,8 +3202,6 @@ SWIG_InitializeModule(void *clientdata) { swig_module_info *module_head, *iter; int found, init; - clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ @@ -3252,7 +3239,7 @@ SWIG_InitializeModule(void *clientdata) { module_head->next = &swig_module; } - /* When multiple interpeters are used, a module could have already been initialized in + /* When multiple interpreters 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 */ @@ -3266,7 +3253,7 @@ SWIG_InitializeModule(void *clientdata) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; - + #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif @@ -3293,7 +3280,7 @@ SWIG_InitializeModule(void *clientdata) { /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { - + /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG diff --git a/libs/esl/php/php_ESL.h b/libs/esl/php/php_ESL.h index 50e80578b3..4c996f502b 100644 --- a/libs/esl/php/php_ESL.h +++ b/libs/esl/php/php_ESL.h @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.7 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.12 + * + * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #ifndef PHP_ESL_H diff --git a/libs/esl/python/ESL.py b/libs/esl/python/ESL.py index bb2de43a87..15c6f15264 100644 --- a/libs/esl/python/ESL.py +++ b/libs/esl/python/ESL.py @@ -1,21 +1,44 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.35 +# Version 2.0.12 # -# Don't modify this file, modify the SWIG interface instead. -# This file is compatible with both classic and new-style classes. +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. -import _ESL -import new -new_instancemethod = new.instancemethod + + + + +from sys import version_info +if version_info >= (2,6,0): + def swig_import_helper(): + from os.path import dirname + import imp + fp = None + try: + fp, pathname, description = imp.find_module('_ESL', [dirname(__file__)]) + except ImportError: + import _ESL + return _ESL + if fp is not None: + try: + _mod = imp.load_module('_ESL', fp, pathname, description) + finally: + fp.close() + return _mod + _ESL = swig_import_helper() + del swig_import_helper +else: + import _ESL +del version_info def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): - if type(value).__name__ == 'PySwigObject': + if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) - if (not static) or hasattr(self,name): + if (not static): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) @@ -27,7 +50,7 @@ def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) - raise AttributeError,name + raise AttributeError(name) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() @@ -47,23 +70,23 @@ class ESLevent: __swig_setmethods__["mine"] = _ESL.ESLevent_mine_set __swig_getmethods__["mine"] = _ESL.ESLevent_mine_get def __init__(self, *args): - this = apply(_ESL.new_ESLevent, args) + this = _ESL.new_ESLevent(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _ESL.delete_ESLevent __del__ = lambda self : None; - def serialize(*args): return apply(_ESL.ESLevent_serialize, args) - def setPriority(*args): return apply(_ESL.ESLevent_setPriority, args) - def getHeader(*args): return apply(_ESL.ESLevent_getHeader, args) - def getBody(*args): return apply(_ESL.ESLevent_getBody, args) - def getType(*args): return apply(_ESL.ESLevent_getType, args) - def addBody(*args): return apply(_ESL.ESLevent_addBody, args) - def addHeader(*args): return apply(_ESL.ESLevent_addHeader, args) - def pushHeader(*args): return apply(_ESL.ESLevent_pushHeader, args) - def unshiftHeader(*args): return apply(_ESL.ESLevent_unshiftHeader, args) - def delHeader(*args): return apply(_ESL.ESLevent_delHeader, args) - def firstHeader(*args): return apply(_ESL.ESLevent_firstHeader, args) - def nextHeader(*args): return apply(_ESL.ESLevent_nextHeader, args) + def serialize(self, format=None): return _ESL.ESLevent_serialize(self, format) + def setPriority(self, *args): return _ESL.ESLevent_setPriority(self, *args) + def getHeader(self, *args): return _ESL.ESLevent_getHeader(self, *args) + def getBody(self): return _ESL.ESLevent_getBody(self) + def getType(self): return _ESL.ESLevent_getType(self) + def addBody(self, *args): return _ESL.ESLevent_addBody(self, *args) + def addHeader(self, *args): return _ESL.ESLevent_addHeader(self, *args) + def pushHeader(self, *args): return _ESL.ESLevent_pushHeader(self, *args) + def unshiftHeader(self, *args): return _ESL.ESLevent_unshiftHeader(self, *args) + def delHeader(self, *args): return _ESL.ESLevent_delHeader(self, *args) + def firstHeader(self): return _ESL.ESLevent_firstHeader(self) + def nextHeader(self): return _ESL.ESLevent_nextHeader(self) ESLevent_swigregister = _ESL.ESLevent_swigregister ESLevent_swigregister(ESLevent) @@ -74,32 +97,36 @@ class ESLconnection: __getattr__ = lambda self, name: _swig_getattr(self, ESLconnection, name) __repr__ = _swig_repr def __init__(self, *args): - this = apply(_ESL.new_ESLconnection, args) + this = _ESL.new_ESLconnection(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _ESL.delete_ESLconnection __del__ = lambda self : None; - def socketDescriptor(*args): return apply(_ESL.ESLconnection_socketDescriptor, args) - def connected(*args): return apply(_ESL.ESLconnection_connected, args) - def getInfo(*args): return apply(_ESL.ESLconnection_getInfo, args) - def send(*args): return apply(_ESL.ESLconnection_send, args) - def sendRecv(*args): return apply(_ESL.ESLconnection_sendRecv, args) - def api(*args): return apply(_ESL.ESLconnection_api, args) - def bgapi(*args): return apply(_ESL.ESLconnection_bgapi, args) - def sendEvent(*args): return apply(_ESL.ESLconnection_sendEvent, args) - def sendMSG(*args): return apply(_ESL.ESLconnection_sendMSG, args) - def recvEvent(*args): return apply(_ESL.ESLconnection_recvEvent, args) - def recvEventTimed(*args): return apply(_ESL.ESLconnection_recvEventTimed, args) - def filter(*args): return apply(_ESL.ESLconnection_filter, args) - def events(*args): return apply(_ESL.ESLconnection_events, args) - def execute(*args): return apply(_ESL.ESLconnection_execute, args) - def executeAsync(*args): return apply(_ESL.ESLconnection_executeAsync, args) - def setAsyncExecute(*args): return apply(_ESL.ESLconnection_setAsyncExecute, args) - def setEventLock(*args): return apply(_ESL.ESLconnection_setEventLock, args) - def disconnect(*args): return apply(_ESL.ESLconnection_disconnect, args) + def socketDescriptor(self): return _ESL.ESLconnection_socketDescriptor(self) + def connected(self): return _ESL.ESLconnection_connected(self) + def getInfo(self): return _ESL.ESLconnection_getInfo(self) + def send(self, *args): return _ESL.ESLconnection_send(self, *args) + def sendRecv(self, *args): return _ESL.ESLconnection_sendRecv(self, *args) + def api(self, *args): return _ESL.ESLconnection_api(self, *args) + def bgapi(self, *args): return _ESL.ESLconnection_bgapi(self, *args) + def sendEvent(self, *args): return _ESL.ESLconnection_sendEvent(self, *args) + def sendMSG(self, *args): return _ESL.ESLconnection_sendMSG(self, *args) + def recvEvent(self): return _ESL.ESLconnection_recvEvent(self) + def recvEventTimed(self, *args): return _ESL.ESLconnection_recvEventTimed(self, *args) + def filter(self, *args): return _ESL.ESLconnection_filter(self, *args) + def events(self, *args): return _ESL.ESLconnection_events(self, *args) + def execute(self, *args): return _ESL.ESLconnection_execute(self, *args) + def executeAsync(self, *args): return _ESL.ESLconnection_executeAsync(self, *args) + def setAsyncExecute(self, *args): return _ESL.ESLconnection_setAsyncExecute(self, *args) + def setEventLock(self, *args): return _ESL.ESLconnection_setEventLock(self, *args) + def disconnect(self): return _ESL.ESLconnection_disconnect(self) ESLconnection_swigregister = _ESL.ESLconnection_swigregister ESLconnection_swigregister(ESLconnection) + +def eslSetLogLevel(*args): + return _ESL.eslSetLogLevel(*args) eslSetLogLevel = _ESL.eslSetLogLevel +# This file is compatible with both classic and new-style classes. diff --git a/libs/esl/python/Makefile b/libs/esl/python/Makefile index 7504665561..eeeb2bdea7 100644 --- a/libs/esl/python/Makefile +++ b/libs/esl/python/Makefile @@ -5,7 +5,7 @@ SITE_DIR=$(DESTDIR)/`python -c "from distutils.sysconfig import get_python_lib; all: _ESL.so esl_wrap.cpp: - swig -module ESL -classic -python -c++ -DMULTIPLICITY -threads -I../src/include -o esl_wrap.cpp ../ESL.i + swig2.0 -module ESL -classic -python -c++ -DMULTIPLICITY -threads -I../src/include -o esl_wrap.cpp ../ESL.i esl_wrap.o: esl_wrap.cpp $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o diff --git a/libs/esl/python/esl_wrap.cpp b/libs/esl/python/esl_wrap.cpp index b12f21cab0..09c89729f1 100644 --- a/libs/esl/python/esl_wrap.cpp +++ b/libs/esl/python/esl_wrap.cpp @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.35 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.12 + * + * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGPYTHON @@ -13,19 +13,23 @@ #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #define SWIG_PYTHON_CLASSIC + #ifdef __cplusplus +/* SwigValueWrapper is described in swig.swg */ template class SwigValueWrapper { - T *tt; + struct SwigMovePointer { + T *ptr; + SwigMovePointer(T *p) : ptr(p) { } + ~SwigMovePointer() { delete ptr; } + SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; } + } pointer; + SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper(const SwigValueWrapper& rhs); public: - SwigValueWrapper() : tt(0) { } - SwigValueWrapper(const SwigValueWrapper& rhs) : tt(new T(*rhs.tt)) { } - SwigValueWrapper(const T& t) : tt(new T(t)) { } - ~SwigValueWrapper() { delete tt; } - SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; } - operator T&() const { return *tt; } - T *operator&() { return tt; } -private: - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); + SwigValueWrapper() : pointer(0) { } + SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; } + operator T&() const { return *pointer.ptr; } + T *operator&() { return pointer.ptr; } }; template T SwigValueInit() { @@ -64,14 +68,20 @@ template T SwigValueInit() { #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED +# endif +#endif + +#ifndef SWIG_MSC_UNSUPPRESS_4505 +# if defined(_MSC_VER) +# pragma warning(disable : 4505) /* unreferenced local function has been removed */ # endif #endif @@ -79,7 +89,7 @@ template T SwigValueInit() { # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -122,7 +132,7 @@ template T SwigValueInit() { # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -137,13 +147,19 @@ template T SwigValueInit() { -/* Python.h has to appear first */ -#include +#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) +/* Use debug wrappers with the Python release dll */ +# undef _DEBUG +# include +# define _DEBUG +#else +# include +#endif /* ----------------------------------------------------------------------------- * swigrun.swg * - * This file contains generic CAPI SWIG runtime support for pointer + * This file contains generic C API SWIG runtime support for pointer * type checking. * ----------------------------------------------------------------------------- */ @@ -162,11 +178,11 @@ template T SwigValueInit() { /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the swig runtime code. - In 99.9% of the cases, swig just needs to declare them as 'static'. - - But only do this if is strictly necessary, ie, if you have problems - with your compiler or so. + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. */ #ifndef SWIGRUNTIME @@ -190,17 +206,17 @@ template T SwigValueInit() { #define SWIG_POINTER_OWN 0x1 -/* +/* Flags/methods for returning states. - - The swig conversion methods, as ConvertPtr, return and integer + + The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). - + Use the following macros/flags to set or process the returning states. - - In old swig versions, you usually write code as: + + In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { // success code @@ -208,7 +224,7 @@ template T SwigValueInit() { //fail code } - Now you can be more explicit as: + Now you can be more explicit: int res = SWIG_ConvertPtr(obj,vptr,ty.flags); if (SWIG_IsOK(res)) { @@ -217,7 +233,7 @@ template T SwigValueInit() { // fail code } - that seems to be the same, but now you can also do + which is the same really, but now you can also do Type *ptr; int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); @@ -232,28 +248,28 @@ template T SwigValueInit() { } else { // fail code } - + I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that - requires also to SWIG_ConvertPtr to return new result values, as + also requires SWIG_ConvertPtr to return new result values, such as - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - swig errors code. + SWIG errors code. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code allows to return the 'cast rank', for example, if you have this @@ -262,18 +278,17 @@ template T SwigValueInit() { int fooi(int); and you call - + food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() +*/ - - */ -#define SWIG_OK (0) +#define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) @@ -294,7 +309,6 @@ template T SwigValueInit() { #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - /* Cast-Rank Mode */ #if defined(SWIG_CASTRANK_MODE) # ifndef SWIG_TypeRank @@ -305,20 +319,18 @@ template T SwigValueInit() { # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { +SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ -# define SWIG_AddCast +# define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif - - #include #ifdef __cplusplus @@ -358,7 +370,7 @@ typedef struct swig_module_info { void *clientdata; /* Language specific module data */ } swig_module_info; -/* +/* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. @@ -378,18 +390,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, /* Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal + Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; - while (!equiv && *ne) { + while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; @@ -397,58 +409,65 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { /* Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb + Return 0 if not equal, 1 if equal */ SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } - -/* think of this as a c++ template<> or a scheme macro */ -#define SWIG_TypeCheck_Template(comparison, ty) \ - if (ty) { \ - swig_cast_info *iter = ty->cast; \ - while (iter) { \ - if (comparison) { \ - if (iter == ty->cast) return iter; \ - /* Move iter to the top of the linked list */ \ - iter->prev->next = iter->next; \ - if (iter->next) \ - iter->next->prev = iter->prev; \ - iter->next = ty->cast; \ - iter->prev = 0; \ - if (ty->cast) ty->cast->prev = iter; \ - ty->cast = iter; \ - return iter; \ - } \ - iter = iter->next; \ - } \ - } \ - return 0 - /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { - SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; } -/* Same as previous function, except strcmp is replaced with a pointer comparison */ +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { - SWIG_TypeCheck_Template(iter->type == from, into); +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; } /* @@ -459,7 +478,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } -/* +/* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * @@ -503,7 +522,7 @@ SWIG_TypePrettyName(const swig_type_info *type) { return type->name; } -/* +/* Set the clientdata field for a type */ SWIGRUNTIME void @@ -511,14 +530,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; - + while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } - } + } cast = cast->next; } } @@ -527,18 +546,18 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } - + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { swig_module_info *iter = start; do { @@ -547,11 +566,11 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; + register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); - if (compare == 0) { + if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { @@ -576,14 +595,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); @@ -602,12 +621,12 @@ SWIG_TypeQueryModule(swig_module_info *start, iter = iter->next; } while (iter != end); } - + /* neither found a match */ return 0; } -/* +/* Pack binary data into a string */ SWIGRUNTIME char * @@ -623,7 +642,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) { return c; } -/* +/* Unpack binary data from a string */ SWIGRUNTIME const char * @@ -637,21 +656,21 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); - else + else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); - else + else return (char *) 0; *u = uu; } return c; } -/* +/* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * @@ -711,22 +730,92 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #endif /* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 +#define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 +/* Compatibility macros for Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + +#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) +#define PyInt_Check(x) PyLong_Check(x) +#define PyInt_AsLong(x) PyLong_AsLong(x) +#define PyInt_FromLong(x) PyLong_FromLong(x) +#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) +#define PyString_Check(name) PyBytes_Check(name) +#define PyString_FromString(x) PyUnicode_FromString(x) +#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) +#define PyString_AsString(str) PyBytes_AsString(str) +#define PyString_Size(str) PyBytes_Size(str) +#define PyString_InternFromString(key) PyUnicode_InternFromString(key) +#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE +#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) +#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) + +#endif + +#ifndef Py_TYPE +# define Py_TYPE(op) ((op)->ob_type) +#endif + +/* SWIG APIs for compatibility of both Python 2 & 3 */ + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_FromFormat PyUnicode_FromFormat +#else +# define SWIG_Python_str_FromFormat PyString_FromFormat +#endif + + +/* Warning: This function will allocate a new string in Python 3, + * so please call SWIG_Python_str_DelForPy3(x) to free the space. + */ +SWIGINTERN char* +SWIG_Python_str_AsChar(PyObject *str) +{ +#if PY_VERSION_HEX >= 0x03000000 + char *cstr; + char *newstr; + Py_ssize_t len; + str = PyUnicode_AsUTF8String(str); + PyBytes_AsStringAndSize(str, &cstr, &len); + newstr = (char *) malloc(len+1); + memcpy(newstr, cstr, len+1); + Py_XDECREF(str); + return newstr; +#else + return PyString_AsString(str); +#endif +} + +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) +#else +# define SWIG_Python_str_DelForPy3(x) +#endif + + +SWIGINTERN PyObject* +SWIG_Python_str_FromChar(const char *c) +{ +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromString(c); +#else + return PyString_FromString(c); +#endif +} /* Add PyOS_snprintf for old Pythons */ #if PY_VERSION_HEX < 0x02020000 @@ -773,6 +862,7 @@ PyString_FromFormat(const char *fmt, ...) { # define PyObject_GenericGetAttr 0 # endif #endif + /* Py_NotImplemented is defined in 2.1 and up. */ #if PY_VERSION_HEX < 0x02010000 # ifndef Py_NotImplemented @@ -780,7 +870,6 @@ PyString_FromFormat(const char *fmt, ...) { # endif #endif - /* A crude PyString_AsStringAndSize implementation for old Pythons */ #if PY_VERSION_HEX < 0x02010000 # ifndef PyString_AsStringAndSize @@ -795,7 +884,6 @@ PyString_FromFormat(const char *fmt, ...) { # endif #endif - /* PyBool_FromLong for old Pythons */ #if PY_VERSION_HEX < 0x02030000 static @@ -814,6 +902,67 @@ PyObject *PyBool_FromLong(long ok) typedef int Py_ssize_t; # define PY_SSIZE_T_MAX INT_MAX # define PY_SSIZE_T_MIN INT_MIN +typedef inquiry lenfunc; +typedef intargfunc ssizeargfunc; +typedef intintargfunc ssizessizeargfunc; +typedef intobjargproc ssizeobjargproc; +typedef intintobjargproc ssizessizeobjargproc; +typedef getreadbufferproc readbufferproc; +typedef getwritebufferproc writebufferproc; +typedef getsegcountproc segcountproc; +typedef getcharbufferproc charbufferproc; +static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) +{ + long result = 0; + PyObject *i = PyNumber_Int(x); + if (i) { + result = PyInt_AsLong(i); + Py_DECREF(i); + } + return result; +} +#endif + +#if PY_VERSION_HEX < 0x02050000 +#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) +#endif + +#if PY_VERSION_HEX < 0x02040000 +#define Py_VISIT(op) \ + do { \ + if (op) { \ + int vret = visit((op), arg); \ + if (vret) \ + return vret; \ + } \ + } while (0) +#endif + +#if PY_VERSION_HEX < 0x02030000 +typedef struct { + PyTypeObject type; + PyNumberMethods as_number; + PyMappingMethods as_mapping; + PySequenceMethods as_sequence; + PyBufferProcs as_buffer; + PyObject *name, *slots; +} PyHeapTypeObject; +#endif + +#if PY_VERSION_HEX < 0x02030000 +typedef destructor freefunc; +#endif + +#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ + (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ + (PY_MAJOR_VERSION > 3)) +# define SWIGPY_USE_CAPSULE +# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) +#endif + +#if PY_VERSION_HEX < 0x03020000 +#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) +#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) #endif /* ----------------------------------------------------------------------------- @@ -873,10 +1022,13 @@ SWIG_Python_AddErrorMsg(const char* mesg) if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); if (value) { + char *tmp; PyObject *old_str = PyObject_Str(value); PyErr_Clear(); Py_XINCREF(type); - PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); + + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); + SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); Py_DECREF(value); } else { @@ -884,8 +1036,6 @@ SWIG_Python_AddErrorMsg(const char* mesg) } } - - #if defined(SWIG_PYTHON_NO_THREADS) # if defined(SWIG_PYTHON_THREADS) # undef SWIG_PYTHON_THREADS @@ -959,9 +1109,6 @@ SWIG_Python_AddErrorMsg(const char* mesg) #ifdef __cplusplus extern "C" { -#if 0 -} /* cc-mode */ -#endif #endif /* ----------------------------------------------------------------------------- @@ -982,18 +1129,29 @@ typedef struct swig_const_info { swig_type_info **ptype; } swig_const_info; -#ifdef __cplusplus -#if 0 -{ /* cc-mode */ + +/* ----------------------------------------------------------------------------- + * Wrapper of PyInstanceMethod_New() used in Python 3 + * It is exported to the generated module, used for -fastproxy + * ----------------------------------------------------------------------------- */ +#if PY_VERSION_HEX >= 0x03000000 +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) +{ + return PyInstanceMethod_New(func); +} +#else +SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) +{ + return NULL; +} #endif + +#ifdef __cplusplus } #endif /* ----------------------------------------------------------------------------- - * See the LICENSE file for information on copyright, usage and redistribution - * of SWIG, and the README file for authors - http://www.swig.org/release.html. - * * pyrun.swg * * This file contains the runtime support for Python modules @@ -1008,7 +1166,15 @@ typedef struct swig_const_info { #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) + +#ifdef SWIGPYTHON_BUILTIN +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) +#else +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) +#endif + +#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) + #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int @@ -1023,7 +1189,7 @@ typedef struct swig_const_info { /* for C or C++ function pointers */ #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) /* for C++ member pointers, ie, member methods */ #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) @@ -1032,9 +1198,9 @@ typedef struct swig_const_info { /* Runtime API */ -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule() +#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) -#define SWIG_NewClientData(obj) PySwigClientData_New(obj) +#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) #define SWIG_SetErrorObj SWIG_Python_SetErrorObj #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg @@ -1058,7 +1224,7 @@ SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, (char *) msg); + PyErr_SetString(errtype, msg); SWIG_PYTHON_THREAD_END_BLOCK; } @@ -1066,12 +1232,41 @@ SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { /* Set a constant value */ +#if defined(SWIGPYTHON_BUILTIN) + +SWIGINTERN void +SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { + PyObject *s = PyString_InternFromString(key); + PyList_Append(seq, s); + Py_DECREF(s); +} + +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { +#if PY_VERSION_HEX < 0x02030000 + PyDict_SetItemString(d, (char *)name, obj); +#else + PyDict_SetItemString(d, name, obj); +#endif + Py_DECREF(obj); + if (public_interface) + SwigPyBuiltin_AddPublicSymbol(public_interface, name); +} + +#else + SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { - PyDict_SetItemString(d, (char*) name, obj); +#if PY_VERSION_HEX < 0x02030000 + PyDict_SetItemString(d, (char *)name, obj); +#else + PyDict_SetItemString(d, name, obj); +#endif Py_DECREF(obj); } +#endif + /* Append a value to the result obj */ SWIGINTERN PyObject* @@ -1132,6 +1327,14 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi } } if (!PyTuple_Check(args)) { + if (min <= 1 && max >= 1) { + register int i; + objs[0] = args; + for (i = 1; i < max; ++i) { + objs[i] = 0; + } + return 2; + } PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); return 0; } else { @@ -1184,11 +1387,11 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) +#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) +#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) + #ifdef __cplusplus extern "C" { -#if 0 -} /* cc-mode */ -#endif #endif /* How to access Py_None */ @@ -1230,7 +1433,7 @@ SWIG_Py_Void(void) return none; } -/* PySwigClientData */ +/* SwigPyClientData */ typedef struct { PyObject *klass; @@ -1239,30 +1442,31 @@ typedef struct { PyObject *destroy; int delargs; int implicitconv; -} PySwigClientData; + PyTypeObject *pytype; +} SwigPyClientData; SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty) { - PySwigClientData *data = (PySwigClientData *)ty->clientdata; + SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; return data ? data->implicitconv : 0; } SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc) { - PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0; + SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; PyObject *klass = data ? data->klass : 0; return (klass ? klass : PyExc_RuntimeError); } -SWIGRUNTIME PySwigClientData * -PySwigClientData_New(PyObject* obj) +SWIGRUNTIME SwigPyClientData * +SwigPyClientData_New(PyObject* obj) { if (!obj) { return 0; } else { - PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData)); + SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); /* the klass element */ data->klass = obj; Py_INCREF(data->klass); @@ -1305,19 +1509,19 @@ PySwigClientData_New(PyObject* obj) data->delargs = 0; } data->implicitconv = 0; + data->pytype = 0; return data; } } SWIGRUNTIME void -PySwigClientData_Del(PySwigClientData* data) -{ +SwigPyClientData_Del(SwigPyClientData *data) { Py_XDECREF(data->newraw); Py_XDECREF(data->newargs); Py_XDECREF(data->destroy); } -/* =============== PySwigObject =====================*/ +/* =============== SwigPyObject =====================*/ typedef struct { PyObject_HEAD @@ -1325,24 +1529,31 @@ typedef struct { swig_type_info *ty; int own; PyObject *next; -} PySwigObject; +#ifdef SWIGPYTHON_BUILTIN + PyObject *dict; +#endif +} SwigPyObject; SWIGRUNTIME PyObject * -PySwigObject_long(PySwigObject *v) +SwigPyObject_long(SwigPyObject *v) { return PyLong_FromVoidPtr(v->ptr); } SWIGRUNTIME PyObject * -PySwigObject_format(const char* fmt, PySwigObject *v) +SwigPyObject_format(const char* fmt, SwigPyObject *v) { PyObject *res = NULL; PyObject *args = PyTuple_New(1); if (args) { - if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) { - PyObject *ofmt = PyString_FromString(fmt); + if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { + PyObject *ofmt = SWIG_Python_str_FromChar(fmt); if (ofmt) { +#if PY_VERSION_HEX >= 0x03000000 + res = PyUnicode_Format(ofmt,args); +#else res = PyString_Format(ofmt,args); +#endif Py_DECREF(ofmt); } Py_DECREF(args); @@ -1352,104 +1563,118 @@ PySwigObject_format(const char* fmt, PySwigObject *v) } SWIGRUNTIME PyObject * -PySwigObject_oct(PySwigObject *v) +SwigPyObject_oct(SwigPyObject *v) { - return PySwigObject_format("%o",v); + return SwigPyObject_format("%o",v); } SWIGRUNTIME PyObject * -PySwigObject_hex(PySwigObject *v) +SwigPyObject_hex(SwigPyObject *v) { - return PySwigObject_format("%x",v); + return SwigPyObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS -PySwigObject_repr(PySwigObject *v) +SwigPyObject_repr(SwigPyObject *v) #else -PySwigObject_repr(PySwigObject *v, PyObject *args) +SwigPyObject_repr(SwigPyObject *v, PyObject *args) #endif { const char *name = SWIG_TypePrettyName(v->ty); - PyObject *hex = PySwigObject_hex(v); - PyObject *repr = PyString_FromFormat("", name, PyString_AsString(hex)); - Py_DECREF(hex); + PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); if (v->next) { -#ifdef METH_NOARGS - PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next); -#else - PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args); -#endif +# ifdef METH_NOARGS + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); +# else + PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); +# endif +# if PY_VERSION_HEX >= 0x03000000 + PyObject *joined = PyUnicode_Concat(repr, nrep); + Py_DecRef(repr); + Py_DecRef(nrep); + repr = joined; +# else PyString_ConcatAndDel(&repr,nrep); +# endif } return repr; } SWIGRUNTIME int -PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ -#ifdef METH_NOARGS - PyObject *repr = PySwigObject_repr(v); -#else - PyObject *repr = PySwigObject_repr(v, NULL); -#endif - if (repr) { - fputs(PyString_AsString(repr), fp); - Py_DECREF(repr); - return 0; - } else { - return 1; - } -} - -SWIGRUNTIME PyObject * -PySwigObject_str(PySwigObject *v) -{ - char result[SWIG_BUFFER_SIZE]; - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? - PyString_FromString(result) : 0; -} - -SWIGRUNTIME int -PySwigObject_compare(PySwigObject *v, PySwigObject *w) +SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) { void *i = v->ptr; void *j = w->ptr; return (i < j) ? -1 : ((i > j) ? 1 : 0); } -SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); - -SWIGRUNTIME PyTypeObject* -PySwigObject_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); - return type; +/* Added for Python 3.x, would it also be useful for Python 2.x? */ +SWIGRUNTIME PyObject* +SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) +{ + PyObject* res; + if( op != Py_EQ && op != Py_NE ) { + Py_INCREF(Py_NotImplemented); + return Py_NotImplemented; + } + res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); + return res; } + +SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); + +#ifdef SWIGPYTHON_BUILTIN +static swig_type_info *SwigPyObject_stype = 0; +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + SwigPyClientData *cd; + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + assert(cd); + assert(cd->pytype); + return cd->pytype; +} +#else +SWIGRUNTIME PyTypeObject* +SwigPyObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); + return type; +} +#endif + SWIGRUNTIMEINLINE int -PySwigObject_Check(PyObject *op) { - return ((op)->ob_type == PySwigObject_type()) - || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0); +SwigPyObject_Check(PyObject *op) { +#ifdef SWIGPYTHON_BUILTIN + PyTypeObject *target_tp = SwigPyObject_type(); + if (PyType_IsSubtype(op->ob_type, target_tp)) + return 1; + return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); +#else + return (Py_TYPE(op) == SwigPyObject_type()) + || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); +#endif } SWIGRUNTIME PyObject * -PySwigObject_New(void *ptr, swig_type_info *ty, int own); +SwigPyObject_New(void *ptr, swig_type_info *ty, int own); SWIGRUNTIME void -PySwigObject_dealloc(PyObject *v) +SwigPyObject_dealloc(PyObject *v) { - PySwigObject *sobj = (PySwigObject *) v; + SwigPyObject *sobj = (SwigPyObject *) v; PyObject *next = sobj->next; if (sobj->own == SWIG_POINTER_OWN) { swig_type_info *ty = sobj->ty; - PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; PyObject *destroy = data ? data->destroy : 0; if (destroy) { /* destroy is always a VARARGS method */ PyObject *res; if (data->delargs) { - /* we need to create a temporal object to carry the destroy operation */ - PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0); + /* we need to create a temporary object to carry the destroy operation */ + PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); res = SWIG_Python_CallFunctor(destroy, tmp); Py_DECREF(tmp); } else { @@ -1471,15 +1696,15 @@ PySwigObject_dealloc(PyObject *v) } SWIGRUNTIME PyObject* -PySwigObject_append(PyObject* v, PyObject* next) +SwigPyObject_append(PyObject* v, PyObject* next) { - PySwigObject *sobj = (PySwigObject *) v; + SwigPyObject *sobj = (SwigPyObject *) v; #ifndef METH_O PyObject *tmp = 0; if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; next = tmp; #endif - if (!PySwigObject_Check(next)) { + if (!SwigPyObject_Check(next)) { return NULL; } sobj->next = next; @@ -1489,12 +1714,12 @@ PySwigObject_append(PyObject* v, PyObject* next) SWIGRUNTIME PyObject* #ifdef METH_NOARGS -PySwigObject_next(PyObject* v) +SwigPyObject_next(PyObject* v) #else -PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { - PySwigObject *sobj = (PySwigObject *) v; + SwigPyObject *sobj = (SwigPyObject *) v; if (sobj->next) { Py_INCREF(sobj->next); return sobj->next; @@ -1505,56 +1730,58 @@ PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) SWIGINTERN PyObject* #ifdef METH_NOARGS -PySwigObject_disown(PyObject *v) +SwigPyObject_disown(PyObject *v) #else -PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { - PySwigObject *sobj = (PySwigObject *)v; + SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = 0; return SWIG_Py_Void(); } SWIGINTERN PyObject* #ifdef METH_NOARGS -PySwigObject_acquire(PyObject *v) +SwigPyObject_acquire(PyObject *v) #else -PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) +SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { - PySwigObject *sobj = (PySwigObject *)v; + SwigPyObject *sobj = (SwigPyObject *)v; sobj->own = SWIG_POINTER_OWN; return SWIG_Py_Void(); } SWIGINTERN PyObject* -PySwigObject_own(PyObject *v, PyObject *args) +SwigPyObject_own(PyObject *v, PyObject *args) { PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#else +#elif (PY_VERSION_HEX < 0x02050000) if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) +#else + if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) #endif { return NULL; } else { - PySwigObject *sobj = (PySwigObject *)v; + SwigPyObject *sobj = (SwigPyObject *)v; PyObject *obj = PyBool_FromLong(sobj->own); if (val) { #ifdef METH_NOARGS if (PyObject_IsTrue(val)) { - PySwigObject_acquire(v); + SwigPyObject_acquire(v); } else { - PySwigObject_disown(v); + SwigPyObject_disown(v); } #else if (PyObject_IsTrue(val)) { - PySwigObject_acquire(v,args); + SwigPyObject_acquire(v,args); } else { - PySwigObject_disown(v,args); + SwigPyObject_disown(v,args); } #endif } @@ -1565,44 +1792,47 @@ PySwigObject_own(PyObject *v, PyObject *args) #ifdef METH_O static PyMethodDef swigobject_methods[] = { - {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #else static PyMethodDef swigobject_methods[] = { - {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 SWIGINTERN PyObject * -PySwigObject_getattr(PySwigObject *sobj,char *name) +SwigPyObject_getattr(SwigPyObject *sobj,char *name) { return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif SWIGRUNTIME PyTypeObject* -_PySwigObject_type(void) { +SwigPyObject_TypeOnce(void) { static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods PySwigObject_as_number = { + + static PyNumberMethods SwigPyObject_as_number = { (binaryfunc)0, /*nb_add*/ (binaryfunc)0, /*nb_subtract*/ (binaryfunc)0, /*nb_multiply*/ + /* nb_divide removed in Python 3 */ +#if PY_VERSION_HEX < 0x03000000 (binaryfunc)0, /*nb_divide*/ +#endif (binaryfunc)0, /*nb_remainder*/ (binaryfunc)0, /*nb_divmod*/ (ternaryfunc)0,/*nb_power*/ @@ -1616,13 +1846,23 @@ _PySwigObject_type(void) { 0, /*nb_and*/ 0, /*nb_xor*/ 0, /*nb_or*/ - (coercion)0, /*nb_coerce*/ - (unaryfunc)PySwigObject_long, /*nb_int*/ - (unaryfunc)PySwigObject_long, /*nb_long*/ +#if PY_VERSION_HEX < 0x03000000 + 0, /*nb_coerce*/ +#endif + (unaryfunc)SwigPyObject_long, /*nb_int*/ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_long, /*nb_long*/ +#else + 0, /*nb_reserved*/ +#endif (unaryfunc)0, /*nb_float*/ - (unaryfunc)PySwigObject_oct, /*nb_oct*/ - (unaryfunc)PySwigObject_hex, /*nb_hex*/ -#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ +#if PY_VERSION_HEX < 0x03000000 + (unaryfunc)SwigPyObject_oct, /*nb_oct*/ + (unaryfunc)SwigPyObject_hex, /*nb_hex*/ +#endif +#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ +#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ @@ -1631,81 +1871,97 @@ _PySwigObject_type(void) { #endif }; - static PyTypeObject pyswigobject_type; + static PyTypeObject swigpyobject_type; static int type_init = 0; if (!type_init) { - const PyTypeObject tmp - = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ - (char *)"PySwigObject", /* tp_name */ - sizeof(PySwigObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)PySwigObject_dealloc, /* tp_dealloc */ - (printfunc)PySwigObject_print, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)PySwigObject_getattr, /* tp_getattr */ + const PyTypeObject tmp = { + /* PyObject header changed in Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) #else - (getattrfunc)0, /* tp_getattr */ + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ #endif - (setattrfunc)0, /* tp_setattr */ - (cmpfunc)PySwigObject_compare, /* tp_compare */ - (reprfunc)PySwigObject_repr, /* tp_repr */ - &PySwigObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)PySwigObject_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ + (char *)"SwigPyObject", /* tp_name */ + sizeof(SwigPyObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyObject_dealloc, /* tp_dealloc */ + 0, /* tp_print */ +#if PY_VERSION_HEX < 0x02020000 + (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ +#else + (getattrfunc)0, /* tp_getattr */ +#endif + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX >= 0x03000000 + 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ +#else + (cmpfunc)SwigPyObject_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyObject_repr, /* tp_repr */ + &SwigPyObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + 0, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ + 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ + 0,0,0,0 /* tp_alloc -> tp_next */ #endif - }; - pyswigobject_type = tmp; - pyswigobject_type.ob_type = &PyType_Type; + }; + swigpyobject_type = tmp; type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + swigpyobject_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&swigpyobject_type) < 0) + return NULL; +#endif } - return &pyswigobject_type; + return &swigpyobject_type; } SWIGRUNTIME PyObject * -PySwigObject_New(void *ptr, swig_type_info *ty, int own) +SwigPyObject_New(void *ptr, swig_type_info *ty, int own) { - PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type()); + SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); if (sobj) { sobj->ptr = ptr; sobj->ty = ty; @@ -1724,10 +1980,10 @@ typedef struct { void *pack; swig_type_info *ty; size_t size; -} PySwigPacked; +} SwigPyPacked; SWIGRUNTIME int -PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) +SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { char result[SWIG_BUFFER_SIZE]; fputs("pack, v->size, 0, sizeof(result))) { - return PyString_FromFormat("", result, v->ty->name); + return SWIG_Python_str_FromFormat("", result, v->ty->name); } else { - return PyString_FromFormat("", v->ty->name); + return SWIG_Python_str_FromFormat("", v->ty->name); } } SWIGRUNTIME PyObject * -PySwigPacked_str(PySwigPacked *v) +SwigPyPacked_str(SwigPyPacked *v) { char result[SWIG_BUFFER_SIZE]; if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ - return PyString_FromFormat("%s%s", result, v->ty->name); + return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); } else { - return PyString_FromString(v->ty->name); + return SWIG_Python_str_FromChar(v->ty->name); } } SWIGRUNTIME int -PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w) +SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) { size_t i = v->size; size_t j = w->size; @@ -1771,104 +2027,120 @@ PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w) return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } -SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); +SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); SWIGRUNTIME PyTypeObject* -PySwigPacked_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); +SwigPyPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); return type; } SWIGRUNTIMEINLINE int -PySwigPacked_Check(PyObject *op) { - return ((op)->ob_type == _PySwigPacked_type()) - || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0); +SwigPyPacked_Check(PyObject *op) { + return ((op)->ob_type == SwigPyPacked_TypeOnce()) + || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); } SWIGRUNTIME void -PySwigPacked_dealloc(PyObject *v) +SwigPyPacked_dealloc(PyObject *v) { - if (PySwigPacked_Check(v)) { - PySwigPacked *sobj = (PySwigPacked *) v; + if (SwigPyPacked_Check(v)) { + SwigPyPacked *sobj = (SwigPyPacked *) v; free(sobj->pack); } PyObject_DEL(v); } SWIGRUNTIME PyTypeObject* -_PySwigPacked_type(void) { +SwigPyPacked_TypeOnce(void) { static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject pyswigpacked_type; - static int type_init = 0; + static PyTypeObject swigpypacked_type; + static int type_init = 0; if (!type_init) { - const PyTypeObject tmp - = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ - (char *)"PySwigPacked", /* tp_name */ - sizeof(PySwigPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)PySwigPacked_dealloc, /* tp_dealloc */ - (printfunc)PySwigPacked_print, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - (cmpfunc)PySwigPacked_compare, /* tp_compare */ - (reprfunc)PySwigPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)PySwigPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ + const PyTypeObject tmp = { + /* PyObject header changed in Python 3 */ +#if PY_VERSION_HEX>=0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ +#endif + (char *)"SwigPyPacked", /* tp_name */ + sizeof(SwigPyPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ + (printfunc)SwigPyPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ +#if PY_VERSION_HEX>=0x03000000 + 0, /* tp_reserved in 3.0.1 */ +#else + (cmpfunc)SwigPyPacked_compare, /* tp_compare */ +#endif + (reprfunc)SwigPyPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)SwigPyPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ + 0, /* tp_del */ +#endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version */ #endif #ifdef COUNT_ALLOCS - 0,0,0,0 /* tp_alloc -> tp_next */ + 0,0,0,0 /* tp_alloc -> tp_next */ #endif - }; - pyswigpacked_type = tmp; - pyswigpacked_type.ob_type = &PyType_Type; + }; + swigpypacked_type = tmp; type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + swigpypacked_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&swigpypacked_type) < 0) + return NULL; +#endif } - return &pyswigpacked_type; + return &swigpypacked_type; } SWIGRUNTIME PyObject * -PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty) +SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) { - PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type()); + SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); if (sobj) { void *pack = malloc(size); if (pack) { @@ -1885,10 +2157,10 @@ PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty) } SWIGRUNTIME swig_type_info * -PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size) +SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { - if (PySwigPacked_Check(obj)) { - PySwigPacked *sobj = (PySwigPacked *)obj; + if (SwigPyPacked_Check(obj)) { + SwigPyPacked *sobj = (SwigPyPacked *)obj; if (sobj->size != size) return 0; memcpy(ptr, sobj->pack, size); return sobj->ty; @@ -1904,65 +2176,88 @@ PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size) SWIGRUNTIMEINLINE PyObject * _SWIG_This(void) { - return PyString_FromString("this"); + return SWIG_Python_str_FromChar("this"); } +static PyObject *swig_this = NULL; + SWIGRUNTIME PyObject * SWIG_This(void) { - static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); + if (swig_this == NULL) + swig_this = _SWIG_This(); return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ -SWIGRUNTIME PySwigObject * +/* TODO: I don't know how to implement the fast getset in Python 3 right now */ +#if PY_VERSION_HEX>=0x03000000 +#define SWIG_PYTHON_SLOW_GETSET_THIS +#endif + +SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj) { - if (PySwigObject_Check(pyobj)) { - return (PySwigObject *) pyobj; - } else { - PyObject *obj = 0; + PyObject *obj; + + if (SwigPyObject_Check(pyobj)) + return (SwigPyObject *) pyobj; + +#ifdef SWIGPYTHON_BUILTIN + (void)obj; +# ifdef PyWeakref_CheckProxy + if (PyWeakref_CheckProxy(pyobj)) { + pyobj = PyWeakref_GET_OBJECT(pyobj); + if (pyobj && SwigPyObject_Check(pyobj)) + return (SwigPyObject*) pyobj; + } +# endif + return NULL; +#else + + obj = 0; + #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { #ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; + } #endif - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; } } -#else - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } -#endif - if (obj && !PySwigObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - PySwigObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (PySwigObject *)obj; } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !SwigPyObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + SwigPyObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (SwigPyObject *)obj; +#endif } /* Acquire a pointer value */ @@ -1970,7 +2265,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own) { if (own == SWIG_POINTER_OWN) { - PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); if (sobj) { int oldown = sobj->own; sobj->own = own; @@ -1984,91 +2279,105 @@ SWIG_Python_AcquirePtr(PyObject *obj, int own) { SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { - if (!obj) return SWIG_ERROR; - if (obj == Py_None) { - if (ptr) *ptr = 0; + int res; + SwigPyObject *sobj; + int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; + + if (!obj) + return SWIG_ERROR; + if (obj == Py_None && !implicit_conv) { + if (ptr) + *ptr = 0; return SWIG_OK; - } else { - PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) { - sobj = (PySwigObject *)sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } + } + + res = SWIG_ERROR; + + sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; } else { - if (ptr) *ptr = vptr; - break; + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (SwigPyObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - return SWIG_OK; } else { - int res = SWIG_ERROR; - if (flags & SWIG_POINTER_IMPLICIT_CONV) { - PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - return res; + if (ptr) *ptr = vptr; + break; } } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + res = SWIG_OK; + } else { + if (implicit_conv) { + SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + if (!SWIG_IsOK(res) && obj == Py_None) { + if (ptr) + *ptr = 0; + if (PyErr_Occurred()) + PyErr_Clear(); + res = SWIG_OK; + } + } + return res; } /* Convert a function ptr value */ @@ -2083,10 +2392,10 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { /* here we get the method pointer for callbacks */ const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) { + if (desc) desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) return SWIG_ERROR; - } + if (!desc) + return SWIG_ERROR; if (ty) { swig_cast_info *tc = SWIG_TypeCheck(desc,ty); if (tc) { @@ -2107,7 +2416,7 @@ SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { - swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz); + swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); if (!to) return SWIG_ERROR; if (ty) { if (to != ty) { @@ -2124,12 +2433,12 @@ SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *t * ----------------------------------------------------------------------------- */ /* - Create a new instance object, whitout calling __init__, and set the + Create a new instance object, without calling __init__, and set the 'this' attribute. */ SWIGRUNTIME PyObject* -SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this) +SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) PyObject *inst = 0; @@ -2153,19 +2462,31 @@ SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this) #endif } } else { +#if PY_VERSION_HEX >= 0x03000000 + inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); + if (inst) { + PyObject_SetAttr(inst, SWIG_This(), swig_this); + Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; + } +#else PyObject *dict = PyDict_New(); - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } +#endif } return inst; #else #if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst; + PyObject *inst = 0; PyObject *dict = PyDict_New(); - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + if (dict) { + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } return (PyObject *) inst; #else PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); @@ -2216,12 +2537,12 @@ SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args) { PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { + if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { return NULL; } else { - PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); if (sthis) { - PySwigObject_append((PyObject*) sthis, obj[1]); + SwigPyObject_append((PyObject*) sthis, obj[1]); } else { SWIG_Python_SetSwigThis(obj[0], obj[1]); } @@ -2232,29 +2553,59 @@ SWIG_Python_InitShadowInstance(PyObject *args) { /* Create a new pointer object */ SWIGRUNTIME PyObject * -SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { - if (!ptr) { +SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { + SwigPyClientData *clientdata; + PyObject * robj; + int own; + + if (!ptr) return SWIG_Py_Void(); - } else { - int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - PyObject *robj = PySwigObject_New(ptr, type, own); - PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0; - if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - if (inst) { - Py_DECREF(robj); - robj = inst; + + clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; + own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + if (clientdata && clientdata->pytype) { + SwigPyObject *newobj; + if (flags & SWIG_BUILTIN_TP_INIT) { + newobj = (SwigPyObject*) self; + if (newobj->ptr) { + PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); + while (newobj->next) + newobj = (SwigPyObject *) newobj->next; + newobj->next = next_self; + newobj = (SwigPyObject *)next_self; } + } else { + newobj = PyObject_New(SwigPyObject, clientdata->pytype); } - return robj; + if (newobj) { + newobj->ptr = ptr; + newobj->ty = type; + newobj->own = own; + newobj->next = 0; +#ifdef SWIGPYTHON_BUILTIN + newobj->dict = 0; +#endif + return (PyObject*) newobj; + } + return SWIG_Py_Void(); } + + assert(!(flags & SWIG_BUILTIN_TP_INIT)); + + robj = SwigPyObject_New(ptr, type, own); + if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + Py_DECREF(robj); + robj = inst; + } + return robj; } /* Create a new packed object */ SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { - return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); + return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* @@ -2266,15 +2617,19 @@ void *SWIG_ReturnGlobalTypeList(void *); #endif SWIGRUNTIME swig_module_info * -SWIG_Python_GetModule(void) { +SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { static void *type_pointer = (void *)0; /* first check if module already created */ if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else +# ifdef SWIGPY_USE_CAPSULE + type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); +# else type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); +# endif if (PyErr_Occurred()) { PyErr_Clear(); type_pointer = (void *)0; @@ -2317,33 +2672,54 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o) #endif SWIGRUNTIME void +#ifdef SWIGPY_USE_CAPSULE +SWIG_Python_DestroyModule(PyObject *obj) +#else SWIG_Python_DestroyModule(void *vptr) +#endif { +#ifdef SWIGPY_USE_CAPSULE + swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); +#else swig_module_info *swig_module = (swig_module_info *) vptr; +#endif swig_type_info **types = swig_module->types; size_t i; for (i =0; i < swig_module->size; ++i) { swig_type_info *ty = types[i]; if (ty->owndata) { - PySwigClientData *data = (PySwigClientData *) ty->clientdata; - if (data) PySwigClientData_Del(data); + SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; + if (data) SwigPyClientData_Del(data); } } Py_DECREF(SWIG_This()); + swig_this = NULL; } SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ - - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - swig_empty_runtime_method_table); +#if PY_VERSION_HEX >= 0x03000000 + /* Add a dummy module object into sys.modules */ + PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); +#else + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); +#endif +#ifdef SWIGPY_USE_CAPSULE + PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } +#else PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) { PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); } else { Py_XDECREF(pointer); } +#endif } /* The python cached type query */ @@ -2357,16 +2733,24 @@ SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type) { PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = PyString_FromString(type); + PyObject *key = SWIG_Python_str_FromChar(type); PyObject *obj = PyDict_GetItem(cache, key); swig_type_info *descriptor; if (obj) { +#ifdef SWIGPY_USE_CAPSULE + descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); +#else descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); +#endif } else { - swig_module_info *swig_module = SWIG_Python_GetModule(); + swig_module_info *swig_module = SWIG_GetModule(0); descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); if (descriptor) { +#ifdef SWIGPY_USE_CAPSULE + obj = PyCapsule_New((void*) descriptor, NULL, NULL); +#else obj = PyCObject_FromVoidPtr(descriptor, NULL); +#endif PyDict_SetItem(cache, key, obj); Py_DECREF(obj); } @@ -2384,21 +2768,23 @@ SWIG_Python_TypeQuery(const char *type) SWIGRUNTIME int SWIG_Python_AddErrMesg(const char* mesg, int infront) -{ +{ if (PyErr_Occurred()) { PyObject *type = 0; PyObject *value = 0; PyObject *traceback = 0; PyErr_Fetch(&type, &value, &traceback); if (value) { + char *tmp; PyObject *old_str = PyObject_Str(value); Py_XINCREF(type); PyErr_Clear(); if (infront) { - PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str)); + PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); } else { - PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); + PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); } + SWIG_Python_str_DelForPy3(tmp); Py_DECREF(old_str); } return 1; @@ -2421,11 +2807,11 @@ SWIG_Python_ArgFail(int argnum) } SWIGRUNTIMEINLINE const char * -PySwigObject_GetDesc(PyObject *self) +SwigPyObject_GetDesc(PyObject *self) { - PySwigObject *v = (PySwigObject *)self; + SwigPyObject *v = (SwigPyObject *)self; swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : (char*)""; + return ty ? ty->str : ""; } SWIGRUNTIME void @@ -2433,10 +2819,10 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) { if (type) { #if defined(SWIG_COBJECT_TYPES) - if (obj && PySwigObject_Check(obj)) { - const char *otype = (const char *) PySwigObject_GetDesc(obj); + if (obj && SwigPyObject_Check(obj)) { + const char *otype = (const char *) SwigPyObject_GetDesc(obj); if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received", + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", type, otype); return; } @@ -2446,10 +2832,11 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) const char *otype = (obj ? obj->ob_type->tp_name : 0); if (otype) { PyObject *str = PyObject_Str(obj); - const char *cstr = str ? PyString_AsString(str) : 0; + const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; if (cstr) { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); + SWIG_Python_str_DelForPy3(cstr); } else { PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); @@ -2467,23 +2854,75 @@ SWIG_Python_TypeError(const char *type, PyObject *obj) /* Convert a pointer value, signal an exception on a type mismatch */ SWIGRUNTIME void * -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { void *result; if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { PyErr_Clear(); - if (flags & SWIG_POINTER_EXCEPTION) { +#if SWIG_POINTER_EXCEPTION + if (flags) { SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); SWIG_Python_ArgFail(argnum); } +#endif } return result; } +#ifdef SWIGPYTHON_BUILTIN +SWIGRUNTIME int +SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { + PyTypeObject *tp = obj->ob_type; + PyObject *descr; + PyObject *encoded_name; + descrsetfunc f; + int res = -1; + +# ifdef Py_USING_UNICODE + if (PyString_Check(name)) { + name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); + if (!name) + return -1; + } else if (!PyUnicode_Check(name)) +# else + if (!PyString_Check(name)) +# endif + { + PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); + return -1; + } else { + Py_INCREF(name); + } + + if (!tp->tp_dict) { + if (PyType_Ready(tp) < 0) + goto done; + } + + descr = _PyType_Lookup(tp, name); + f = NULL; + if (descr != NULL) + f = descr->ob_type->tp_descr_set; + if (!f) { + if (PyString_Check(name)) { + encoded_name = name; + Py_INCREF(name); + } else { + encoded_name = PyUnicode_AsUTF8String(name); + } + PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); + Py_DECREF(encoded_name); + } else { + res = f(descr, obj, value); + } + + done: + Py_DECREF(name); + return res; +} +#endif + #ifdef __cplusplus -#if 0 -{ /* cc-mode */ -#endif } #endif @@ -2518,11 +2957,16 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0}; /*----------------------------------------------- @(target):= _ESL.so ------------------------------------------------*/ -#define SWIG_init init_ESL +#if PY_VERSION_HEX >= 0x03000000 +# define SWIG_init PyInit__ESL +#else +# define SWIG_init init_ESL + +#endif #define SWIG_name "_ESL" -#define SWIGVERSION 0x010335 +#define SWIGVERSION 0x020012 #define SWIG_VERSION SWIGVERSION @@ -2534,28 +2978,28 @@ static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0}; namespace swig { - class PyObject_ptr { + class SwigPtr_PyObject { protected: PyObject *_obj; public: - PyObject_ptr() :_obj(0) + SwigPtr_PyObject() :_obj(0) { } - PyObject_ptr(const PyObject_ptr& item) : _obj(item._obj) + SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj) { Py_XINCREF(_obj); } - PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj) + SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj) { if (initial_ref) { Py_XINCREF(_obj); } } - PyObject_ptr & operator=(const PyObject_ptr& item) + SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) { Py_XINCREF(item._obj); Py_XDECREF(_obj); @@ -2563,7 +3007,7 @@ namespace swig { return *this; } - ~PyObject_ptr() + ~SwigPtr_PyObject() { Py_XDECREF(_obj); } @@ -2582,10 +3026,10 @@ namespace swig { namespace swig { - struct PyObject_var : PyObject_ptr { - PyObject_var(PyObject* obj = 0) : PyObject_ptr(obj, false) { } + struct SwigVar_PyObject : SwigPtr_PyObject { + SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { } - PyObject_var & operator = (PyObject* obj) + SwigVar_PyObject & operator = (PyObject* obj) { Py_XDECREF(_obj); _obj = obj; @@ -2615,10 +3059,28 @@ SWIG_pchar_descriptor(void) SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { - if (PyString_Check(obj)) { +#if PY_VERSION_HEX>=0x03000000 + if (PyUnicode_Check(obj)) +#else + if (PyString_Check(obj)) +#endif + { char *cstr; Py_ssize_t len; +#if PY_VERSION_HEX>=0x03000000 + if (!alloc && cptr) { + /* We can't allow converting without allocation, since the internal + representation of string in Python 3 is UCS-2/UCS-4 but we require + a UTF-8 representation. + TODO(bhy) More detailed explanation */ + return SWIG_RuntimeError; + } + obj = PyUnicode_AsUTF8String(obj); + PyBytes_AsStringAndSize(obj, &cstr, &len); + if(alloc) *alloc = SWIG_NEWOBJ; +#else PyString_AsStringAndSize(obj, &cstr, &len); - if (cptr) { +#endif + if (cptr) { if (alloc) { /* In python the user should not be able to modify the inner @@ -2643,10 +3105,16 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) *alloc = SWIG_OLDOBJ; } } else { - *cptr = PyString_AsString(obj); + #if PY_VERSION_HEX>=0x03000000 + assert(0); /* Should never reach here in Python 3 */ + #endif + *cptr = SWIG_Python_str_AsChar(obj); } } if (psize) *psize = len + 1; +#if PY_VERSION_HEX>=0x03000000 + Py_XDECREF(obj); +#endif return SWIG_OK; } else { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); @@ -2674,9 +3142,13 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size) if (size > INT_MAX) { swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); return pchar_descriptor ? - SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); } else { +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_FromStringAndSize(carray, static_cast< int >(size)); +#else return PyString_FromStringAndSize(carray, static_cast< int >(size)); +#endif } } else { return SWIG_Py_Void(); @@ -2836,13 +3308,10 @@ SWIG_AsVal_int (PyObject * obj, int *val) } - #define SWIG_From_long PyInt_FromLong - - -SWIGINTERNINLINE PyObject * -SWIG_From_int (int value) -{ - return SWIG_From_long (value); +SWIGINTERNINLINE PyObject* + SWIG_From_int (int value) +{ + return PyInt_FromLong((long) value); } @@ -2866,7 +3335,6 @@ SWIGINTERN PyObject *_wrap_ESLevent_event_set(PyObject *SWIGUNUSEDPARM(self), Py PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_event_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -2881,14 +3349,11 @@ SWIGINTERN PyObject *_wrap_ESLevent_event_set(PyObject *SWIGUNUSEDPARM(self), Py { SWIG_PYTHON_THREAD_BEGIN_ALLOW; if (arg1) (arg1)->event = arg2; - SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_Py_Void(); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -2896,12 +3361,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLevent_event_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; - esl_event_t *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + esl_event_t *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_event_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -2914,10 +3378,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_event_get(PyObject *SWIGUNUSEDPARM(self), Py SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_esl_event_t, 0 | 0 ); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -2934,7 +3396,6 @@ SWIGINTERN PyObject *_wrap_ESLevent_serialized_string_set(PyObject *SWIGUNUSEDPA PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_serialized_string_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -2959,11 +3420,9 @@ SWIGINTERN PyObject *_wrap_ESLevent_serialized_string_set(PyObject *SWIGUNUSEDPA } resultobj = SWIG_Py_Void(); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -2971,12 +3430,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLevent_serialized_string_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + char *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_serialized_string_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -2989,10 +3447,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_serialized_string_get(PyObject *SWIGUNUSEDPA SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_FromCharPtr((const char *)result); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3008,7 +3464,6 @@ SWIGINTERN PyObject *_wrap_ESLevent_mine_set(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_mine_set",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3023,14 +3478,11 @@ SWIGINTERN PyObject *_wrap_ESLevent_mine_set(PyObject *SWIGUNUSEDPARM(self), PyO { SWIG_PYTHON_THREAD_BEGIN_ALLOW; if (arg1) (arg1)->mine = arg2; - SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_Py_Void(); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3038,12 +3490,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLevent_mine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + int result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_mine_get",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3056,10 +3507,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_mine_get(PyObject *SWIGUNUSEDPARM(self), PyO SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_From_int(static_cast< int >(result)); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3068,7 +3517,6 @@ SWIGINTERN PyObject *_wrap_new_ESLevent__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; char *arg1 = (char *) 0 ; char *arg2 = (char *) NULL ; - ESLevent *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -3077,8 +3525,8 @@ SWIGINTERN PyObject *_wrap_new_ESLevent__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O|O:new_ESLevent",&obj0,&obj1)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { @@ -3100,12 +3548,10 @@ SWIGINTERN PyObject *_wrap_new_ESLevent__SWIG_0(PyObject *SWIGUNUSEDPARM(self), resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3114,15 +3560,14 @@ SWIGINTERN PyObject *_wrap_new_ESLevent__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; esl_event_t *arg1 = (esl_event_t *) 0 ; int arg2 = (int) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O|O:new_ESLevent",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_esl_event_t, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3142,10 +3587,8 @@ SWIGINTERN PyObject *_wrap_new_ESLevent__SWIG_1(PyObject *SWIGUNUSEDPARM(self), SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_NEW | 0 ); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3153,12 +3596,11 @@ fail: SWIGINTERN PyObject *_wrap_new_ESLevent__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:new_ESLevent",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3171,10 +3613,8 @@ SWIGINTERN PyObject *_wrap_new_ESLevent__SWIG_2(PyObject *SWIGUNUSEDPARM(self), SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_NEW | 0 ); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3184,10 +3624,9 @@ SWIGINTERN PyObject *_wrap_new_ESLevent(PyObject *self, PyObject *args) { PyObject *argv[3]; int ii; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argc = args ? (int)PyObject_Length(args) : 0; + for (ii = 0; (ii < 2) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if ((argc >= 1) && (argc <= 2)) { @@ -3197,7 +3636,6 @@ SWIGINTERN PyObject *_wrap_new_ESLevent(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { if (argc <= 1) { - SWIG_PYTHON_THREAD_END_BLOCK; return _wrap_new_ESLevent__SWIG_1(self, args); } { @@ -3205,7 +3643,6 @@ SWIGINTERN PyObject *_wrap_new_ESLevent(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - SWIG_PYTHON_THREAD_END_BLOCK; return _wrap_new_ESLevent__SWIG_1(self, args); } } @@ -3216,7 +3653,6 @@ SWIGINTERN PyObject *_wrap_new_ESLevent(PyObject *self, PyObject *args) { int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_ESLevent, 0); _v = SWIG_CheckState(res); if (_v) { - SWIG_PYTHON_THREAD_END_BLOCK; return _wrap_new_ESLevent__SWIG_2(self, args); } } @@ -3226,26 +3662,23 @@ SWIGINTERN PyObject *_wrap_new_ESLevent(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); if (_v) { if (argc <= 1) { - SWIG_PYTHON_THREAD_END_BLOCK; return _wrap_new_ESLevent__SWIG_0(self, args); } int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - SWIG_PYTHON_THREAD_END_BLOCK; return _wrap_new_ESLevent__SWIG_0(self, args); } } } - SWIG_PYTHON_THREAD_END_BLOCK; fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ESLevent'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ESLevent'.\n" " Possible C/C++ prototypes are:\n" - " ESLevent(char const *,char const *)\n" - " ESLevent(esl_event_t *,int)\n" - " ESLevent(ESLevent *)\n"); - return NULL; + " ESLevent::ESLevent(char const *,char const *)\n" + " ESLevent::ESLevent(esl_event_t *,int)\n" + " ESLevent::ESLevent(ESLevent *)\n"); + return 0; } @@ -3256,7 +3689,6 @@ SWIGINTERN PyObject *_wrap_delete_ESLevent(PyObject *SWIGUNUSEDPARM(self), PyObj int res1 = 0 ; PyObject * obj0 = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:delete_ESLevent",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { @@ -3266,14 +3698,11 @@ SWIGINTERN PyObject *_wrap_delete_ESLevent(PyObject *SWIGUNUSEDPARM(self), PyObj { SWIG_PYTHON_THREAD_BEGIN_ALLOW; delete arg1; - SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_Py_Void(); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3282,7 +3711,6 @@ SWIGINTERN PyObject *_wrap_ESLevent_serialize(PyObject *SWIGUNUSEDPARM(self), Py PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) NULL ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3290,8 +3718,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_serialize(PyObject *SWIGUNUSEDPARM(self), Py int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + char *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O|O:ESLevent_serialize",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3312,11 +3740,9 @@ SWIGINTERN PyObject *_wrap_ESLevent_serialize(PyObject *SWIGUNUSEDPARM(self), Py } resultobj = SWIG_FromCharPtr((const char *)result); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3325,15 +3751,14 @@ SWIGINTERN PyObject *_wrap_ESLevent_setPriority(PyObject *SWIGUNUSEDPARM(self), PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ; - bool result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + bool result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O|O:ESLevent_setPriority",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3361,10 +3786,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_setPriority(PyObject *SWIGUNUSEDPARM(self), SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_From_bool(static_cast< bool >(result)); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3374,7 +3797,6 @@ SWIGINTERN PyObject *_wrap_ESLevent_getHeader(PyObject *SWIGUNUSEDPARM(self), Py ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; int arg3 = (int) -1 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3385,8 +3807,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_getHeader(PyObject *SWIGUNUSEDPARM(self), Py PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + char *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLevent_getHeader",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3412,11 +3834,9 @@ SWIGINTERN PyObject *_wrap_ESLevent_getHeader(PyObject *SWIGUNUSEDPARM(self), Py } resultobj = SWIG_FromCharPtr((const char *)result); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3424,12 +3844,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLevent_getBody(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + char *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_getBody",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3442,10 +3861,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_getBody(PyObject *SWIGUNUSEDPARM(self), PyOb SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_FromCharPtr((const char *)result); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3453,12 +3870,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLevent_getType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + char *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_getType",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3471,10 +3887,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_getType(PyObject *SWIGUNUSEDPARM(self), PyOb SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_FromCharPtr((const char *)result); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3483,7 +3897,6 @@ SWIGINTERN PyObject *_wrap_ESLevent_addBody(PyObject *SWIGUNUSEDPARM(self), PyOb PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3491,8 +3904,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_addBody(PyObject *SWIGUNUSEDPARM(self), PyOb int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + bool result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_addBody",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3511,11 +3924,9 @@ SWIGINTERN PyObject *_wrap_ESLevent_addBody(PyObject *SWIGUNUSEDPARM(self), PyOb } resultobj = SWIG_From_bool(static_cast< bool >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3525,7 +3936,6 @@ SWIGINTERN PyObject *_wrap_ESLevent_addHeader(PyObject *SWIGUNUSEDPARM(self), Py ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3537,8 +3947,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_addHeader(PyObject *SWIGUNUSEDPARM(self), Py PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + bool result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OOO:ESLevent_addHeader",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3563,12 +3973,10 @@ SWIGINTERN PyObject *_wrap_ESLevent_addHeader(PyObject *SWIGUNUSEDPARM(self), Py resultobj = SWIG_From_bool(static_cast< bool >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3578,7 +3986,6 @@ SWIGINTERN PyObject *_wrap_ESLevent_pushHeader(PyObject *SWIGUNUSEDPARM(self), P ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3590,8 +3997,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_pushHeader(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + bool result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OOO:ESLevent_pushHeader",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3616,12 +4023,10 @@ SWIGINTERN PyObject *_wrap_ESLevent_pushHeader(PyObject *SWIGUNUSEDPARM(self), P resultobj = SWIG_From_bool(static_cast< bool >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3631,7 +4036,6 @@ SWIGINTERN PyObject *_wrap_ESLevent_unshiftHeader(PyObject *SWIGUNUSEDPARM(self) ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3643,8 +4047,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_unshiftHeader(PyObject *SWIGUNUSEDPARM(self) PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + bool result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OOO:ESLevent_unshiftHeader",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3669,12 +4073,10 @@ SWIGINTERN PyObject *_wrap_ESLevent_unshiftHeader(PyObject *SWIGUNUSEDPARM(self) resultobj = SWIG_From_bool(static_cast< bool >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3683,7 +4085,6 @@ SWIGINTERN PyObject *_wrap_ESLevent_delHeader(PyObject *SWIGUNUSEDPARM(self), Py PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; char *arg2 = (char *) 0 ; - bool result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -3691,8 +4092,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_delHeader(PyObject *SWIGUNUSEDPARM(self), Py int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + bool result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLevent_delHeader",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3711,11 +4112,9 @@ SWIGINTERN PyObject *_wrap_ESLevent_delHeader(PyObject *SWIGUNUSEDPARM(self), Py } resultobj = SWIG_From_bool(static_cast< bool >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3723,12 +4122,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLevent_firstHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + char *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_firstHeader",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3741,10 +4139,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_firstHeader(PyObject *SWIGUNUSEDPARM(self), SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_FromCharPtr((const char *)result); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3752,12 +4148,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLevent_nextHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLevent *arg1 = (ESLevent *) 0 ; - char *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + char *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLevent_nextHeader",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLevent, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3770,10 +4165,8 @@ SWIGINTERN PyObject *_wrap_ESLevent_nextHeader(PyObject *SWIGUNUSEDPARM(self), P SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_FromCharPtr((const char *)result); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3791,7 +4184,6 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_0(PyObject *SWIGUNUSEDPARM(se int arg2 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -3807,8 +4199,8 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_0(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; + ESLconnection *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ESLconnection",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { @@ -3839,13 +4231,11 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_0(PyObject *SWIGUNUSEDPARM(se if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3855,7 +4245,6 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_1(PyObject *SWIGUNUSEDPARM(se char *arg1 = (char *) 0 ; int arg2 ; char *arg3 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -3867,8 +4256,8 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_1(PyObject *SWIGUNUSEDPARM(se PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + ESLconnection *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OOO:new_ESLconnection",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { @@ -3893,12 +4282,10 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_1(PyObject *SWIGUNUSEDPARM(se resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_POINTER_NEW | 0 ); if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3909,7 +4296,6 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_2(PyObject *SWIGUNUSEDPARM(se char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; char *arg4 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -3926,8 +4312,8 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_2(PyObject *SWIGUNUSEDPARM(se PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; + ESLconnection *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ESLconnection",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { @@ -3959,14 +4345,12 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_2(PyObject *SWIGUNUSEDPARM(se if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -3976,7 +4360,6 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_3(PyObject *SWIGUNUSEDPARM(se char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - ESLconnection *result = 0 ; int res1 ; char *buf1 = 0 ; int alloc1 = 0 ; @@ -3989,8 +4372,8 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_3(PyObject *SWIGUNUSEDPARM(se PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + ESLconnection *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OOO:new_ESLconnection",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); if (!SWIG_IsOK(res1)) { @@ -4016,13 +4399,11 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_3(PyObject *SWIGUNUSEDPARM(se if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc1 == SWIG_NEWOBJ) delete[] buf1; if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4030,12 +4411,11 @@ fail: SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; int arg1 ; - ESLconnection *result = 0 ; int val1 ; int ecode1 = 0 ; PyObject * obj0 = 0 ; + ESLconnection *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:new_ESLconnection",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { @@ -4048,10 +4428,8 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection__SWIG_4(PyObject *SWIGUNUSEDPARM(se SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLconnection, SWIG_POINTER_NEW | 0 ); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4061,10 +4439,9 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) { PyObject *argv[5]; int ii; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyTuple_Check(args)) SWIG_fail; - argc = (int)PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argc = args ? (int)PyObject_Length(args) : 0; + for (ii = 0; (ii < 4) && (ii < argc); ii++) { argv[ii] = PyTuple_GET_ITEM(args,ii); } if (argc == 1) { @@ -4074,7 +4451,6 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) { _v = SWIG_CheckState(res); } if (_v) { - SWIG_PYTHON_THREAD_END_BLOCK; return _wrap_new_ESLconnection__SWIG_4(self, args); } } @@ -4091,7 +4467,6 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - SWIG_PYTHON_THREAD_END_BLOCK; return _wrap_new_ESLconnection__SWIG_1(self, args); } } @@ -4108,7 +4483,6 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) { int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - SWIG_PYTHON_THREAD_END_BLOCK; return _wrap_new_ESLconnection__SWIG_3(self, args); } } @@ -4130,7 +4504,6 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) { int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - SWIG_PYTHON_THREAD_END_BLOCK; return _wrap_new_ESLconnection__SWIG_0(self, args); } } @@ -4151,7 +4524,6 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) { int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0); _v = SWIG_CheckState(res); if (_v) { - SWIG_PYTHON_THREAD_END_BLOCK; return _wrap_new_ESLconnection__SWIG_2(self, args); } } @@ -4159,16 +4531,15 @@ SWIGINTERN PyObject *_wrap_new_ESLconnection(PyObject *self, PyObject *args) { } } - SWIG_PYTHON_THREAD_END_BLOCK; fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_ESLconnection'.\n" + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ESLconnection'.\n" " Possible C/C++ prototypes are:\n" - " ESLconnection(char const *,int const,char const *,char const *)\n" - " ESLconnection(char const *,int const,char const *)\n" - " ESLconnection(char const *,char const *,char const *,char const *)\n" - " ESLconnection(char const *,char const *,char const *)\n" - " ESLconnection(int)\n"); - return NULL; + " ESLconnection::ESLconnection(char const *,int const,char const *,char const *)\n" + " ESLconnection::ESLconnection(char const *,int const,char const *)\n" + " ESLconnection::ESLconnection(char const *,char const *,char const *,char const *)\n" + " ESLconnection::ESLconnection(char const *,char const *,char const *)\n" + " ESLconnection::ESLconnection(int)\n"); + return 0; } @@ -4179,7 +4550,6 @@ SWIGINTERN PyObject *_wrap_delete_ESLconnection(PyObject *SWIGUNUSEDPARM(self), int res1 = 0 ; PyObject * obj0 = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:delete_ESLconnection",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, SWIG_POINTER_DISOWN | 0 ); if (!SWIG_IsOK(res1)) { @@ -4189,14 +4559,11 @@ SWIGINTERN PyObject *_wrap_delete_ESLconnection(PyObject *SWIGUNUSEDPARM(self), { SWIG_PYTHON_THREAD_BEGIN_ALLOW; delete arg1; - SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_Py_Void(); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4204,12 +4571,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLconnection_socketDescriptor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + int result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLconnection_socketDescriptor",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4222,10 +4588,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_socketDescriptor(PyObject *SWIGUNUSEDPA SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_From_int(static_cast< int >(result)); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4233,12 +4597,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLconnection_connected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + int result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLconnection_connected",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4251,10 +4614,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_connected(PyObject *SWIGUNUSEDPARM(self SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_From_int(static_cast< int >(result)); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4262,12 +4623,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLconnection_getInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLconnection_getInfo",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4280,10 +4640,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_getInfo(PyObject *SWIGUNUSEDPARM(self), SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 ); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4292,7 +4650,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_send(PyObject *SWIGUNUSEDPARM(self), Py PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4300,8 +4657,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_send(PyObject *SWIGUNUSEDPARM(self), Py int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + int result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_send",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4320,11 +4677,9 @@ SWIGINTERN PyObject *_wrap_ESLconnection_send(PyObject *SWIGUNUSEDPARM(self), Py } resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4333,7 +4688,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_sendRecv(PyObject *SWIGUNUSEDPARM(self) PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4341,8 +4695,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_sendRecv(PyObject *SWIGUNUSEDPARM(self) int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_sendRecv",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4361,11 +4715,9 @@ SWIGINTERN PyObject *_wrap_ESLconnection_sendRecv(PyObject *SWIGUNUSEDPARM(self) } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4375,7 +4727,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_api(PyObject *SWIGUNUSEDPARM(self), PyO ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4387,8 +4738,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_api(PyObject *SWIGUNUSEDPARM(self), PyO PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLconnection_api",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4415,12 +4766,10 @@ SWIGINTERN PyObject *_wrap_ESLconnection_api(PyObject *SWIGUNUSEDPARM(self), PyO resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4431,7 +4780,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_bgapi(PyObject *SWIGUNUSEDPARM(self), P char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4447,8 +4795,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_bgapi(PyObject *SWIGUNUSEDPARM(self), P PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO|OO:ESLconnection_bgapi",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4483,13 +4831,11 @@ SWIGINTERN PyObject *_wrap_ESLconnection_bgapi(PyObject *SWIGUNUSEDPARM(self), P if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4498,15 +4844,14 @@ SWIGINTERN PyObject *_wrap_ESLconnection_sendEvent(PyObject *SWIGUNUSEDPARM(self PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; ESLevent *arg2 = (ESLevent *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_sendEvent",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4524,10 +4869,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_sendEvent(PyObject *SWIGUNUSEDPARM(self SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 ); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4537,7 +4880,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_sendMSG(PyObject *SWIGUNUSEDPARM(self), ESLconnection *arg1 = (ESLconnection *) 0 ; ESLevent *arg2 = (ESLevent *) 0 ; char *arg3 = (char *) NULL ; - int result; void *argp1 = 0 ; int res1 = 0 ; void *argp2 = 0 ; @@ -4548,8 +4890,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_sendMSG(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + int result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO|O:ESLconnection_sendMSG",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4575,11 +4917,9 @@ SWIGINTERN PyObject *_wrap_ESLconnection_sendMSG(PyObject *SWIGUNUSEDPARM(self), } resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4587,12 +4927,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLconnection_recvEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLconnection_recvEvent",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4605,10 +4944,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_recvEvent(PyObject *SWIGUNUSEDPARM(self SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 ); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4617,15 +4954,14 @@ SWIGINTERN PyObject *_wrap_ESLconnection_recvEventTimed(PyObject *SWIGUNUSEDPARM PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; int arg2 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int val2 ; int ecode2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_recvEventTimed",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4643,10 +4979,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_recvEventTimed(PyObject *SWIGUNUSEDPARM SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 ); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4656,7 +4990,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_filter(PyObject *SWIGUNUSEDPARM(self), ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4668,8 +5001,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_filter(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OOO:ESLconnection_filter",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4694,12 +5027,10 @@ SWIGINTERN PyObject *_wrap_ESLconnection_filter(PyObject *SWIGUNUSEDPARM(self), resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ESLevent, SWIG_POINTER_OWN | 0 ); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4709,7 +5040,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_events(PyObject *SWIGUNUSEDPARM(self), ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; char *arg3 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4721,8 +5051,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_events(PyObject *SWIGUNUSEDPARM(self), PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; + int result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OOO:ESLconnection_events",&obj0,&obj1,&obj2)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4747,12 +5077,10 @@ SWIGINTERN PyObject *_wrap_ESLconnection_events(PyObject *SWIGUNUSEDPARM(self), resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4763,7 +5091,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_execute(PyObject *SWIGUNUSEDPARM(self), char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4779,8 +5106,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_execute(PyObject *SWIGUNUSEDPARM(self), PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO|OO:ESLconnection_execute",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4815,13 +5142,11 @@ SWIGINTERN PyObject *_wrap_ESLconnection_execute(PyObject *SWIGUNUSEDPARM(self), if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4832,7 +5157,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_executeAsync(PyObject *SWIGUNUSEDPARM(s char *arg2 = (char *) 0 ; char *arg3 = (char *) NULL ; char *arg4 = (char *) NULL ; - ESLevent *result = 0 ; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4848,8 +5172,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_executeAsync(PyObject *SWIGUNUSEDPARM(s PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; + ESLevent *result = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO|OO:ESLconnection_executeAsync",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4884,13 +5208,11 @@ SWIGINTERN PyObject *_wrap_ESLconnection_executeAsync(PyObject *SWIGUNUSEDPARM(s if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; if (alloc3 == SWIG_NEWOBJ) delete[] buf3; if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4899,7 +5221,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_setAsyncExecute(PyObject *SWIGUNUSEDPAR PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4907,8 +5228,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_setAsyncExecute(PyObject *SWIGUNUSEDPAR int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + int result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_setAsyncExecute",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4927,11 +5248,9 @@ SWIGINTERN PyObject *_wrap_ESLconnection_setAsyncExecute(PyObject *SWIGUNUSEDPAR } resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4940,7 +5259,6 @@ SWIGINTERN PyObject *_wrap_ESLconnection_setEventLock(PyObject *SWIGUNUSEDPARM(s PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; char *arg2 = (char *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; int res2 ; @@ -4948,8 +5266,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_setEventLock(PyObject *SWIGUNUSEDPARM(s int alloc2 = 0 ; PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; + int result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"OO:ESLconnection_setEventLock",&obj0,&obj1)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4968,11 +5286,9 @@ SWIGINTERN PyObject *_wrap_ESLconnection_setEventLock(PyObject *SWIGUNUSEDPARM(s } resultobj = SWIG_From_int(static_cast< int >(result)); if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -4980,12 +5296,11 @@ fail: SWIGINTERN PyObject *_wrap_ESLconnection_disconnect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; ESLconnection *arg1 = (ESLconnection *) 0 ; - int result; void *argp1 = 0 ; int res1 = 0 ; PyObject * obj0 = 0 ; + int result; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:ESLconnection_disconnect",&obj0)) SWIG_fail; res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_ESLconnection, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -4998,10 +5313,8 @@ SWIGINTERN PyObject *_wrap_ESLconnection_disconnect(PyObject *SWIGUNUSEDPARM(sel SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_From_int(static_cast< int >(result)); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } @@ -5020,7 +5333,6 @@ SWIGINTERN PyObject *_wrap_eslSetLogLevel(PyObject *SWIGUNUSEDPARM(self), PyObje int ecode1 = 0 ; PyObject * obj0 = 0 ; - SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!PyArg_ParseTuple(args,(char *)"O:eslSetLogLevel",&obj0)) SWIG_fail; ecode1 = SWIG_AsVal_int(obj0, &val1); if (!SWIG_IsOK(ecode1)) { @@ -5033,15 +5345,14 @@ SWIGINTERN PyObject *_wrap_eslSetLogLevel(PyObject *SWIGUNUSEDPARM(self), PyObje SWIG_PYTHON_THREAD_END_ALLOW; } resultobj = SWIG_Py_Void(); - SWIG_PYTHON_THREAD_END_BLOCK; return resultobj; fail: - SWIG_PYTHON_THREAD_END_BLOCK; return NULL; } static PyMethodDef SwigMethods[] = { + { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, { (char *)"ESLevent_event_set", _wrap_ESLevent_event_set, METH_VARARGS, NULL}, { (char *)"ESLevent_event_get", _wrap_ESLevent_event_get, METH_VARARGS, NULL}, { (char *)"ESLevent_serialized_string_set", _wrap_ESLevent_serialized_string_set, METH_VARARGS, NULL}, @@ -5130,18 +5441,18 @@ static swig_const_info swig_const_table[] = { #endif /* ----------------------------------------------------------------------------- * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * - * The generated swig_type_info structures are assigned staticly to an initial + * The generated swig_type_info structures are assigned staticly to an initial * 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 @@ -5151,17 +5462,17 @@ static swig_const_info swig_const_table[] = { * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it + * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * - * First off, we lookup the cast->type name to see if it is already loaded. + * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the + * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that @@ -5187,8 +5498,6 @@ SWIG_InitializeModule(void *clientdata) { swig_module_info *module_head, *iter; int found, init; - clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ @@ -5226,7 +5535,7 @@ SWIG_InitializeModule(void *clientdata) { module_head->next = &swig_module; } - /* When multiple interpeters are used, a module could have already been initialized in + /* When multiple interpreters 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 */ @@ -5394,26 +5703,58 @@ extern "C" { SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { +#if PY_VERSION_HEX >= 0x03000000 + return PyUnicode_InternFromString(""); +#else return PyString_FromString(""); +#endif } SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v) { +#if PY_VERSION_HEX >= 0x03000000 + PyObject *str = PyUnicode_InternFromString("("); + PyObject *tail; + PyObject *joined; + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + tail = PyUnicode_FromString(var->name); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + if (var->next) { + tail = PyUnicode_InternFromString(", "); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; + } + } + tail = PyUnicode_InternFromString(")"); + joined = PyUnicode_Concat(str, tail); + Py_DecRef(str); + Py_DecRef(tail); + str = joined; +#else PyObject *str = PyString_FromString("("); - swig_globalvar *var; + swig_globalvar *var; for (var = v->vars; var; var=var->next) { PyString_ConcatAndDel(&str,PyString_FromString(var->name)); if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); } PyString_ConcatAndDel(&str,PyString_FromString(")")); +#endif return str; } SWIGINTERN int swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { + char *tmp; PyObject *str = swig_varlink_str(v); fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", PyString_AsString(str)); + fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); + SWIG_Python_str_DelForPy3(tmp); Py_DECREF(str); return 0; } @@ -5467,19 +5808,23 @@ extern "C" { swig_varlink_type(void) { static char varlink__doc__[] = "Swig var link object"; static PyTypeObject varlink_type; - static int type_init = 0; + static int type_init = 0; if (!type_init) { - const PyTypeObject tmp - = { + const PyTypeObject tmp = { + /* PyObject header changed in Python 3 */ +#if PY_VERSION_HEX >= 0x03000000 + PyVarObject_HEAD_INIT(NULL, 0) +#else PyObject_HEAD_INIT(NULL) - 0, /* Number of items in variable part (ob_size) */ - (char *)"swigvarlink", /* Type name (tp_name) */ - sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ - 0, /* Itemsize (tp_itemsize) */ - (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ - (printfunc) swig_varlink_print, /* Print (tp_print) */ - (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ - (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ + 0, /* ob_size */ +#endif + (char *)"swigvarlink", /* tp_name */ + sizeof(swig_varlinkobject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor) swig_varlink_dealloc, /* tp_dealloc */ + (printfunc) swig_varlink_print, /* tp_print */ + (getattrfunc) swig_varlink_getattr, /* tp_getattr */ + (setattrfunc) swig_varlink_setattr, /* tp_setattr */ 0, /* tp_compare */ (reprfunc) swig_varlink_repr, /* tp_repr */ 0, /* tp_as_number */ @@ -5487,7 +5832,7 @@ extern "C" { 0, /* tp_as_mapping */ 0, /* tp_hash */ 0, /* tp_call */ - (reprfunc)swig_varlink_str, /* tp_str */ + (reprfunc) swig_varlink_str, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer */ @@ -5503,13 +5848,21 @@ extern "C" { #if PY_VERSION_HEX >= 0x02030000 0, /* tp_del */ #endif +#if PY_VERSION_HEX >= 0x02060000 + 0, /* tp_version */ +#endif #ifdef COUNT_ALLOCS 0,0,0,0 /* tp_alloc -> tp_next */ #endif }; varlink_type = tmp; - varlink_type.ob_type = &PyType_Type; type_init = 1; +#if PY_VERSION_HEX < 0x02020000 + varlink_type.ob_type = &PyType_Type; +#else + if (PyType_Ready(&varlink_type) < 0) + return NULL; +#endif } return &varlink_type; } @@ -5560,7 +5913,7 @@ extern "C" { for (i = 0; constants[i].type; ++i) { switch(constants[i].type) { case SWIG_PY_POINTER: - obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); break; case SWIG_PY_BINARY: obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); @@ -5600,15 +5953,15 @@ extern "C" { } } if (ci) { - size_t shift = (ci->ptype) - types; - swig_type_info *ty = types_initial[shift]; - size_t ldoc = (c - methods[i].ml_doc); - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; - char *ndoc = (char*)malloc(ldoc + lptr + 10); - if (ndoc) { - char *buff = ndoc; - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; - if (ptr) { + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; strncpy(buff, methods[i].ml_doc, ldoc); buff += ldoc; strncpy(buff, "swig_ptr: ", 10); @@ -5633,21 +5986,139 @@ extern "C" { #ifdef __cplusplus extern "C" #endif -SWIGEXPORT void SWIG_init(void) { - PyObject *m, *d; + +SWIGEXPORT +#if PY_VERSION_HEX >= 0x03000000 +PyObject* +#else +void +#endif +SWIG_init(void) { + PyObject *m, *d, *md; +#if PY_VERSION_HEX >= 0x03000000 + static struct PyModuleDef SWIG_module = { +# if PY_VERSION_HEX >= 0x03020000 + PyModuleDef_HEAD_INIT, +# else + { + PyObject_HEAD_INIT(NULL) + NULL, /* m_init */ + 0, /* m_index */ + NULL, /* m_copy */ + }, +# endif + (char *) SWIG_name, + NULL, + -1, + SwigMethods, + NULL, + NULL, + NULL, + NULL + }; +#endif + +#if defined(SWIGPYTHON_BUILTIN) + static SwigPyClientData SwigPyObject_clientdata = { + 0, 0, 0, 0, 0, 0, 0 + }; + static PyGetSetDef this_getset_def = { + (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL + }; + static SwigPyGetSet thisown_getset_closure = { + (PyCFunction) SwigPyObject_own, + (PyCFunction) SwigPyObject_own + }; + static PyGetSetDef thisown_getset_def = { + (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure + }; + PyObject *metatype_args; + PyTypeObject *builtin_pytype; + int builtin_base_count; + swig_type_info *builtin_basetype; + PyObject *tuple; + PyGetSetDescrObject *static_getset; + PyTypeObject *metatype; + SwigPyClientData *cd; + PyObject *public_interface, *public_symbol; + PyObject *this_descr; + PyObject *thisown_descr; + int i; + + (void)builtin_pytype; + (void)builtin_base_count; + (void)builtin_basetype; + (void)tuple; + (void)static_getset; + + /* metatype is used to implement static member variables. */ + metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type); + assert(metatype_args); + metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL); + assert(metatype); + Py_DECREF(metatype_args); + metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro; + assert(PyType_Ready(metatype) >= 0); +#endif /* Fix SwigMethods to carry the callback ptrs when needed */ SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); +#if PY_VERSION_HEX >= 0x03000000 + m = PyModule_Create(&SWIG_module); +#else m = Py_InitModule((char *) SWIG_name, SwigMethods); - d = PyModule_GetDict(m); +#endif + md = d = PyModule_GetDict(m); + (void)md; SWIG_InitializeModule(0); - SWIG_InstallConstants(d,swig_const_table); +#ifdef SWIGPYTHON_BUILTIN + SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); + assert(SwigPyObject_stype); + cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; + if (!cd) { + SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; + SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce(); + } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) { + PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); +# if PY_VERSION_HEX >= 0x03000000 + return NULL; +# else + return; +# endif + } + + /* All objects have a 'this' attribute */ + this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); + (void)this_descr; + + /* All objects have a 'thisown' attribute */ + thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); + (void)thisown_descr; + + public_interface = PyList_New(0); + public_symbol = 0; + (void)public_symbol; + + PyDict_SetItemString(md, "__all__", public_interface); + Py_DECREF(public_interface); + for (i = 0; SwigMethods[i].ml_name != NULL; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); + for (i = 0; swig_const_table[i].name != 0; ++i) + SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); +#endif + + SWIG_InstallConstants(d,swig_const_table); /* Initialize threading */ SWIG_PYTHON_INITIALIZE_THREADS; +#if PY_VERSION_HEX >= 0x03000000 + return m; +#else + return; +#endif } diff --git a/libs/esl/ruby/esl_wrap.cpp b/libs/esl/ruby/esl_wrap.cpp index 81dcb73e0e..27eaf201eb 100644 --- a/libs/esl/ruby/esl_wrap.cpp +++ b/libs/esl/ruby/esl_wrap.cpp @@ -1,11 +1,11 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.7 - * - * This file is not intended to be easily readable and contains a number of + * Version 2.0.12 + * + * 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 - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. * ----------------------------------------------------------------------------- */ #define SWIGRUBY @@ -65,28 +65,28 @@ template T SwigValueInit() { #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -129,7 +129,7 @@ template T SwigValueInit() { # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -174,28 +174,28 @@ template T SwigValueInit() { #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif #ifndef SWIG_MSC_UNSUPPRESS_4505 # if defined(_MSC_VER) # pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif +# endif #endif #ifndef SWIGUNUSEDPARM # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -238,7 +238,7 @@ template T SwigValueInit() { # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -276,7 +276,7 @@ template T SwigValueInit() { You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the SWIG runtime code. In 99.9% of the cases, SWIG just needs to declare them as 'static'. - + But only do this if strictly necessary, ie, if you have problems with your compiler or suchlike. */ @@ -302,16 +302,16 @@ template T SwigValueInit() { #define SWIG_POINTER_OWN 0x1 -/* +/* Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer + + The SWIG conversion methods, as ConvertPtr, return an integer that tells if the conversion was successful or not. And if not, an error code can be returned (see swigerrors.swg for the codes). - + Use the following macros/flags to set or process the returning states. - + In old versions of SWIG, code such as the following was usually written: if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { @@ -344,23 +344,23 @@ template T SwigValueInit() { } else { // fail code } - + I.e., now SWIG_ConvertPtr can return new objects and you can identify the case and take care of the deallocation. Of course that also requires SWIG_ConvertPtr to return new result values, such as - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } } Of course, returning the plain '0(success)/-1(fail)' still works, but you can be @@ -374,17 +374,17 @@ template T SwigValueInit() { int fooi(int); and you call - + food(1) // cast rank '1' (1 -> 1.0) fooi(1) // cast rank '0' just use the SWIG_AddCast()/SWIG_CheckState() */ -#define SWIG_OK (0) +#define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) @@ -415,14 +415,14 @@ template T SwigValueInit() { # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { +SWIGINTERNINLINE int SWIG_AddCast(int r) { return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ -# define SWIG_AddCast +# define SWIG_AddCast(r) (r) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif @@ -466,7 +466,7 @@ typedef struct swig_module_info { void *clientdata; /* Language specific module data */ } swig_module_info; -/* +/* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class" == "Class", etc. @@ -486,18 +486,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, /* Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal + Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - int equiv = 0; +SWIG_TypeCmp(const char *nb, const char *tb) { + int equiv = 1; const char* te = tb + strlen(tb); const char* ne = nb; - while (!equiv && *ne) { + while (equiv != 0 && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + equiv = SWIG_TypeNameComp(nb, ne, tb, te); if (*ne) ++ne; } return equiv; @@ -505,24 +505,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { /* Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb + Return 0 if not equal, 1 if equal */ SWIGRUNTIME int -SWIG_TypeCompare(const char *nb, const char *tb) { - int equiv = 0; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (!equiv && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; - if (*ne) ++ne; - } - return equiv; +SWIG_TypeEquiv(const char *nb, const char *tb) { + return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; } - /* Check the typename */ @@ -550,7 +539,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) { return 0; } -/* +/* Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison */ SWIGRUNTIME swig_cast_info * @@ -585,7 +574,7 @@ SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); } -/* +/* Dynamic pointer casting. Down an inheritance hierarchy */ SWIGRUNTIME swig_type_info * @@ -629,7 +618,7 @@ SWIG_TypePrettyName(const swig_type_info *type) { return type->name; } -/* +/* Set the clientdata field for a type */ SWIGRUNTIME void @@ -637,14 +626,14 @@ SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { swig_cast_info *cast = ti->cast; /* if (ti->clientdata == clientdata) return; */ ti->clientdata = clientdata; - + while (cast) { if (!cast->converter) { swig_type_info *tc = cast->type; if (!tc->clientdata) { SWIG_TypeClientData(tc, clientdata); } - } + } cast = cast->next; } } @@ -653,18 +642,18 @@ SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(ti, clientdata); ti->owndata = 1; } - + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { swig_module_info *iter = start; do { @@ -673,11 +662,11 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, register size_t r = iter->size - 1; do { /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - register size_t i = (l + r) >> 1; + register size_t i = (l + r) >> 1; const char *iname = iter->types[i]->name; if (iname) { register int compare = strcmp(name, iname); - if (compare == 0) { + if (compare == 0) { return iter->types[i]; } else if (compare < 0) { if (i) { @@ -702,14 +691,14 @@ SWIG_MangledTypeQueryModule(swig_module_info *start, Search for a swig_type_info structure for either a mangled name or a human readable name. It first searches the mangled names of the types, which is a O(log #types) If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. + + We start searching at module start, and finish searching when start == end. Note: if start == end at the beginning of the function, we go all the way around the circular list. */ SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, const char *name) { /* STEP 1: Search the name field using binary search */ swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); @@ -728,12 +717,12 @@ SWIG_TypeQueryModule(swig_module_info *start, iter = iter->next; } while (iter != end); } - + /* neither found a match */ return 0; } -/* +/* Pack binary data into a string */ SWIGRUNTIME char * @@ -749,7 +738,7 @@ SWIG_PackData(char *c, void *ptr, size_t sz) { return c; } -/* +/* Unpack binary data from a string */ SWIGRUNTIME const char * @@ -763,21 +752,21 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); - else + else return (char *) 0; d = *(c++); if ((d >= '0') && (d <= '9')) uu |= (d - '0'); else if ((d >= 'a') && (d <= 'f')) uu |= (d - ('a'-10)); - else + else return (char *) 0; *u = uu; } return c; } -/* +/* Pack 'void *' into a string buffer. */ SWIGRUNTIME char * @@ -837,18 +826,18 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { #endif /* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 +#define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 @@ -1398,7 +1387,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { /* Runtime API */ -#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule() +#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata) #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer) @@ -1734,7 +1723,7 @@ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) { } SWIGRUNTIME swig_module_info * -SWIG_Ruby_GetModule(void) +SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata)) { VALUE pointer; swig_module_info *ret = 0; @@ -1774,7 +1763,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer) SWIGINTERN int SWIG_Ruby_isCallable( VALUE proc ) { - if ( rb_respond_to( proc, swig_call_id ) == Qtrue ) + if ( rb_respond_to( proc, swig_call_id ) ) return 1; return 0; } @@ -1787,7 +1776,7 @@ int SWIG_Ruby_isCallable( VALUE proc ) SWIGINTERN int SWIG_Ruby_arity( VALUE proc, int minimal ) { - if ( rb_respond_to( proc, swig_arity_id ) == Qtrue ) + if ( rb_respond_to( proc, swig_arity_id ) ) { VALUE num = rb_funcall( proc, swig_arity_id, 0 ); int arity = NUM2INT(num); @@ -1834,7 +1823,7 @@ static VALUE mESL; #define SWIG_RUBY_THREAD_END_BLOCK -#define SWIGVERSION 0x020007 +#define SWIGVERSION 0x020012 #define SWIG_VERSION SWIGVERSION @@ -1866,11 +1855,7 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) { if (TYPE(obj) == T_STRING) { - #if defined(StringValuePtr) char *cstr = StringValuePtr(obj); - #else - char *cstr = STR2CSTR(obj); - #endif size_t size = RSTRING_LEN(obj) + 1; if (cptr) { if (alloc) { @@ -3894,18 +3879,18 @@ static swig_cast_info *swig_cast_initial[] = { /* ----------------------------------------------------------------------------- * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of * swig_module, and does all the lookup, filling in the swig_module.types * array with the correct data and linking the correct swig_cast_info * structures together. * - * The generated swig_type_info structures are assigned staticly to an initial + * The generated swig_type_info structures are assigned staticly to an initial * 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 @@ -3915,17 +3900,17 @@ static swig_cast_info *swig_cast_initial[] = { * a column is one of the swig_cast_info structures for that type. * The cast_initial array is actually an array of arrays, because each row has * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it + * we find the array of casts associated with the type, and loop through it * adding the casts to the list. The one last trick we need to do is making * sure the type pointer in the swig_cast_info struct is correct. * - * First off, we lookup the cast->type name to see if it is already loaded. + * First off, we lookup the cast->type name to see if it is already loaded. * There are three cases to handle: * 1) If the cast->type has already been loaded AND the type we are adding * casting info to has not been loaded (it is in this module), THEN we * replace the cast->type pointer with the type pointer that has already * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the + * 2) If BOTH types (the one we are adding casting info to, and the * cast->type) are loaded, THEN the cast info has already been loaded by * the previous module so we just ignore it. * 3) Finally, if cast->type has not already been loaded, then we add that @@ -3951,8 +3936,6 @@ SWIG_InitializeModule(void *clientdata) { swig_module_info *module_head, *iter; int found, init; - clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ @@ -3990,7 +3973,7 @@ SWIG_InitializeModule(void *clientdata) { module_head->next = &swig_module; } - /* When multiple interpeters are used, a module could have already been initialized in + /* When multiple interpreters 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 */ @@ -4004,7 +3987,7 @@ SWIG_InitializeModule(void *clientdata) { swig_type_info *type = 0; swig_type_info *ret; swig_cast_info *cast; - + #ifdef SWIGRUNTIME_DEBUG printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif @@ -4031,7 +4014,7 @@ SWIG_InitializeModule(void *clientdata) { /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { - + /* Don't need to add information already in the list */ ret = 0; #ifdef SWIGRUNTIME_DEBUG