mirror of
https://github.com/json-c/json-c.git
synced 2026-03-29 09:59:06 +08:00
Issue #236: Add -Wcast-qual and fix casts to retain constness.
To better distinguish between entry->k and entry->v being const within linkhash, but non-const outside, add lh_entry_v() and lh_entry_k() accessors. Make lh_entry->k const.
This commit is contained in:
@@ -28,7 +28,7 @@ int main()
|
||||
{
|
||||
const char *input = "\"\\ud840\\udd26,\\ud840\\udd27,\\ud800\\udd26,\\ud800\\udd27\"";
|
||||
const char *expected = "\xF0\xA0\x84\xA6,\xF0\xA0\x84\xA7,\xF0\x90\x84\xA6,\xF0\x90\x84\xA7";
|
||||
struct json_object *parse_result = json_tokener_parse((char*)input);
|
||||
struct json_object *parse_result = json_tokener_parse(input);
|
||||
const char *unjson = json_object_get_string(parse_result);
|
||||
|
||||
printf("input: %s\n", input);
|
||||
|
||||
Reference in New Issue
Block a user