mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 20:00:19 +02:00
rename SCM_SNAME to SCM_SUBR_NAME
* libguile/procs.h: Rename SCM_SNAME to SCM_SUBR_NAME. * libguile/debug.c: * libguile/eval.c: * libguile/eval.i.c: * libguile/goops.c: * libguile/gsubr.c: * libguile/print.c: * libguile/procs.c: Update callers.
This commit is contained in:
parent
96b73e84bb
commit
ce471ab8b0
8 changed files with 18 additions and 18 deletions
|
@ -309,7 +309,7 @@ SCM_DEFINE (scm_procedure_name, "procedure-name", 1, 0, 0,
|
||||||
SCM_VALIDATE_PROC (1, proc);
|
SCM_VALIDATE_PROC (1, proc);
|
||||||
switch (SCM_TYP7 (proc)) {
|
switch (SCM_TYP7 (proc)) {
|
||||||
case scm_tcs_subrs:
|
case scm_tcs_subrs:
|
||||||
return SCM_SNAME (proc);
|
return SCM_SUBR_NAME (proc);
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
SCM name = scm_procedure_property (proc, scm_sym_name);
|
SCM name = scm_procedure_property (proc, scm_sym_name);
|
||||||
|
|
|
@ -3397,7 +3397,7 @@ call_dsubr_1 (SCM proc, SCM arg1)
|
||||||
return (scm_from_double (SCM_DSUBRF (proc) (scm_i_fraction2double (arg1))));
|
return (scm_from_double (SCM_DSUBRF (proc) (scm_i_fraction2double (arg1))));
|
||||||
}
|
}
|
||||||
SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1,
|
SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1,
|
||||||
SCM_ARG1, scm_i_symbol_chars (SCM_SNAME (proc)));
|
SCM_ARG1, scm_i_symbol_chars (SCM_SUBR_NAME (proc)));
|
||||||
}
|
}
|
||||||
|
|
||||||
static SCM
|
static SCM
|
||||||
|
|
|
@ -1238,7 +1238,7 @@ dispatch:
|
||||||
}
|
}
|
||||||
SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1,
|
SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1,
|
||||||
SCM_ARG1,
|
SCM_ARG1,
|
||||||
scm_i_symbol_chars (SCM_SNAME (proc)));
|
scm_i_symbol_chars (SCM_SUBR_NAME (proc)));
|
||||||
case scm_tc7_cxr:
|
case scm_tc7_cxr:
|
||||||
RETURN (scm_i_chase_pairs (arg1, (scm_t_bits) SCM_SUBRF (proc)));
|
RETURN (scm_i_chase_pairs (arg1, (scm_t_bits) SCM_SUBRF (proc)));
|
||||||
case scm_tc7_rpsubr:
|
case scm_tc7_rpsubr:
|
||||||
|
@ -1765,7 +1765,7 @@ tail:
|
||||||
RETURN (scm_from_double (SCM_DSUBRF (proc) (scm_i_fraction2double (arg1))));
|
RETURN (scm_from_double (SCM_DSUBRF (proc) (scm_i_fraction2double (arg1))));
|
||||||
}
|
}
|
||||||
SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1,
|
SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1,
|
||||||
SCM_ARG1, scm_i_symbol_chars (SCM_SNAME (proc)));
|
SCM_ARG1, scm_i_symbol_chars (SCM_SUBR_NAME (proc)));
|
||||||
case scm_tc7_cxr:
|
case scm_tc7_cxr:
|
||||||
if (SCM_UNLIKELY (SCM_UNBNDP (arg1) || !scm_is_null (args)))
|
if (SCM_UNLIKELY (SCM_UNBNDP (arg1) || !scm_is_null (args)))
|
||||||
scm_wrong_num_args (proc);
|
scm_wrong_num_args (proc);
|
||||||
|
|
|
@ -1862,7 +1862,7 @@ SCM_DEFINE (scm_enable_primitive_generic_x, "enable-primitive-generic!", 0, 0, 1
|
||||||
*SCM_SUBR_GENERIC (subr)
|
*SCM_SUBR_GENERIC (subr)
|
||||||
= scm_make (scm_list_3 (scm_class_generic,
|
= scm_make (scm_list_3 (scm_class_generic,
|
||||||
k_name,
|
k_name,
|
||||||
SCM_SNAME (subr)));
|
SCM_SUBR_NAME (subr)));
|
||||||
subrs = SCM_CDR (subrs);
|
subrs = SCM_CDR (subrs);
|
||||||
}
|
}
|
||||||
return SCM_UNSPECIFIED;
|
return SCM_UNSPECIFIED;
|
||||||
|
@ -1905,7 +1905,7 @@ scm_c_extend_primitive_generic (SCM extended, SCM extension)
|
||||||
gf = *SCM_SUBR_GENERIC (extended);
|
gf = *SCM_SUBR_GENERIC (extended);
|
||||||
gext = scm_call_2 (SCM_VARIABLE_REF (scm_var_make_extended_generic),
|
gext = scm_call_2 (SCM_VARIABLE_REF (scm_var_make_extended_generic),
|
||||||
gf,
|
gf,
|
||||||
SCM_SNAME (extension));
|
SCM_SUBR_NAME (extension));
|
||||||
SCM_SET_SUBR_GENERIC (extension, gext);
|
SCM_SET_SUBR_GENERIC (extension, gext);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -94,7 +94,7 @@ create_gsubr (int define, const char *name,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (define)
|
if (define)
|
||||||
scm_define (SCM_SNAME (subr), subr);
|
scm_define (SCM_SUBR_NAME (subr), subr);
|
||||||
|
|
||||||
return subr;
|
return subr;
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,7 @@ create_gsubr_with_generic (int define,
|
||||||
subr = scm_c_make_subr_with_generic (name, scm_tc7_lsubr_2, fcn, gf);
|
subr = scm_c_make_subr_with_generic (name, scm_tc7_lsubr_2, fcn, gf);
|
||||||
create_subr:
|
create_subr:
|
||||||
if (define)
|
if (define)
|
||||||
scm_define (SCM_SNAME (subr), subr);
|
scm_define (SCM_SUBR_NAME (subr), subr);
|
||||||
return subr;
|
return subr;
|
||||||
default:
|
default:
|
||||||
;
|
;
|
||||||
|
@ -196,7 +196,7 @@ gsubr_apply_raw (SCM proc, unsigned int argc, const SCM *argv)
|
||||||
|
|
||||||
if (SCM_UNLIKELY (argc != argc_max))
|
if (SCM_UNLIKELY (argc != argc_max))
|
||||||
/* We expect the exact argument count. */
|
/* We expect the exact argument count. */
|
||||||
scm_wrong_num_args (SCM_SNAME (proc));
|
scm_wrong_num_args (SCM_SUBR_NAME (proc));
|
||||||
|
|
||||||
fcn = SCM_SUBRF (proc);
|
fcn = SCM_SUBRF (proc);
|
||||||
|
|
||||||
|
@ -229,7 +229,7 @@ gsubr_apply_raw (SCM proc, unsigned int argc, const SCM *argv)
|
||||||
return (*fcn) (argv[0], argv[1], argv[2], argv[3], argv[4], argv[5],
|
return (*fcn) (argv[0], argv[1], argv[2], argv[3], argv[4], argv[5],
|
||||||
argv[6], argv[7], argv[8], argv[9]);
|
argv[6], argv[7], argv[8], argv[9]);
|
||||||
default:
|
default:
|
||||||
scm_misc_error ((char *) SCM_SNAME (proc),
|
scm_misc_error ((char *) SCM_SUBR_NAME (proc),
|
||||||
"gsubr invocation with more than 10 arguments not implemented",
|
"gsubr invocation with more than 10 arguments not implemented",
|
||||||
SCM_EOL);
|
SCM_EOL);
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@ scm_i_gsubr_apply (SCM proc, SCM arg, ...)
|
||||||
argv[argc] = arg;
|
argv[argc] = arg;
|
||||||
|
|
||||||
if (SCM_UNLIKELY (argc < SCM_GSUBR_REQ (type)))
|
if (SCM_UNLIKELY (argc < SCM_GSUBR_REQ (type)))
|
||||||
scm_wrong_num_args (SCM_SNAME (proc));
|
scm_wrong_num_args (SCM_SUBR_NAME (proc));
|
||||||
|
|
||||||
/* Fill in optional arguments that were not passed. */
|
/* Fill in optional arguments that were not passed. */
|
||||||
while (argc < argc_max)
|
while (argc < argc_max)
|
||||||
|
@ -296,7 +296,7 @@ scm_i_gsubr_apply_list (SCM self, SCM args)
|
||||||
|
|
||||||
for (i = 0; i < SCM_GSUBR_REQ (typ); i++) {
|
for (i = 0; i < SCM_GSUBR_REQ (typ); i++) {
|
||||||
if (scm_is_null (args))
|
if (scm_is_null (args))
|
||||||
scm_wrong_num_args (SCM_SNAME (self));
|
scm_wrong_num_args (SCM_SUBR_NAME (self));
|
||||||
v[i] = SCM_CAR(args);
|
v[i] = SCM_CAR(args);
|
||||||
args = SCM_CDR(args);
|
args = SCM_CDR(args);
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ scm_i_gsubr_apply_list (SCM self, SCM args)
|
||||||
if (SCM_GSUBR_REST(typ))
|
if (SCM_GSUBR_REST(typ))
|
||||||
v[i] = args;
|
v[i] = args;
|
||||||
else if (!scm_is_null (args))
|
else if (!scm_is_null (args))
|
||||||
scm_wrong_num_args (SCM_SNAME (self));
|
scm_wrong_num_args (SCM_SUBR_NAME (self));
|
||||||
|
|
||||||
return gsubr_apply_raw (self, n, v);
|
return gsubr_apply_raw (self, n, v);
|
||||||
}
|
}
|
||||||
|
|
|
@ -655,7 +655,7 @@ iprin1 (SCM exp, SCM port, scm_print_state *pstate)
|
||||||
? "#<primitive-generic "
|
? "#<primitive-generic "
|
||||||
: "#<primitive-procedure ",
|
: "#<primitive-procedure ",
|
||||||
port);
|
port);
|
||||||
scm_puts (scm_i_symbol_chars (SCM_SNAME (exp)), port);
|
scm_puts (scm_i_symbol_chars (SCM_SUBR_NAME (exp)), port);
|
||||||
scm_putc ('>', port);
|
scm_putc ('>', port);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ SCM
|
||||||
scm_c_define_subr (const char *name, long type, SCM (*fcn) ())
|
scm_c_define_subr (const char *name, long type, SCM (*fcn) ())
|
||||||
{
|
{
|
||||||
SCM subr = scm_c_make_subr (name, type, fcn);
|
SCM subr = scm_c_make_subr (name, type, fcn);
|
||||||
scm_define (SCM_SNAME (subr), subr);
|
scm_define (SCM_SUBR_NAME (subr), subr);
|
||||||
return subr;
|
return subr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ scm_c_define_subr_with_generic (const char *name,
|
||||||
long type, SCM (*fcn) (), SCM *gf)
|
long type, SCM (*fcn) (), SCM *gf)
|
||||||
{
|
{
|
||||||
SCM subr = scm_c_make_subr_with_generic (name, type, fcn, gf);
|
SCM subr = scm_c_make_subr_with_generic (name, type, fcn, gf);
|
||||||
scm_define (SCM_SNAME (subr), subr);
|
scm_define (SCM_SUBR_NAME (subr), subr);
|
||||||
return subr;
|
return subr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ SCM_DEFINE (scm_make_procedure_with_setter, "make-procedure-with-setter", 2, 0,
|
||||||
lookup */
|
lookup */
|
||||||
switch (SCM_TYP7 (procedure)) {
|
switch (SCM_TYP7 (procedure)) {
|
||||||
case scm_tcs_subrs:
|
case scm_tcs_subrs:
|
||||||
name = SCM_SNAME (procedure);
|
name = SCM_SUBR_NAME (procedure);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
name = scm_procedure_property (procedure, scm_sym_name);
|
name = scm_procedure_property (procedure, scm_sym_name);
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SCM_SUBR_META_INFO(x) ((SCM *) SCM_CELL_WORD_3 (x))
|
#define SCM_SUBR_META_INFO(x) ((SCM *) SCM_CELL_WORD_3 (x))
|
||||||
#define SCM_SNAME(x) (SCM_SUBR_META_INFO (x) [0])
|
#define SCM_SUBR_NAME(x) (SCM_SUBR_META_INFO (x) [0])
|
||||||
#define SCM_SUBRF(x) ((SCM (*)()) SCM_CELL_WORD_1 (x))
|
#define SCM_SUBRF(x) ((SCM (*)()) SCM_CELL_WORD_1 (x))
|
||||||
#define SCM_SET_SUBRF(x, v) (SCM_SET_CELL_WORD_1 ((x), (v)))
|
#define SCM_SET_SUBRF(x, v) (SCM_SET_CELL_WORD_1 ((x), (v)))
|
||||||
#define SCM_DSUBRF(x) ((double (*)()) SCM_CELL_WORD_1 (x))
|
#define SCM_DSUBRF(x) ((double (*)()) SCM_CELL_WORD_1 (x))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue