diff options
author | daurnimator <quae@daurnimator.com> | 2017-04-26 17:15:37 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-04-26 17:21:52 +1000 |
commit | 46049c9df73a446192957af1f50df19167c79f07 (patch) | |
tree | e055ff69c29a6faf8aec40cd2dc47bb5e245ce05 /src/loslib.js | |
parent | ef7bc7c1f8684af04da5d9e91fecf6ce82ecf397 (diff) | |
download | fengari-46049c9df73a446192957af1f50df19167c79f07.tar.gz fengari-46049c9df73a446192957af1f50df19167c79f07.tar.bz2 fengari-46049c9df73a446192957af1f50df19167c79f07.zip |
Remove lua.CT and lua.constant_types (still available from defs)
Diffstat (limited to 'src/loslib.js')
-rw-r--r-- | src/loslib.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/loslib.js b/src/loslib.js index 781dec9..4eea581 100644 --- a/src/loslib.js +++ b/src/loslib.js @@ -33,7 +33,7 @@ const getfield = function(L, key, d, delta) { let t = lapi.lua_getfield(L, -1, lua.to_luastring(key)); /* get field and its type */ let res = lapi.lua_tointegerx(L, -1); if (res !== false) { /* field is not an integer? */ - if (t != lua.CT.LUA_TNIL) /* some other value? */ + if (t != lua.LUA_TNIL) /* some other value? */ return lauxlib.luaL_error(L, lua.to_luastring(`field '${key}' is not an integer`), true); else if (d < 0) /* absent field; no default? */ return lauxlib.luaL_error(L, lua.to_luastring(`field '${key}' missing in date table`), true); @@ -51,7 +51,7 @@ const getfield = function(L, key, d, delta) { const os_time = function(L) { let t = new Date(); if (!lapi.lua_isnoneornil(L, 1)) /* called with arg */{ - lauxlib.luaL_checktype(L, 1, lua.CT.LUA_TTABLE); /* make sure table is at the top */ + lauxlib.luaL_checktype(L, 1, lua.LUA_TTABLE); /* make sure table is at the top */ lapi.lua_settop(L, 1); t.setSeconds(getfield(L, "sec", 0, 0)); t.setSeconds(getfield(L, "min", 0, 0)); |