diff options
author | daurnimator <quae@daurnimator.com> | 2017-04-26 22:59:22 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-04-26 22:59:22 +1000 |
commit | a70eeebe4aa5014e08b67da7ec07be903c3cf6a5 (patch) | |
tree | 28ae75b25c58cb24c8576567f4072deb5f098d85 /src/lapi.js | |
parent | 6d07675c7397e351c8c15ae961f8ad06c3f9d8a6 (diff) | |
download | fengari-a70eeebe4aa5014e08b67da7ec07be903c3cf6a5.tar.gz fengari-a70eeebe4aa5014e08b67da7ec07be903c3cf6a5.tar.bz2 fengari-a70eeebe4aa5014e08b67da7ec07be903c3cf6a5.zip |
src/lapi.js: Ignore size argument to lua_newuserdata
Diffstat (limited to 'src/lapi.js')
-rw-r--r-- | src/lapi.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lapi.js b/src/lapi.js index 6d75e44..184630c 100644 --- a/src/lapi.js +++ b/src/lapi.js @@ -466,12 +466,9 @@ const lua_createtable = function(L, narray, nrec) { assert(L.top <= L.ci.top, "stack overflow"); }; +// ignore size argument const lua_newuserdata = function(L, size) { - let box; - if (typeof size == "number") - box = new ArrayBuffer(size); - else // if size is not passed, create a new empty object - box = Object.create(null); + let box = Object.create(null); L.stack[L.top++] = new lobject.TValue(CT.LUA_TUSERDATA, box); |