Added Cyc_is_fixnum

This commit is contained in:
Justin Ethier 2017-03-01 18:24:45 -05:00
parent c826f09341
commit a714f57f97
2 changed files with 9 additions and 0 deletions

View file

@ -73,6 +73,7 @@ void gc_init_heap(long heap_size);
#define Cyc_check_pair(d,obj) Cyc_check_type(d,Cyc_is_pair, pair_tag, obj); #define Cyc_check_pair(d,obj) Cyc_check_type(d,Cyc_is_pair, pair_tag, obj);
#define Cyc_check_proc(d,obj) Cyc_check_type2(d,Cyc_is_procedure, closureN_tag, obj); #define Cyc_check_proc(d,obj) Cyc_check_type2(d,Cyc_is_procedure, closureN_tag, obj);
#define Cyc_check_num(d,obj) Cyc_check_type(d,Cyc_is_number, integer_tag, obj); #define Cyc_check_num(d,obj) Cyc_check_type(d,Cyc_is_number, integer_tag, obj);
#define Cyc_check_fixnum(d,obj) Cyc_check_type(d,Cyc_is_fixnum, integer_tag, obj);
#define Cyc_check_int(d,obj) Cyc_check_type(d,Cyc_is_integer, integer_tag, obj); #define Cyc_check_int(d,obj) Cyc_check_type(d,Cyc_is_integer, integer_tag, obj);
#define Cyc_check_str(d,obj) Cyc_check_type(d,Cyc_is_string, string_tag, obj); #define Cyc_check_str(d,obj) Cyc_check_type(d,Cyc_is_string, string_tag, obj);
#define Cyc_check_sym(d,obj) Cyc_check_type(d,Cyc_is_symbol, symbol_tag, obj); #define Cyc_check_sym(d,obj) Cyc_check_type(d,Cyc_is_symbol, symbol_tag, obj);
@ -359,6 +360,7 @@ object Cyc_is_null(object o);
object Cyc_is_number(object o); object Cyc_is_number(object o);
object Cyc_is_real(object o); object Cyc_is_real(object o);
object Cyc_is_integer(object o); object Cyc_is_integer(object o);
object Cyc_is_fixnum(object o);
object Cyc_is_bignum(object o); object Cyc_is_bignum(object o);
object Cyc_is_vector(object o); object Cyc_is_vector(object o);
object Cyc_is_bytevector(object o); object Cyc_is_bytevector(object o);

View file

@ -1465,6 +1465,13 @@ object Cyc_is_real(object o)
return Cyc_is_number(o); return Cyc_is_number(o);
} }
object Cyc_is_fixnum(object o)
{
if (obj_is_int(o))
return boolean_t;
return boolean_f;
}
object Cyc_is_integer(object o) object Cyc_is_integer(object o)
{ {
if ((o != NULL) && (obj_is_int(o) || if ((o != NULL) && (obj_is_int(o) ||