diff options
author | Thibault Charbonnier <thibaultcha@me.com> | 2016-12-16 18:27:49 -0800 |
---|---|---|
committer | Yichun Zhang (agentzh) <agentzh@gmail.com> | 2016-12-17 20:14:47 -0800 |
commit | a61d7840ba2d79df8cb73d8c864a99d0eb06d580 (patch) | |
tree | d410e0db9567b283e801ef4cb0e1b15517601da1 /lua | |
parent | a18d6999d82ba34493892a609c00937b81c84355 (diff) | |
download | lua-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