]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
reswig
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 9 Jan 2014 20:28:58 +0000 (01:28 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 9 Jan 2014 20:28:58 +0000 (01:28 +0500)
src/mod/legacy/languages/mod_lua/Makefile.am
src/mod/legacy/languages/mod_lua/Makefile.in
src/mod/legacy/languages/mod_lua/freeswitch.i
src/mod/legacy/languages/mod_lua/mod_lua_wrap.cpp

index 805b52cb692cfb459b63f10bbf33693974a5e62b..30865e5610bd8cd80ae140845a6bf3de481fe9a3 100644 (file)
@@ -29,7 +29,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 -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
 
index 75788cdee7a68cf6211ba1adc5f002a98ea3032f..3173ef08de6bdbf90a72ed1e038be30013e62f96 100644 (file)
@@ -746,7 +746,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 -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
 
index 6fca2260016ac6ac4a6bde70c03fd6e1d9abd61a..0a2246f161a01e2a1d11dfd84cbce258ca2271d5 100644 (file)
@@ -1,5 +1,5 @@
 %module freeswitch
-%include ../../../../swig_common.i
+%include ../../../../../swig_common.i
 //%include "cstring.i"
 
 /** 
index 5335321b82a44c1af286bc2de7dcf04b5bc48e31..b2877983a9692db6e80c59fbfa8fbe67ab7d76dd 100644 (file)
@@ -1877,10 +1877,17 @@ static swig_lua_class _wrap_class_IVRMenu = { "IVRMenu", &SWIGTYPE_p_IVRMenu,_wr
 
 static int _wrap_new_API(lua_State* L) {
   int SWIG_arg = -1;
+  CoreSession *arg1 = (CoreSession *) NULL ;
   API *result = 0 ;
   
-  SWIG_check_num_args("API",0,0)
-  result = (API *)new API();
+  SWIG_check_num_args("API",0,1)
+  if(lua_gettop(L)>=1 && !SWIG_isptrtype(L,1)) SWIG_fail_arg("API",1,"CoreSession *");
+  if(lua_gettop(L)>=1){
+    if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){
+      SWIG_fail_ptr("new_API",1,SWIGTYPE_p_CoreSession);
+    }
+  }
+  result = (API *)new API(arg1);
   SWIG_arg=0;
   SWIG_NewPointerObj(L,result,SWIGTYPE_p_API,1); SWIG_arg++; 
   return SWIG_arg;