From f64469235df66e1e67ab4dc5d17802dfeea4dd0d Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 12 Jan 2017 15:02:41 +0000 Subject: [PATCH] Argh! --- src/consspaceobject.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/consspaceobject.h b/src/consspaceobject.h index a4553b7..e151fc4 100644 --- a/src/consspaceobject.h +++ b/src/consspaceobject.h @@ -63,6 +63,11 @@ */ #define consp(conspoint) (check_tag(conspoint,CONSTAG)) +/** + * true if conspointer points to a function cell, else false + */ +#define functionp(conspoint) (check_tag(conspoint,FUNCTIONTAG)) + /** * true if conspointer points to a string cell, else false */ @@ -114,6 +119,11 @@ struct cons_payload { struct cons_pointer cdr; }; +struct function_payload { + struct cons_pointer source; + struct cons_pointer (*executable)(struct cons_pointer, struct cons_pointer); +}; + /** * payload of a free cell. For the time being identical to a cons cell, * but it may not be so in future. @@ -165,6 +175,8 @@ struct cons_space_object { struct cons_payload cons; /* if tag == FREETAG */ struct free_payload free; + /* if tag == FUNCTIONTAG */ + struct function_payload function; /* if tag == INTEGERTAG */ struct integer_payload integer; /* if tag == NILTAG; we'll treat the special cell NIL as just a cons */