From 1f5f050ada93ccda9323209e2a7b29851392404e Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 4 Mar 2018 19:15:42 +1100 Subject: src/lapi.js: Remove lua_toljsstring It doesn't return length as a seperate thing: js strings implicitly have a length already --- src/lapi.js | 5 +---- src/lua.js | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/lapi.js b/src/lapi.js index 369a64b..21b6c0d 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -680,7 +680,7 @@ const lua_tolstring = function(L, idx) { const lua_tostring = lua_tolstring; -const lua_toljsstring = function(L, idx) { +const lua_tojsstring = function(L, idx) { let o = index2addr(L, idx); if (!o.ttisstring()) { @@ -692,8 +692,6 @@ const lua_toljsstring = function(L, idx) { return o.jsstring(); }; -const lua_tojsstring = lua_toljsstring; - const lua_todataview = function(L, idx) { let u8 = lua_tolstring(L, idx); return new DataView(u8.buffer, u8.byteOffset, u8.byteLength); @@ -1228,7 +1226,6 @@ module.exports.lua_todataview = lua_todataview; module.exports.lua_tointeger = lua_tointeger; module.exports.lua_tointegerx = lua_tointegerx; module.exports.lua_tojsstring = lua_tojsstring; -module.exports.lua_toljsstring = lua_toljsstring; module.exports.lua_tolstring = lua_tolstring; module.exports.lua_tonumber = lua_tonumber; module.exports.lua_tonumberx = lua_tonumberx; diff --git a/src/lua.js b/src/lua.js index 6de7553..3dd15a5 100644 --- a/src/lua.js +++ b/src/lua.js @@ -186,7 +186,6 @@ module.exports.lua_todataview = lapi.lua_todataview; module.exports.lua_tointeger = lapi.lua_tointeger; module.exports.lua_tointegerx = lapi.lua_tointegerx; module.exports.lua_tojsstring = lapi.lua_tojsstring; -module.exports.lua_toljsstring = lapi.lua_toljsstring; module.exports.lua_tolstring = lapi.lua_tolstring; module.exports.lua_tonumber = lapi.lua_tonumber; module.exports.lua_tonumberx = lapi.lua_tonumberx; -- cgit v1.2.3-70-g09d2