diff options
author | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-21 14:05:14 +0100 |
---|---|---|
committer | Benoit Giannangeli <benoit.giannangeli@boursorama.fr> | 2017-03-21 14:05:14 +0100 |
commit | c4b23126f0cb803ec944c5d7877bbf669f582374 (patch) | |
tree | 9c2bf5740ee89268e57f73574ec3abe870a4e160 /src/lstrlib.js | |
parent | 932875c87ab3f2ed2b676a98f273392661535f65 (diff) | |
download | fengari-c4b23126f0cb803ec944c5d7877bbf669f582374.tar.gz fengari-c4b23126f0cb803ec944c5d7877bbf669f582374.tar.bz2 fengari-c4b23126f0cb803ec944c5d7877bbf669f582374.zip |
Userdata are ArrayBuffers, new lightuserdata subtype for js objects
Diffstat (limited to 'src/lstrlib.js')
-rw-r--r-- | src/lstrlib.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lstrlib.js b/src/lstrlib.js index cd9278d..95fb375 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -1252,7 +1252,8 @@ const str_gmatch = function(L) { let ls = s.length; let lp = p.length; lapi.lua_settop(L, 2); /* keep them on closure to avoid being collected */ - let gm = lapi.lua_newuserdata(L, new GMatchState()); + let gm = new GMatchState(); + lapi.lua_pushobject(L, gm); prepstate(gm.ms, L, s, ls, p, lp); gm.src = 0; gm.p = 0; |