[FFmpeg-cvslog] r21363 - trunk/libavutil/mem.h

mru subversion
Thu Jan 21 13:59:22 CET 2010


Author: mru
Date: Thu Jan 21 13:59:22 2010
New Revision: 21363

Log:
Make DECLARE_ALIGNED macros work with external array specifiers

The macro implementation might need the name of the variable being
declared for compiler-specific syntax.  Moving array specifiers outside
the macro invocation allows this to work.

Modified:
   trunk/libavutil/mem.h

Modified: trunk/libavutil/mem.h
==============================================================================
--- trunk/libavutil/mem.h	Thu Jan 21 13:57:24 2010	(r21362)
+++ trunk/libavutil/mem.h	Thu Jan 21 13:59:22 2010	(r21363)
@@ -29,11 +29,11 @@
 #include "common.h"
 
 #if defined(__ICC) || defined(__SUNPRO_C)
-    #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
+    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
     #define DECLARE_ASM_CONST(n,t,v)    const t __attribute__ ((aligned (n))) v
 #elif defined(__GNUC__)
-    #define DECLARE_ALIGNED(n,t,v)      t v __attribute__ ((aligned (n)))
-    #define DECLARE_ASM_CONST(n,t,v)    static const t v attribute_used __attribute__ ((aligned (n)))
+    #define DECLARE_ALIGNED(n,t,v)      t __attribute__ ((aligned (n))) v
+    #define DECLARE_ASM_CONST(n,t,v)    static const t attribute_used __attribute__ ((aligned (n))) v
 #elif defined(_MSC_VER)
     #define DECLARE_ALIGNED(n,t,v)      __declspec(align(n)) t v
     #define DECLARE_ASM_CONST(n,t,v)    __declspec(align(n)) static const t v



More information about the ffmpeg-cvslog mailing list