From 9d6afeba223c22163928557c69a102877223d3bd Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Wed, 15 Feb 2017 22:13:01 +0100 Subject: Everything need to make luaL_newstate work, lua_pushnil test --- src/lua.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/lua.js') diff --git a/src/lua.js b/src/lua.js index a336bb0..4534f78 100644 --- a/src/lua.js +++ b/src/lua.js @@ -61,6 +61,14 @@ constant_types.LUA_TLCL = constant_types.LUA_TFUNCTION | (0 << 4); /* Lua closu constant_types.LUA_TLCF = constant_types.LUA_TFUNCTION | (1 << 4); /* light C function */ constant_types.LUA_TCCL = constant_types.LUA_TFUNCTION | (2 << 4); /* C closure */ +const LUA_NUMTAGS = 9; +const LUA_MINSTACK = 20; + +/* predefined values in the registry */ +const LUA_RIDX_MAINTHREAD = 1; +const LUA_RIDX_GLOBALS = 2; +const LUA_RIDX_LAST = LUA_RIDX_GLOBALS; + const print_version = function() { console.log(FENGARI_COPYRIGHT); }; @@ -122,4 +130,9 @@ module.exports.FENGARI_RELEASE = FENGARI_RELEASE; module.exports.FENGARI_COPYRIGHT = FENGARI_COPYRIGHT; module.exports.FENGARI_AUTHORS = FENGARI_AUTHORS; module.exports.LUA_INIT_VAR = LUA_INIT_VAR; -module.exports.LUA_INITVARVERSION = LUA_INITVARVERSION; \ No newline at end of file +module.exports.LUA_INITVARVERSION = LUA_INITVARVERSION; +module.exports.LUA_NUMTAGS = LUA_NUMTAGS; +module.exports.LUA_MINSTACK = LUA_MINSTACK; +module.exports.LUA_RIDX_MAINTHREAD = LUA_RIDX_MAINTHREAD; +module.exports.LUA_RIDX_GLOBALS = LUA_RIDX_GLOBALS; +module.exports.LUA_RIDX_LAST = LUA_RIDX_LAST; \ No newline at end of file -- cgit v1.2.3-70-g09d2