diff --git a/include/cyclone/runtime.h b/include/cyclone/runtime.h index d8f08306..92aec28d 100644 --- a/include/cyclone/runtime.h +++ b/include/cyclone/runtime.h @@ -22,9 +22,12 @@ #define Cyc_check_type(data, fnc_test, tag, obj) { \ if ((boolean_f == fnc_test(obj))) Cyc_invalid_type_error(data, tag, obj); } +#define Cyc_check_type2(data, fnc_test, tag, obj) { \ + if ((boolean_f == fnc_test(data, obj))) Cyc_invalid_type_error(data, tag, obj); } #define Cyc_check_pair_or_null(d,obj) { if (obj != NULL) { Cyc_check_pair(d,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_num(d,obj) Cyc_check_type(d,Cyc_is_number, 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);