From f87a838f498c2ec6536ba813d7ae83bd1e78a506 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Mon, 29 May 2017 14:13:28 +1000 Subject: luaO_tostring should modify TValue --- src/lapi.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lapi.js') diff --git a/src/lapi.js b/src/lapi.js index 42e87a9..b08f342 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -654,8 +654,7 @@ const lua_tolstring = function(L, idx) { if (!lvm.cvt2str(o)) { /* not convertible? */ return null; } - /* TODO: this should modify number on the stack */ - return lobject.luaO_tostring(L, o).getstr(); + lobject.luaO_tostring(L, o); } return o.svalue(); }; @@ -669,8 +668,7 @@ const lua_toljsstring = function(L, idx) { if (!lvm.cvt2str(o)) { /* not convertible? */ return null; } - /* TODO: this should modify number on the stack */ - return defs.to_jsstring(lobject.luaO_tostring(L, o).getstr()); + lobject.luaO_tostring(L, o); } return o.jsstring(); }; -- cgit v1.2.3-54-g00ecf