From f4c338c63f3456a8eccd56c35e233843687d55be Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 29 Mar 2019 00:43:25 +0800 Subject: *thread --- .../libs/asura-lib-utils/io/binding/_data_buffer.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/libs/asura-lib-utils/io/binding/_data_buffer.cpp') diff --git a/source/libs/asura-lib-utils/io/binding/_data_buffer.cpp b/source/libs/asura-lib-utils/io/binding/_data_buffer.cpp index c42888c..6725bc4 100644 --- a/source/libs/asura-lib-utils/io/binding/_data_buffer.cpp +++ b/source/libs/asura-lib-utils/io/binding/_data_buffer.cpp @@ -10,12 +10,12 @@ namespace AsuraEngine LUAX_REGISTRY(DataBuffer) { LUAX_REGISTER_METHODS(state, - { "New", _New }, - { "GetBuffer", _GetData }, - { "GetSize", _GetSize }, - { "Refactor", _Refactor }, - { "Load", _Load }, - { "Clear", _Clear } + { "New", _New }, + { "GetData", _GetData }, + { "GetSize", _GetSize }, + { "Refactor", _Refactor }, + { "Load", _Load }, + { "Clear", _Clear } ); } @@ -49,14 +49,14 @@ namespace AsuraEngine } } - // lsting, len = databuffer:GetBuffer() + // lsting, len = databuffer:GetData() LUAX_IMPL_METHOD(DataBuffer, _GetData) { LUAX_SETUP(L, "U"); DataBuffer* self = state.GetUserdata(1); lua_pushlstring(L, self->GetData(), self->GetSize()); - return 2; + return 1; } // length = databuffer:GetSize() @@ -74,7 +74,7 @@ namespace AsuraEngine { LUAX_PREPARE(L, DataBuffer); - size_t size = state.CheckParam(2); + size_t size = state.CheckValue(2); self->Refactor(size); return 0; } -- cgit v1.1-26-g67d0