added ucx_sprintf macro

Sat, 04 Apr 2015 18:58:24 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 04 Apr 2015 18:58:24 +0200
changeset 190
07e2f2a78ac6
parent 189
f43bbd33fec0
child 191
4d251abe0836

added ucx_sprintf macro

ucx/utils.h file | annotate | diff | comparison | revisions
     1.1 --- a/ucx/utils.h	Tue Mar 31 10:17:36 2015 +0200
     1.2 +++ b/ucx/utils.h	Sat Apr 04 18:58:24 2015 +0200
     1.3 @@ -219,6 +219,10 @@
     1.4   */
     1.5  sstr_t ucx_asprintf(UcxAllocator *allocator, const char *fmt, ...);
     1.6  
     1.7 +/** Shortcut for ucx_asprintf() with default allocator. */
     1.8 +#define ucx_sprintf(fmt, ...) \
     1.9 +    ucx_asprintf(ucx_default_allocator(), fmt, __VA_ARGS___)
    1.10 +
    1.11  /**
    1.12   * <code>va_list</code> version of ucx_asprintf().
    1.13   * 

mercurial