diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-01 11:51:00 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-01 11:51:00 +0100 |
commit | 444182dbbb18f44cf7cafc378f092c28006be365 (patch) | |
tree | a7d539ec3698c113c6cb68697bd3ec6f39b499e0 /src/lfunc.js | |
parent | ae8b95ee9c3871f506b20c74367fdc9e8cb098e2 (diff) | |
download | fengari-444182dbbb18f44cf7cafc378f092c28006be365.tar.gz fengari-444182dbbb18f44cf7cafc378f092c28006be365.tar.bz2 fengari-444182dbbb18f44cf7cafc378f092c28006be365.zip |
Loading tests (binary/text)
Diffstat (limited to 'src/lfunc.js')
-rw-r--r-- | src/lfunc.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lfunc.js b/src/lfunc.js index 37239b2..227606d 100644 --- a/src/lfunc.js +++ b/src/lfunc.js @@ -102,12 +102,16 @@ const luaF_close = function(L, level) { } }; +/* +** fill a closure with new closed upvalues +*/ const luaF_initupvals = function(L, cl) { for (let i = 0; i < cl.nupvalues; i++) { let uv = new UpVal(L); uv.refcount = 1; uv.u.value = null; uv.v = uv.u.value; + cl.upvals[i] = uv; } }; |