From 89759084ab381f7181bb0aef250f5161d012d41e Mon Sep 17 00:00:00 2001 From: Mikael Djurfeldt Date: Sun, 14 Oct 2001 16:05:04 +0000 Subject: [PATCH] * read.c (scm_lreadr): When user-defined hash procedure returns SCM_UNSPECIFIED: Fall back to standard handling instead of raising an exception. (This prevents parsing of uniform vectors from interfering with parsing of numbers.) * arrays.scm (read:uniform-vector): Return *unspecified* instead of raising an exception if hash extend character isn't followed by the array list. (This prevents parsing of uniform vectors from interfering with parsing of numbers.) --- ice-9/ChangeLog | 7 +++++++ ice-9/arrays.scm | 3 +-- libguile/ChangeLog | 7 +++++++ libguile/read.c | 3 ++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog index 3f5f18326..70e1e2df9 100644 --- a/ice-9/ChangeLog +++ b/ice-9/ChangeLog @@ -1,3 +1,10 @@ +2001-10-14 Mikael Djurfeldt + + * arrays.scm (read:uniform-vector): Return *unspecified* instead + of raising an exception if hash extend character isn't followed by + the array list. (This prevents parsing of uniform vectors from + interfering with parsing of numbers.) + 2001-10-08 Mikael Djurfeldt * emacs.scm (%%load-port, %%emacs-load, %%emacs-eval-request, diff --git a/ice-9/arrays.scm b/ice-9/arrays.scm index b08de5e97..ae711d062 100644 --- a/ice-9/arrays.scm +++ b/ice-9/arrays.scm @@ -79,5 +79,4 @@ (define (read:uniform-vector proto port) (if (eq? #\( (peek-char port)) - (list->uniform-array 1 proto (read port)) - (error "read:uniform-vector list not found"))) + (list->uniform-array 1 proto (read port)))) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index ed58e920e..88437daa0 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,10 @@ +2001-10-14 Mikael Djurfeldt + + * read.c (scm_lreadr): When user-defined hash procedure returns + SCM_UNSPECIFIED: Fall back to standard handling instead of raising + an exception. (This prevents parsing of uniform vectors from + interfering with parsing of numbers.) + 2001-10-13 Marius Vollmer * numbers.c: Set NO_PREPRO_MAGIC when defining our version of diff --git a/libguile/read.c b/libguile/read.c index 0387c293d..1b8979ce1 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -350,7 +350,7 @@ scm_lreadr (SCM *tok_buf,SCM port,SCM *copy) got = scm_call_2 (sharp, SCM_MAKE_CHAR (c), port); if (SCM_EQ_P (got, SCM_UNSPECIFIED)) - goto unkshrp; + goto handle_sharp; if (SCM_RECORD_POSITIONS_P) return *copy = recsexpr (got, line, column, SCM_FILENAME (port)); @@ -358,6 +358,7 @@ scm_lreadr (SCM *tok_buf,SCM port,SCM *copy) return got; } } + handle_sharp: switch (c) { case '(':