MINOR: hlua_fcn: register queue class using hlua_register_metatable()

Most lua classes are registered by leveraging the
hlua_register_metatable() helper. Let's use that for the Queue class as
well for consitency.
This commit is contained in:
Aurelien DARRAGON 2025-03-21 23:00:59 +01:00
parent c6fa061f22
commit 748dba4859
2 changed files with 2 additions and 1 deletions

View File

@ -60,6 +60,7 @@
#define CLASS_CERTCACHE "CertCache"
#define CLASS_PROXY_LIST "ProxyList"
#define CLASS_SERVER_LIST "ServerList"
#define CLASS_QUEUE "Queue"
struct stream;

View File

@ -728,7 +728,7 @@ static void hlua_queue_init(lua_State *L)
hlua_class_function(L, "__gc", hlua_queue_gc);
class_queue_ref = luaL_ref(L, LUA_REGISTRYINDEX);
class_queue_ref = hlua_register_metatable(L, CLASS_QUEUE);
}
int hlua_fcn_new_stktable(lua_State *L, struct stktable *tbl)