diff options
author | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
commit | c963d75dfdeec11f82e79e727062fbf89afa2c04 (patch) | |
tree | 895633dbf641110be46f117c29890c49b3ffc0bd /libraries/eina/src/include/eina_types.h | |
parent | Adding the new extantz viewer and grid manager. (diff) | |
download | SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.zip SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.gz SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.bz2 SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.xz |
Update EFL to latest beta.
Diffstat (limited to '')
-rw-r--r-- | libraries/eina/src/include/eina_types.h | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/libraries/eina/src/include/eina_types.h b/libraries/eina/src/include/eina_types.h index 1653949..b0a7cf8 100644 --- a/libraries/eina/src/include/eina_types.h +++ b/libraries/eina/src/include/eina_types.h | |||
@@ -98,13 +98,13 @@ | |||
98 | 98 | ||
99 | #ifdef __GNUC__ | 99 | #ifdef __GNUC__ |
100 | # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) | 100 | # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) |
101 | # define EINA_WARN_UNUSED_RESULT __attribute__ ((warn_unused_result)) | 101 | # define EINA_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__)) |
102 | # else | 102 | # else |
103 | # define EINA_WARN_UNUSED_RESULT | 103 | # define EINA_WARN_UNUSED_RESULT |
104 | # endif | 104 | # endif |
105 | 105 | ||
106 | # if (!defined(EINA_SAFETY_CHECKS)) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) | 106 | # if (!defined(EINA_SAFETY_CHECKS)) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) |
107 | # define EINA_ARG_NONNULL(idx, ...) __attribute__ ((nonnull(idx, ## __VA_ARGS__))) | 107 | # define EINA_ARG_NONNULL(idx, ...) __attribute__ ((__nonnull__(idx, ## __VA_ARGS__))) |
108 | # else | 108 | # else |
109 | # define EINA_ARG_NONNULL(idx, ...) | 109 | # define EINA_ARG_NONNULL(idx, ...) |
110 | # endif | 110 | # endif |
@@ -116,19 +116,23 @@ | |||
116 | # endif | 116 | # endif |
117 | 117 | ||
118 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) | 118 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) |
119 | # define EINA_MALLOC __attribute__ ((malloc)) | 119 | # define EINA_MALLOC __attribute__ ((__malloc__)) |
120 | # define EINA_PURE __attribute__ ((pure)) | 120 | # define EINA_PURE __attribute__ ((__pure__)) |
121 | # else | 121 | # else |
122 | # define EINA_MALLOC | 122 | # define EINA_MALLOC |
123 | # define EINA_PURE | 123 | # define EINA_PURE |
124 | # endif | 124 | # endif |
125 | 125 | ||
126 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) | 126 | # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) |
127 | # define EINA_PRINTF(fmt, arg) __attribute__((format (printf, fmt, arg))) | 127 | # if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 3) |
128 | # define EINA_SCANF(fmt, arg) __attribute__((format (scanf, fmt, arg))) | 128 | # define EINA_PRINTF(fmt, arg) __attribute__((__format__ (__gnu_printf__, fmt, arg))) |
129 | # define EINA_FORMAT(fmt) __attribute__((format_arg(fmt))) | 129 | # else |
130 | # define EINA_CONST __attribute__((const)) | 130 | # define EINA_PRINTF(fmt, arg) __attribute__((__format__ (__printf__, fmt, arg))) |
131 | # define EINA_NOINSTRUMENT __attribute__((no_instrument_function)) | 131 | # endif |
132 | # define EINA_SCANF(fmt, arg) __attribute__((__format__ (__scanf__, fmt, arg))) | ||
133 | # define EINA_FORMAT(fmt) __attribute__((__format_arg__(fmt))) | ||
134 | # define EINA_CONST __attribute__((__const__)) | ||
135 | # define EINA_NOINSTRUMENT __attribute__((__no_instrument_function__)) | ||
132 | # define EINA_UNLIKELY(exp) __builtin_expect((exp), 0) | 136 | # define EINA_UNLIKELY(exp) __builtin_expect((exp), 0) |
133 | # define EINA_LIKELY(exp) __builtin_expect((exp), 1) | 137 | # define EINA_LIKELY(exp) __builtin_expect((exp), 1) |
134 | # else | 138 | # else |
@@ -276,6 +280,16 @@ typedef void (*Eina_Free_Cb)(void *data); | |||
276 | #define EINA_FREE_CB(Function) ((Eina_Free_Cb)Function) | 280 | #define EINA_FREE_CB(Function) ((Eina_Free_Cb)Function) |
277 | 281 | ||
278 | /** | 282 | /** |
283 | * @def EINA_C_ARRAY_LENGTH | ||
284 | * Macro to return the array length of a standard c array. | ||
285 | * For example: | ||
286 | * int foo[] = { 0, 1, 2, 3 }; | ||
287 | * would return 4 and not 4 * sizeof(int). | ||
288 | * @since 1.2.0 | ||
289 | */ | ||
290 | #define EINA_C_ARRAY_LENGTH(arr) (sizeof(arr) / sizeof((arr)[0])) | ||
291 | |||
292 | /** | ||
279 | * @} | 293 | * @} |
280 | */ | 294 | */ |
281 | 295 | ||