Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
4e88d9ee
提交
4e88d9ee
authored
6月 16, 2015
作者:
Brian West
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update languages to use swig2.0 and reswig
上级
54762dd1
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
133 行增加
和
45 行删除
+133
-45
Makefile.am
src/mod/languages/mod_java/Makefile.am
+1
-1
Makefile.am
src/mod/languages/mod_lua/Makefile.am
+1
-1
hack.diff
src/mod/languages/mod_lua/hack.diff
+17
-35
mod_lua_wrap.cpp
src/mod/languages/mod_lua/mod_lua_wrap.cpp
+5
-5
Makefile.am
src/mod/languages/mod_perl/Makefile.am
+1
-1
foo.diff
src/mod/languages/mod_perl/foo.diff
+106
-0
hack.diff
src/mod/languages/mod_perl/hack.diff
+2
-2
没有找到文件。
src/mod/languages/mod_java/Makefile.am
浏览文件 @
4e88d9ee
...
...
@@ -29,7 +29,7 @@ classes:
reswig
:
rm
-f
switch_swig_wrap.cpp
swig
-java
-c
++
-I
../../../include
-package
org.freeswitch.swig
-outdir
src/org/freeswitch/swig
-o
switch_swig_wrap.cpp mod_java.i
swig
2.0
-java
-c
++
-I
../../../include
-package
org.freeswitch.swig
-outdir
src/org/freeswitch/swig
-o
switch_swig_wrap.cpp mod_java.i
install-data-local
:
cp
freeswitch.jar
$(DESTDIR)
@scriptdir@
...
...
src/mod/languages/mod_lua/Makefile.am
浏览文件 @
4e88d9ee
...
...
@@ -30,7 +30,7 @@ swigclean: clean
rm
-f
mod_lua_wrap.
*
lua_wrap
:
mod_lua_extra.c
swig
-lua
-c
++
-I
../../../../src/include
-oh
mod_lua_wrap.h
-o
mod_lua_wrap.cpp freeswitch.i
swig
2.0
-lua
-c
++
-I
../../../../src/include
-oh
mod_lua_wrap.h
-o
mod_lua_wrap.cpp freeswitch.i
echo
"#include
\"
mod_lua_extra.c
\"
"
>>
mod_lua_wrap.cpp
patch
-s
-p0
-i
hack.diff
src/mod/languages/mod_lua/hack.diff
浏览文件 @
4e88d9ee
--- mod_lua_wrap.cpp.orig 2014-09-06 19:25:05.000000000 +0800
+++ mod_lua_wrap.cpp 2014-09-06 19:27:17.000000000 +0800
@@ -2799,7 +2799,7 @@
--- mod_lua_wrap.cpp.old 2015-06-16 12:27:19.024000000 -0500
+++ mod_lua_wrap.cpp 2015-06-16 12:34:51.540000000 -0500
@@ -3065,7 +3065,7 @@
}
result = (char *)(arg1)->read(arg2);
SWIG_arg=0;
- lua_pushstring(L,(const char*)result); SWIG_arg++;
- lua_pushstring(L,(const char *)result); SWIG_arg++;
+ lua_pushlstring(L,(const char*)result, (*arg2)); SWIG_arg++;
lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
return SWIG_arg;
@@ -6750,7 +6750,7 @@
SWIG_check_num_args("LUA::Session",0,0)
@@ -6855,7 +6855,7 @@
SWIG_check_num_args("LUA::Session::Session",0,0)
result = (LUA::Session *)new LUA::Session();
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -6778,7 +6778,7 @@
@@ -6882,7 +6882,7 @@
}
result = (LUA::Session *)new LUA::Session(arg1,arg2);
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -6799,7 +6799,7 @@
@@ -6902,7 +6902,7 @@
if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("LUA::Session::Session",1,"char *");
arg1 = (char *)lua_tostring(L, 1);
result = (LUA::Session *)new LUA::Session(arg1);
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -6824,7 +6824,7 @@
@@ -6926,7 +6926,7 @@
}
result = (LUA::Session *)new LUA::Session(arg1);
SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
result->setLUA(L);
return SWIG_arg;
if(0) SWIG_fail;
@@ -8236,7 +8236,7 @@
}
#endif
-static const struct luaL_reg swig_commands[] = {
+static const struct luaL_Reg swig_commands[] = {
{ "setGlobalVariable", _wrap_setGlobalVariable},
{ "getGlobalVariable", _wrap_getGlobalVariable},
{ "consoleLog", _wrap_consoleLog},
@@ -8654,7 +8654,7 @@
{
int i;
/* start with global table */
- lua_pushvalue(L,LUA_GLOBALSINDEX);
+ lua_pushglobaltable(L);
/* SWIG's internal initalisation */
SWIG_InitializeModule((void*)L);
SWIG_PropagateClientData();
src/mod/languages/mod_lua/mod_lua_wrap.cpp
浏览文件 @
4e88d9ee
...
...
@@ -3065,7 +3065,7 @@ static int _wrap_Stream_read(lua_State* L) {
}
result
=
(
char
*
)(
arg1
)
->
read
(
arg2
);
lua_push
string
(
L
,(
const
char
*
)
result
);
SWIG_arg
++
;
lua_push
lstring
(
L
,(
const
char
*
)
result
,
(
*
arg2
)
);
SWIG_arg
++
;
lua_pushnumber
(
L
,
(
lua_Number
)
*
arg2
);
SWIG_arg
++
;
return
SWIG_arg
;
...
...
@@ -6855,7 +6855,7 @@ static int _wrap_new_Session__SWIG_0(lua_State* L) {
SWIG_check_num_args
(
"LUA::Session::Session"
,
0
,
0
)
result
=
(
LUA
::
Session
*
)
new
LUA
::
Session
();
SWIG_NewPointerObj
(
L
,
result
,
SWIGTYPE_p_LUA__Session
,
1
);
SWIG_arg
++
;
SWIG_NewPointerObj
(
L
,
result
,
SWIGTYPE_p_LUA__Session
,
1
);
SWIG_arg
++
;
result
->
setLUA
(
L
);
return
SWIG_arg
;
if
(
0
)
SWIG_fail
;
...
...
@@ -6882,7 +6882,7 @@ static int _wrap_new_Session__SWIG_1(lua_State* L) {
}
result
=
(
LUA
::
Session
*
)
new
LUA
::
Session
(
arg1
,
arg2
);
SWIG_NewPointerObj
(
L
,
result
,
SWIGTYPE_p_LUA__Session
,
1
);
SWIG_arg
++
;
SWIG_NewPointerObj
(
L
,
result
,
SWIGTYPE_p_LUA__Session
,
1
);
SWIG_arg
++
;
result
->
setLUA
(
L
);
return
SWIG_arg
;
if
(
0
)
SWIG_fail
;
...
...
@@ -6902,7 +6902,7 @@ static int _wrap_new_Session__SWIG_2(lua_State* L) {
if
(
!
SWIG_lua_isnilstring
(
L
,
1
))
SWIG_fail_arg
(
"LUA::Session::Session"
,
1
,
"char *"
);
arg1
=
(
char
*
)
lua_tostring
(
L
,
1
);
result
=
(
LUA
::
Session
*
)
new
LUA
::
Session
(
arg1
);
SWIG_NewPointerObj
(
L
,
result
,
SWIGTYPE_p_LUA__Session
,
1
);
SWIG_arg
++
;
SWIG_NewPointerObj
(
L
,
result
,
SWIGTYPE_p_LUA__Session
,
1
);
SWIG_arg
++
;
result
->
setLUA
(
L
);
return
SWIG_arg
;
if
(
0
)
SWIG_fail
;
...
...
@@ -6926,7 +6926,7 @@ static int _wrap_new_Session__SWIG_3(lua_State* L) {
}
result
=
(
LUA
::
Session
*
)
new
LUA
::
Session
(
arg1
);
SWIG_NewPointerObj
(
L
,
result
,
SWIGTYPE_p_LUA__Session
,
1
);
SWIG_arg
++
;
SWIG_NewPointerObj
(
L
,
result
,
SWIGTYPE_p_LUA__Session
,
1
);
SWIG_arg
++
;
result
->
setLUA
(
L
);
return
SWIG_arg
;
if
(
0
)
SWIG_fail
;
...
...
src/mod/languages/mod_perl/Makefile.am
浏览文件 @
4e88d9ee
...
...
@@ -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
swig
2.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
...
...
src/mod/languages/mod_perl/foo.diff
0 → 100644
浏览文件 @
4e88d9ee
--- 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:
src/mod/languages/mod_perl/hack.diff
浏览文件 @
4e88d9ee
--- mod_perl_wrap.cpp.old 2015-06-16 12:
01:31.83
2000000 -0500
+++ mod_perl_wrap.cpp 2015-06-16 12:
01:38.996
000000 -0500
--- mod_perl_wrap.cpp.old 2015-06-16 12:
37:32.61
2000000 -0500
+++ mod_perl_wrap.cpp 2015-06-16 12:
37:40.328
000000 -0500
@@ -8710,13 +8710,18 @@
{
int argvi = 0;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论