diff options
-rw-r--r-- | bugs | 23 | ||||
-rw-r--r-- | lauxlib.h | 8 |
2 files changed, 28 insertions, 3 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 | } | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.h,v 1.86 2005/10/21 13:47:42 roberto Exp roberto $ | 2 | ** $Id: lauxlib.h,v 1.87 2005/12/29 15:32:11 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -108,9 +108,11 @@ LUALIB_API const char *(luaL_findtable) (lua_State *L, int idx, | |||
108 | 108 | ||
109 | #define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) | 109 | #define luaL_typename(L,i) lua_typename(L, lua_type(L,(i))) |
110 | 110 | ||
111 | #define luaL_dofile(L, fn) (luaL_loadfile(L, fn) || lua_pcall(L, 0, 0, 0)) | 111 | #define luaL_dofile(L, fn) \ |
112 | (luaL_loadfile(L, fn) || lua_pcall(L, 0, LUA_MULTRET, 0)) | ||
112 | 113 | ||
113 | #define luaL_dostring(L, s) (luaL_loadstring(L, s) || lua_pcall(L, 0, 0, 0)) | 114 | #define luaL_dostring(L, s) \ |
115 | (luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0)) | ||
114 | 116 | ||
115 | #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) | 117 | #define luaL_getmetatable(L,n) (lua_getfield(L, LUA_REGISTRYINDEX, (n))) |
116 | 118 | ||