summaryrefslogtreecommitdiff
path: root/lua_cjson.c
diff options
context:
space:
mode:
authorBrandon <lordnynex@gmail.com>2015-11-01 01:51:30 -0700
committerYichun Zhang (agentzh) <agentzh@gmail.com>2015-11-04 22:37:29 +0800
commitf79aa68af865ae84b36c7e794beedd87fef2ed54 (patch)
tree882359f4bca0651aff399cb18c1779e65a3cc7a1 /lua_cjson.c
parentfab1440c3268fa415d098ff37bf0f929eeb53844 (diff)
downloadlua-cjson-2.1.0.3.tar.gz
lua-cjson-2.1.0.3.tar.bz2
lua-cjson-2.1.0.3.zip
feature: now we allow up to 16 decimal places in JSON number encoding via cjson.encode_number_precision().2.1.0.3
thanks lordnynex for the patch in #4. Test cases for changing precision
Diffstat (limited to 'lua_cjson.c')
-rw-r--r--lua_cjson.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua_cjson.c b/lua_cjson.c
index 97f2350..5ff3bf7 100644
--- a/lua_cjson.c
+++ b/lua_cjson.c
@@ -299,7 +299,7 @@ static int json_cfg_encode_number_precision(lua_State *l)
299{ 299{
300 json_config_t *cfg = json_arg_init(l, 1); 300 json_config_t *cfg = json_arg_init(l, 1);
301 301
302 return json_integer_option(l, 1, &cfg->encode_number_precision, 1, 14); 302 return json_integer_option(l, 1, &cfg->encode_number_precision, 1, 16);
303} 303}
304 304
305/* Configures how to treat empty table when encode lua table */ 305/* Configures how to treat empty table when encode lua table */