summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2010-01-05 18:29:31 -0800
committerKaz Kylheku <kaz@kylheku.com>2010-01-05 18:29:31 -0800
commitf70f76d6e8ada0e386c3708673eafa2e8abb8ca8 (patch)
tree878d3a4d473298f347eeacd73bc2f557a75a5572 /lib.h
parentb553f54bca43cda8ac0eaca5c21469dd36415d2b (diff)
parentf9ea3b7c156391758aa0356c7636983393184a39 (diff)
downloadtxr-f70f76d6e8ada0e386c3708673eafa2e8abb8ca8.tar.gz
txr-f70f76d6e8ada0e386c3708673eafa2e8abb8ca8.tar.bz2
txr-f70f76d6e8ada0e386c3708673eafa2e8abb8ca8.zip
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/txr
Conflicts: ChangeLog
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib.h b/lib.h
index b50c1075..4afaa812 100644
--- a/lib.h
+++ b/lib.h
@@ -24,8 +24,10 @@
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+typedef int_ptr_t cnum;
+
#define TAG_SHIFT 2
-#define TAG_MASK ((1L << TAG_SHIFT) - 1)
+#define TAG_MASK (((cnum) 1 << TAG_SHIFT) - 1)
#define TAG_PTR 0
#define TAG_NUM 1
#define TAG_CHR 2
@@ -33,8 +35,6 @@
#define NUM_MAX (INT_PTR_MAX/4)
#define NUM_MIN (INT_PTR_MIN/4)
-typedef int_ptr_t cnum;
-
typedef enum type {
NUM = TAG_NUM, CHR = TAG_CHR, LIT = TAG_LIT, CONS,
STR, SYM, PKG, FUN, VEC, LCONS, LSTR, COBJ
@@ -379,7 +379,7 @@ val match(val spec, val data);
#define nil ((obj_t *) 0)
-#define nao ((obj_t *) (-1 << TAG_SHIFT)) /* "not an object" sentinel value. */
+#define nao ((obj_t *) (1 << TAG_SHIFT)) /* "not an object" sentinel value. */
#define eq(a, b) ((a) == (b) ? t : nil)