aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorThibault Charbonnier <thibaultcha@me.com>2016-12-16 18:27:49 -0800
committerYichun Zhang (agentzh) <agentzh@gmail.com>2016-12-17 20:14:47 -0800
commita61d7840ba2d79df8cb73d8c864a99d0eb06d580 (patch)
treed410e0db9567b283e801ef4cb0e1b15517601da1 /lua
parenta18d6999d82ba34493892a609c00937b81c84355 (diff)
downloadlua-cjson-a61d7840ba2d79df8cb73d8c864a99d0eb06d580.tar.gz
lua-cjson-a61d7840ba2d79df8cb73d8c864a99d0eb06d580.tar.bz2
lua-cjson-a61d7840ba2d79df8cb73d8c864a99d0eb06d580.zip
bugfix: preserve 'empty_array_mt' behavior upon multiple loadings of the module.
Prior to this fix, when the module would be loaded several times (by-passing `package.loaded`), the `lua_cjson_new` function would override the `empty_array_mt` table in the registry with a new one. Comparison for equality between those tables would then fail, and the behavior would be broken. This was discovered after loading `cjson` *and* `cjson.safe` in the same application, resulting in two calls to `lua_cjson_new`. Signed-off-by: Yichun Zhang (agentzh) <agentzh@gmail.com>
Diffstat (limited to 'lua')
0 files changed, 0 insertions, 0 deletions