Skip to content

Commit

Permalink
Check both ends of Symbol and Cons memory in IS_* macros
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Distad committed Feb 15, 2012
1 parent 06e3f04 commit 0dd963a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/uberlisp/types.h
Expand Up @@ -26,8 +26,8 @@ typedef volatile intptr_t uptr_t;

#define IS_INT(uptr) ((uptr) & INT_FLAG)
#define IS_PTR(uptr) (!(IS_INT(uptr)))
#define IS_SYM(uptr) (IS_PTR(uptr) && (TO_PTR(uptr) < SEND_p))
#define IS_CONS(uptr) (IS_PTR(uptr) && (TO_PTR(uptr) >= CSTART_p))
#define IS_SYM(uptr) (IS_PTR(uptr) && (TO_PTR(uptr) < SEND_p) && (TO_PTR(uptr) >= SSTART_p))
#define IS_CONS(uptr) (IS_PTR(uptr) && (TO_PTR(uptr) >= CSTART_p) && (TO_PTR(uptr) < CEND_p))
#define IS_NIL(uptr) EQ(uptr, NIL)
#define IS_REG(uptr) (IS_PTR(uptr) && !IS_NIL(uptr) && (TO_PTR(uptr) < 0x100))

Expand Down

0 comments on commit 0dd963a

Please sign in to comment.