mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 20:30:28 +02:00
remove some deprecated things, undeprecate scm_the_root_module()
* libguile/deprecated.h * libguile/deprecated.c (SCM_ILOC00, SCM_IDINC, SCM_IDSTMSK) (scm_s_expression, scm_s_test, scm_s_body, scm_s_bindings) (scm_s_variable, scm_s_clauses, scm_s_formals, SCM_EVALIM2) (SCM_EVALIM, SCM_XEVAL, SCM_XEVALCAR): Remove these macros and constants, deprecated in 2003. (scm_the_root_module): Undeprecate, it's actually a useful function, that other parts of the code use. * libguile/modules.h (scm_the_root_module): Undeprecated. * libguile/modules.c (scm_the_root_module): Rename from the_root_module. Use it in the rest of this file.
This commit is contained in:
parent
1963682290
commit
f39fc3b38c
4 changed files with 6 additions and 62 deletions
|
@ -70,17 +70,6 @@ char *scm_isymnames[] =
|
|||
};
|
||||
|
||||
|
||||
/* From eval.c: Error messages of the evaluator. These were deprecated in
|
||||
* guile 1.7.0 on 2003-06-02. */
|
||||
const char scm_s_expression[] = "missing or extra expression";
|
||||
const char scm_s_test[] = "bad test";
|
||||
const char scm_s_body[] = "bad body";
|
||||
const char scm_s_bindings[] = "bad bindings";
|
||||
const char scm_s_variable[] = "bad variable";
|
||||
const char scm_s_clauses[] = "bad or missing clauses";
|
||||
const char scm_s_formals[] = "bad formals";
|
||||
|
||||
|
||||
SCM_REGISTER_PROC(s_substring_move_left_x, "substring-move-left!", 5, 0, 0, scm_substring_move_x);
|
||||
|
||||
SCM_REGISTER_PROC(s_substring_move_right_x, "substring-move-right!", 5, 0, 0, scm_substring_move_x);
|
||||
|
@ -271,17 +260,6 @@ init_module_stuff ()
|
|||
}
|
||||
}
|
||||
|
||||
SCM
|
||||
scm_the_root_module ()
|
||||
{
|
||||
init_module_stuff ();
|
||||
scm_c_issue_deprecation_warning ("`scm_the_root_module' is deprecated. "
|
||||
"Use `scm_c_resolve_module (\"guile\")' "
|
||||
"instead.");
|
||||
|
||||
return scm_c_resolve_module ("guile");
|
||||
}
|
||||
|
||||
static SCM
|
||||
scm_module_full_name (SCM name)
|
||||
{
|
||||
|
|
|
@ -58,40 +58,6 @@ SCM_API char *scm_isymnames[];
|
|||
#define SCM_SLOPPY_COMPLEXP(x) (SCM_TYP16 (x) == scm_tc16_complex)
|
||||
|
||||
|
||||
/* From eval.h: Macros for handling ilocs. These were deprecated in guile
|
||||
* 1.7.0 on 2003-06-04. */
|
||||
#define SCM_ILOC00 SCM_MAKE_ITAG8(0L, scm_tc8_iloc)
|
||||
#define SCM_IDINC (0x00100000L)
|
||||
#define SCM_IDSTMSK (-SCM_IDINC)
|
||||
|
||||
|
||||
/* From eval.h: Error messages of the evaluator. These were deprecated in
|
||||
* guile 1.7.0 on 2003-06-02. */
|
||||
SCM_DEPRECATED const char scm_s_expression[];
|
||||
SCM_DEPRECATED const char scm_s_test[];
|
||||
SCM_DEPRECATED const char scm_s_body[];
|
||||
SCM_DEPRECATED const char scm_s_bindings[];
|
||||
SCM_DEPRECATED const char scm_s_variable[];
|
||||
SCM_DEPRECATED const char scm_s_clauses[];
|
||||
SCM_DEPRECATED const char scm_s_formals[];
|
||||
|
||||
|
||||
/* From eval.h: Helper macros for evaluation and application. These were
|
||||
* deprecated in guile 1.7.0 on 2003-06-02. */
|
||||
#define SCM_EVALIM2(x) \
|
||||
((scm_is_eq ((x), SCM_EOL) \
|
||||
? scm_misc_error (NULL, scm_s_expression, SCM_EOL), 0 \
|
||||
: 0), \
|
||||
(x))
|
||||
#define SCM_EVALIM(x, env) (SCM_ILOCP (x) \
|
||||
? *scm_ilookup ((x), env) \
|
||||
: SCM_EVALIM2(x))
|
||||
#define SCM_XEVAL(x, env) (scm_i_eval_x ((x), (env)))
|
||||
#define SCM_XEVALCAR(x, env) (SCM_SYMBOLP (SCM_CAR (x)) \
|
||||
? *scm_lookupcar (x, env, 1) \
|
||||
: scm_i_eval_x (SCM_CAR (x), (env)))
|
||||
|
||||
|
||||
/* From structs.h:
|
||||
Deprecated in Guile 1.9.5 on 2009-11-03. */
|
||||
#define scm_vtable_index_vtable scm_vtable_index_self
|
||||
|
@ -133,7 +99,6 @@ SCM_DEPRECATED SCM scm_unprotect_object (SCM obj);
|
|||
#define SCM_GCCDR(x) SCM_CDR (x)
|
||||
SCM_DEPRECATED void scm_remember (SCM * ptr);
|
||||
|
||||
SCM_DEPRECATED SCM scm_the_root_module (void);
|
||||
SCM_DEPRECATED SCM scm_make_module (SCM name);
|
||||
SCM_DEPRECATED SCM scm_ensure_user_module (SCM name);
|
||||
SCM_DEPRECATED SCM scm_load_scheme_module (SCM name);
|
||||
|
|
|
@ -52,8 +52,8 @@ static SCM unbound_variable (const char *func, SCM sym)
|
|||
"Unbound variable: ~S", scm_list_1 (sym), SCM_BOOL_F);
|
||||
}
|
||||
|
||||
static SCM
|
||||
the_root_module ()
|
||||
SCM
|
||||
scm_the_root_module (void)
|
||||
{
|
||||
if (scm_module_system_booted_p)
|
||||
return SCM_VARIABLE_REF (the_root_module_var);
|
||||
|
@ -68,7 +68,7 @@ SCM_DEFINE (scm_current_module, "current-module", 0, 0, 0,
|
|||
{
|
||||
SCM curr = scm_fluid_ref (the_module);
|
||||
|
||||
return scm_is_true (curr) ? curr : the_root_module ();
|
||||
return scm_is_true (curr) ? curr : scm_the_root_module ();
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
|
@ -257,7 +257,7 @@ SCM
|
|||
scm_lookup_closure_module (SCM proc)
|
||||
{
|
||||
if (scm_is_false (proc))
|
||||
return the_root_module ();
|
||||
return scm_the_root_module ();
|
||||
else if (SCM_EVAL_CLOSURE_P (proc))
|
||||
return SCM_PACK (SCM_SMOB_DATA (proc));
|
||||
else
|
||||
|
@ -270,7 +270,7 @@ scm_lookup_closure_module (SCM proc)
|
|||
|
||||
mod = scm_procedure_property (proc, sym_module);
|
||||
if (scm_is_false (mod))
|
||||
mod = the_root_module ();
|
||||
mod = scm_the_root_module ();
|
||||
return mod;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ SCM_API scm_t_bits scm_tc16_eval_closure;
|
|||
|
||||
|
||||
SCM_API SCM scm_current_module (void);
|
||||
SCM_API SCM scm_the_root_module (void);
|
||||
SCM_API SCM scm_module_variable (SCM module, SCM sym);
|
||||
SCM_API SCM scm_module_local_variable (SCM module, SCM sym);
|
||||
SCM_API SCM scm_interaction_environment (void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue