add GNU __attribute__((__format__(printf,...))) to new aprintf function
This commit is contained in:
@@ -212,12 +212,18 @@ __attribute__((__format__(printf,4,5)))
|
||||
gpi_string_list_to_flags(const char *str[],
|
||||
const StringFlagItem *map);
|
||||
|
||||
/* Allocates a sufficiently large buffer and interpolates the format
|
||||
* string with the proveded va_list args. The returned memory has to
|
||||
* be freed by the caller. */
|
||||
char*
|
||||
gpi_vsnprintf (const char* format, va_list args);
|
||||
/* Allocates a sufficiently large buffer and interpolates the format
|
||||
* string with the proveded va_list args. The returned memory has to
|
||||
* be freed by the caller. */
|
||||
#ifdef __GNUC__
|
||||
__attribute__((__format__(printf,1,0)))
|
||||
#endif
|
||||
char*
|
||||
gpi_vsnprintf (const char* format, va_list args);
|
||||
|
||||
#ifdef __GNUC__
|
||||
__attribute__((__format__(printf,1,2)))
|
||||
#endif
|
||||
static inline char*
|
||||
aprintf(const char *fmt, ...)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user