Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-09-01 19:01:15 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-09-01 19:01:15 +0400
commit35b61a7512dc1b8b1d8bc562aad2a72d254b8a69 (patch)
tree5050db48823af6cf23eee62b5a013e2f208fdded /source/blender/makesrna/RNA_access.h
parent901dea87a1266479d3b7aab6cfd2d5fbf6adc393 (diff)
Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers to use special compiler's hints use a special file where all things like this are concentrated. Makes code easier to follow and allows to manage special attributes in more efficient way. Thanks Campbell for review!
Diffstat (limited to 'source/blender/makesrna/RNA_access.h')
-rw-r--r--source/blender/makesrna/RNA_access.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 0725cea3291..9ba30ec0350 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -31,6 +31,8 @@
#include "RNA_types.h"
+#include "BLI_compiler_attrs.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -1085,17 +1087,9 @@ int RNA_function_call_lookup(struct bContext *C, struct ReportList *reports, Poi
const char *identifier, ParameterList *parms);
int RNA_function_call_direct(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
- FunctionRNA *func, const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 5, 6)))
-#endif
-;
+ FunctionRNA *func, const char *format, ...) ATTR_PRINTF_FORMAT(5, 6);
int RNA_function_call_direct_lookup(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
- const char *identifier, const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 5, 6)))
-#endif
-;
+ const char *identifier, const char *format, ...) ATTR_PRINTF_FORMAT(5, 6);
int RNA_function_call_direct_va(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
FunctionRNA *func, const char *format, va_list args);
int RNA_function_call_direct_va_lookup(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
@@ -1121,11 +1115,7 @@ StructRNA *ID_code_to_RNA_type(short idcode);
# define RNA_warning(format, ...) _RNA_warning("%s: " format "\n", __FUNCTION__, __VA_ARGS__)
#endif
-void _RNA_warning(const char *format, ...)
-#ifdef __GNUC__
-__attribute__ ((format(printf, 1, 2)))
-#endif
-;
+void _RNA_warning(const char *format, ...) ATTR_PRINTF_FORMAT(1, 2);
/* Equals test (skips pointers and collections)
* is_strict false assumes uninitialized properties are equal */