Bläddra i källkod

app_lua: exported special kemi function to execute module function

- KSR.x.modf(fname, params...)
Daniel-Constantin Mierla 9 år sedan
förälder
incheckning
829a8a6e82
1 ändrade filer med 9 tillägg och 0 borttagningar
  1. 9 0
      modules/app_lua/app_lua_sr.c

+ 9 - 0
modules/app_lua/app_lua_sr.c

@@ -1684,6 +1684,14 @@ int sr_kemi_exec_func(lua_State* L, str *mname, int midx, str *fname)
 	return app_lua_return_false(L);
 }
 
+/**
+ *
+ */
+static const luaL_Reg _sr_kemi_x_Map [] = {
+	{"modf",         lua_sr_modf},
+	{NULL, NULL}
+};
+
 /**
  *
  */
@@ -1747,6 +1755,7 @@ void lua_sr_kemi_register_core(lua_State *L)
 
 	/* special modules - pv.get(...) can return int or str */
 	luaL_openlib(L, "KSR.pv",   _sr_pv_Map,   0);
+	luaL_openlib(L, "KSR.x",   _sr_kemi_x_Map,   0);
 
 	LM_DBG("pushing lua KSR table definition returned %d\n", ret);
 }