From ec6dc0e991b3653e16a637bfaa0daf783f82af31 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 24 Oct 2012 12:06:01 -0400 Subject: Don't save empty cc_config_out in ccache Add an internal json function to make it easier to detect if an object is empty, and use it to avoid creating a ccache config entry for preauth module config data if there isn't any to save. ticket: 7427 (new) target_version: 1.11 tags: pullup --- src/include/k5-json.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include') diff --git a/src/include/k5-json.h b/src/include/k5-json.h index fb9a3afe6..42dcfa3d3 100644 --- a/src/include/k5-json.h +++ b/src/include/k5-json.h @@ -148,6 +148,8 @@ k5_json_object k5_json_object_create(void); void k5_json_object_iterate(k5_json_object obj, k5_json_object_iterator_fn func, void *arg); +/* 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. */ int k5_json_object_set(k5_json_object obj, const char *key, k5_json_value val); -- cgit