From 6941ada64fb0e8ccf0365460431acb25b1dc2d13 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Tue, 23 Jun 2009 11:49:26 +0900 Subject: [PATCH] Was unintentionally using the same name 'sexp_types' for the sexp type definitions and for the sexp type enum. They shouldn't conflict, since the enum is in the enum namespace, but apparently they do in mscv. Chaging the defs to sexp_type_specs. --- gc.c | 4 ++-- sexp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gc.c b/gc.c index 2972e49b..c8a980f3 100644 --- a/gc.c +++ b/gc.c @@ -38,7 +38,7 @@ sexp_uint_t sexp_allocated_bytes (sexp x) { sexp t; if ((! sexp_pointerp(x)) || (sexp_pointer_tag(x) > SEXP_CONTEXT)) return sexp_heap_align(1); - t = &(sexp_types[sexp_pointer_tag(x)]); + t = &(sexp_type_specs[sexp_pointer_tag(x)]); len_ptr = (sexp_uint_t*) (((char*)x) + sexp_type_size_off(t)); res = sexp_type_size_base(t) + len_ptr[0] * sexp_type_size_scale(t); return res; @@ -56,7 +56,7 @@ void sexp_mark (sexp x) { if (sexp_contextp(x)) for (saves=sexp_context_saves(x); saves; saves=saves->next) if (saves->var) sexp_mark(*(saves->var)); - t = &(sexp_types[sexp_pointer_tag(x)]); + t = &(sexp_type_specs[sexp_pointer_tag(x)]); p = (sexp*) (((char*)x) + sexp_type_field_base(t)); len_ptr = (sexp_uint_t*) (((char*)x) + sexp_type_field_len_off(t)); len = sexp_type_field_len_base(t) diff --git a/sexp.c b/sexp.c index 12ed719f..24a4d437 100644 --- a/sexp.c +++ b/sexp.c @@ -59,7 +59,7 @@ sexp sexp_alloc_tagged(sexp ctx, size_t size, sexp_uint_t tag) { #define _DEF_TYPE(t,fb,flb,flo,fls,sb,so,sc,n) \ {.tag=SEXP_TYPE, .value={.type={t,fb,flb,flo,fls,sb,so,sc,n}}} -static struct sexp_struct sexp_types[] = { +static struct sexp_struct sexp_type_specs[] = { _DEF_TYPE(SEXP_OBJECT, 0, 0, 0, 0, 0, 0, 0, "object"), _DEF_TYPE(SEXP_TYPE, 0, 0, 0, 0, sexp_sizeof(type), 0, 0, "type"), _DEF_TYPE(SEXP_FIXNUM, 0, 0, 0, 0, 0, 0, 0, "fixnum"),