** header chaching's database backend.\fP
*/
#endif
- { NULL, NULL }
};
void mlua_initialize(void)
luaL_register(L, "madmutt", madmutt_module_funcs);
for (i = 0; i < countof(madmutt_module_vars); i++) {
- char buffer[STRING];
-
- snprintf(buffer, sizeof(buffer), "madmutt.%s = \"%s\";",
- madmutt_module_vars[i].key,
- madmutt_module_vars[i].value);
- (void)luaL_dostring(L, buffer);
+ lua_pushstring(L, madmutt_module_vars[i].value);
+ lua_setfield(L, -2, madmutt_module_vars[i].key);
}
}