MSVC 2005 and higher supports variable length macroses, so RNA_warning can report

warnings in nicer format even on msvc now.
This commit is contained in:
Sergey Sharybin
2011-11-23 15:39:29 +00:00
parent 307a0f6fec
commit 0f3b1d23de

View File

@@ -995,8 +995,8 @@ StructRNA *ID_code_to_RNA_type(short idcode);
/* macro which inserts the function name */
#ifdef __GNUC__
# define RNA_warning(format, args...) _RNA_warning("%s: " format "\n", __func__, ##args)
#else /* MSVC doesnt support variable length args in macros */
# define RNA_warning _RNA_warning
#else
# define RNA_warning(format, args, ...) _RNA_warning("%s: " format "\n", __FUNCTION__, __VA_ARGS__)
#endif
void _RNA_warning(const char *format, ...)