summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2013-08-16 21:11:56 (GMT)
committerRemko Tronçon <git@el-tramo.be>2013-08-17 09:32:03 (GMT)
commit92ffd5b909badeafabbf73b73a6946a5440c8be5 (patch)
treea33a6086ace038c63751403ae29573ae161846b2 /Sluift/sluift.h
parentac6ff12e174b832326c6d89784d4c5e53044eecf (diff)
downloadswift-92ffd5b909badeafabbf73b73a6946a5440c8be5.zip
swift-92ffd5b909badeafabbf73b73a6946a5440c8be5.tar.bz2
Fix building sluift as .dll on Mac OS X.
Change-Id: Ia8043d66ef676048e7fe1d0347b65e8d64aa3bd5
Diffstat (limited to 'Sluift/sluift.h')
-rw-r--r--Sluift/sluift.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/Sluift/sluift.h b/Sluift/sluift.h
index 27b4eab..4e0f5ee 100644
--- a/Sluift/sluift.h
+++ b/Sluift/sluift.h
@@ -1,5 +1,5 @@
/*
- * 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,16 @@
#if defined(SLUIFT_BUILD_DLL)
#define SLUIFT_API __declspec(dllexport)
#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);