aboutsummaryrefslogtreecommitdiff
path: root/io/param.c
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2015-05-26 14:06:52 +0800
committerDeterminant <[email protected]>2015-05-26 14:06:52 +0800
commit81bf2d653902860c5d28ccade19ac6e1fd56acaf (patch)
tree831a25c84332ac0839dbe498f61620ea634170e0 /io/param.c
parent8c5246a8794011ca0c25f15643771f031d258594 (diff)
add layer and param
Diffstat (limited to 'io/param.c')
-rw-r--r--io/param.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/io/param.c b/io/param.c
index 627c815..477df28 100644
--- a/io/param.c
+++ b/io/param.c
@@ -220,12 +220,12 @@ int nerv_param_file_write_chunkdata(lua_State *L) {
write_param_metadata(pfh->fp, metadata_str, &status);
CHECK_WRITE(status);
lua_pushvalue(L, 3);
- lua_getfield(L, -1, "save");
+ lua_getfield(L, -1, "write");
if (!lua_isfunction(L, -1))
- nerv_error(L, "\"save\" method must be implemented");
+ nerv_error(L, "\"write\" method must be implemented");
lua_pushvalue(L, -2);
- lua_pushvalue(L, 4); /* pass handle as parameter to save() */
- lua_call(L, 2, 0); /* let the save() to write */
+ lua_pushvalue(L, 4); /* pass handle as parameter to write() */
+ lua_call(L, 2, 0); /* let the write() to write */
lua_pop(L, 1);
size = ftello(pfh->fp) - start;
fseeko(pfh->fp, start, SEEK_SET);