summaryrefslogtreecommitdiff
path: root/src/lfunc.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lfunc.js')
-rw-r--r--src/lfunc.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/lfunc.js b/src/lfunc.js
index f3e11d3..39ad049 100644
--- a/src/lfunc.js
+++ b/src/lfunc.js
@@ -88,8 +88,18 @@ const luaF_close = function(L, level) {
}
};
-module.exports.Proto = Proto;
-module.exports.UpVal = UpVal;
-module.exports.findupval = findupval;
-module.exports.luaF_close = luaF_close;
-module.exports.MAXUPVAL = 255; \ No newline at end of file
+const luaF_initupvals = function(L, cl) {
+ for (let i = 0; i < cl.nupvalues; i++) {
+ let uv = new UpVal();
+ uv.refcount = 1;
+ uv.u.value = null;
+ uv.v = uv.u.value;
+ }
+};
+
+module.exports.Proto = Proto;
+module.exports.UpVal = UpVal;
+module.exports.findupval = findupval;
+module.exports.luaF_close = luaF_close;
+module.exports.MAXUPVAL = 255;
+module.exports.luaF_initupvals = luaF_initupvals; \ No newline at end of file