Create new empty userdata from pure Lua
问题 I think I saw somewhere a native function in Lua that can return a new userdata. Does it exist? Is it possible to create custom userdata from normal Lua script? 回答1: You may be thinking of newproxy From: http://lua-users.org/wiki/HiddenFeatures newproxy is an unsupported and undocumented function in the Lua base library. From Lua code, the setmetatable function may only be used on objects of table type. The newproxy function circumvents that limitation by creating a zero-size userdata and