diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2014-10-08 14:29:34 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2014-10-08 14:29:34 +0200 |
commit | 7280e10e8bfa507953d8c823abd502db98c514fa (patch) | |
tree | 9c60dad32369be442e659dede923f67e2a9a546c /include/luaglue | |
parent | 4aec1091870aaeec9d64b4bd9d7d143ef4a2bbcc (diff) | |
download | crawler-7280e10e8bfa507953d8c823abd502db98c514fa.tar.gz crawler-7280e10e8bfa507953d8c823abd502db98c514fa.tar.bz2 |
some fixes on Windows
Diffstat (limited to 'include/luaglue')
-rw-r--r-- | include/luaglue/LuaGlueExportable.hpp | 26 | ||||
-rwxr-xr-x | include/luaglue/LuaVM.hpp | 16 |
2 files changed, 35 insertions, 7 deletions
diff --git a/include/luaglue/LuaGlueExportable.hpp b/include/luaglue/LuaGlueExportable.hpp new file mode 100644 index 0000000..134e3f0 --- /dev/null +++ b/include/luaglue/LuaGlueExportable.hpp @@ -0,0 +1,26 @@ +#ifndef __LUAGLUE_EXPORTABLE_H +#define __LUAGLUE_EXPORTABLE_H + +#ifndef _WIN32 + +#define LUAGLUE_DLL_VISIBLE + +#else + +#ifdef SHARED + +#ifdef BUILDING_LUAGLUE +#define LUAGLUE_DLL_VISIBLE __declspec(dllexport) +#else +#define LUAGLUE_DLL_VISIBLE __declspec(dllimport) +#endif + +#else + +#define LUAGLUE_DLL_VISIBLE + +#endif // BUILDING_LUAGLUE + +#endif // _WIN32 + +#endif diff --git a/include/luaglue/LuaVM.hpp b/include/luaglue/LuaVM.hpp index baa5bca..bd2fd21 100755 --- a/include/luaglue/LuaVM.hpp +++ b/include/luaglue/LuaVM.hpp @@ -1,6 +1,8 @@ #ifndef __LUA_VM_H #define __LUA_VM_H +#include "LuaGlueExportable.hpp" + #include "lua.hpp" #include <string> @@ -8,15 +10,15 @@ class LuaVM { public: - LuaVM( ); - ~LuaVM( ); + LUAGLUE_DLL_VISIBLE LuaVM( ); + LUAGLUE_DLL_VISIBLE ~LuaVM( ); - void loadSource( const char *sourceFilename ); - void executeMain( ); - void dumpState( ); - void fullGarbageCollect( ); + LUAGLUE_DLL_VISIBLE void loadSource( const char *sourceFilename ); + LUAGLUE_DLL_VISIBLE void executeMain( ); + LUAGLUE_DLL_VISIBLE void dumpState( ); + LUAGLUE_DLL_VISIBLE void fullGarbageCollect( ); - lua_State *handle( ); + LUAGLUE_DLL_VISIBLE lua_State *handle( ); private: void initialize( ); |