summaryrefslogtreecommitdiff
path: root/srfi
diff options
context:
space:
mode:
authorMikael Djurfeldt <djurfeldt@nada.kth.se>2003-03-06 12:51:57 +0000
committerMikael Djurfeldt <djurfeldt@nada.kth.se>2003-03-06 12:51:57 +0000
commita48d60b1c01ebaf8c2b42be3ccc04f1c6d11e423 (patch)
tree7788e38d18cf6e9d0a491b97798714c1b57f9b28 /srfi
parent1798b73dc45fb18e57f54b349375520c4de18340 (diff)
downloadguile-a48d60b1c01ebaf8c2b42be3ccc04f1c6d11e423.tar.gz
* srfi-1.c (scm_init_srfi_1): Extend root module map and for-each
with the versions in this module using scm_c_extend_primitive_generic. * goops.scm (equal?): Define default method. * goops.c (scm_primitive_generic_generic): Enable primitive generic if not enabled. (scm_sys_goops_loaded): Setup unextended primitive generics. * goops.c, goops.h (scm_c_extend_primitive_generic): New function. * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New snarf macros. * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a testing example. All uses of SCM_GPROC should be converted.) * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of scm_assoc. * eq.c (scm_equal_p): Turned into a primitive generic.
Diffstat (limited to 'srfi')
-rw-r--r--srfi/ChangeLog6
-rw-r--r--srfi/srfi-1.c7
2 files changed, 13 insertions, 0 deletions
diff --git a/srfi/ChangeLog b/srfi/ChangeLog
index 2d090b64f..97401db1c 100644
--- a/srfi/ChangeLog
+++ b/srfi/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
+
+ * srfi-1.c (scm_init_srfi_1): Extend root module map and for-each
+ with the versions in this module using
+ scm_c_extend_primitive_generic.
+
2003-02-03 Mikael Djurfeldt <djurfeldt@nada.kth.se>
* srfi-1.c (srfi1_for_each): Corrected argument checking for the
diff --git a/srfi/srfi-1.c b/srfi/srfi-1.c
index afd3e78bc..d46e56ac1 100644
--- a/srfi/srfi-1.c
+++ b/srfi/srfi-1.c
@@ -348,9 +348,16 @@ SCM_DEFINE (scm_srfi1_assoc, "assoc", 2, 1, 0,
void
scm_init_srfi_1 (void)
{
+ SCM the_root_module = scm_lookup_closure_module (SCM_BOOL_F);
#ifndef SCM_MAGIC_SNARFER
#include "srfi/srfi-1.x"
#endif
+ scm_c_extend_primitive_generic
+ (SCM_VARIABLE_REF (scm_c_module_lookup (the_root_module, "map")),
+ SCM_VARIABLE_REF (scm_c_lookup ("map")));
+ scm_c_extend_primitive_generic
+ (SCM_VARIABLE_REF (scm_c_module_lookup (the_root_module, "for-each")),
+ SCM_VARIABLE_REF (scm_c_lookup ("for-each")));
}
/* End of srfi-1.c. */