提交 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/*
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
......
/* ----------------------------------------------------------------------------
* 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
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -8,20 +8,25 @@
* interface file instead.
* ----------------------------------------------------------------------------- */
#define SWIGJAVA
#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
T *tt;
public:
SwigValueWrapper() : tt(0) { }
SwigValueWrapper(const SwigValueWrapper<T>& 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:
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<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() {
......@@ -71,6 +76,12 @@ template <typename T> T SwigValueInit() {
# 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)
......@@ -134,7 +145,7 @@ template <typename T> 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;
}
......
/* ----------------------------------------------------------------------------
* 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,12 +26,14 @@ public class ESLconnection {
}
public synchronized void delete() {
if(swigCPtr != 0 && swigCMemOwn) {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
eslJNI.delete_ESLconnection(swigCPtr);
}
swigCPtr = 0;
}
}
public ESLconnection(String host, int port, String user, String password) {
this(eslJNI.new_ESLconnection__SWIG_0(host, port, user, password), true);
......
/* ----------------------------------------------------------------------------
* 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,12 +26,14 @@ public class ESLevent {
}
public synchronized void delete() {
if(swigCPtr != 0 && swigCMemOwn) {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
eslJNI.delete_ESLevent(swigCPtr);
}
swigCPtr = 0;
}
}
public void setEvent(SWIGTYPE_p_esl_event_t 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).
* 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.
......
/* ----------------------------------------------------------------------------
* 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.
......
/* ----------------------------------------------------------------------------
* 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.
......
/* ----------------------------------------------------------------------------
* 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);
......
差异被折叠。
/* ----------------------------------------------------------------------------
* 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.
......
/* ----------------------------------------------------------------------------
* 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);
......
/* ----------------------------------------------------------------------------
* 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) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
ESLPINVOKE.delete_ESLconnection(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
......
/* ----------------------------------------------------------------------------
* 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) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
ESLPINVOKE.delete_ESLevent(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
......
......@@ -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
......
/* ----------------------------------------------------------------------------
* 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.
......
/* ----------------------------------------------------------------------------
* 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.
......
差异被折叠。
/* ----------------------------------------------------------------------------
* 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
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -8,20 +8,25 @@
* interface file instead.
* ----------------------------------------------------------------------------- */
#define SWIGCSHARP
#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
T *tt;
public:
SwigValueWrapper() : tt(0) { }
SwigValueWrapper(const SwigValueWrapper<T>& 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:
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<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() {
......@@ -71,6 +76,12 @@ template <typename T> T SwigValueInit() {
# 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)
......@@ -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;
}
......
# 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 -------------
......
......@@ -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
......
差异被折叠。
#include <EXTERN.h>
#include <perl.h>
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
EXTERN_C void xs_init (pTHX);
......@@ -8,8 +9,9 @@ EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
EXTERN_C void
xs_init(pTHX)
{
char *file = __FILE__;
static const char file[] = __FILE__;
dXSUB_SYS;
PERL_UNUSED_CONTEXT;
/* DynaLoader is a special case */
newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
......
......@@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
* 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
* coding conventions designed to improve portability and efficiency. Do not make
......
/* ----------------------------------------------------------------------------
* 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
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -315,7 +315,7 @@ 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
......@@ -379,18 +379,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/*
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
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 <name1>|<name2>|...
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
*/
......@@ -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();
}
......@@ -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 */
......
/* ----------------------------------------------------------------------------
* 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
* coding conventions designed to improve portability and efficiency. Do not make
......
# 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.
......@@ -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
......
/* ----------------------------------------------------------------------------
* 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
* coding conventions designed to improve portability and efficiency. Do not make
......@@ -422,7 +422,7 @@ 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
......@@ -486,18 +486,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
/*
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
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 <name1>|<name2>|...
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
*/
......@@ -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) {
......@@ -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 */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论