From 2b693fb4493764e71f11b6257c0ce58cdbb8a779 Mon Sep 17 00:00:00 2001 From: Mark Pulford Date: Sat, 16 Apr 2011 22:39:20 +0930 Subject: Initialise lua_json lookup tables once (globally) --- lua_json.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua_json.c b/lua_json.c index 9b7e4e2..25078a3 100644 --- a/lua_json.c +++ b/lua_json.c @@ -343,7 +343,7 @@ static void json_process_value(lua_State *l, json_parse_t *json, json_token_t *t static json_token_type_t json_ch2token[256]; static char json_ch2escape[256]; -static void json_init_lookup_tables() +void lua_json_global_init() { int i; @@ -693,8 +693,6 @@ void lua_json_init(lua_State *l) { NULL, NULL } }; - json_init_lookup_tables(); - luaL_register(l, "json", reg); /* Set json.null, and pop "json" table from the stack */ -- cgit v1.2.3-55-g6feb