1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

* Don't use return value from SCM_SETCDR or SCM_WHASHSET.

This commit is contained in:
Dirk Herrmann 2000-07-18 16:09:09 +00:00
parent cc4feeca51
commit 62850ef3c1
3 changed files with 33 additions and 22 deletions

View file

@ -1,3 +1,9 @@
2000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
read.c (scm_lreadrecparen), srcprop.c (scm_set_source_property_x):
SCM_SETCDR and SCM_WHASHSET macros don't deliver a return value.
Thanks to Han-Wen Nienhuys for the bug report.
2000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de> 2000-07-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
* root.[ch] (scm_call_catching_errors): Deprecated. * root.[ch] (scm_call_catching_errors): Deprecated.

View file

@ -666,6 +666,8 @@ scm_lreadrecparen (SCM *tok_buf, SCM port, char *name, SCM *copy)
SCM_EOL); SCM_EOL);
while (')' != (c = scm_flush_ws (port, name))) while (')' != (c = scm_flush_ws (port, name)))
{ {
SCM new_tail;
scm_ungetc (c, port); scm_ungetc (c, port);
if (SCM_EQ_P (scm_sym_dot, (tmp = scm_lreadr (tok_buf, port, copy)))) if (SCM_EQ_P (scm_sym_dot, (tmp = scm_lreadr (tok_buf, port, copy))))
{ {
@ -679,12 +681,17 @@ scm_lreadrecparen (SCM *tok_buf, SCM port, char *name, SCM *copy)
scm_wta (SCM_UNDEFINED, "missing close paren", ""); scm_wta (SCM_UNDEFINED, "missing close paren", "");
goto exit; goto exit;
} }
tl = SCM_SETCDR (tl, scm_cons (tmp, SCM_EOL));
new_tail = scm_cons (tmp, SCM_EOL);
SCM_SETCDR (tl, new_tail);
tl = new_tail;
if (SCM_COPY_SOURCE_P) if (SCM_COPY_SOURCE_P)
tl2 = SCM_SETCDR (tl2, scm_cons (SCM_CONSP (tmp) {
? *copy SCM new_tail2 = scm_cons (SCM_CONSP (tmp) ? *copy : tmp, SCM_EOL);
: tmp, SCM_SETCDR (tl2, new_tail2);
SCM_EOL)); tl2 = new_tail2;
}
} }
exit: exit:
scm_whash_insert (scm_source_whash, scm_whash_insert (scm_source_whash,

View file

@ -262,24 +262,22 @@ SCM_DEFINE (scm_set_source_property_x, "set-source-property!", 3, 0, 0,
} }
if (SCM_EQ_P (scm_sym_breakpoint, key)) if (SCM_EQ_P (scm_sym_breakpoint, key))
{ {
if (SCM_FALSEP (datum)) if (SRCPROPSP (p))
CLEARSRCPROPBRK (SRCPROPSP (p) {
? p if (SCM_FALSEP (datum))
: SCM_WHASHSET (scm_source_whash, h, CLEARSRCPROPBRK (p);
scm_make_srcprops (0, else
0, SETSRCPROPBRK (p);
SCM_UNDEFINED, }
SCM_UNDEFINED,
p)));
else else
SETSRCPROPBRK (SRCPROPSP (p) {
? p SCM sp = scm_make_srcprops (0, 0, SCM_UNDEFINED, SCM_UNDEFINED, p);
: SCM_WHASHSET (scm_source_whash, h, SCM_WHASHSET (scm_source_whash, h, sp);
scm_make_srcprops (0, if (SCM_FALSEP (datum))
0, CLEARSRCPROPBRK (sp);
SCM_UNDEFINED, else
SCM_UNDEFINED, SETSRCPROPBRK (sp);
p))); }
} }
else if (SCM_EQ_P (scm_sym_line, key)) else if (SCM_EQ_P (scm_sym_line, key))
{ {