From 46049c9df73a446192957af1f50df19167c79f07 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Wed, 26 Apr 2017 17:15:37 +1000 Subject: Remove lua.CT and lua.constant_types (still available from defs) --- src/loslib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/loslib.js') 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)); -- cgit v1.2.3-54-g00ecf