[Gmp-commit] /var/hg/gmp: gmp-impl.h (NEG_CAST, ABS_CAST): Use __GMP_CAST.

mercurial at gmplib.org mercurial at gmplib.org
Fri Feb 15 10:43:11 CET 2013


details:   /var/hg/gmp/rev/cea984523f93
changeset: 15435:cea984523f93
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Feb 15 10:42:32 2013 +0100
description:
gmp-impl.h (NEG_CAST, ABS_CAST): Use __GMP_CAST.

diffstat:

 gmp-impl.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (14 lines):

diff -r d50118f7f9e2 -r cea984523f93 gmp-impl.h
--- a/gmp-impl.h	Thu Feb 14 19:32:51 2013 +0100
+++ b/gmp-impl.h	Fri Feb 15 10:42:32 2013 +0100
@@ -506,8 +506,8 @@
 #define UNLIKELY(cond)                 __GMP_UNLIKELY(cond)
 
 #define ABS(x) ((x) >= 0 ? (x) : -(x))
-#define NEG_CAST(T,x) (-((T)((x) + 1) - 1))
-#define ABS_CAST(T,x) ((x) >= 0 ? (T)(x) : NEG_CAST(T,x))
+#define NEG_CAST(T,x) (- (__GMP_CAST (T, (x) + 1) - 1))
+#define ABS_CAST(T,x) ((x) >= 0 ? __GMP_CAST (T, x) : NEG_CAST (T,x))
 #undef MIN
 #define MIN(l,o) ((l) < (o) ? (l) : (o))
 #undef MAX


More information about the gmp-commit mailing list