mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
serialization functions naming update
This commit is contained in:
parent
7f58a38454
commit
fdd9ede9d5
4 changed files with 8 additions and 6 deletions
|
|
@ -23,14 +23,14 @@ static int l_json_stringify(lua_State* L) {
|
|||
}
|
||||
|
||||
static int l_json_parse(lua_State* L) {
|
||||
auto string = lua_tostring(L, 1);
|
||||
auto string = scripting::state->requireString(1);
|
||||
auto element = json::parse("<string>", string);
|
||||
scripting::state->pushvalue(element);
|
||||
return 1;
|
||||
}
|
||||
|
||||
const luaL_Reg jsonlib [] = {
|
||||
{"stringify", lua_wrap_errors<l_json_stringify>},
|
||||
{"tostring", lua_wrap_errors<l_json_stringify>},
|
||||
{"parse", lua_wrap_errors<l_json_parse>},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ static int l_toml_parse(lua_State*) {
|
|||
}
|
||||
|
||||
const luaL_Reg tomllib [] = {
|
||||
{"serialize", lua_wrap_errors<l_toml_stringify>},
|
||||
{"deserialize", lua_wrap_errors<l_toml_parse>},
|
||||
{"tostring", lua_wrap_errors<l_toml_stringify>},
|
||||
{"parse", lua_wrap_errors<l_toml_parse>},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue