Eina: Fixed usage of gnu extension.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 15 Apr 2012 09:54:47 +0000 (09:54 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 15 Apr 2012 09:54:47 +0000 (09:54 +0000)
(idx, ## __VA_ARGS__) is a gnu extension, fixed to be (__VA_ARGS__).
Should be fine this way. Less descriptive maybe, because now people will
may think it's ok to pass 0 arguments, but there's no avoiding this.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@70194 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/include/eina_safety_checks.h
src/include/eina_types.h

index a6d0106..73ae1b2 100644 (file)
@@ -210,7 +210,7 @@ EAPI extern Eina_Error EINA_ERROR_SAFETY_FAILED;
 #ifdef EINA_ARG_NONNULL
 /* make EINA_ARG_NONNULL void so GCC does not optimize safety checks */
 #undef EINA_ARG_NONNULL
-#define EINA_ARG_NONNULL(idx, ...)
+#define EINA_ARG_NONNULL(...)
 #endif
 
 #else /* no safety checks */
index 9f3aa6f..d1e84dc 100644 (file)
 # endif
 
 # if (!defined(EINA_SAFETY_CHECKS)) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
-#  define EINA_ARG_NONNULL(idx, ...) __attribute__ ((__nonnull__(idx, ## __VA_ARGS__)))
+#  define EINA_ARG_NONNULL(...) __attribute__ ((__nonnull__(__VA_ARGS__)))
 # else
-#  define EINA_ARG_NONNULL(idx, ...)
+#  define EINA_ARG_NONNULL(...)
 # endif
 
 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
 
 #elif defined(_WIN32)
 # define EINA_WARN_UNUSED_RESULT
-# define EINA_ARG_NONNULL(idx, ...)
+# define EINA_ARG_NONNULL(...)
 # if defined(_MSC_VER) && _MSC_VER >= 1300
 #  define EINA_DEPRECATED __declspec(deprecated)
 # else
  * @def EINA_ARG_NONNULL
  * Used to warn when the specified arguments of the function are @c NULL.
  */
-# define EINA_ARG_NONNULL(idx, ...)
+# define EINA_ARG_NONNULL(...)
 
 /**
  * @def EINA_DEPRECATED