提交 de516ce2 authored 作者: Anthony Minessale's avatar Anthony Minessale

make lua work on mac

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8322 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 5b778435
......@@ -270,7 +270,7 @@
>
</File>
<File
RelativePath=".\mod_lua.c"
RelativePath=".\mod_lua.cpp"
>
</File>
<File
......
......@@ -30,11 +30,11 @@
*/
#include <switch.h>
SWITCH_BEGIN_EXTERN_C
#include "lua.h"
#include <lauxlib.h>
#include <lualib.h>
#include "mod_lua_extra.h"
SWITCH_MODULE_LOAD_FUNCTION(mod_lua_load);
SWITCH_MODULE_DEFINITION(mod_lua, mod_lua_load, NULL, NULL);
......@@ -140,7 +140,7 @@ static void lua_parse_and_execute(lua_State *L, char *input_code)
stream.write_function(&stream, "'%s'%s", argv[x], x == argc-1 ? "" : ", ");
}
stream.write_function(&stream, " };");
code = stream.data;
code = (char *)stream.data;
} else {
code = switch_mprintf("argv = {};");
}
......@@ -370,6 +370,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_lua_load)
return SWITCH_STATUS_SUCCESS;
}
SWITCH_END_EXTERN_C
/* For Emacs:
* Local Variables:
* mode:c
......
......@@ -270,7 +270,7 @@
>
</File>
<File
RelativePath=".\mod_lua.c"
RelativePath=".\mod_lua.cpp"
>
</File>
<File
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论