mirror of
https://github.com/json-c/json-c.git
synced 2026-09-08 00:56:50 +08:00
The iterative rewrite in 17328a67 made json_object_put() return 0 for freed scalars, strings and empty containers, contradicting the documented contract in json_object.h. Distinguish "freed" from "still referenced" in _json_object_put_maybe_free() and add regression tests.
11 lines
300 B
Plaintext
11 lines
300 B
Plaintext
Parsed depth 100000 string to json_object: yes
|
|
Freed json_object
|
|
in user_delete, userdata_val=1
|
|
put(empty object) returned 1
|
|
put(empty array) returned 1
|
|
put(string) returned 1
|
|
put(int) returned 1
|
|
put(non-empty object) returned 1
|
|
put(still-referenced object) returned 0
|
|
put(last reference) returned 1
|