diff options
author | Mattes D <github@xoft.cz> | 2016-06-27 20:49:59 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2016-06-27 20:51:53 +0200 |
commit | bf88312a1664311968736b4ba7ce1458c8b0954e (patch) | |
tree | 59bae2de637b5f3c629db8e55fb44a3106266709 /src/Bindings/LuaState.cpp | |
parent | Removed dead code related to callbacks. (diff) | |
download | cuberite-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.cpp | 13 |
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); |