提交 54762dd1 authored 作者: Brian West's avatar Brian West

update esl swig to swig 2.0 and reswig

上级 6a903e23
...@@ -5,7 +5,7 @@ CLASSES=org/freeswitch/esl/* ...@@ -5,7 +5,7 @@ CLASSES=org/freeswitch/esl/*
all: esl.jar all: esl.jar
esl_wrap.cpp: 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 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 $(CXX) $(CXX_CFLAGS) $(LOCAL_CFLAGS) $(CXXFLAGS) $(GCC_WARNING_JUNK) $(PERL_INC) -c esl_wrap.cpp -o esl_wrap.o
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.35 * Version 2.0.12
* *
* This file is not intended to be easily readable and contains a number of * 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 * coding conventions designed to improve portability and efficiency. Do not make
...@@ -8,20 +8,25 @@ ...@@ -8,20 +8,25 @@
* interface file instead. * interface file instead.
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
#define SWIGJAVA
#ifdef __cplusplus #ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper { template<typename T> class SwigValueWrapper {
T *tt; struct SwigMovePointer {
public: T *ptr;
SwigValueWrapper() : tt(0) { } SwigMovePointer(T *p) : ptr(p) { }
SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { } ~SwigMovePointer() { delete ptr; }
SwigValueWrapper(const T& t) : tt(new T(t)) { } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
~SwigValueWrapper() { delete tt; } } pointer;
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<T>& rhs); SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
SwigValueWrapper(const SwigValueWrapper<T>& 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 <typename T> T SwigValueInit() { template <typename T> T SwigValueInit() {
...@@ -71,6 +76,12 @@ template <typename T> T SwigValueInit() { ...@@ -71,6 +76,12 @@ template <typename T> T SwigValueInit() {
# endif # endif
#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 #ifndef SWIGUNUSEDPARM
# ifdef __cplusplus # ifdef __cplusplus
# define SWIGUNUSEDPARM(p) # define SWIGUNUSEDPARM(p)
...@@ -134,7 +145,7 @@ template <typename T> T SwigValueInit() { ...@@ -134,7 +145,7 @@ template <typename T> T SwigValueInit() {
/* Fix for jlong on some versions of gcc on Windows */ /* 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; typedef long long __int64;
#endif #endif
...@@ -181,7 +192,8 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC ...@@ -181,7 +192,8 @@ static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionC
{ SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
{ SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
{ SWIG_JavaUnknownError, "java/lang/UnknownError" }, { 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; const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
while (except_ptr->code != code && except_ptr->code) while (except_ptr->code != code && except_ptr->code)
...@@ -217,7 +229,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1event_1set(JNIE ...@@ -217,7 +229,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1event_1set(JNIE
arg1 = *(ESLevent **)&jarg1; arg1 = *(ESLevent **)&jarg1;
arg2 = *(esl_event_t **)&jarg2; arg2 = *(esl_event_t **)&jarg2;
if (arg1) (arg1)->event = arg2; if (arg1) (arg1)->event = arg2;
} }
...@@ -250,7 +261,7 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialized_1str ...@@ -250,7 +261,7 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialized_1str
if (!arg2) return ; if (!arg2) return ;
} }
{ {
if (arg1->serialized_string) delete [] arg1->serialized_string; delete [] arg1->serialized_string;
if (arg2) { if (arg2) {
arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]); arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]);
strcpy((char *)arg1->serialized_string, (const char *)arg2); strcpy((char *)arg1->serialized_string, (const char *)arg2);
...@@ -272,7 +283,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialized_1 ...@@ -272,7 +283,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialized_1
(void)jarg1_; (void)jarg1_;
arg1 = *(ESLevent **)&jarg1; arg1 = *(ESLevent **)&jarg1;
result = (char *) ((arg1)->serialized_string); result = (char *) ((arg1)->serialized_string);
if(result) jresult = jenv->NewStringUTF((const char *)result); if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult; return jresult;
} }
...@@ -287,7 +298,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1mine_1set(JNIEn ...@@ -287,7 +298,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1mine_1set(JNIEn
arg1 = *(ESLevent **)&jarg1; arg1 = *(ESLevent **)&jarg1;
arg2 = (int)jarg2; arg2 = (int)jarg2;
if (arg1) (arg1)->mine = arg2; if (arg1) (arg1)->mine = arg2;
} }
...@@ -370,7 +380,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_delete_1ESLevent(JNIEnv * ...@@ -370,7 +380,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_delete_1ESLevent(JNIEnv *
(void)jcls; (void)jcls;
arg1 = *(ESLevent **)&jarg1; arg1 = *(ESLevent **)&jarg1;
delete arg1; delete arg1;
} }
...@@ -390,7 +399,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialize(JN ...@@ -390,7 +399,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1serialize(JN
if (!arg2) return 0; if (!arg2) return 0;
} }
result = (char *)(arg1)->serialize((char const *)arg2); 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); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult; return jresult;
} }
...@@ -400,8 +409,8 @@ SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1setPriority ...@@ -400,8 +409,8 @@ SWIGEXPORT jboolean JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1setPriority
jboolean jresult = 0 ; jboolean jresult = 0 ;
ESLevent *arg1 = (ESLevent *) 0 ; ESLevent *arg1 = (ESLevent *) 0 ;
esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ; esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ;
bool result;
esl_priority_t *argp2 ; esl_priority_t *argp2 ;
bool result;
(void)jenv; (void)jenv;
(void)jcls; (void)jcls;
...@@ -437,7 +446,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getHeader(JN ...@@ -437,7 +446,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getHeader(JN
} }
arg3 = (int)jarg3; arg3 = (int)jarg3;
result = (char *)(arg1)->getHeader((char const *)arg2,arg3); 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); if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
return jresult; return jresult;
} }
...@@ -453,7 +462,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getBody(JNIE ...@@ -453,7 +462,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getBody(JNIE
(void)jarg1_; (void)jarg1_;
arg1 = *(ESLevent **)&jarg1; arg1 = *(ESLevent **)&jarg1;
result = (char *)(arg1)->getBody(); result = (char *)(arg1)->getBody();
if(result) jresult = jenv->NewStringUTF((const char *)result); if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult; return jresult;
} }
...@@ -468,7 +477,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getType(JNIE ...@@ -468,7 +477,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1getType(JNIE
(void)jarg1_; (void)jarg1_;
arg1 = *(ESLevent **)&jarg1; arg1 = *(ESLevent **)&jarg1;
result = (char *)(arg1)->getType(); result = (char *)(arg1)->getType();
if(result) jresult = jenv->NewStringUTF((const char *)result); if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult; return jresult;
} }
...@@ -614,7 +623,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1firstHeader( ...@@ -614,7 +623,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1firstHeader(
(void)jarg1_; (void)jarg1_;
arg1 = *(ESLevent **)&jarg1; arg1 = *(ESLevent **)&jarg1;
result = (char *)(arg1)->firstHeader(); result = (char *)(arg1)->firstHeader();
if(result) jresult = jenv->NewStringUTF((const char *)result); if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult; return jresult;
} }
...@@ -629,7 +638,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1nextHeader(J ...@@ -629,7 +638,7 @@ SWIGEXPORT jstring JNICALL Java_org_freeswitch_esl_eslJNI_ESLevent_1nextHeader(J
(void)jarg1_; (void)jarg1_;
arg1 = *(ESLevent **)&jarg1; arg1 = *(ESLevent **)&jarg1;
result = (char *)(arg1)->nextHeader(); result = (char *)(arg1)->nextHeader();
if(result) jresult = jenv->NewStringUTF((const char *)result); if (result) jresult = jenv->NewStringUTF((const char *)result);
return jresult; return jresult;
} }
...@@ -791,7 +800,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_delete_1ESLconnection(JNI ...@@ -791,7 +800,6 @@ SWIGEXPORT void JNICALL Java_org_freeswitch_esl_eslJNI_delete_1ESLconnection(JNI
(void)jcls; (void)jcls;
arg1 = *(ESLconnection **)&jarg1; arg1 = *(ESLconnection **)&jarg1;
delete arg1; delete arg1;
} }
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
...@@ -26,12 +26,14 @@ public class ESLconnection { ...@@ -26,12 +26,14 @@ public class ESLconnection {
} }
public synchronized void delete() { public synchronized void delete() {
if(swigCPtr != 0 && swigCMemOwn) { if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false; swigCMemOwn = false;
eslJNI.delete_ESLconnection(swigCPtr); eslJNI.delete_ESLconnection(swigCPtr);
} }
swigCPtr = 0; swigCPtr = 0;
} }
}
public ESLconnection(String host, int port, String user, String password) { public ESLconnection(String host, int port, String user, String password) {
this(eslJNI.new_ESLconnection__SWIG_0(host, port, user, password), true); this(eslJNI.new_ESLconnection__SWIG_0(host, port, user, password), true);
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
...@@ -26,12 +26,14 @@ public class ESLevent { ...@@ -26,12 +26,14 @@ public class ESLevent {
} }
public synchronized void delete() { public synchronized void delete() {
if(swigCPtr != 0 && swigCMemOwn) { if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false; swigCMemOwn = false;
eslJNI.delete_ESLevent(swigCPtr); eslJNI.delete_ESLevent(swigCPtr);
} }
swigCPtr = 0; swigCPtr = 0;
} }
}
public void setEvent(SWIGTYPE_p_esl_event_t value) { public void setEvent(SWIGTYPE_p_esl_event_t value) {
eslJNI.ESLevent_event_set(swigCPtr, this, SWIGTYPE_p_esl_event_t.getCPtr(value)); eslJNI.ESLevent_event_set(swigCPtr, this, SWIGTYPE_p_esl_event_t.getCPtr(value));
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
package org.freeswitch.esl; 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 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 long ESLevent_event_get(long jarg1, ESLevent jarg1_);
public final static native void ESLevent_serialized_string_set(long jarg1, ESLevent jarg1_, String jarg2); public final static native void ESLevent_serialized_string_set(long jarg1, ESLevent jarg1_, String jarg2);
......
差异被折叠。
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
...@@ -184,6 +184,10 @@ class ESLPINVOKE { ...@@ -184,6 +184,10 @@ class ESLPINVOKE {
static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper(); static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper();
static ESLPINVOKE() {
}
[DllImport("ESL", EntryPoint="CSharp_ESLevent_Event_set")] [DllImport("ESL", EntryPoint="CSharp_ESLevent_Event_set")]
public static extern void ESLevent_Event_set(HandleRef jarg1, HandleRef jarg2); public static extern void ESLevent_Event_set(HandleRef jarg1, HandleRef jarg2);
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
...@@ -29,11 +29,13 @@ public class ESLconnection : IDisposable { ...@@ -29,11 +29,13 @@ public class ESLconnection : IDisposable {
public virtual void Dispose() { public virtual void Dispose() {
lock(this) { lock(this) {
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false; swigCMemOwn = false;
ESLPINVOKE.delete_ESLconnection(swigCPtr); ESLPINVOKE.delete_ESLconnection(swigCPtr);
} }
swigCPtr = new HandleRef(null, IntPtr.Zero); swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this); GC.SuppressFinalize(this);
} }
} }
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
...@@ -29,11 +29,13 @@ public class ESLevent : IDisposable { ...@@ -29,11 +29,13 @@ public class ESLevent : IDisposable {
public virtual void Dispose() { public virtual void Dispose() {
lock(this) { lock(this) {
if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false; swigCMemOwn = false;
ESLPINVOKE.delete_ESLevent(swigCPtr); ESLPINVOKE.delete_ESLevent(swigCPtr);
} }
swigCPtr = new HandleRef(null, IntPtr.Zero); swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this); GC.SuppressFinalize(this);
} }
} }
......
...@@ -5,7 +5,7 @@ WRAP_GCC_WARNING_SILENCE=-Wno-unused-function ...@@ -5,7 +5,7 @@ WRAP_GCC_WARNING_SILENCE=-Wno-unused-function
all: ESL.so all: ESL.so
esl_wrap.cpp: 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 esl_wrap.o: esl_wrap.cpp
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) $(WRAP_GCC_WARNING_SILENCE) -c esl_wrap.cpp -o esl_wrap.o $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) $(WRAP_GCC_WARNING_SILENCE) -c esl_wrap.cpp -o esl_wrap.o
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * 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 * Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead. * the SWIG interface file instead.
......
差异被折叠。
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.35 * Version 2.0.12
* *
* This file is not intended to be easily readable and contains a number of * 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 * coding conventions designed to improve portability and efficiency. Do not make
...@@ -8,20 +8,25 @@ ...@@ -8,20 +8,25 @@
* interface file instead. * interface file instead.
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
#define SWIGCSHARP
#ifdef __cplusplus #ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper { template<typename T> class SwigValueWrapper {
T *tt; struct SwigMovePointer {
public: T *ptr;
SwigValueWrapper() : tt(0) { } SwigMovePointer(T *p) : ptr(p) { }
SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { } ~SwigMovePointer() { delete ptr; }
SwigValueWrapper(const T& t) : tt(new T(t)) { } SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
~SwigValueWrapper() { delete tt; } } pointer;
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<T>& rhs); SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
SwigValueWrapper(const SwigValueWrapper<T>& 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 <typename T> T SwigValueInit() { template <typename T> T SwigValueInit() {
...@@ -71,6 +76,12 @@ template <typename T> T SwigValueInit() { ...@@ -71,6 +76,12 @@ template <typename T> T SwigValueInit() {
# endif # endif
#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 #ifndef SWIGUNUSEDPARM
# ifdef __cplusplus # ifdef __cplusplus
# define SWIGUNUSEDPARM(p) # define SWIGUNUSEDPARM(p)
...@@ -190,12 +201,12 @@ static SWIG_CSharpException_t SWIG_csharp_exceptions[] = { ...@@ -190,12 +201,12 @@ static SWIG_CSharpException_t SWIG_csharp_exceptions[] = {
static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = { static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = {
{ SWIG_CSharpArgumentException, NULL }, { SWIG_CSharpArgumentException, NULL },
{ SWIG_CSharpArgumentNullException, NULL }, { SWIG_CSharpArgumentNullException, NULL },
{ SWIG_CSharpArgumentOutOfRangeException, NULL }, { SWIG_CSharpArgumentOutOfRangeException, NULL }
}; };
static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) { static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) {
SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback; 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 = SWIG_csharp_exceptions[code].callback;
} }
callback(msg); callback(msg);
...@@ -203,7 +214,7 @@ static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes ...@@ -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) { 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; 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 = SWIG_csharp_exceptions_argument[code].callback;
} }
callback(msg, param_name); callback(msg, param_name);
...@@ -284,7 +295,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_Event_set(void * jarg1, void * jarg2 ...@@ -284,7 +295,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_Event_set(void * jarg1, void * jarg2
arg1 = (ESLevent *)jarg1; arg1 = (ESLevent *)jarg1;
arg2 = (esl_event_t *)jarg2; arg2 = (esl_event_t *)jarg2;
if (arg1) (arg1)->event = arg2; if (arg1) (arg1)->event = arg2;
} }
...@@ -307,7 +317,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_SerializedString_set(void * jarg1, c ...@@ -307,7 +317,7 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_SerializedString_set(void * jarg1, c
arg1 = (ESLevent *)jarg1; arg1 = (ESLevent *)jarg1;
arg2 = (char *)jarg2; arg2 = (char *)jarg2;
{ {
if (arg1->serialized_string) delete [] arg1->serialized_string; delete [] arg1->serialized_string;
if (arg2) { if (arg2) {
arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]); arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]);
strcpy((char *)arg1->serialized_string, (const char *)arg2); strcpy((char *)arg1->serialized_string, (const char *)arg2);
...@@ -337,7 +347,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_Mine_set(void * jarg1, int jarg2) { ...@@ -337,7 +347,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_ESLevent_Mine_set(void * jarg1, int jarg2) {
arg1 = (ESLevent *)jarg1; arg1 = (ESLevent *)jarg1;
arg2 = (int)jarg2; arg2 = (int)jarg2;
if (arg1) (arg1)->mine = arg2; if (arg1) (arg1)->mine = arg2;
} }
...@@ -398,7 +407,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_ESLevent(void * jarg1) { ...@@ -398,7 +407,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_ESLevent(void * jarg1) {
arg1 = (ESLevent *)jarg1; arg1 = (ESLevent *)jarg1;
delete arg1; delete arg1;
} }
...@@ -420,8 +428,8 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_SetPriority(void * jarg1, vo ...@@ -420,8 +428,8 @@ SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESLevent_SetPriority(void * jarg1, vo
unsigned int jresult ; unsigned int jresult ;
ESLevent *arg1 = (ESLevent *) 0 ; ESLevent *arg1 = (ESLevent *) 0 ;
esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ; esl_priority_t arg2 = (esl_priority_t) ESL_PRIORITY_NORMAL ;
bool result;
esl_priority_t *argp2 ; esl_priority_t *argp2 ;
bool result;
arg1 = (ESLevent *)jarg1; arg1 = (ESLevent *)jarg1;
argp2 = (esl_priority_t *)jarg2; argp2 = (esl_priority_t *)jarg2;
...@@ -661,7 +669,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_ESLconnection(void * jarg1) { ...@@ -661,7 +669,6 @@ SWIGEXPORT void SWIGSTDCALL CSharp_delete_ESLconnection(void * jarg1) {
arg1 = (ESLconnection *)jarg1; arg1 = (ESLconnection *)jarg1;
delete arg1; delete arg1;
} }
......
# This file was automatically generated by SWIG (http://www.swig.org). # 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; package ESL;
require Exporter; use base qw(Exporter);
require DynaLoader; use base qw(DynaLoader);
@ISA = qw(Exporter DynaLoader);
package ESLc; package ESLc;
bootstrap ESL; bootstrap ESL;
package ESL; package ESL;
@EXPORT = qw( ); @EXPORT = qw();
# ---------- BASE METHODS ------------- # ---------- BASE METHODS -------------
......
...@@ -18,7 +18,7 @@ perlmod-install: install-perlLTLIBRARIES ...@@ -18,7 +18,7 @@ perlmod-install: install-perlLTLIBRARIES
endif endif
esl_wrap.cpp: 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: perlxsi.c:
$(PERL) -MExtUtils::Embed -e xsinit -- -o perlxsi.c $(PERL) -MExtUtils::Embed -e xsinit -- -o perlxsi.c
......
差异被折叠。
#include <EXTERN.h> #include "EXTERN.h"
#include <perl.h> #include "perl.h"
#include "XSUB.h"
EXTERN_C void xs_init (pTHX); EXTERN_C void xs_init (pTHX);
...@@ -8,8 +9,9 @@ EXTERN_C void boot_DynaLoader (pTHX_ CV* cv); ...@@ -8,8 +9,9 @@ EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
EXTERN_C void EXTERN_C void
xs_init(pTHX) xs_init(pTHX)
{ {
char *file = __FILE__; static const char file[] = __FILE__;
dXSUB_SYS; dXSUB_SYS;
PERL_UNUSED_CONTEXT;
/* DynaLoader is a special case */ /* DynaLoader is a special case */
newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file); newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.7 * Version 2.0.12
* *
* This file is not intended to be easily readable and contains a number of * 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 * coding conventions designed to improve portability and efficiency. Do not make
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.7 * Version 2.0.12
* *
* This file is not intended to be easily readable and contains a number of * 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 * coding conventions designed to improve portability and efficiency. Do not make
...@@ -315,7 +315,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { ...@@ -315,7 +315,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
} }
#else /* no cast-rank mode */ #else /* no cast-rank mode */
# define SWIG_AddCast # define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif #endif
...@@ -379,18 +379,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, ...@@ -379,18 +379,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if not equal, 1 if equal Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) { SWIG_TypeCmp(const char *nb, const char *tb) {
int equiv = 0; int equiv = 1;
const char* te = tb + strlen(tb); const char* te = tb + strlen(tb);
const char* ne = nb; const char* ne = nb;
while (!equiv && *ne) { while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) { for (nb = ne; *ne; ++ne) {
if (*ne == '|') break; if (*ne == '|') break;
} }
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne; if (*ne) ++ne;
} }
return equiv; return equiv;
...@@ -398,24 +398,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { ...@@ -398,24 +398,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if equal, -1 if nb < tb, 1 if nb > tb Return 0 if not equal, 1 if equal
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeCompare(const char *nb, const char *tb) { SWIG_TypeEquiv(const char *nb, const char *tb) {
int equiv = 0; return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 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;
} }
/* /*
Check the typename Check the typename
*/ */
...@@ -810,7 +799,7 @@ static int default_error_code = E_ERROR; ...@@ -810,7 +799,7 @@ static int default_error_code = E_ERROR;
if (!(expr) ) { zend_printf("Contract Assert Failed %s\n",msg ); } else if (!(expr) ) { zend_printf("Contract Assert Failed %s\n",msg ); } else
/* Standard SWIG API */ /* 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) #define SWIG_SetModule(clientdata, pointer) SWIG_Php_SetModule(pointer)
/* used to wrap returned objects in so we know whether they are newobject /* 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) { ...@@ -940,11 +929,11 @@ SWIG_ZTS_ConvertResourcePtr(zval *z, swig_type_info *ty, int flags TSRMLS_DC) {
const char *type_name; const char *type_name;
value = (swig_object_wrapper *) zend_list_find(z->value.lval, &type); 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; value->newobject = 0;
} }
p = value->ptr; p = value->ptr;
if (type==-1) return NULL;
type_name=zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC); 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 ...@@ -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 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; zval *pointer;
swig_module_info *ret = 0; swig_module_info *ret = 0;
TSRMLS_FETCH();
MAKE_STD_ZVAL(pointer); MAKE_STD_ZVAL(pointer);
TSRMLS_FETCH();
if (zend_get_constant(const_name, sizeof(const_name) - 1, pointer TSRMLS_CC)) { if (zend_get_constant(const_name, sizeof(const_name) - 1, pointer TSRMLS_CC)) {
if (pointer->type == IS_LONG) { if (pointer->type == IS_LONG) {
ret = (swig_module_info *) pointer->value.lval; ret = (swig_module_info *) pointer->value.lval;
...@@ -1038,6 +1026,7 @@ static void SWIG_FAIL() __attribute__ ((__noreturn__)); ...@@ -1038,6 +1026,7 @@ static void SWIG_FAIL() __attribute__ ((__noreturn__));
#endif #endif
static void SWIG_FAIL() { static void SWIG_FAIL() {
TSRMLS_FETCH();
zend_error(SWIG_ErrorCode(), "%s", SWIG_ErrorMsg()); zend_error(SWIG_ErrorCode(), "%s", SWIG_ErrorMsg());
abort(); abort();
} }
...@@ -3213,8 +3202,6 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -3213,8 +3202,6 @@ SWIG_InitializeModule(void *clientdata) {
swig_module_info *module_head, *iter; swig_module_info *module_head, *iter;
int found, init; int found, init;
clientdata = clientdata;
/* check to see if the circular list has been setup, if not, set it up */ /* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) { if (swig_module.next==0) {
/* Initialize the swig_module */ /* Initialize the swig_module */
...@@ -3252,7 +3239,7 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -3252,7 +3239,7 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module; 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. 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 In this case, we do not want to continue adding types... everything should be
set up already */ set up already */
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.7 * Version 2.0.12
* *
* This file is not intended to be easily readable and contains a number of * 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 * coding conventions designed to improve portability and efficiency. Do not make
......
# This file was automatically generated by SWIG (http://www.swig.org). # 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
# This file is compatible with both classic and new-style classes. # the SWIG interface file instead.
import _ESL
import new from sys import version_info
new_instancemethod = new.instancemethod 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): def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "thisown"): return self.this.own(value) if (name == "thisown"): return self.this.own(value)
if (name == "this"): if (name == "this"):
if type(value).__name__ == 'PySwigObject': if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value self.__dict__[name] = value
return return
method = class_type.__swig_setmethods__.get(name,None) method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value) if method: return method(self,value)
if (not static) or hasattr(self,name): if (not static):
self.__dict__[name] = value self.__dict__[name] = value
else: else:
raise AttributeError("You cannot add attributes to %s" % self) raise AttributeError("You cannot add attributes to %s" % self)
...@@ -27,7 +50,7 @@ def _swig_getattr(self,class_type,name): ...@@ -27,7 +50,7 @@ def _swig_getattr(self,class_type,name):
if (name == "thisown"): return self.this.own() if (name == "thisown"): return self.this.own()
method = class_type.__swig_getmethods__.get(name,None) method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self) if method: return method(self)
raise AttributeError,name raise AttributeError(name)
def _swig_repr(self): def _swig_repr(self):
try: strthis = "proxy of " + self.this.__repr__() try: strthis = "proxy of " + self.this.__repr__()
...@@ -47,23 +70,23 @@ class ESLevent: ...@@ -47,23 +70,23 @@ class ESLevent:
__swig_setmethods__["mine"] = _ESL.ESLevent_mine_set __swig_setmethods__["mine"] = _ESL.ESLevent_mine_set
__swig_getmethods__["mine"] = _ESL.ESLevent_mine_get __swig_getmethods__["mine"] = _ESL.ESLevent_mine_get
def __init__(self, *args): def __init__(self, *args):
this = apply(_ESL.new_ESLevent, args) this = _ESL.new_ESLevent(*args)
try: self.this.append(this) try: self.this.append(this)
except: self.this = this except: self.this = this
__swig_destroy__ = _ESL.delete_ESLevent __swig_destroy__ = _ESL.delete_ESLevent
__del__ = lambda self : None; __del__ = lambda self : None;
def serialize(*args): return apply(_ESL.ESLevent_serialize, args) def serialize(self, format=None): return _ESL.ESLevent_serialize(self, format)
def setPriority(*args): return apply(_ESL.ESLevent_setPriority, args) def setPriority(self, *args): return _ESL.ESLevent_setPriority(self, *args)
def getHeader(*args): return apply(_ESL.ESLevent_getHeader, args) def getHeader(self, *args): return _ESL.ESLevent_getHeader(self, *args)
def getBody(*args): return apply(_ESL.ESLevent_getBody, args) def getBody(self): return _ESL.ESLevent_getBody(self)
def getType(*args): return apply(_ESL.ESLevent_getType, args) def getType(self): return _ESL.ESLevent_getType(self)
def addBody(*args): return apply(_ESL.ESLevent_addBody, args) def addBody(self, *args): return _ESL.ESLevent_addBody(self, *args)
def addHeader(*args): return apply(_ESL.ESLevent_addHeader, args) def addHeader(self, *args): return _ESL.ESLevent_addHeader(self, *args)
def pushHeader(*args): return apply(_ESL.ESLevent_pushHeader, args) def pushHeader(self, *args): return _ESL.ESLevent_pushHeader(self, *args)
def unshiftHeader(*args): return apply(_ESL.ESLevent_unshiftHeader, args) def unshiftHeader(self, *args): return _ESL.ESLevent_unshiftHeader(self, *args)
def delHeader(*args): return apply(_ESL.ESLevent_delHeader, args) def delHeader(self, *args): return _ESL.ESLevent_delHeader(self, *args)
def firstHeader(*args): return apply(_ESL.ESLevent_firstHeader, args) def firstHeader(self): return _ESL.ESLevent_firstHeader(self)
def nextHeader(*args): return apply(_ESL.ESLevent_nextHeader, args) def nextHeader(self): return _ESL.ESLevent_nextHeader(self)
ESLevent_swigregister = _ESL.ESLevent_swigregister ESLevent_swigregister = _ESL.ESLevent_swigregister
ESLevent_swigregister(ESLevent) ESLevent_swigregister(ESLevent)
...@@ -74,32 +97,36 @@ class ESLconnection: ...@@ -74,32 +97,36 @@ class ESLconnection:
__getattr__ = lambda self, name: _swig_getattr(self, ESLconnection, name) __getattr__ = lambda self, name: _swig_getattr(self, ESLconnection, name)
__repr__ = _swig_repr __repr__ = _swig_repr
def __init__(self, *args): def __init__(self, *args):
this = apply(_ESL.new_ESLconnection, args) this = _ESL.new_ESLconnection(*args)
try: self.this.append(this) try: self.this.append(this)
except: self.this = this except: self.this = this
__swig_destroy__ = _ESL.delete_ESLconnection __swig_destroy__ = _ESL.delete_ESLconnection
__del__ = lambda self : None; __del__ = lambda self : None;
def socketDescriptor(*args): return apply(_ESL.ESLconnection_socketDescriptor, args) def socketDescriptor(self): return _ESL.ESLconnection_socketDescriptor(self)
def connected(*args): return apply(_ESL.ESLconnection_connected, args) def connected(self): return _ESL.ESLconnection_connected(self)
def getInfo(*args): return apply(_ESL.ESLconnection_getInfo, args) def getInfo(self): return _ESL.ESLconnection_getInfo(self)
def send(*args): return apply(_ESL.ESLconnection_send, args) def send(self, *args): return _ESL.ESLconnection_send(self, *args)
def sendRecv(*args): return apply(_ESL.ESLconnection_sendRecv, args) def sendRecv(self, *args): return _ESL.ESLconnection_sendRecv(self, *args)
def api(*args): return apply(_ESL.ESLconnection_api, args) def api(self, *args): return _ESL.ESLconnection_api(self, *args)
def bgapi(*args): return apply(_ESL.ESLconnection_bgapi, args) def bgapi(self, *args): return _ESL.ESLconnection_bgapi(self, *args)
def sendEvent(*args): return apply(_ESL.ESLconnection_sendEvent, args) def sendEvent(self, *args): return _ESL.ESLconnection_sendEvent(self, *args)
def sendMSG(*args): return apply(_ESL.ESLconnection_sendMSG, args) def sendMSG(self, *args): return _ESL.ESLconnection_sendMSG(self, *args)
def recvEvent(*args): return apply(_ESL.ESLconnection_recvEvent, args) def recvEvent(self): return _ESL.ESLconnection_recvEvent(self)
def recvEventTimed(*args): return apply(_ESL.ESLconnection_recvEventTimed, args) def recvEventTimed(self, *args): return _ESL.ESLconnection_recvEventTimed(self, *args)
def filter(*args): return apply(_ESL.ESLconnection_filter, args) def filter(self, *args): return _ESL.ESLconnection_filter(self, *args)
def events(*args): return apply(_ESL.ESLconnection_events, args) def events(self, *args): return _ESL.ESLconnection_events(self, *args)
def execute(*args): return apply(_ESL.ESLconnection_execute, args) def execute(self, *args): return _ESL.ESLconnection_execute(self, *args)
def executeAsync(*args): return apply(_ESL.ESLconnection_executeAsync, args) def executeAsync(self, *args): return _ESL.ESLconnection_executeAsync(self, *args)
def setAsyncExecute(*args): return apply(_ESL.ESLconnection_setAsyncExecute, args) def setAsyncExecute(self, *args): return _ESL.ESLconnection_setAsyncExecute(self, *args)
def setEventLock(*args): return apply(_ESL.ESLconnection_setEventLock, args) def setEventLock(self, *args): return _ESL.ESLconnection_setEventLock(self, *args)
def disconnect(*args): return apply(_ESL.ESLconnection_disconnect, args) def disconnect(self): return _ESL.ESLconnection_disconnect(self)
ESLconnection_swigregister = _ESL.ESLconnection_swigregister ESLconnection_swigregister = _ESL.ESLconnection_swigregister
ESLconnection_swigregister(ESLconnection) ESLconnection_swigregister(ESLconnection)
def eslSetLogLevel(*args):
return _ESL.eslSetLogLevel(*args)
eslSetLogLevel = _ESL.eslSetLogLevel eslSetLogLevel = _ESL.eslSetLogLevel
# This file is compatible with both classic and new-style classes.
...@@ -5,7 +5,7 @@ SITE_DIR=$(DESTDIR)/`python -c "from distutils.sysconfig import get_python_lib; ...@@ -5,7 +5,7 @@ SITE_DIR=$(DESTDIR)/`python -c "from distutils.sysconfig import get_python_lib;
all: _ESL.so all: _ESL.so
esl_wrap.cpp: 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 esl_wrap.o: esl_wrap.cpp
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o $(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(LOCAL_CFLAGS) -c esl_wrap.cpp -o esl_wrap.o
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.7 * Version 2.0.12
* *
* This file is not intended to be easily readable and contains a number of * 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 * coding conventions designed to improve portability and efficiency. Do not make
...@@ -422,7 +422,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) { ...@@ -422,7 +422,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
} }
#else /* no cast-rank mode */ #else /* no cast-rank mode */
# define SWIG_AddCast # define SWIG_AddCast(r) (r)
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif #endif
...@@ -486,18 +486,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1, ...@@ -486,18 +486,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if not equal, 1 if equal Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) { SWIG_TypeCmp(const char *nb, const char *tb) {
int equiv = 0; int equiv = 1;
const char* te = tb + strlen(tb); const char* te = tb + strlen(tb);
const char* ne = nb; const char* ne = nb;
while (!equiv && *ne) { while (equiv != 0 && *ne) {
for (nb = ne; *ne; ++ne) { for (nb = ne; *ne; ++ne) {
if (*ne == '|') break; if (*ne == '|') break;
} }
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; equiv = SWIG_TypeNameComp(nb, ne, tb, te);
if (*ne) ++ne; if (*ne) ++ne;
} }
return equiv; return equiv;
...@@ -505,24 +505,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) { ...@@ -505,24 +505,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
/* /*
Check type equivalence in a name list like <name1>|<name2>|... Check type equivalence in a name list like <name1>|<name2>|...
Return 0 if equal, -1 if nb < tb, 1 if nb > tb Return 0 if not equal, 1 if equal
*/ */
SWIGRUNTIME int SWIGRUNTIME int
SWIG_TypeCompare(const char *nb, const char *tb) { SWIG_TypeEquiv(const char *nb, const char *tb) {
int equiv = 0; return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 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;
} }
/* /*
Check the typename Check the typename
*/ */
...@@ -1398,7 +1387,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { ...@@ -1398,7 +1387,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
/* Runtime API */ /* 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) #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) { ...@@ -1734,7 +1723,7 @@ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
} }
SWIGRUNTIME swig_module_info * SWIGRUNTIME swig_module_info *
SWIG_Ruby_GetModule(void) SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
{ {
VALUE pointer; VALUE pointer;
swig_module_info *ret = 0; swig_module_info *ret = 0;
...@@ -1774,7 +1763,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer) ...@@ -1774,7 +1763,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
SWIGINTERN SWIGINTERN
int SWIG_Ruby_isCallable( VALUE proc ) 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 1;
return 0; return 0;
} }
...@@ -1787,7 +1776,7 @@ int SWIG_Ruby_isCallable( VALUE proc ) ...@@ -1787,7 +1776,7 @@ int SWIG_Ruby_isCallable( VALUE proc )
SWIGINTERN SWIGINTERN
int SWIG_Ruby_arity( VALUE proc, int minimal ) 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 ); VALUE num = rb_funcall( proc, swig_arity_id, 0 );
int arity = NUM2INT(num); int arity = NUM2INT(num);
...@@ -1834,7 +1823,7 @@ static VALUE mESL; ...@@ -1834,7 +1823,7 @@ static VALUE mESL;
#define SWIG_RUBY_THREAD_END_BLOCK #define SWIG_RUBY_THREAD_END_BLOCK
#define SWIGVERSION 0x020007 #define SWIGVERSION 0x020012
#define SWIG_VERSION SWIGVERSION #define SWIG_VERSION SWIGVERSION
...@@ -1866,11 +1855,7 @@ SWIGINTERN int ...@@ -1866,11 +1855,7 @@ SWIGINTERN int
SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
{ {
if (TYPE(obj) == T_STRING) { if (TYPE(obj) == T_STRING) {
#if defined(StringValuePtr)
char *cstr = StringValuePtr(obj); char *cstr = StringValuePtr(obj);
#else
char *cstr = STR2CSTR(obj);
#endif
size_t size = RSTRING_LEN(obj) + 1; size_t size = RSTRING_LEN(obj) + 1;
if (cptr) { if (cptr) {
if (alloc) { if (alloc) {
...@@ -3951,8 +3936,6 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -3951,8 +3936,6 @@ SWIG_InitializeModule(void *clientdata) {
swig_module_info *module_head, *iter; swig_module_info *module_head, *iter;
int found, init; int found, init;
clientdata = clientdata;
/* check to see if the circular list has been setup, if not, set it up */ /* check to see if the circular list has been setup, if not, set it up */
if (swig_module.next==0) { if (swig_module.next==0) {
/* Initialize the swig_module */ /* Initialize the swig_module */
...@@ -3990,7 +3973,7 @@ SWIG_InitializeModule(void *clientdata) { ...@@ -3990,7 +3973,7 @@ SWIG_InitializeModule(void *clientdata) {
module_head->next = &swig_module; 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. 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 In this case, we do not want to continue adding types... everything should be
set up already */ set up already */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论