From 32345800737b668011a87328cd3dcce59ec2934c Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 26 Oct 2021 11:27:58 +0800 Subject: *misc --- Runtime/Scripting/Common/DataBuffer.bind.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Runtime/Scripting/Common/DataBuffer.bind.cpp (limited to 'Runtime/Scripting/Common/DataBuffer.bind.cpp') diff --git a/Runtime/Scripting/Common/DataBuffer.bind.cpp b/Runtime/Scripting/Common/DataBuffer.bind.cpp new file mode 100644 index 0000000..5a5c30a --- /dev/null +++ b/Runtime/Scripting/Common/DataBuffer.bind.cpp @@ -0,0 +1,19 @@ +#include "Runtime/Common/DataBuffer.h" + +LUA_BIND_REGISTRY(DataBuffer) +{ + LUA_BIND_REGISTER_METHODS(state, + { "GetLength", _GetLength } + ); +} + +LUA_BIND_POSTPROCESS(DataBuffer) +{ +} + +LUA_BIND_IMPL_METHOD(DataBuffer, _GetLength) +{ + LUA_BIND_PREPARE(L, DataBuffer); + state.Push(self->length); + return 1; +} \ No newline at end of file -- cgit v1.1-26-g67d0