summaryrefslogtreecommitdiff
path: root/src/lapi.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lapi.js')
-rw-r--r--src/lapi.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/lapi.js b/src/lapi.js
index 8e0c491..ae9fa89 100644
--- a/src/lapi.js
+++ b/src/lapi.js
@@ -511,13 +511,7 @@ const lua_createtable = function(L, narray, nrec) {
};
const luaS_newudata = function(L, size) {
- return {
- id: L.l_G.id_counter++,
- metatable: null,
- uservalue: new lobject.TValue(CT.LUA_TNIL, null),
- len: size,
- data: Object.create(null) // ignores size argument
- };
+ return new lobject.Udata(L, size);
};
const lua_newuserdata = function(L, size) {