From 0193377d24db3ec57ea9be488069a4b86878e6e6 Mon Sep 17 00:00:00 2001 From: Michael Gran Date: Thu, 20 Aug 2009 20:30:12 -0700 Subject: Avoid accessing symbol internals in call_dsubr_1 and DEVAL The symbol's characters are only accessed in case they are needed for an error message. This can be avoided by passing the symbol all the way to a error message function. * libguile/__scm.h (SCM_WTA_DISPATCH_1_SUBR): new macro * libguile/error.c (scm_i_wrong_type_arg_symbol): new error function * libguile/error.h: declaration of scm_i_wrong_type_arg_symbol * libguile/eval.c (call_dsubr_1): use new macro SCM_WTA_DISPATCH_1_SUBR to avoid having to unpack the symbol's chars * libguile/eval.i.c: use new macro SCM_WTA_DISPATCH_1_SUBR --- libguile/eval.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libguile/eval.c') diff --git a/libguile/eval.c b/libguile/eval.c index 1563b5125..eeafb0b9d 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -3381,8 +3381,7 @@ call_dsubr_1 (SCM proc, SCM arg1) { return (scm_from_double (SCM_DSUBRF (proc) (scm_i_fraction2double (arg1)))); } - SCM_WTA_DISPATCH_1 (*SCM_SUBR_GENERIC (proc), arg1, - SCM_ARG1, scm_i_symbol_chars (SCM_SUBR_NAME (proc))); + SCM_WTA_DISPATCH_1_SUBR (proc, arg1, SCM_ARG1); } static SCM -- cgit v1.2.3