diff options
author | Benoit Giannangeli <giann008@gmail.com> | 2017-04-18 15:20:37 +0200 |
---|---|---|
committer | Benoit Giannangeli <giann008@gmail.com> | 2017-04-18 15:20:37 +0200 |
commit | a02f4e93b92e7ebb7ef038ad151e51652b0ce84d (patch) | |
tree | 2b83cacef266ff88ca3ed8cf3f19c1a1cbea7b38 /src/lstrlib.js | |
parent | 924ca09e8e9ec765301868d90dd3eba98058cafb (diff) | |
download | fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.tar.gz fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.tar.bz2 fengari-a02f4e93b92e7ebb7ef038ad151e51652b0ce84d.zip |
No more Table, just TValue with table type and Map value
Diffstat (limited to 'src/lstrlib.js')
-rw-r--r-- | src/lstrlib.js | 4 |
1 files changed, 2 insertions, 2 deletions
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 */ }; |