From 2a498d86625f65f6ab308fa20c421099c785bf94 Mon Sep 17 00:00:00 2001 From: aunsane Date: Thu, 22 Mar 2018 01:53:49 +0300 Subject: 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 --- plugins/MirLua/src/m_json.h | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'plugins/MirLua/src/m_json.h') 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 - -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" -- cgit v1.2.3