diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-09 05:29:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-09 05:29:53 +0400 |
commit | a59ba9a519c076aad17e00442e3fc0ad6bf26284 (patch) | |
tree | f2eddeb85c33b39b5ce3768194cf5978fa6ac098 /source/blender/makesrna/RNA_access.h | |
parent | ae7401751c126dfd0373d6f16b71d0311c1c2ea2 (diff) |
- turn RNA_warning into a macro which includes the function name (was being written in manually but had incorrect func names in places).
- add __func__ define to BLI_utildefines.h for MSVC.
Diffstat (limited to 'source/blender/makesrna/RNA_access.h')
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 5da125bb440..7d013d01e72 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -974,7 +974,11 @@ int RNA_function_call_direct_va_lookup(struct bContext *C, struct ReportList *re short RNA_type_to_ID_code(StructRNA *type); StructRNA *ID_code_to_RNA_type(short idcode); -void RNA_warning(const char *format, ...) + +/* macro which inserts the function name */ +#define RNA_warning(format, args...) _RNA_warning("%s: " format "\n", __func__, ##args) + +void _RNA_warning(const char *format, ...) #ifdef __GNUC__ __attribute__ ((format (printf, 1, 2))) #endif |