summaryrefslogtreecommitdiffstats
path: root/gst/smpte
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
commit1505cd8773944d1d0598bff9daca075c90ae5dfc (patch)
tree4993fca843e0bcb7c618443346df661cf5104180 /gst/smpte
parent08962fa4f432b6fb446116ca8067503f753cc932 (diff)
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.
Diffstat (limited to 'gst/smpte')
-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,