diff options
author | Mathieu Lacage <Mathieu.Lacage@sophia.inria.fr> | 2006-12-05 03:59:11 +0200 |
---|---|---|
committer | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2006-12-05 03:59:11 +0200 |
commit | a4f5463cdd5e2b088cd009de332db821ef0bd806 (patch) | |
tree | af75b9c4a6e8c2600040d1c5b4ad672855798c79 /src/cairo-wideint.c | |
parent | 94e086b7b9f4129bde3e32b7005e2a33788f334a (diff) |
bugfix: fix cairo-wideint.c uint64_t usage and const return qualifiers
These patches were sent to the cairo mailing list by Mathieu Lacage
<Mathieu.Lacage@sophia.inria.fr>:
http://lists.freedesktop.org/archives/cairo/2006-December/008741.html
_cairo_uint_96by64_32x64_divrem(): fixes misuse of the uint64_t type
and cairo-wideint-private.h functions.
http://lists.freedesktop.org/archives/cairo/2006-December/008742.html
Remove const qualifiers from return types from cairo-wideint.c functions.
http://lists.freedesktop.org/archives/cairo/2006-December/008747.html
Fixes a typo in cairo-wideint-private.h: _cairo_uint128_to_int128_
had an extra trailing underscore.
Diffstat (limited to 'src/cairo-wideint.c')
-rw-r--r-- | src/cairo-wideint.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cairo-wideint.c b/src/cairo-wideint.c index 4de39943..62944ed8 100644 --- a/src/cairo-wideint.c +++ b/src/cairo-wideint.c @@ -71,7 +71,7 @@ _cairo_int32_to_int64 (int32_t i) return q; } -static const cairo_uint64_t +static cairo_uint64_t _cairo_uint32s_to_uint64 (uint32_t h, uint32_t l) { cairo_uint64_t q; @@ -407,7 +407,7 @@ _cairo_uint128_sub (cairo_uint128_t a, cairo_uint128_t b) #define uint64_lo32(i) ((i).lo) #define uint64_hi32(i) ((i).hi) -static const cairo_uint64_t +static cairo_uint64_t uint64_lo (cairo_uint64_t i) { cairo_uint64_t s; @@ -417,7 +417,7 @@ uint64_lo (cairo_uint64_t i) return s; } -static const cairo_uint64_t +static cairo_uint64_t uint64_hi (cairo_uint64_t i) { cairo_uint64_t s; @@ -427,7 +427,7 @@ uint64_hi (cairo_uint64_t i) return s; } -static const cairo_uint64_t +static cairo_uint64_t uint64_shift32 (cairo_uint64_t i) { cairo_uint64_t s; @@ -671,7 +671,7 @@ _cairo_uint_96by64_32x64_divrem (cairo_uint128_t num, cairo_uint64_t den) { cairo_uquorem64_t result; - uint64_t B = _cairo_uint32s_to_uint64 (1, 0); + cairo_uint64_t B = _cairo_uint32s_to_uint64 (1, 0); /* These are the high 64 bits of the *96* bit numerator. We're * going to represent the numerator as xB + y, where x is a 64, @@ -701,7 +701,7 @@ _cairo_uint_96by64_32x64_divrem (cairo_uint128_t num, * den = uB + v u, v : 32 bits */ uint32_t y = _cairo_uint128_to_uint32 (num); - uint32_t u = uint64_hi (den); + uint32_t u = uint64_hi32 (den); uint32_t v = _cairo_uint64_to_uint32 (den); /* Compute a lower bound approximate quotient of num/den @@ -738,7 +738,7 @@ _cairo_uint_96by64_32x64_divrem (cairo_uint128_t num, r = _cairo_uint64_to_uint32 (quorem.rem); } else { - q = uint64_hi (x); + q = uint64_hi32 (x); r = _cairo_uint64_to_uint32 (x); } quotient = q; |