summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2003-05-22 10:26:44 +0000
committerBrian Cameron <brian.cameron@sun.com>2003-05-22 10:26:44 +0000
commit2e570bdceca42ea775e01bbc383673d9320143ae (patch)
treee015be8c84b36e73a0307e5bf5c45253dec043d0
parentdebf9fea7a64b62e204e6f51c27bff42278f573c (diff)
downloadgst-plugins-bad-2e570bdceca42ea775e01bbc383673d9320143ae.tar.gz
gst-plugins-bad-2e570bdceca42ea775e01bbc383673d9320143ae.tar.bz2
gst-plugins-bad-2e570bdceca42ea775e01bbc383673d9320143ae.zip
Made the SWAP and PREPARE_3D_LINE macros work with gints rather than using typeof(), since typeof() is a gcc-extensio...
Original commit message from CVS: Made the SWAP and PREPARE_3D_LINE macros work with gints rather than using typeof(), since typeof() is a gcc-extension and does not work with other compilers. This is okay since every place these macros are used, gints are passed in. I renamed SWAP to SWAP_INT to reflect that it is not so generic.
-rw-r--r--gst/smpte/paint.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gst/smpte/paint.c b/gst/smpte/paint.c
index c04aba6f..e912dfdf 100644
--- a/gst/smpte/paint.c
+++ b/gst/smpte/paint.c
@@ -113,9 +113,9 @@ G_STMT_START { \
} \
} G_STMT_END
-#define SWAP(a,b) \
+#define SWAP_INT(a,b) \
G_STMT_START { \
- typeof (a) tmp; \
+ gint tmp; \
tmp = (a); \
(a) = (b); \
(b) = (tmp); \
@@ -125,7 +125,7 @@ G_STMT_START { \
#define PREPARE_3D_LINE(x0,y0,z0,x1,y1,z1,dxabs,dyabs,dzabs,sdx,sdy,sdz,xr,yr,zr,px,py,pz)\
G_STMT_START { \
- typeof (x0) dx, dy, dz; \
+ gint dx, dy, dz; \
dx = x1 - x0; \
dy = y1 - y0; \
dz = z1 - z0; \
@@ -152,9 +152,9 @@ gst_smpte_paint_triangle_linear (guint32 *dest, gint stride,
gint sdxr, sdyr, sdcr, dxrabs, dyrabs, dcrabs, xrr, yrr, crr, pxr, pyr, pcr;
gint i, j, k, seg_start, seg_end;
- if (y0 > y1) { SWAP (x0, x1); SWAP (y0, y1); SWAP (c0, c1); }
- if (y0 > y2) { SWAP (x0, x2); SWAP (y0, y2); SWAP (c0, c2); }
- if (y1 > y2) { SWAP (x1, x2); SWAP (y1, y2); SWAP (c1, c2); }
+ if (y0 > y1) { SWAP_INT (x0, x1); SWAP_INT (y0, y1); SWAP_INT (c0, c1); }
+ if (y0 > y2) { SWAP_INT (x0, x2); SWAP_INT (y0, y2); SWAP_INT (c0, c2); }
+ if (y1 > y2) { SWAP_INT (x1, x2); SWAP_INT (y1, y2); SWAP_INT (c1, c2); }
PREPARE_3D_LINE (x0,y0,c0,x2,y2,c2,
dxlabs,dylabs,dclabs,