From: Javier Kohen Date: Wed, 6 Nov 2019 19:46:17 +0000 (-0300) Subject: Expose meta_data_toc function. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=fe4a2a28cae8fb143d7c36da99a0fe8f8c780498;p=collectd.git Expose meta_data_toc function. This is useful for traversing all the meta data elements in a value list, since there is no element to look up the metadata object. For example usage, see https://github.com/Stackdriver/collectd/pull/166 --- diff --git a/src/daemon/utils_cache.c b/src/daemon/utils_cache.c index 672b01f1..5e8cf75b 100644 --- a/src/daemon/utils_cache.c +++ b/src/daemon/utils_cache.c @@ -1003,6 +1003,11 @@ int uc_meta_data_exists(const value_list_t *vl, int uc_meta_data_delete(const value_list_t *vl, const char *key) UC_WRAP(meta_data_delete) + +/* The second argument is called `toc` in the API, but the macro expects + * `key`. */ +int uc_meta_data_toc(const value_list_t *vl, char ***key) UC_WRAP(meta_data_toc) + #undef UC_WRAP /* We need a new version of this macro because the following functions take