diff options
author | aunsane <aunsane@gmail.com> | 2018-03-22 01:53:49 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-03-22 01:54:09 +0300 |
commit | 2a498d86625f65f6ab308fa20c421099c785bf94 (patch) | |
tree | 9c0d59f41411e46288f88ccdbde4a0d23f440720 /plugins/MirLua/src/m_json.h | |
parent | 46cded99bbfb90bea8e998e9183c20cc3e4f7365 (diff) |
MirLua: various fixes
- CMLua now inherit PLUGIN
- additional lua fuctions initialization moved to separated loader
- ability to realod script without object recreation
- scropt object should control own enable state
- fix m_json whit is not workes almost at all
- version bump
Diffstat (limited to 'plugins/MirLua/src/m_json.h')
-rw-r--r-- | plugins/MirLua/src/m_json.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/plugins/MirLua/src/m_json.h b/plugins/MirLua/src/m_json.h index bb3a2e1568..1357505bec 100644 --- a/plugins/MirLua/src/m_json.h +++ b/plugins/MirLua/src/m_json.h @@ -1,29 +1,6 @@ #ifndef _LUA_M_JSON_H_ #define _LUA_M_JSON_H_ -#include <m_json.h> - -struct JSON -{ - JSONNode *node; - bool bDelete; - - JSON(JSONNode &refNode, bool bCopy = false) - : node(bCopy ? json_copy(&refNode) : &refNode), bDelete(bCopy) { } - JSON(JSONNode *n, bool bD = true) - : node(n), bDelete(bD) { } - ~JSON() - { - if (bDelete) - json_delete(node); - } - - __inline void* operator new(size_t size, lua_State *L) - { - return lua_newuserdata(L, size); - } -}; - #define MT_JSON "JSON" #define MLUA_JSON "m_json" |