Most lua classes are registered by leveraging the
hlua_register_metatable() helper. Let's use that for the Queue class as
well for consitency.
#define CLASS_CERTCACHE "CertCache"
#define CLASS_PROXY_LIST "ProxyList"
#define CLASS_SERVER_LIST "ServerList"
+#define CLASS_QUEUE "Queue"
struct stream;
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)