desktop/elinks/elinks-0.11.3-lua-5.patch
2010-08-07 21:18:52 +00:00

46 lines
1.8 KiB
Diff

diff -Naurp elinks-0.11.3-orig/configure.in elinks-0.11.3/configure.in
--- elinks-0.11.3-orig/configure.in 2007-05-13 11:51:34.000000000 +0200
+++ elinks-0.11.3/configure.in 2007-05-13 11:52:30.000000000 +0200
@@ -727,7 +727,7 @@ if test -z "$disable_lua"; then
for luadir in "$withval" "" /usr /usr/local; do
for suffix in "" 50 51; do
if test "$cf_result" = no; then
- LUA_LIBS="-llua$suffix -llualib$suffix -lm"
+ LUA_LIBS="`pkg-config --libs lua`"
if test ! -z "$luadir"; then
LUA_LIBS="-L$luadir/lib $LUA_LIBS"
diff -Naurp elinks-0.11.3-orig/src/scripting/lua/core.c elinks-0.11.3/src/scripting/lua/core.c
--- elinks-0.11.3-orig/src/scripting/lua/core.c 2007-05-13 11:51:34.000000000 +0200
+++ elinks-0.11.3/src/scripting/lua/core.c 2007-05-13 11:51:49.000000000 +0200
@@ -633,7 +633,7 @@ do_hooks_file(LS, unsigned char *prefix,
if (file_can_read(file)) {
int oldtop = lua_gettop(S);
- if (lua_dofile(S, file) != 0)
+ if (luaL_dofile(S, file) != 0)
sleep(3); /* Let some time to see error messages. */
lua_settop(S, oldtop);
}
@@ -755,7 +755,7 @@ handle_ret_eval(struct session *ses)
int oldtop = lua_gettop(L);
if (prepare_lua(ses) == 0) {
- lua_dostring(L, expr);
+ luaL_dostring(L, expr);
lua_settop(L, oldtop);
finish_lua();
}
diff -Naurp elinks-0.11.3-orig/src/scripting/lua/hooks.c elinks-0.11.3/src/scripting/lua/hooks.c
--- elinks-0.11.3-orig/src/scripting/lua/hooks.c 2007-05-13 11:51:34.000000000 +0200
+++ elinks-0.11.3/src/scripting/lua/hooks.c 2007-05-13 11:51:49.000000000 +0200
@@ -200,7 +200,7 @@ static enum evhook_status
script_hook_quit(va_list ap, void *data)
{
if (!prepare_lua(NULL)) {
- lua_dostring(lua_state, "if quit_hook then quit_hook() end");
+ luaL_dostring(lua_state, "if quit_hook then quit_hook() end");
finish_lua();
}