forked from bartvdbraak/blender
workaround for msvc not supporting variable length args in macros.
This commit is contained in:
parent
fe48e008e5
commit
2b33c6b0b2
@ -976,7 +976,11 @@ StructRNA *ID_code_to_RNA_type(short idcode);
|
||||
|
||||
|
||||
/* macro which inserts the function name */
|
||||
#define RNA_warning(format, args...) _RNA_warning("%s: " format "\n", __func__, ##args)
|
||||
#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
|
||||
#endif
|
||||
|
||||
void _RNA_warning(const char *format, ...)
|
||||
#ifdef __GNUC__
|
||||
|
@ -5383,6 +5383,11 @@ void _RNA_warning(const char *format, ...)
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
|
||||
/* gcc macro adds '\n', but cant use for other compilers */
|
||||
#ifndef __GNUC__
|
||||
fputc('\n', stdout);
|
||||
#endif
|
||||
|
||||
#ifdef WITH_PYTHON
|
||||
{
|
||||
extern void PyC_LineSpit(void);
|
||||
|
Loading…
Reference in New Issue
Block a user