diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-22 09:26:19 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-22 09:49:13 -0400 |
commit | 3883338c8121212b3f6f9c020d489d50bbcdd855 (patch) | |
tree | 18d9b69f63060354ad9c7525a46c63e0dcef54d3 /src/lib/container/smartlist.h | |
parent | 1abadee3fd1c15f3720003c411ec6043c29d7c09 (diff) | |
download | tor-3883338c8121212b3f6f9c020d489d50bbcdd855.tar.gz tor-3883338c8121212b3f6f9c020d489d50bbcdd855.zip |
Move smartlist_add_{v,}asprintf into smartlist.[ch]
Now that I know that "strings" nests below "container", I know this
is safe.
Diffstat (limited to 'src/lib/container/smartlist.h')
-rw-r--r-- | src/lib/container/smartlist.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/container/smartlist.h b/src/lib/container/smartlist.h index 7b80a9fed3..53a4948cf6 100644 --- a/src/lib/container/smartlist.h +++ b/src/lib/container/smartlist.h @@ -37,6 +37,11 @@ void smartlist_clear(smartlist_t *sl); void smartlist_add(smartlist_t *sl, void *element); void smartlist_add_all(smartlist_t *sl, const smartlist_t *s2); void smartlist_add_strdup(struct smartlist_t *sl, const char *string); +void smartlist_add_asprintf(struct smartlist_t *sl, const char *pattern, ...) + CHECK_PRINTF(2, 3); +void smartlist_add_vasprintf(struct smartlist_t *sl, const char *pattern, + va_list args) + CHECK_PRINTF(2, 0); void smartlist_remove(smartlist_t *sl, const void *element); void smartlist_remove_keeporder(smartlist_t *sl, const void *element); void *smartlist_pop_last(smartlist_t *sl); |