mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-21 02:34:16 +00:00
update languages to use swig2.0 and reswig
This commit is contained in:
1 parent
54762dd197
commit
4e88d9eea1
7 files changed
+133
-45
No files matched your search
@@ -23,7 +23,7 @@ swigclean: clean
|
||||
rm -f mod_perl_wrap.* freeswitch.so freeswitch.pm
|
||||
|
||||
mod_perl_wrap.cpp:
|
||||
swig -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
|
||||
swig2.0 -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
|
||||
echo "#include \"mod_perl_extra.c\"" >> mod_perl_wrap.cpp
|
||||
patch -s -p0 -i hack.diff
|
||||
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
--- mod_perl_wrap.cpp.old 2015-06-16 11:43:04.120000000 -0500
|
||||
+++ mod_perl_wrap.cpp 2015-06-16 11:43:54.704000000 -0500
|
||||
@@ -8710,13 +8711,18 @@
|
||||
{
|
||||
int argvi = 0;
|
||||
PERL::Session *result = 0 ;
|
||||
+ SV *foo;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 0) || (items > 0)) {
|
||||
SWIG_croak("Usage: new_Session();");
|
||||
}
|
||||
result = (PERL::Session *)new PERL::Session();
|
||||
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
||||
+ result->setPERL(my_perl);
|
||||
+ foo = sv_newmortal();
|
||||
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
||||
+ result->setME(foo);
|
||||
+ ST(argvi) = foo; argvi++ ;
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
SWIG_croak_null();
|
||||
@@ -8735,6 +8741,7 @@
|
||||
int res2 = 0 ;
|
||||
int argvi = 0;
|
||||
PERL::Session *result = 0 ;
|
||||
+ SV *foo;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 2) || (items > 2)) {
|
||||
@@ -8751,7 +8758,16 @@
|
||||
}
|
||||
arg2 = reinterpret_cast< CoreSession * >(argp2);
|
||||
result = (PERL::Session *)new PERL::Session(arg1,arg2);
|
||||
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
||||
+ if (result->allocated) {
|
||||
+ result->setPERL(my_perl);
|
||||
+ foo = get_sv(result->suuid, TRUE);
|
||||
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
||||
+ result->setME(foo);
|
||||
+ } else {
|
||||
+ foo = sv_newmortal();
|
||||
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
||||
+ }
|
||||
+ ST(argvi) = foo; argvi++ ;
|
||||
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
||||
|
||||
XSRETURN(argvi);
|
||||
@@ -8771,6 +8787,7 @@
|
||||
int alloc1 = 0 ;
|
||||
int argvi = 0;
|
||||
PERL::Session *result = 0 ;
|
||||
+ SV *foo;
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
@@ -8781,8 +8798,18 @@
|
||||
SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "char *""'");
|
||||
}
|
||||
arg1 = reinterpret_cast< char * >(buf1);
|
||||
- result = (PERL::Session *)new PERL::Session(arg1);
|
||||
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
||||
+ result = (PERL::Session *)new PERL::Session(arg1);
|
||||
+ if (result->allocated) {
|
||||
+ result->setPERL(my_perl);
|
||||
+ foo = get_sv(result->suuid, TRUE);
|
||||
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
||||
+ result->setME(foo);
|
||||
+ } else {
|
||||
+ foo = sv_newmortal();
|
||||
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
||||
+ }
|
||||
+ ST(argvi) = foo; argvi++ ;
|
||||
+
|
||||
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
@@ -8799,6 +8826,8 @@
|
||||
int res1 = 0 ;
|
||||
int argvi = 0;
|
||||
PERL::Session *result = 0 ;
|
||||
+ SV *foo;
|
||||
+
|
||||
dXSARGS;
|
||||
|
||||
if ((items < 1) || (items > 1)) {
|
||||
@@ -8810,7 +8839,18 @@
|
||||
}
|
||||
arg1 = reinterpret_cast< switch_core_session_t * >(argp1);
|
||||
result = (PERL::Session *)new PERL::Session(arg1);
|
||||
- ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
|
||||
+ if (result->allocated) {
|
||||
+ result->setPERL(my_perl);
|
||||
+ foo = get_sv(result->suuid, TRUE);
|
||||
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
||||
+ result->setME(foo);
|
||||
+ } else {
|
||||
+ foo = sv_newmortal();
|
||||
+ SWIG_MakePtr(foo, SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW);
|
||||
+ }
|
||||
+
|
||||
+ ST(argvi) = foo; argvi++ ;
|
||||
+
|
||||
|
||||
XSRETURN(argvi);
|
||||
fail:
|
||||
@@ -1,5 +1,5 @@
|
||||
--- mod_perl_wrap.cpp.old 2015-06-16 12:01:31.832000000 -0500
|
||||
+++ mod_perl_wrap.cpp 2015-06-16 12:01:38.996000000 -0500
|
||||
--- mod_perl_wrap.cpp.old 2015-06-16 12:37:32.612000000 -0500
|
||||
+++ mod_perl_wrap.cpp 2015-06-16 12:37:40.328000000 -0500
|
||||
@@ -8710,13 +8710,18 @@
|
||||
{
|
||||
int argvi = 0;
|
||||
|
||||
Reference in new issue
Block a user