summaryrefslogtreecommitdiff
path: root/source/libs/asura-lib-utils/io/binding/_file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/libs/asura-lib-utils/io/binding/_file.cpp')
-rw-r--r--source/libs/asura-lib-utils/io/binding/_file.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/libs/asura-lib-utils/io/binding/_file.cpp b/source/libs/asura-lib-utils/io/binding/_file.cpp
index 0670379..c44bc90 100644
--- a/source/libs/asura-lib-utils/io/binding/_file.cpp
+++ b/source/libs/asura-lib-utils/io/binding/_file.cpp
@@ -49,7 +49,7 @@ namespace AsuraEngine
{
LUAX_STATE(L);
- cc8* name = state.CheckParam<cc8*>(1);
+ cc8* name = state.CheckValue<cc8*>(1);
File* file = new File(name);
file->PushLuaxUserdata(state);
return 1;
@@ -60,7 +60,7 @@ namespace AsuraEngine
{
LUAX_PREPARE(L, File);
- File::FileMode mode = (File::FileMode)state.CheckParam<int>(2);
+ File::FileMode mode = (File::FileMode)state.CheckValue<int>(2);
state.Push(self->Open(mode));
return 1;
}
@@ -115,7 +115,7 @@ namespace AsuraEngine
DataBuffer* db = state.CheckUserdata<DataBuffer>(2);
if (!db) return state.ErrorType(2, "DataBuffer");
- int len = state.CheckParam<int>(3);
+ int len = state.CheckValue<int>(3);
int size = self->Read(db, len);
state.Push(size);
return 1;
@@ -164,7 +164,7 @@ namespace AsuraEngine
{
LUAX_PREPARE(L, File);
- int pos = state.CheckParam<int>(2);
+ int pos = state.CheckValue<int>(2);
state.Push(self->Seek(pos));
return 1;
}
@@ -174,8 +174,8 @@ namespace AsuraEngine
{
LUAX_PREPARE(L, File);
- BufferMode mode = (BufferMode)state.CheckParam<int>(2);
- int size = state.CheckParam<int>(3);
+ BufferMode mode = (BufferMode)state.CheckValue<int>(2);
+ int size = state.CheckValue<int>(3);
state.Push(self->SetBuffer(mode, size));
return 1;
}