summaryrefslogtreecommitdiff
path: root/com32/lua/src/dmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lua/src/dmi.c')
-rw-r--r--com32/lua/src/dmi.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/com32/lua/src/dmi.c b/com32/lua/src/dmi.c
index aa38df3a..f4755e8e 100644
--- a/com32/lua/src/dmi.c
+++ b/com32/lua/src/dmi.c
@@ -9,8 +9,18 @@
#include "lualib.h"
#include "dmi/dmi.h"
-extern void add_string_item(lua_State*, const char*, const char*);
-extern void add_int_item(lua_State*, const char*, int);
+static void add_string_item(lua_State *L, const char *item, const char *value_str) {
+ lua_pushstring(L,item);
+ lua_pushstring(L,value_str);
+ lua_settable(L,-3);
+}
+
+static void add_int_item(lua_State *L, const char *item, int value_int) {
+ lua_pushstring(L,item);
+ lua_pushnumber(L,value_int);
+ lua_settable(L,-3);
+}
+
typedef int (*table_fn)(lua_State*, s_dmi*);
/* Add a Lua_String entry to the table on stack