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