mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 12:35:05 +02:00
Converted (vector?) to a macro
This commit is contained in:
parent
8622eb8241
commit
1d0654a9d7
2 changed files with 10 additions and 9 deletions
|
@ -441,15 +441,16 @@ object equalp(object, object);
|
||||||
object Cyc_has_cycle(object lst);
|
object Cyc_has_cycle(object lst);
|
||||||
object Cyc_is_boolean(object o);
|
object Cyc_is_boolean(object o);
|
||||||
#define Cyc_is_pair(o) ((is_object_type(o) && ((list) o)->tag == pair_tag) ? boolean_t : boolean_f)
|
#define Cyc_is_pair(o) ((is_object_type(o) && ((list) o)->tag == pair_tag) ? boolean_t : boolean_f)
|
||||||
#define Cyc_is_null(o) make_boolean(o == NULL)
|
#define Cyc_is_null(o) (make_boolean(o == NULL))
|
||||||
TODO: convert all of these to macros (if it makes sense, most should), and remove them from runtime.c:
|
//TODO: convert all of these to macros (if it makes sense, most should), and remove them from runtime.c:
|
||||||
object Cyc_is_number(object o);
|
object Cyc_is_number(object o);
|
||||||
object Cyc_is_complex(object o);
|
object Cyc_is_complex(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_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);
|
||||||
|
#define Cyc_is_vector(o) (make_boolean(is_object_type(o) && ((list) o)->tag == vector_tag))
|
||||||
object Cyc_is_bytevector(object o);
|
object Cyc_is_bytevector(object o);
|
||||||
object Cyc_is_port(object o);
|
object Cyc_is_port(object o);
|
||||||
object Cyc_is_mutex(object o);
|
object Cyc_is_mutex(object o);
|
||||||
|
|
12
runtime.c
12
runtime.c
|
@ -1618,12 +1618,12 @@ object Cyc_is_symbol(object o)
|
||||||
return boolean_f;
|
return boolean_f;
|
||||||
}
|
}
|
||||||
|
|
||||||
object Cyc_is_vector(object o)
|
//object Cyc_is_vector(object o)
|
||||||
{
|
//{
|
||||||
if ((o != NULL) && !is_value_type(o) && ((list) o)->tag == vector_tag)
|
// if ((o != NULL) && !is_value_type(o) && ((list) o)->tag == vector_tag)
|
||||||
return boolean_t;
|
// return boolean_t;
|
||||||
return boolean_f;
|
// return boolean_f;
|
||||||
}
|
//}
|
||||||
|
|
||||||
object Cyc_is_bytevector(object o)
|
object Cyc_is_bytevector(object o)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue