summaryrefslogtreecommitdiff
path: root/plugins/MirLua/Modules/JSON/src/json.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-06-19 18:42:13 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-06-19 18:42:13 +0000
commit1b6c4e6e4a16ed49570e1787641e5af79dba23f7 (patch)
tree620245ae2a5ded115b26f79a6f422881a9340365 /plugins/MirLua/Modules/JSON/src/json.cpp
parent6593f9613819dbc42ffff76a4d7a6d5156b46eae (diff)
MirLua: almost work m_json
git-svn-id: http://svn.miranda-ng.org/main/trunk@17013 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/Modules/JSON/src/json.cpp')
-rw-r--r--plugins/MirLua/Modules/JSON/src/json.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/plugins/MirLua/Modules/JSON/src/json.cpp b/plugins/MirLua/Modules/JSON/src/json.cpp
deleted file mode 100644
index c8680c753c..0000000000
--- a/plugins/MirLua/Modules/JSON/src/json.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "stdafx.h"
-
-static int lua_decode(lua_State *L)
-{
- const char *string = luaL_checkstring(L, 1);
- new (L) MT(json_parse(string));
- luaL_setmetatable(L, MT_JSON);
- return 1;
-}
-
-int json__call(lua_State *L);
-static int lua_encode(lua_State *L)
-{
- return json__call(L);
-}
-
-static const luaL_Reg methods[] =
-{
- { "decode", lua_decode },
- { "encode", lua_encode },
- { NULL, NULL }
-};
-
-LUA_LIBRARY_EXPORT(json)
-{
- luaL_newlib(L, methods);
-
- luaL_newmetatable(L, MT_JSON);
- luaL_setfuncs(L, jsonApi, 0);
- lua_pop(L, 1);
-
- return 1;
-} \ No newline at end of file