diff options
author | Greg Hudson <ghudson@mit.edu> | 2013-07-16 18:09:55 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2013-07-16 18:09:55 -0400 |
commit | ea29df4d93b1b7b384c15f39a4ee20be3e0991ac (patch) | |
tree | 25837e2647b89b5f12f5712f1daa113400db9f58 /src/include | |
parent | 57d0b4b300e43722ae9f080fbf132edeb3834323 (diff) | |
download | krb5-ea29df4d93b1b7b384c15f39a4ee20be3e0991ac.tar.gz krb5-ea29df4d93b1b7b384c15f39a4ee20be3e0991ac.tar.xz krb5-ea29df4d93b1b7b384c15f39a4ee20be3e0991ac.zip |
Clarify and improve k5_json_object_set
Document that k5_json_object_set can be used to overwrite an existing
key, and make it possible to remove a key by setting it to NULL.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/k5-json.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/k5-json.h b/src/include/k5-json.h index b01b8b847e..8b22cd39d3 100644 --- a/src/include/k5-json.h +++ b/src/include/k5-json.h @@ -168,7 +168,11 @@ void k5_json_object_iterate(k5_json_object obj, /* Return the number of mappings in an object. */ size_t k5_json_object_count(k5_json_object obj); -/* Store val into object at key, incrementing val's reference count. */ +/* + * Store val into object at key, incrementing val's reference count and + * releasing any previous value at key. If val is NULL, key is removed from + * obj if it exists, and obj remains unchanged if it does not. + */ int k5_json_object_set(k5_json_object obj, const char *key, k5_json_value val); /* Get an alias to the object's value for key, without incrementing the |