mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 18:20:22 +02:00
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
This commit is contained in:
parent
7f5946427e
commit
0193377d24
5 changed files with 25 additions and 7 deletions
|
@ -53,6 +53,8 @@ SCM_API void scm_wrong_num_args (SCM proc) SCM_NORETURN;
|
|||
SCM_API void scm_error_num_args_subr (const char* subr) SCM_NORETURN;
|
||||
SCM_API void scm_wrong_type_arg (const char *subr, int pos,
|
||||
SCM bad_value) SCM_NORETURN;
|
||||
SCM_INTERNAL void scm_i_wrong_type_arg_symbol (SCM symbol, int pos,
|
||||
SCM bad_value) SCM_NORETURN;
|
||||
SCM_API void scm_wrong_type_arg_msg (const char *subr, int pos,
|
||||
SCM bad_value, const char *sz) SCM_NORETURN;
|
||||
SCM_API void scm_memory_error (const char *subr) SCM_NORETURN;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue