diff options
author | Petr Machata <pmachata@redhat.com> | 2012-11-28 22:06:17 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2013-03-08 22:52:31 +0100 |
commit | 3e86576623d16c5032af4d50108eb878166fb686 (patch) | |
tree | c784bcddc39c2dcf76369dd4db84f0e1a95634a7 /dict.h | |
parent | 2718e3fdab7a3ac75dad45c6969f1aeb4a159a68 (diff) | |
download | ltrace-3e86576623d16c5032af4d50108eb878166fb686.tar.gz |
Add dict_{dtor,clone}_string
... because it's bound to come up often.
Diffstat (limited to 'dict.h')
-rw-r--r-- | dict.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -218,4 +218,10 @@ size_t dict_hash_string(const char **key); /* An equality predicate callback for strings. */ int dict_eq_string(const char **key1, const char **key2); +/* A dtor which calls 'free' on keys in a table. */ +void dict_dtor_string(const char **key, void *data); + +/* A cloner that calls 'strdup' on keys in a table. */ +int dict_clone_string(const char **tgt, const char **src, void *data); + #endif /* _DICT_H_ */ |