use new lua userdata api

This commit is contained in:
Cloud Wu
2020-10-10 19:19:33 +08:00
parent 623d8182eb
commit a87b039c6d
10 changed files with 26 additions and 26 deletions

View File

@@ -68,7 +68,7 @@ create_proxy(lua_State *L, const void *data, int index) {
// NODECACHE, table, PROXYCACHE
lua_pushvalue(L, -2);
// NODECACHE, table, PROXYCACHE, table
struct proxy * p = lua_newuserdata(L, sizeof(struct proxy));
struct proxy * p = lua_newuserdatauv(L, sizeof(struct proxy), 0);
// NODECACHE, table, PROXYCACHE, table, proxy
p->data = data;
p->index = index;