diff --git a/include/cyclone/runtime.h b/include/cyclone/runtime.h index 040c774b..4898870e 100644 --- a/include/cyclone/runtime.h +++ b/include/cyclone/runtime.h @@ -406,6 +406,7 @@ object Cyc_is_boolean(object o); #define Cyc_is_pair(o) ((is_object_type(o) && ((list) o)->tag == pair_tag) ? boolean_t : boolean_f) object Cyc_is_null(object o); object Cyc_is_number(object o); +object Cyc_is_complex(object o); object Cyc_is_real(object o); object Cyc_is_integer(object o); object Cyc_is_fixnum(object o); diff --git a/runtime.c b/runtime.c index 05337de2..b694aa55 100644 --- a/runtime.c +++ b/runtime.c @@ -1581,6 +1581,13 @@ object Cyc_is_real(object o) return Cyc_is_number(o); } +object Cyc_is_complex(object o) +{ + if ((o != NULL) && !is_value_type(o) && ((list) o)->tag == complex_num_tag) + return boolean_t; + return boolean_f; +} + object Cyc_is_fixnum(object o) { if (obj_is_int(o))