From 18330b6091696f2900d89e8ddef6fb548a3ac84d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 12 Apr 2006 17:31:15 -0300 Subject: lua_dostring/lua_dofile should return any values returned by the chunk --- bugs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'bugs') diff --git a/bugs b/bugs index 5f8feb1b..a65f5474 100644 --- a/bugs +++ b/bugs @@ -923,3 +923,26 @@ patch = [[ ]], } + + +@Bug{ +what = [[lua_dostring/lua_dofile should return any values returned +by the chunk]], + +patch = [[ +* lauxlib.h: +@@ -108,9 +108,11 @@ + + #define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) + +-#define luaL_dofile(L, fn) (luaL_loadfile(L, fn) || lua_pcall(L, 0, 0, 0)) ++#define luaL_dofile(L, fn) \ ++ (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) + +-#define luaL_dostring(L, s) (luaL_loadstring(L, s) || lua_pcall(L, 0, 0, 0))+#define luaL_dostring(L, s) \ ++ (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) + + #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) +]], + +} -- cgit v1.2.3-55-g6feb