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:
parent
c6fa061f22
commit
748dba4859
@ -60,6 +60,7 @@
|
||||
#define CLASS_CERTCACHE "CertCache"
|
||||
#define CLASS_PROXY_LIST "ProxyList"
|
||||
#define CLASS_SERVER_LIST "ServerList"
|
||||
#define CLASS_QUEUE "Queue"
|
||||
|
||||
struct stream;
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user