]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Expose meta_data_toc function.
authorJavier Kohen <jkohen@google.com>
Wed, 6 Nov 2019 19:46:17 +0000 (16:46 -0300)
committerGitHub <noreply@github.com>
Wed, 6 Nov 2019 19:46:17 +0000 (16:46 -0300)
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

src/daemon/utils_cache.c

index 672b01f101e81af90a774b255a64bef2992d9669..5e8cf75b619a3abbb9322fe57492061fccb54d75 100644 (file)
@@ -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