mirror of
https://github.com/json-c/json-c.git
synced 2026-04-04 12:59:07 +08:00
Rename boolean type to json_bool
In building large systems, there are often clashes over the preferred base type to use for bool/boolean. At least one experience has been with a 3rd party proprietary library which can not be changed. In that case, boolean was a synonym for unsigned char and used widely in packed structures.
This commit is contained in:
@@ -275,7 +275,7 @@ static int json_object_boolean_to_json_string(struct json_object* jso,
|
||||
else return sprintbuf(pb, "false");
|
||||
}
|
||||
|
||||
struct json_object* json_object_new_boolean(boolean b)
|
||||
struct json_object* json_object_new_boolean(json_bool b)
|
||||
{
|
||||
struct json_object *jso = json_object_new(json_type_boolean);
|
||||
if(!jso) return NULL;
|
||||
@@ -284,7 +284,7 @@ struct json_object* json_object_new_boolean(boolean b)
|
||||
return jso;
|
||||
}
|
||||
|
||||
boolean json_object_get_boolean(struct json_object *jso)
|
||||
json_bool json_object_get_boolean(struct json_object *jso)
|
||||
{
|
||||
if(!jso) return FALSE;
|
||||
switch(jso->o_type) {
|
||||
|
||||
Reference in New Issue
Block a user