summaryrefslogtreecommitdiff
path: root/src/compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat.h')
-rw-r--r--src/compat.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compat.h b/src/compat.h
index 35f9ef2..2033aa3 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -6,6 +6,7 @@
#if LUA_VERSION_NUM == 501
void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup);
+void *luaL_testudata(lua_State *L, int ud, const char *tname);
#endif
@@ -13,6 +14,17 @@ void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup);
#include <sys/types.h>
#endif
+// Windows compatibility; define DWORD and TRUE/FALSE on non-Windows
+#ifndef _WIN32
+#ifndef DWORD
+#define DWORD unsigned long
+#endif
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+#endif
+
#ifdef _MSC_VER
// MSVC Windows doesn't have ssize_t, so we define it here
#if SIZE_MAX == UINT_MAX