aboutsummaryrefslogtreecommitdiff
path: root/src/lauxlib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-03-30 16:39:41 +1100
committerdaurnimator <quae@daurnimator.com>2018-03-30 16:42:26 +1100
commitfb3b9c3b3f0ee1a04ec264d1b40bd1cccf24a999 (patch)
tree3166cfef0f1c8cde6b6662b46791dfb66f681e3d /src/lauxlib.js
parent2f2bd7fad5342583f85e99ec67eea74fad5fafdd (diff)
parent1371afafae9144b30475262f06940c4057485d02 (diff)
downloadfengari-fb3b9c3b3f0ee1a04ec264d1b40bd1cccf24a999.tar.gz
fengari-fb3b9c3b3f0ee1a04ec264d1b40bd1cccf24a999.tar.bz2
fengari-fb3b9c3b3f0ee1a04ec264d1b40bd1cccf24a999.zip
Merge branch 'accept-jsstrings'
Diffstat (limited to 'src/lauxlib.js')
-rw-r--r--src/lauxlib.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js
index 5abbaaa..475fd1b 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -402,16 +402,14 @@ const luaL_checktype = function(L, arg, t) {
tag_error(L, arg, t);
};
-const luaL_checkstring = function(L, n) {
- return luaL_checklstring(L, n, null);
-};
-
const luaL_checklstring = function(L, arg) {
let s = lua_tolstring(L, arg);
if (s === null || s === undefined) tag_error(L, arg, LUA_TSTRING);
return s;
};
+const luaL_checkstring = luaL_checklstring;
+
const luaL_optlstring = function(L, arg, def) {
if (lua_type(L, arg) <= 0) {
return def === null ? null : from_userstring(def);