diff options
author | chai <chaifix@163.com> | 2019-03-29 00:43:25 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-03-29 00:43:25 +0800 |
commit | f4c338c63f3456a8eccd56c35e233843687d55be (patch) | |
tree | 7278fe4723320c9ef310c5a04d92bf0be1bc778c /source/libs/asura-lib-utils/io/binding/_data_buffer.cpp | |
parent | 3bced067a4144381e59ce4bd0eb749eeff5ad1f4 (diff) |
*thread
Diffstat (limited to 'source/libs/asura-lib-utils/io/binding/_data_buffer.cpp')
-rw-r--r-- | source/libs/asura-lib-utils/io/binding/_data_buffer.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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<DataBuffer>(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<int>(2); + size_t size = state.CheckValue<int>(2); self->Refactor(size); return 0; } |