summaryrefslogtreecommitdiff
path: root/library/LuaTools.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-06-13 21:12:36 +0400
committerAlexander Gavrilov2012-06-13 21:12:36 +0400
commit8d7cf092fd6f3f1cf68e6b48b8f3dc42ef40dcfa (patch)
tree71efd9ac56972e88110123ee6d1b698bfa25ae93 /library/LuaTools.cpp
parent24e2c151136fc7d565f9f9babcf24b199eb6c6f3 (diff)
downloaddfhack-8d7cf092fd6f3f1cf68e6b48b8f3dc42ef40dcfa.tar.gz
dfhack-8d7cf092fd6f3f1cf68e6b48b8f3dc42ef40dcfa.tar.bz2
dfhack-8d7cf092fd6f3f1cf68e6b48b8f3dc42ef40dcfa.tar.xz
Add Lua API for access to some contextual and low-level info.
Diffstat (limited to 'library/LuaTools.cpp')
-rw-r--r--library/LuaTools.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/LuaTools.cpp b/library/LuaTools.cpp
index f794f6b4..752c341b 100644
--- a/library/LuaTools.cpp
+++ b/library/LuaTools.cpp
@@ -66,6 +66,8 @@ using namespace DFHack::LuaWrapper;
lua_State *DFHack::Lua::Core::State = NULL;
+void dfhack_printerr(lua_State *S, const std::string &str);
+
inline void AssertCoreSuspend(lua_State *state)
{
assert(!Lua::IsCoreContext(state) || DFHack::Core::getInstance().isSuspended());
@@ -96,8 +98,6 @@ static void check_valid_ptr_index(lua_State *state, int val_index)
}
}
-static void dfhack_printerr(lua_State *S, const std::string &str);
-
static void signal_typeid_error(color_ostream *out, lua_State *state,
type_identity *type, const char *msg,
int val_index, bool perr, bool signal)
@@ -233,7 +233,7 @@ static int lua_dfhack_println(lua_State *S)
return 0;
}
-static void dfhack_printerr(lua_State *S, const std::string &str)
+void dfhack_printerr(lua_State *S, const std::string &str)
{
if (color_ostream *out = Lua::GetOutput(S))
out->printerr("%s\n", str.c_str());