MAY_LJMP(check_args(L, 1, "register_init"));
+ if (hlua_gethlua(L)) {
+ /* runtime processing */
+ WILL_LJMP(luaL_error(L, "register_init: not available outside of body context"));
+ }
+
ref = MAY_LJMP(hlua_checkfunction(L, 1));
init = calloc(1, sizeof(*init));
MAY_LJMP(check_args(L, 2, "register_converters"));
+ if (hlua_gethlua(L)) {
+ /* runtime processing */
+ WILL_LJMP(luaL_error(L, "register_converters: not available outside of body context"));
+ }
+
/* First argument : converter name. */
name = MAY_LJMP(luaL_checkstring(L, 1));
MAY_LJMP(check_args(L, 2, "register_fetches"));
+ if (hlua_gethlua(L)) {
+ /* runtime processing */
+ WILL_LJMP(luaL_error(L, "register_fetches: not available outside of body context"));
+ }
+
/* First argument : sample-fetch name. */
name = MAY_LJMP(luaL_checkstring(L, 1));
if (lua_gettop(L) < 3 || lua_gettop(L) > 4)
WILL_LJMP(luaL_error(L, "'register_action' needs between 3 and 4 arguments"));
+ if (hlua_gethlua(L)) {
+ /* runtime processing */
+ WILL_LJMP(luaL_error(L, "register_action: not available outside of body context"));
+ }
+
/* First argument : converter name. */
name = MAY_LJMP(luaL_checkstring(L, 1));
MAY_LJMP(check_args(L, 3, "register_service"));
+ if (hlua_gethlua(L)) {
+ /* runtime processing */
+ WILL_LJMP(luaL_error(L, "register_service: not available outside of body context"));
+ }
+
/* First argument : converter name. */
name = MAY_LJMP(luaL_checkstring(L, 1));
MAY_LJMP(check_args(L, 3, "register_cli"));
+ if (hlua_gethlua(L)) {
+ /* runtime processing */
+ WILL_LJMP(luaL_error(L, "register_cli: not available outside of body context"));
+ }
+
/* First argument : an array of maximum 5 keywords. */
if (!lua_istable(L, 1))
WILL_LJMP(luaL_argerror(L, 1, "1st argument must be a table"));
MAY_LJMP(check_args(L, 3, "register_filter"));
+ if (hlua_gethlua(L)) {
+ /* runtime processing */
+ WILL_LJMP(luaL_error(L, "register_filter: not available outside of body context"));
+ }
+
/* First argument : filter name. */
name = MAY_LJMP(luaL_checkstring(L, 1));