Code

curl_json plugin: Refactor the way trees/keys are stored.
authorFlorian Forster <octo@collectd.org>
Tue, 16 May 2017 20:44:26 +0000 (22:44 +0200)
committerFlorian Forster <octo@collectd.org>
Tue, 16 May 2017 20:49:13 +0000 (22:49 +0200)
commit307bf74a8cef765fcd5d788f6aad5b2e9bdf670b
tree7f1053d10cc902a89619cf2ad07a30f4e4f20872
parentb7ff429c9f1440bac83eaa26c75945742ea70c0b
curl_json plugin: Refactor the way trees/keys are stored.

Previously, keys had a "magic" as their first member which was used to
differentiate between the two types when they were returned from the
binary search tree.

This patch creates a new struct, cj_tree_entry_t, which includes an enum
identifying which union member is valid.
src/curl_json.c
src/curl_json_test.c