summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Sluift/sluift.h')
-rw-r--r--Sluift/sluift.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/Sluift/sluift.h b/Sluift/sluift.h
index 27b4eab..b82e1c4 100644
--- a/Sluift/sluift.h
+++ b/Sluift/sluift.h
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2011 Remko Tronçon
+ * Copyright (c) 2011-2013 Remko Tronçon
* Licensed under the GNU General Public License v3.
* See Documentation/Licenses/GPLv3.txt for more information.
@@ -9,9 +9,18 @@
#if defined(SLUIFT_BUILD_DLL)
#define SLUIFT_API __declspec(dllexport)
+#elif __GNUC__ >= 4
+#define SLUIFT_API __attribute__((visibility("default")))
#else
-#define SLUIFT_API extern
+#define SLUIFT_API
#endif
+#if defined(__cplusplus)
+#include <lua.hpp>
+#else
#include <lua.h>
+#endif
+#if defined(__cplusplus)
+extern "C"
+#endif
SLUIFT_API int (luaopen_sluift)(lua_State *L);