summaryrefslogtreecommitdiff
path: root/plugins/MirLua/Modules/JSON/src/json.cpp
diff options
context:
space:
mode:
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