search for: set_table_string_string

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

2014 Nov 28
2
[PATCH] Add ldisk.c32 Lua module
...<disk/read.h> + +#include "lua.h" +#include "lauxlib.h" +#include "lualib.h" + +#define SET_TABLE_STRING_INT(state, key, value) do {\ + lua_pushstring((state), (key));\ + lua_pushinteger((state), (value));\ + lua_settable((state), -3);\ +} while(0); + +#define SET_TABLE_STRING_STRING(state, key, value) do {\ + lua_pushstring((state), (key));\ + lua_pushstring((state), (const char*) (value));\ + lua_settable((state), -3);\ +} while(0); + +static int get_disks(lua_State* L) { + lua_newtable(L); + int i = 1; + for (int id = 0x80; id < 0xff; id++) { + struct driveinfo info =...