提交 0bc3e848 authored 作者: Anthony Minessale's avatar Anthony Minessale

add namespace

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8356 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 89dc2f83
#include <switch.h> #include <switch.h>
#include "freeswitch_lua.h" #include "freeswitch_lua.h"
using namespace LUA;
Session::Session() : CoreSession() Session::Session() : CoreSession()
{ {
......
...@@ -10,6 +10,7 @@ extern "C" { ...@@ -10,6 +10,7 @@ extern "C" {
#include <switch_cpp.h> #include <switch_cpp.h>
namespace LUA {
class Session : public CoreSession { class Session : public CoreSession {
private: private:
virtual void do_hangup_hook(); virtual void do_hangup_hook();
...@@ -38,5 +39,5 @@ class Session : public CoreSession { ...@@ -38,5 +39,5 @@ class Session : public CoreSession {
char *hangup_func_arg; char *hangup_func_arg;
void setLUA(lua_State *state); void setLUA(lua_State *state);
}; };
}
#endif #endif
--- hack.cpp 2008-04-29 13:49:22.000000000 -0400 --- mod_lua_wrap.cpp 2008-05-11 20:03:58.000000000 -0400
+++ mod_lua_wrap.cpp 2008-04-29 13:49:10.000000000 -0400 +++ mod_lua_wrap2.cpp 2008-05-11 20:05:08.000000000 -0400
@@ -4028,7 +4028,7 @@ @@ -5158,7 +5158,7 @@
SWIG_check_num_args("Session",0,0) SWIG_check_num_args("LUA::Session",0,0)
result = (Session *)new Session(); result = (LUA::Session *)new LUA::Session();
SWIG_arg=0; SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg; return SWIG_arg;
if(0) SWIG_fail; if(0) SWIG_fail;
@@ -4049,7 +4049,7 @@ @@ -5179,7 +5179,7 @@
arg1 = (char *)lua_tostring(L, 1); arg1 = (char *)lua_tostring(L, 1);
result = (Session *)new Session(arg1); result = (LUA::Session *)new LUA::Session(arg1);
SWIG_arg=0; SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg; return SWIG_arg;
if(0) SWIG_fail; if(0) SWIG_fail;
@@ -4074,7 +4074,7 @@ @@ -5204,7 +5204,7 @@
result = (Session *)new Session(arg1); result = (LUA::Session *)new LUA::Session(arg1);
SWIG_arg=0; SWIG_arg=0;
- SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; - SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++;
+ SWIG_NewPointerObj(L,result,SWIGTYPE_p_Session,1); SWIG_arg++; result->setLUA(L); + SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
return SWIG_arg; return SWIG_arg;
if(0) SWIG_fail; if(0) SWIG_fail;
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
* *
*/ */
#include <switch.h> #include <switch.h>
SWITCH_BEGIN_EXTERN_C SWITCH_BEGIN_EXTERN_C
#include "lua.h" #include "lua.h"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论