diff options
author | liljencrantz <liljencrantz@gmail.com> | 2007-09-29 07:32:27 +1000 |
---|---|---|
committer | liljencrantz <liljencrantz@gmail.com> | 2007-09-29 07:32:27 +1000 |
commit | 0e716763d80f56f6cb80ad9b673af8fff9296a95 (patch) | |
tree | e2042eddc8052c4f218cdc8dd0c8c883aade7662 /util.h | |
parent | 50f5941a8234d2224bf3c74403c554cca6224b0e (diff) |
Replace variadic functions like sb_append and contains_str with variadic macros without a sentinel.
darcs-hash:20070928213227-75c98-2e7b06242acfd5fd0bf02ce77c41d52374f2363a.gz
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -599,11 +599,6 @@ void sb_init( string_buffer_t * ); string_buffer_t *sb_new(); /** - Append a string to the buffer -*/ -void sb_append( string_buffer_t *, const wchar_t * ); - -/** Append a part of a string to the buffer */ void sb_append_substring( string_buffer_t *, const wchar_t *, size_t ); @@ -613,6 +608,7 @@ void sb_append_substring( string_buffer_t *, const wchar_t *, size_t ); */ void sb_append_char( string_buffer_t *, wchar_t ); +#define sb_append( sb,... ) sb_append_internal( sb, __VA_ARGS__, (void *)0 ) /** Append a null terminated list of strings to the buffer. @@ -622,7 +618,7 @@ void sb_append_char( string_buffer_t *, wchar_t ); Do not forget to cast the last 0 to (void *), or you might encounter errors on 64-bit platforms! */ -__sentinel void sb_append2( string_buffer_t *, ... ); +__sentinel void sb_append_internal( string_buffer_t *, ... ); /** Append formated string data to the buffer. This function internally |