summaryrefslogtreecommitdiff
path: root/json_object.h
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2012-03-31 11:12:20 -0700
committerEric Haszlakiewicz <erh+git@nimenees.com>2012-03-31 11:12:20 -0700
commit7e57d63aebf68889d3fe5ff94ab33e49f8de5ea3 (patch)
treedfbde409acd7c180f93c5908605be91214c4848d /json_object.h
parentd3c37b82a6de97c40a2403f2df0fd66f3d9fb616 (diff)
parent37e74674769d2ae224ad52b1a866eb38c00e2821 (diff)
downloadjson-c-7e57d63aebf68889d3fe5ff94ab33e49f8de5ea3.tar.gz
Merge pull request #16 from kdopen/master
Renaming the boolean type to json_bool in json_object.h
Diffstat (limited to 'json_object.h')
-rw-r--r--json_object.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/json_object.h b/json_object.h
index e4f4c45..1ee9fb0 100644
--- a/json_object.h
+++ b/json_object.h
@@ -21,10 +21,10 @@ extern "C" {
#define JSON_OBJECT_DEF_HASH_ENTRIES 16
#undef FALSE
-#define FALSE ((boolean)0)
+#define FALSE ((json_bool)0)
#undef TRUE
-#define TRUE ((boolean)1)
+#define TRUE ((json_bool)1)
extern const char *json_number_chars;
extern const char *json_hex_chars;
@@ -39,7 +39,7 @@ struct json_object_iter
/* forward structure definitions */
-typedef int boolean;
+typedef int json_bool;
typedef struct printbuf printbuf;
typedef struct lh_table lh_table;
typedef struct array_list array_list;
@@ -245,26 +245,26 @@ extern int json_object_array_put_idx(struct json_object *obj, int idx,
extern struct json_object* json_object_array_get_idx(struct json_object *obj,
int idx);
-/* boolean type methods */
+/* json_bool type methods */
/** Create a new empty json_object of type json_type_boolean
- * @param b a boolean TRUE or FALSE (0 or 1)
+ * @param b a json_bool TRUE or FALSE (0 or 1)
* @returns a json_object of type json_type_boolean
*/
-extern struct json_object* json_object_new_boolean(boolean b);
+extern struct json_object* json_object_new_boolean(json_bool b);
-/** Get the boolean value of a json_object
+/** Get the json_bool value of a json_object
*
- * The type is coerced to a boolean if the passed object is not a boolean.
+ * The type is coerced to a json_bool if the passed object is not a json_bool.
* integer and double objects will return FALSE if there value is zero
* or TRUE otherwise. If the passed object is a string it will return
* TRUE if it has a non zero length. If any other object type is passed
* TRUE will be returned if the object is not NULL.
*
* @param obj the json_object instance
- * @returns a boolean
+ * @returns a json_bool
*/
-extern boolean json_object_get_boolean(struct json_object *obj);
+extern json_bool json_object_get_boolean(struct json_object *obj);
/* int type methods */