From a02f4e93b92e7ebb7ef038ad151e51652b0ce84d Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Tue, 18 Apr 2017 15:20:37 +0200 Subject: No more Table, just TValue with table type and Map value --- src/lstrlib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lstrlib.js') diff --git a/src/lstrlib.js b/src/lstrlib.js index c2ee817..f8158a8 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -81,7 +81,7 @@ const str_dump = function(L) { lauxlib.luaL_checktype(L, 1, CT.LUA_TFUNCTION); lapi.lua_settop(L, 1); if (lapi.lua_dump(L, writer, b, strip) !== 0) - return lauxlib.luaL_error(L, "unable to dump given function"); + return lauxlib.luaL_error(L, lua.to_luastring("unable to dump given function")); lapi.lua_pushstring(L, b); return 1; }; @@ -1392,7 +1392,7 @@ const createmetatable = function(L) { lapi.lua_setmetatable(L, -2); /* set table as metatable for strings */ lapi.lua_pop(L, 1); /* pop dummy string */ lapi.lua_pushvalue(L, -2); /* get string library */ - lapi.lua_setfield(L, -2, lua.to_luastring("__index", true)); /* metatable.__index = string */ + lapi.lua_setfield(L, -2, lua.to_luastring("__index", true)); /* lobject.table_index = string */ lapi.lua_pop(L, 1); /* pop metatable */ }; -- cgit v1.2.3-54-g00ecf