summaryrefslogtreecommitdiff
path: root/src/configure.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/configure.h')
-rw-r--r--src/configure.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/configure.h b/src/configure.h
new file mode 100644
index 0000000..bc107e1
--- /dev/null
+++ b/src/configure.h
@@ -0,0 +1,38 @@
+#ifndef _CONFIGURE_H_
+#define _CONFIGURE_H_
+
+#define TEST_1 1
+#define TEST_2 2
+#define TEST_3 3
+#define TEST_4 4
+#define TEST_5 5
+#define TEST_6 6
+#define TEST_7 7
+#define TEST_8 8
+#define TEST_9 9
+#define TEST_10 10
+
+
+#define BUILD_TEST TEST_1
+
+//-----------------------------------------------------------------------------------------------------
+
+extern "C" {
+#include "lua51/lua.h"
+#include "lua51/lualib.h"
+#include "lua51/lauxlib.h"
+}
+
+inline void luax_registerglobal(lua_State* L, luaL_reg *fns)
+{
+ luaL_reg* fn;
+ int i = 0;
+ for (fn = &fns[0]; fn->name != 0; fn = &fns[++i])
+ {
+ lua_pushcfunction(L, fn->func);
+ lua_setglobal(L, fn->name);
+ }
+}
+
+
+#endif \ No newline at end of file