/[guile]/guile/guile-core/libguile/num2integral.i.c
ViewVC logotype

Diff of /guile/guile-core/libguile/num2integral.i.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by mvo, Mon Nov 12 01:12:37 2001 UTC revision 1.14 by dirk, Mon Feb 25 22:48:21 2002 UTC
# Line 27  NUM2INTEGRAL (SCM num, unsigned long int Line 27  NUM2INTEGRAL (SCM num, unsigned long int
27          scm_out_of_range (s_caller, num);          scm_out_of_range (s_caller, num);
28  #endif  #endif
29            
30        if (sizeof (ITYPE) >= sizeof (scm_t_signed_bits))  #if SIZEOF_ITYPE >= SIZEOF_SCM_T_BITS
31          /* can't fit anything too big for this type in an inum        /* the target type is large enough to hold any possible inum */
32             anyway */        return (ITYPE) n;
33          return (ITYPE) n;  #else
34        else        /* an inum can be out of range, so check */
35          { /* an inum can be out of range, so check */  #ifdef UNSIGNED
36            if (((ITYPE)n) != n)        /* n is known to be >= 0 */
37              scm_out_of_range (s_caller, num);        if ((scm_t_bits) n > UNSIGNED_ITYPE_MAX)
38            else          scm_out_of_range (s_caller, num);
39              return (ITYPE) n;  #else
40          }        if (((ITYPE)n) != n)
41            scm_out_of_range (s_caller, num);
42    #endif
43          return (ITYPE) n;
44    #endif /* SIZEOF_ITYPE >= SIZEOF_SCM_T_BITS */
45      }      }
46    else if (SCM_BIGP (num))    else if (SCM_BIGP (num))
47      { /* bignum */      { /* bignum */
# Line 78  NUM2INTEGRAL (SCM num, unsigned long int Line 82  NUM2INTEGRAL (SCM num, unsigned long int
82              scm_out_of_range (s_caller, num);              scm_out_of_range (s_caller, num);
83          }          }
84  #endif  #endif
85          
86  #else /* SIZEOF_ITYPE >= SIZEOF_SCM_T_BITS */  #else /* SIZEOF_ITYPE >= SIZEOF_SCM_T_BITS */
87              scm_out_of_range (s_caller, num);        scm_out_of_range (s_caller, num);
88  #endif  #endif
89                
90      }      }

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26