The split of json_object into type-specific sub-structures is now functionally complete.

Remove all of the temporary defines, structures, old compat fuctions, extra fields, etc... that were needed during the conversion to a split set of json_object_* structures.
This commit is contained in:
Eric Haszlakiewicz
2020-06-07 03:30:39 +00:00
parent c4cc673071
commit 66d91fdf86
5 changed files with 89 additions and 433 deletions

View File

@@ -56,12 +56,12 @@ int main(int argc, char **argv)
#define MID "A MID STRING"
// 12345678901234567890123456789012....
#define HUGE "A string longer than 32 chars as to check non local buf codepath"
tmp = json_object_new_string(SHORT);
assert(strcmp(json_object_get_string(tmp), SHORT) == 0);
assert(strcmp(json_object_to_json_string(tmp), "\"" SHORT "\"") == 0);
json_object_set_string(tmp, MID);
tmp = json_object_new_string(MID);
assert(strcmp(json_object_get_string(tmp), MID) == 0);
assert(strcmp(json_object_to_json_string(tmp), "\"" MID "\"") == 0);
json_object_set_string(tmp, SHORT);
assert(strcmp(json_object_get_string(tmp), SHORT) == 0);
assert(strcmp(json_object_to_json_string(tmp), "\"" SHORT "\"") == 0);
json_object_set_string(tmp, HUGE);
assert(strcmp(json_object_get_string(tmp), HUGE) == 0);
assert(strcmp(json_object_to_json_string(tmp), "\"" HUGE "\"") == 0);