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
--- a/ucx/utils.h	Tue Mar 31 10:17:36 2015 +0200
+++ b/ucx/utils.h	Sat Apr 04 18:58:24 2015 +0200
@@ -219,6 +219,10 @@
  */
 sstr_t ucx_asprintf(UcxAllocator *allocator, const char *fmt, ...);
 
+/** Shortcut for ucx_asprintf() with default allocator. */
+#define ucx_sprintf(fmt, ...) \
+    ucx_asprintf(ucx_default_allocator(), fmt, __VA_ARGS___)
+
 /**
  * <code>va_list</code> version of ucx_asprintf().
  * 

mercurial