Mercurial > hg > xemacs-beta
comparison src/number.c @ 5934:e2fae7783046 cygwin
lots of use of EMACS_INT, a few others, to eliminate all pointer truncation warnings
author | Henry Thompson <ht@markup.co.uk> |
---|---|
date | Sat, 12 Dec 2015 19:08:46 +0000 |
parents | a2912073be85 |
children | d5eb0914ca1f |
comparison
equal
deleted
inserted
replaced
5933:c1e8f3294298 | 5934:e2fae7783046 |
---|---|
349 unsigned long prec; | 349 unsigned long prec; |
350 | 350 |
351 CHECK_BIGFLOAT (f); | 351 CHECK_BIGFLOAT (f); |
352 if (FIXNUMP (precision)) | 352 if (FIXNUMP (precision)) |
353 { | 353 { |
354 prec = (XFIXNUM (precision) <= 0) ? 1UL : (unsigned long) XFIXNUM (precision); | 354 prec = (XFIXNUM (precision) <= 0) ? (EMACS_UINT)1 : (unsigned long) XFIXNUM (precision); |
355 } | 355 } |
356 #ifdef HAVE_BIGNUM | 356 #ifdef HAVE_BIGNUM |
357 else if (BIGNUMP (precision)) | 357 else if (BIGNUMP (precision)) |
358 { | 358 { |
359 prec = bignum_fits_ulong_p (XBIGNUM_DATA (precision)) | 359 prec = bignum_fits_ulong_p (XBIGNUM_DATA (precision)) |
517 #else | 517 #else |
518 ABORT (); | 518 ABORT (); |
519 #endif /* HAVE_BIGNUM */ | 519 #endif /* HAVE_BIGNUM */ |
520 case RATIO_T: | 520 case RATIO_T: |
521 #ifdef HAVE_RATIO | 521 #ifdef HAVE_RATIO |
522 return make_ratio (XREALFIXNUM (number), 1UL); | 522 return make_ratio (XREALFIXNUM (number), (EMACS_UINT)1); |
523 #else | 523 #else |
524 ABORT (); | 524 ABORT (); |
525 #endif /* HAVE_RATIO */ | 525 #endif /* HAVE_RATIO */ |
526 case FLOAT_T: | 526 case FLOAT_T: |
527 return make_float (XREALFIXNUM (number)); | 527 return make_float (XREALFIXNUM (number)); |