1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

* modules.h (scm_selected_module, scm_current_module): Renamed

scm_selected_module to scm_current_module to synchronize Scheme
and C names.
(scm_select_module, scm_set_current_module): Likewise.  Changed
all uses.
This commit is contained in:
Marius Vollmer 2001-02-08 18:49:52 +00:00
parent fdfe6305a5
commit aa767bc58f
7 changed files with 21 additions and 21 deletions

View file

@ -3820,9 +3820,9 @@ change_environment (void *data)
{
SCM pair = SCM_PACK (data);
SCM new_module = SCM_CAR (pair);
SCM old_module = scm_selected_module ();
SCM old_module = scm_current_module ();
SCM_SETCDR (pair, old_module);
scm_select_module (new_module);
scm_set_current_module (new_module);
}
@ -3847,9 +3847,9 @@ restore_environment (void *data)
{
SCM pair = SCM_PACK (data);
SCM old_module = SCM_CDR (pair);
SCM new_module = scm_selected_module ();
SCM new_module = scm_current_module ();
SCM_SETCAR (pair, new_module);
scm_select_module (old_module);
scm_set_current_module (old_module);
}
@ -3874,7 +3874,7 @@ SCM_DEFINE (scm_eval, "eval", 2, 0, 0,
#if (SCM_DEBUG_DEPRECATED == 0)
/* Use scm_selected_module () or scm_interaction_environment ()
/* Use scm_current_module () or scm_interaction_environment ()
* instead. The former is the module selected during loading of code.
* The latter is the module in which the user of this thread currently
* types expressions.

View file

@ -125,7 +125,7 @@ extern SCM scm_eval_options_interface (SCM setting);
/*fixme* This should probably be removed throught the code. */
#define SCM_TOP_LEVEL_LOOKUP_CLOSURE \
SCM_MODULE_EVAL_CLOSURE (scm_selected_module ())
SCM_MODULE_EVAL_CLOSURE (scm_current_module ())
#if SCM_DEBUG_DEPRECATED == 0

View file

@ -2323,9 +2323,9 @@ make_class_from_template (char *template, char *type_name, SCM supers)
* This kludge is needed until DEFVAR ceases to use `define-public'
* or `define-public' ceases to use `current-module'.
*/
SCM old_module = scm_select_module (scm_module_goops);
SCM old_module = scm_set_current_module (scm_module_goops);
DEFVAR (name, class);
scm_select_module (old_module);
scm_set_current_module (old_module);
}
return class;
}
@ -2632,7 +2632,7 @@ scm_init_goops (void)
{
SCM old_module;
scm_module_goops = scm_make_module (scm_read_0str ("(oop goops)"));
old_module = scm_select_module (scm_module_goops);
old_module = scm_set_current_module (scm_module_goops);
scm_goops_lookup_closure = scm_module_lookup_closure (scm_module_goops);
@ -2667,7 +2667,7 @@ scm_init_goops (void)
DEFVAR (name, scm_no_applicable_method);
}
scm_select_module (old_module);
scm_set_current_module (old_module);
}
void

View file

@ -103,7 +103,7 @@ load (void *data)
scm_i_eval_x (form,
scm_module_system_booted_p
? (scm_top_level_env
(SCM_MODULE_EVAL_CLOSURE (scm_selected_module ())))
(SCM_MODULE_EVAL_CLOSURE (scm_current_module ())))
: SCM_EOL);
}
return SCM_UNSPECIFIED;
@ -479,7 +479,7 @@ SCM_DEFINE (scm_read_and_eval_x, "read-and-eval!", 0, 1, 0,
SCM form = scm_read (port);
if (SCM_EOF_OBJECT_P (form))
scm_ithrow (scm_end_of_file_key, SCM_EOL, 1);
return scm_eval_x (form, scm_selected_module ());
return scm_eval_x (form, scm_current_module ());
}
#undef FUNC_NAME

View file

@ -73,7 +73,7 @@ scm_the_root_module ()
static SCM the_module;
SCM
scm_selected_module ()
scm_current_module ()
{
return scm_fluid_ref (SCM_CDR (the_module));
}
@ -86,9 +86,9 @@ static SCM set_current_module;
*/
SCM
scm_select_module (SCM module)
scm_set_current_module (SCM module)
{
SCM old = scm_selected_module ();
SCM old = scm_current_module ();
scm_apply (SCM_CDR (set_current_module), SCM_LIST1 (module), SCM_EOL);
return old;
}
@ -102,7 +102,7 @@ SCM_DEFINE (scm_interaction_environment, "interaction-environment", 0, 0, 0,
"dynamically typed by the user.")
#define FUNC_NAME s_scm_interaction_environment
{
return scm_selected_module ();
return scm_current_module ();
}
#undef FUNC_NAME

View file

@ -83,9 +83,9 @@ extern SCM scm_module_system_booted_p;
extern SCM scm_module_tag;
extern SCM scm_the_root_module (void);
extern SCM scm_selected_module (void);
extern SCM scm_current_module (void);
extern SCM scm_interaction_environment (void);
extern SCM scm_select_module (SCM module);
extern SCM scm_set_current_module (SCM module);
extern SCM scm_make_module (SCM name);
extern SCM scm_ensure_user_module (SCM name);
extern SCM scm_module_lookup_closure (SCM module);

View file

@ -284,13 +284,13 @@ void
scm_init_rdelim (void)
{
SCM rdelim_module = scm_make_module (scm_read_0str ("(ice-9 rdelim)"));
SCM old_module = scm_select_module (rdelim_module);
SCM old_module = scm_set_current_module (rdelim_module);
#ifndef SCM_MAGIC_SNARFER
#include "libguile/rdelim.x"
#endif
scm_select_module (old_module);
scm_set_current_module (old_module);
#if DEBUG_DEPRECATED == 0
{
@ -300,7 +300,7 @@ scm_init_rdelim (void)
scm_eval_string (scm_makfromstr (expr, (sizeof expr) - 1, 0));
}
scm_select_module (old_module);
scm_set_current_module (old_module);
#endif
}