summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-06-27 20:49:59 +0200
committerMattes D <github@xoft.cz>2016-06-27 20:51:53 +0200
commitbf88312a1664311968736b4ba7ce1458c8b0954e (patch)
tree59bae2de637b5f3c629db8e55fb44a3106266709 /src/Bindings/LuaState.cpp
parentRemoved dead code related to callbacks. (diff)
downloadcuberite-bf88312a1664311968736b4ba7ce1458c8b0954e.tar
cuberite-bf88312a1664311968736b4ba7ce1458c8b0954e.tar.gz
cuberite-bf88312a1664311968736b4ba7ce1458c8b0954e.tar.bz2
cuberite-bf88312a1664311968736b4ba7ce1458c8b0954e.tar.lz
cuberite-bf88312a1664311968736b4ba7ce1458c8b0954e.tar.xz
cuberite-bf88312a1664311968736b4ba7ce1458c8b0954e.tar.zst
cuberite-bf88312a1664311968736b4ba7ce1458c8b0954e.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaState.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 109809cab..5e6c24365 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -1023,6 +1023,19 @@ bool cLuaState::GetStackValue(int a_StackPos, cCallbackPtr & a_Callback)
{
if (a_Callback == nullptr)
{
+ a_Callback = cpp14::make_unique<cCallback>();
+ }
+ return a_Callback->RefStack(*this, a_StackPos);
+}
+
+
+
+
+
+bool cLuaState::GetStackValue(int a_StackPos, cCallbackSharedPtr & a_Callback)
+{
+ if (a_Callback == nullptr)
+ {
a_Callback = std::make_shared<cCallback>();
}
return a_Callback->RefStack(*this, a_StackPos);