search for: lua_add_table

Displaying 1 result from an estimated 1 matches for "lua_add_table".

2012 Sep 19
1
[PATCH 1/1] lua: Cleaned up the dmi table structure in Lua.c32 and added all missing DMI subtables
...macro to work. For example, for the bios subtable, the table_fn is + get_bios_table() and the subtable name is "bios". + All (*table_fn)() have to return 1 if a subtable is created on the stack + or 0 if the subtable is not created (no corresponding dim subtable found). +*/ +#define LUA_ADD_TABLE(pLua_state, pDmi, tb_name) \ + add_dmi_sub_table(pLua_state, pDmi, #tb_name, get_ ## tb_name ## _table); + + +static void add_dmi_sub_table(lua_State *L, s_dmi *dmi_ptr, char *table_name, + table_fn get_table_fn) { - s_dmi dmi; - - lua_newtable(L); - - if ( ! dmi_i...