ucx/utils.h

changeset 124
80609f9675f1
parent 0
1f419bd32da1
child 152
62921b370c60
equal deleted inserted replaced
123:55adc92e7c09 124:80609f9675f1
1 /* 1 /*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 * 3 *
4 * Copyright 2013 Olaf Wintermann. All rights reserved. 4 * Copyright 2015 Olaf Wintermann. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
217 * @param ... additional arguments 217 * @param ... additional arguments
218 * @return a sstr_t containing the formatted string 218 * @return a sstr_t containing the formatted string
219 */ 219 */
220 sstr_t ucx_asprintf(UcxAllocator *allocator, const char *fmt, ...); 220 sstr_t ucx_asprintf(UcxAllocator *allocator, const char *fmt, ...);
221 221
222 /** Shortcut for ucx_asprintf() with default allocator. */
223 #define ucx_sprintf(fmt, ...) \
224 ucx_asprintf(ucx_default_allocator(), fmt, __VA_ARGS__)
225
222 /** 226 /**
223 * <code>va_list</code> version of ucx_asprintf(). 227 * <code>va_list</code> version of ucx_asprintf().
224 * 228 *
225 * @param allocator the UcxAllocator used for allocating the result sstr_t 229 * @param allocator the UcxAllocator used for allocating the result sstr_t
226 * @param fmt format string 230 * @param fmt format string

mercurial