diff options
-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); |