modify the json_object, replace c_int64/c_uint64 with struct{union{int64, uint64},...}

This commit is contained in:
dota17
2020-02-26 20:54:36 +08:00
parent 3c3b5920f7
commit c816de212b
7 changed files with 111 additions and 87 deletions

View File

@@ -91,12 +91,11 @@ static void getit(struct json_object *new_obj, const char *field)
static void checktype_header()
{
printf("json_object_is_type: %s,%s,%s,%s,%s,%s,%s,%s\n",
printf("json_object_is_type: %s,%s,%s,%s,%s,%s,%s\n",
json_type_to_name(json_type_null),
json_type_to_name(json_type_boolean),
json_type_to_name(json_type_double),
json_type_to_name(json_type_int),
json_type_to_name(json_type_uint),
json_type_to_name(json_type_object),
json_type_to_name(json_type_array),
json_type_to_name(json_type_string));
@@ -107,13 +106,12 @@ static void checktype(struct json_object *new_obj, const char *field)
if (field && !json_object_object_get_ex(new_obj, field, &o))
printf("Field %s does not exist\n", field);
printf("new_obj%s%-18s: %d,%d,%d,%d,%d,%d,%d,%d\n",
printf("new_obj%s%-18s: %d,%d,%d,%d,%d,%d,%d\n",
field ? "." : " ", field ? field : "",
json_object_is_type(o, json_type_null),
json_object_is_type(o, json_type_boolean),
json_object_is_type(o, json_type_double),
json_object_is_type(o, json_type_int),
json_object_is_type(o, json_type_uint),
json_object_is_type(o, json_type_object),
json_object_is_type(o, json_type_array),
json_object_is_type(o, json_type_string));