summaryrefslogtreecommitdiff
path: root/src/lbaselib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2017-04-26 17:26:00 +1000
committerdaurnimator <quae@daurnimator.com>2017-04-26 17:27:03 +1000
commit992285ba12d217a3def72e49a29fba70e4e48f2f (patch)
tree5d84504946443de0c86b3419c871a38f59322364 /src/lbaselib.js
parent382e28086f97085edbf099247949c3f801cc0ed0 (diff)
downloadfengari-992285ba12d217a3def72e49a29fba70e4e48f2f.tar.gz
fengari-992285ba12d217a3def72e49a29fba70e4e48f2f.tar.bz2
fengari-992285ba12d217a3def72e49a29fba70e4e48f2f.zip
Remove lua.thread_status
Diffstat (limited to 'src/lbaselib.js')
-rw-r--r--src/lbaselib.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lbaselib.js b/src/lbaselib.js
index 8b4e6a5..aa02908 100644
--- a/src/lbaselib.js
+++ b/src/lbaselib.js
@@ -6,7 +6,6 @@ const lua = require('./lua.js');
const lapi = require('./lapi.js');
const lauxlib = require('./lauxlib.js');
const lobject = require('./lobject.js');
-const TS = lua.thread_status;
const luaB_print = function(L) {
let n = lapi.lua_gettop(L); /* number of arguments */
@@ -222,7 +221,7 @@ const luaB_select = function(L) {
** ignored).
*/
const finishpcall = function(L, status, extra) {
- if (status !== TS.LUA_OK && status !== TS.LUA_YIELD) { /* error? */
+ if (status !== lua.LUA_OK && status !== lua.LUA_YIELD) { /* error? */
lapi.lua_pushboolean(L, 0); /* first result (false) */
lapi.lua_pushvalue(L, -2); /* error message */
return 2; /* return false, msg */
@@ -255,7 +254,7 @@ const luaB_xpcall = function(L) {
// TODO: does it overwrite the upvalue of the previous closure ?
const load_aux = function(L, status, envidx) {
- if (status === TS.LUA_OK) {
+ if (status === lua.LUA_OK) {
if (envidx !== 0) { /* 'env' parameter? */
lapi.lua_pushvalue(L, envidx); /* environment for loaded function */
if (!lapi.lua_setupvalue(L, -2, 1)) /* set it as 1st upvalue */
@@ -359,7 +358,7 @@ if (typeof require === "function") {
const luaB_dofile = function(L) {
let fname = lauxlib.luaL_optstring(L, 1, null);
lapi.lua_settop(L, 1);
- if (lauxlib.luaL_loadfile(L, fname) !== TS.LUA_OK)
+ if (lauxlib.luaL_loadfile(L, fname) !== lua.LUA_OK)
return lapi.lua_error(L);
lapi.lua_callk(L, 0, lua.LUA_MULTRET, 0, dofilecont);
return dofilecont(L, 0, 0);