diff options
author | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 1999-09-09 21:29:25 +0000 |
---|---|---|
committer | Mikael Djurfeldt <djurfeldt@nada.kth.se> | 1999-09-09 21:29:25 +0000 |
commit | c72a774a57c93b25b4abbc82466d673371034b31 (patch) | |
tree | 11f663677e4655f0ff4198a0f2615e6f41cd3de8 /libguile/procs.c | |
parent | bc848f7feed33eea9a53dec4fab5099c71aae0f4 (diff) | |
download | guile-c72a774a57c93b25b4abbc82466d673371034b31.tar.gz |
* procs.c (scm_setter): Signal WTA if handed an entity or operator
lacking a setter.
Diffstat (limited to 'libguile/procs.c')
-rw-r--r-- | libguile/procs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libguile/procs.c b/libguile/procs.c index 0a1cd4089..9d9312cd9 100644 --- a/libguile/procs.c +++ b/libguile/procs.c @@ -360,11 +360,15 @@ scm_setter (SCM proc) return SCM_SETTER (proc); else if (SCM_STRUCTP (proc)) { + SCM setter; SCM_GASSERT1 (SCM_I_OPERATORP (proc), g_setter, proc, SCM_ARG1, s_setter); - return (SCM_I_ENTITYP (proc) - ? SCM_ENTITY_SETTER (proc) - : SCM_OPERATOR_SETTER (proc)); + setter = (SCM_I_ENTITYP (proc) + ? SCM_ENTITY_SETTER (proc) + : SCM_OPERATOR_SETTER (proc)); + if (SCM_NIMP (setter)) + return setter; + /* fall through */ } SCM_WTA_DISPATCH_1 (g_setter, proc, SCM_ARG1, s_setter); return 0; |