Commit 6eefb098 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia
Browse files

[OPENBUS-2184] Adaptação do código para ser compatível também com Lua 5.2



git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/core/branches/02_00_00@147132 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 4f6123b4
......@@ -28,6 +28,10 @@
#define LPW_LIBNAME "lpw"
#if (LUA_VERSION_NUM < 502)
#define luaL_newlib(L,f) luaL_register(L,"lpw",f)
#endif
const char const* OPENBUS_MAIN = "openbus.core.admin.main";
const char const* OPENBUS_PROGNAME = TECMAKE_APPNAME;
......@@ -52,7 +56,7 @@ static const luaL_Reg lpw_funcs[] = {
static int luaopen_lpw(lua_State *L)
{
luaL_register(L, LPW_LIBNAME, lpw_funcs);
luaL_newlib(L, lpw_funcs);
return 1;
}
......
......@@ -34,7 +34,7 @@ LUASRC= \
include ${OIL_HOME}/openbus/base.mak
LIBS:= lce luuid lfs luavararg luastruct luasocket loop luatuple \
luacoroutine luacothread luainspector luaidl oil luascs luaopenbus lua5.1
luacoroutine luacothread luainspector luaidl oil luascs luaopenbus
DEFINES= \
TECMAKE_APPNAME=\"$(APPNAME)\"
......
......@@ -42,7 +42,7 @@ end
local function execute(...)
local command = bin..login..password
local params = table.concat(arg, " ")
local params = table.concat({...}, " ")
local tofile = " > "..outputfile
os.execute(command..params..tofile)
local output = readOutput()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment