From 161c46ac72210eadf7614af10808776706543885 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 27 Apr 2016 04:05:54 -0400 Subject: [PATCH] Added Cyc_is_opaque --- include/cyclone/runtime.h | 1 + runtime.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/cyclone/runtime.h b/include/cyclone/runtime.h index 69492d23..8fe19f8f 100644 --- a/include/cyclone/runtime.h +++ b/include/cyclone/runtime.h @@ -235,6 +235,7 @@ object Cyc_is_procedure(void *data, object o); object Cyc_is_macro(object o); object Cyc_is_eof_object(object o); object Cyc_is_cvar(object o); +object Cyc_is_opaque(object o); object Cyc_sum_op(void *data, common_type * x, object y); object Cyc_sub_op(void *data, common_type * x, object y); object Cyc_mul_op(void *data, common_type * x, object y); diff --git a/runtime.c b/runtime.c index 84c7f463..ae1916b6 100644 --- a/runtime.c +++ b/runtime.c @@ -1115,6 +1115,13 @@ object Cyc_is_cvar(object o) return boolean_f; } +object Cyc_is_opaque(object o) +{ + if ((o != NULL) && !is_value_type(o) && ((list) o)->tag == c_opaque_tag) + return boolean_t; + return boolean_f; +} + object Cyc_eq(object x, object y) { if (x == y)