From 2aba2da56df5e1b9683b7fbc8b46c8f083af901c Mon Sep 17 00:00:00 2001 From: lethosor Date: Tue, 11 Aug 2015 22:59:19 -0400 Subject: [PATCH] Avoid DataStaticsFields dependency on PluginManager.h --- library/LuaApi.cpp | 1 + library/LuaTools.cpp | 1 + library/LuaTypes.cpp | 1 + library/include/LuaWrapper.h | 8 +++++--- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index c23cfe22a..d601b198a 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -39,6 +39,7 @@ distribution. #include "DataIdentity.h" #include "DataFuncs.h" #include "DFHackVersion.h" +#include "PluginManager.h" #include "modules/World.h" #include "modules/Gui.h" diff --git a/library/LuaTools.cpp b/library/LuaTools.cpp index 8c0e5ef1a..7992373a9 100644 --- a/library/LuaTools.cpp +++ b/library/LuaTools.cpp @@ -49,6 +49,7 @@ distribution. #include "MiscUtils.h" #include "DFHackVersion.h" +#include "PluginManager.h" #include "df/job.h" #include "df/job_item.h" diff --git a/library/LuaTypes.cpp b/library/LuaTypes.cpp index 410c25f88..0904ff8f9 100644 --- a/library/LuaTypes.cpp +++ b/library/LuaTypes.cpp @@ -40,6 +40,7 @@ distribution. #include "LuaTools.h" #include "DataFuncs.h" +#include "PluginManager.h" #include "MiscUtils.h" #include diff --git a/library/include/LuaWrapper.h b/library/include/LuaWrapper.h index ab694c4a8..4604ed451 100644 --- a/library/include/LuaWrapper.h +++ b/library/include/LuaWrapper.h @@ -30,7 +30,6 @@ distribution. #include #include "DataDefs.h" -#include "PluginManager.h" #include #include @@ -39,7 +38,10 @@ distribution. * Internal header file of the lua wrapper. */ -namespace DFHack { namespace LuaWrapper { + +namespace DFHack { + struct FunctionReg; +namespace LuaWrapper { struct LuaToken; /** @@ -232,7 +234,7 @@ namespace DFHack { namespace LuaWrapper { /** * Wrap functions and add them to the table on the top of the stack. */ - using DFHack::FunctionReg; + typedef DFHack::FunctionReg FunctionReg; void SetFunctionWrappers(lua_State *state, const FunctionReg *reg); int method_wrapper_core(lua_State *state, function_identity_base *id);