[cairo] [PATCH] cairo-wideint: Fix typo in two cairo_uint128 functions

Bryce W. Harrington b.harrington at samsung.com
Mon Jul 21 15:09:47 PDT 2014


_cairo_int128_negate and _cairo_int128_not are #defines of
_cairo_uint128_negate and _cairo_uint128_not respectively.  The function
implementations should use the actual function name not the aliases.  On
systems without a uint128 type, these could lead to build issues.

Credit for finding this go to Dr. Peter Barnes, LLNL.

Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
---
 src/cairo-wideint.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/cairo-wideint.c b/src/cairo-wideint.c
index bba266b..2e056fa 100644
--- a/src/cairo-wideint.c
+++ b/src/cairo-wideint.c
@@ -654,16 +654,16 @@ _cairo_uint128_divrem (cairo_uint128_t num, cairo_uint128_t den)
     return qr;
 }
 
-cairo_int128_t
-_cairo_int128_negate (cairo_int128_t a)
+cairo_uint128_t
+_cairo_uint128_negate (cairo_uint128_t a)
 {
     a.lo = _cairo_uint64_not (a.lo);
     a.hi = _cairo_uint64_not (a.hi);
     return _cairo_uint128_add (a, _cairo_uint32_to_uint128 (1));
 }
 
-cairo_int128_t
-_cairo_int128_not (cairo_int128_t a)
+cairo_uint128_t
+_cairo_uint128_not (cairo_uint128_t a)
 {
     a.lo = _cairo_uint64_not (a.lo);
     a.hi = _cairo_uint64_not (a.hi);
-- 
1.7.9.5


More information about the cairo mailing list