diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-04-12 17:31:15 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-04-12 17:31:15 -0300 |
commit | 18330b6091696f2900d89e8ddef6fb548a3ac84d (patch) | |
tree | 69c6b775e656bb6f46b9cda81b912decbb2e8c76 /bugs | |
parent | 84879136970b76e5d1782f3b4664c7c8f9076821 (diff) | |
download | lua-18330b6091696f2900d89e8ddef6fb548a3ac84d.tar.gz lua-18330b6091696f2900d89e8ddef6fb548a3ac84d.tar.bz2 lua-18330b6091696f2900d89e8ddef6fb548a3ac84d.zip |
lua_dostring/lua_dofile should return any values returned by the chunk
Diffstat (limited to 'bugs')
-rw-r--r-- | bugs | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -923,3 +923,26 @@ patch = [[ | |||
923 | ]], | 923 | ]], |
924 | 924 | ||
925 | } | 925 | } |
926 | |||
927 | |||
928 | @Bug{ | ||
929 | what = [[lua_dostring/lua_dofile should return any values returned | ||
930 | by the chunk]], | ||
931 | |||
932 | patch = [[ | ||
933 | * lauxlib.h: | ||
934 | @@ -108,9 +108,11 @@ | ||
935 | |||
936 | #define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) | ||
937 | |||
938 | -#define luaL_dofile(L, fn) (luaL_loadfile(L, fn) || lua_pcall(L, 0, 0, 0)) | ||
939 | +#define luaL_dofile(L, fn) \ | ||
940 | + (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) | ||
941 | |||
942 | -#define luaL_dostring(L, s) (luaL_loadstring(L, s) || lua_pcall(L, 0, 0, 0))+#define luaL_dostring(L, s) \ | ||
943 | + (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) | ||
944 | |||
945 | #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) | ||
946 | ]], | ||
947 | |||
948 | } | ||