From 534c55a97d9860059a2d2042263cce3cad364b2c Mon Sep 17 00:00:00 2001 From: Dirk Herrmann Date: Thu, 18 Sep 2003 20:55:40 +0000 Subject: This set of patches introduces a new tc7 code scm_tc7_number for numbers. Bignums, reals and complex numbers are turned from smobs into subtypes of scm_tc7_number. * tags.h (scm_tc7_number): New. * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c (scm_class_of), print.c (scm_iprin1), smob.c (scm_smob_prehistory): Don't handle bignums, reals and complex numbers as subtypes of scm_tc7_smob any more. * numbers.h, tags.h (scm_tc16_big, scm_tc16_real, scm_tc16_complex): Moved definitions from tags.h to numbers.h. --- libguile/smob.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'libguile/smob.c') diff --git a/libguile/smob.c b/libguile/smob.c index 6b3001ed8..c73b2a9ca 100644 --- a/libguile/smob.c +++ b/libguile/smob.c @@ -448,7 +448,7 @@ scm_make_smob (scm_t_bits tc) } -/* {Initialization for i/o types, float, bignum, the type of free cells} +/* {Initialization for the type of free cells} */ static int @@ -491,21 +491,9 @@ scm_smob_prehistory () scm_smobs[i].gsubr_type = 0; } - /* WARNING: These scm_make_smob_type calls must be done in this order */ + /* WARNING: This scm_make_smob_type call must be done first. */ tc = scm_make_smob_type ("free", 0); scm_set_smob_print (tc, free_print); - - tc = scm_make_smob_type ("big", 0); /* freed in gc */ - scm_set_smob_print (tc, scm_bigprint); - scm_set_smob_equalp (tc, scm_bigequal); - - tc = scm_make_smob_type ("real", 0); /* freed in gc */ - scm_set_smob_print (tc, scm_print_real); - scm_set_smob_equalp (tc, scm_real_equalp); - - tc = scm_make_smob_type ("complex", 0); /* freed in gc */ - scm_set_smob_print (tc, scm_print_complex); - scm_set_smob_equalp (tc, scm_complex_equalp); } /* -- cgit v1.2.3