diff options
author | Andy Wingo <wingo@pobox.com> | 2013-10-31 12:52:23 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-10-31 12:55:24 +0100 |
commit | 30b7cf9df0f51bc2a3553396dc368c197eab4d8d (patch) | |
tree | eac9a77340ee120423d4abea40856a744f64942b /libguile/procs.c | |
parent | 6165d8120d5973ea177514d0632247e1d38904ee (diff) |
Avoid calling procedure-name when doing a make-procedure-with-setter
* libguile/procs.c (scm_make_procedure_with_setter): Don't set the name
of the procedure. Instead rely on procedure-name to look it up from
the wrapped procedure as needed.
* libguile/procprop.c (scm_procedure_name): If there was no override and
the procedure is a procedure-with-setter, recurse on the procedure.
Diffstat (limited to 'libguile/procs.c')
-rw-r--r-- | libguile/procs.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libguile/procs.c b/libguile/procs.c index 8d9ef15b4..b02182427 100644 --- a/libguile/procs.c +++ b/libguile/procs.c @@ -89,18 +89,10 @@ SCM_DEFINE (scm_make_procedure_with_setter, "make-procedure-with-setter", 2, 0, "with the associated setter @var{setter}.") #define FUNC_NAME s_scm_make_procedure_with_setter { - SCM name, ret; SCM_VALIDATE_PROC (1, procedure); SCM_VALIDATE_PROC (2, setter); - ret = scm_make_struct (pws_vtable, SCM_INUM0, - scm_list_2 (procedure, setter)); - - /* don't use procedure_name, because don't care enough to do a reverse - lookup */ - name = scm_procedure_property (procedure, scm_sym_name); - if (scm_is_true (name)) - scm_set_procedure_property_x (ret, scm_sym_name, name); - return ret; + return scm_make_struct (pws_vtable, SCM_INUM0, + scm_list_2 (procedure, setter)); } #undef FUNC_NAME |