summaryrefslogtreecommitdiff
path: root/src/lfunc.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lfunc.js')
-rw-r--r--src/lfunc.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lfunc.js b/src/lfunc.js
index 3f8fe2d..e12816d 100644
--- a/src/lfunc.js
+++ b/src/lfunc.js
@@ -56,9 +56,7 @@ class UpVal {
}
const luaF_newLclosure = function(L, n) {
- let c = new lobject.LClosure();
- c.p = null;
- c.nupvalues = n;
+ let c = new lobject.LClosure(L, n);
while (n--) c.upvals[n] = null;
return c;
};