From d9041d6e12ded456c17622f7f2e7bbacb9e99b1a Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 26 Mar 2019 09:09:02 +0800 Subject: *misc --- source/libs/asura-lib-utils/io/binding/_file_data.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'source/libs/asura-lib-utils/io/binding/_file_data.cpp') diff --git a/source/libs/asura-lib-utils/io/binding/_file_data.cpp b/source/libs/asura-lib-utils/io/binding/_file_data.cpp index 56f65f7..09a0643 100644 --- a/source/libs/asura-lib-utils/io/binding/_file_data.cpp +++ b/source/libs/asura-lib-utils/io/binding/_file_data.cpp @@ -7,10 +7,6 @@ namespace AsuraEngine namespace IO { -#define PREPARE(L) \ - LUAX_STATE(L); \ - FileData* self = state.GetUserdata(1); - LUAX_REGISTRY(FileData) { LUAX_REGISTER_METHODS(state, @@ -28,7 +24,7 @@ namespace AsuraEngine // filename = filedata:GetFileName() LUAX_IMPL_METHOD(FileData, _GetFileName) { - PREPARE(L); + LUAX_PREPARE(L, FileData); string filename = self->GetFileName(); state.Push(filename); return 1; @@ -37,7 +33,7 @@ namespace AsuraEngine // extension = filedata:GetExtension() LUAX_IMPL_METHOD(FileData, _GetExtension) { - PREPARE(L); + LUAX_PREPARE(L, FileData); string extension = self->GetExtension(); state.Push(extension); return 1; @@ -46,7 +42,7 @@ namespace AsuraEngine // name = filedata:GetName() LUAX_IMPL_METHOD(FileData, _GetName) { - PREPARE(L); + LUAX_PREPARE(L, FileData); string extension = self->GetName(); state.Push(extension); return 1; @@ -55,10 +51,10 @@ namespace AsuraEngine // databuffer = filedata:GetDataBuffer() LUAX_IMPL_METHOD(FileData, _GetDataBuffer) { - PREPARE(L); + LUAX_PREPARE(L, FileData); self->PushLuaxMemberRef(state, self->mDataRef); return 1; } } -} +} \ No newline at end of file -- cgit v1.1-26-g67d0