diff options
Diffstat (limited to 'source/core/StarLua.hpp')
-rw-r--r-- | source/core/StarLua.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/core/StarLua.hpp b/source/core/StarLua.hpp index 84fc256..2fe275d 100644 --- a/source/core/StarLua.hpp +++ b/source/core/StarLua.hpp @@ -1467,6 +1467,8 @@ namespace LuaDetail { // index. void shallowCopy(lua_State* state, int sourceIndex, int targetIndex); + LuaTable insertJsonMetatable(LuaEngine& engine, LuaTable const& table, Json::Type type); + // Creates a custom lua table from a JsonArray or JsonObject that has // slightly different behavior than a standard lua table. The table // remembers nil entries, as well as whether it was initially constructed @@ -1489,10 +1491,14 @@ namespace LuaDetail { // Create a JsonList container table Json jarrayCreate(); - // Create a JsonMap container table Json jobjectCreate(); + // Adds the Json array metatable to a Lua table or creates one. + LuaTable jarray(LuaEngine& engine, Maybe<LuaTable> table); + // Adds the Json object metatable to a Lua table or creates one. + LuaTable jobject(LuaEngine& engine, Maybe<LuaTable> table); + // *Really* remove an entry from a JsonList or JsonMap container table, // including removing it from the __nils table. If the given table is not a // special container table, is equivalent to setting the key entry to nil. |