diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 96cad558b..2e023feb0 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,13 @@ +2000-05-08 Dirk Herrmann + + * feature.c: No need to include "libguile/smob.h" + + (scm_loc_features, features, scm_add_feature, scm_init_feature): + Removed variable 'scm_loc_features' as a pointer to the SCM value + holding the features list. Using variable 'features' instead, + which holds the interned pair. Thus, SCM_SETCDR can be used + instead of pointer trickery. + 2000-05-08 Dirk Herrmann * alist.c (scm_acons): Use SCM{_SET}?_CELL_OBJECT as long as a diff --git a/libguile/feature.c b/libguile/feature.c index e05a10115..0589521e5 100644 --- a/libguile/feature.c +++ b/libguile/feature.c @@ -45,30 +45,30 @@ #include -#include "libguile/_scm.h" - -#include "libguile/root.h" -#include "libguile/smob.h" -#include "libguile/strings.h" - -#include "libguile/validate.h" -#include "libguile/feature.h" - #ifdef HAVE_STRING_H #include #endif + +#include "libguile/_scm.h" +#include "libguile/root.h" +#include "libguile/strings.h" +#include "libguile/validate.h" + +#include "libguile/feature.h" + -static SCM *scm_loc_features; +static SCM features; + void scm_add_feature (const char *str) { - *scm_loc_features = scm_cons (SCM_CAR (scm_intern (str, strlen (str))), - *scm_loc_features); + SCM old = SCM_CDR (features); + SCM new = scm_cons (SCM_CAR (scm_intern (str, strlen (str))), old); + SCM_SETCDR (features, new); } - SCM_DEFINE (scm_program_arguments, "program-arguments", 0, 0, 0, @@ -100,7 +100,7 @@ scm_set_program_arguments (int argc, char **argv, char *first) void scm_init_feature() { - scm_loc_features = SCM_CDRLOC (scm_sysintern ("*features*", SCM_EOL)); + features = scm_sysintern ("*features*", SCM_EOL); #ifdef SCM_RECKLESS scm_add_feature("reckless"); #endif