summaryrefslogtreecommitdiff
path: root/src/lua.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-02-15 22:13:01 +0100
committerBenoit Giannangeli <giann008@gmail.com>2017-02-15 22:19:14 +0100
commit9d6afeba223c22163928557c69a102877223d3bd (patch)
tree481efe9bfaf1095792ca1612603ef3505352d1f8 /src/lua.js
parent43474e4c411709e3c1ab1b1d13283d2bc4789d1d (diff)
downloadfengari-9d6afeba223c22163928557c69a102877223d3bd.tar.gz
fengari-9d6afeba223c22163928557c69a102877223d3bd.tar.bz2
fengari-9d6afeba223c22163928557c69a102877223d3bd.zip
Everything need to make luaL_newstate work, lua_pushnil test
Diffstat (limited to 'src/lua.js')
-rw-r--r--src/lua.js15
1 files changed, 14 insertions, 1 deletions
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