From 3e2073bd24027e8b057e22186fa08c8d7ef34b51 Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Mon, 18 Jul 2005 13:55:44 +0000 Subject: [PATCH] * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are mallocating for (unsigned long *bounds). * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to scm_t_bits before storing them in the type word. * gc.c (tag_table_to_type_alist): Modified type of c_tag from scm_t_bits to int. --- libguile/ChangeLog | 14 ++++++++++++++ libguile/gc.c | 4 ++-- libguile/hashtab.c | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index bf3a2615e..473c9f6de 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,17 @@ +2005-07-18 Mikael Djurfeldt + + Some changes towards making it possible to run Guile on the EM64T + platform. + + * gc.c (scm_gc_stats): Bugfix: Measure size of the type we are + mallocating for (unsigned long *bounds). + + * hashtab.c (scm_i_rehash): Cast SCM_HASHTABLE_FLAGS (table) to + scm_t_bits before storing them in the type word. + + * gc.c (tag_table_to_type_alist): Modified type of c_tag from + scm_t_bits to int. + 2005-07-12 Kevin Ryde * eval.c (scm_dbg_make_iloc): Should be SCM_IFRAMEMAX and diff --git a/libguile/gc.c b/libguile/gc.c index 382022c82..928e8c146 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -264,7 +264,7 @@ tag_table_to_type_alist (void *closure, SCM key, SCM val, SCM acc) { if (scm_is_integer (key)) { - scm_t_bits c_tag = scm_to_int (key); + int c_tag = scm_to_int (key); char const * name = scm_i_tag_name (c_tag); if (name != NULL) @@ -329,7 +329,7 @@ SCM_DEFINE (scm_gc_stats, "gc-stats", 0, 0, 0, temporarily store the numbers, so as not to cause GC. */ - bounds = malloc (sizeof (int) * table_size * 2); + bounds = malloc (sizeof (unsigned long) * table_size * 2); if (!bounds) abort(); for (i = table_size; i--; ) diff --git a/libguile/hashtab.c b/libguile/hashtab.c index 24f16a082..0ca5a2203 100644 --- a/libguile/hashtab.c +++ b/libguile/hashtab.c @@ -176,7 +176,7 @@ scm_i_rehash (SCM table, SCM_SET_HASHTABLE_VECTOR (table, new_buckets); SCM_SET_HASHTABLE_N_ITEMS (table, 0); if (SCM_HASHTABLE_WEAK_P (table)) - SCM_I_SET_WVECT_TYPE (buckets, (SCM_HASHTABLE_FLAGS (table))); + SCM_I_SET_WVECT_TYPE (buckets, ((scm_t_bits) SCM_HASHTABLE_FLAGS (table))); old_size = SCM_SIMPLE_VECTOR_LENGTH (buckets); for (i = 0; i < old_size; ++i)