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

* list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around

validation.

	* read.c (scm_lreadparen): Removed.
	(scm_lreadparen1): Renamed scm_i_lreadparen.
This commit is contained in:
Neil Jerram 2004-02-20 22:04:24 +00:00
parent eb741d98e2
commit 1e55d28813
4 changed files with 16 additions and 14 deletions

View file

@ -1,3 +1,11 @@
2004-02-20 Neil Jerram <neil@ossau.uklinux.net>
* list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
validation.
* read.c (scm_lreadparen): Removed.
(scm_lreadparen1): Renamed scm_i_lreadparen.
2004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
* list.c (scm_list_n): validate non-immediate arguments;

View file

@ -90,9 +90,10 @@ scm_list_n (SCM elt, ...)
var_start (foo, elt);
while (! SCM_UNBNDP (elt))
{
#if (SCM_DEBUG_CELL_ACCESSES == 1)
if (SCM_NIMP (elt))
SCM_VALIDATE_CELL(elt, 0);
#endif
*pos = scm_cons (elt, SCM_EOL);
pos = SCM_CDRLOC (*pos);
elt = va_arg (foo, SCM);

View file

@ -298,7 +298,7 @@ skip_scsh_block_comment (SCM port)
static SCM scm_get_hash_procedure(int c);
static SCM scm_lreadparen1 (SCM *, SCM, char *, SCM *, char);
static SCM scm_i_lreadparen (SCM *, SCM, char *, SCM *, char);
static char s_list[]="list";
static char s_vector[]="vector";
@ -322,7 +322,7 @@ scm_lreadr (SCM *tok_buf, SCM port, SCM *copy)
case '(':
return SCM_RECORD_POSITIONS_P
? scm_lreadrecparen (tok_buf, port, s_list, copy)
: scm_lreadparen1 (tok_buf, port, s_list, copy, ')');
: scm_i_lreadparen (tok_buf, port, s_list, copy, ')');
case ')':
scm_input_error (FUNC_NAME, port,"unexpected \")\"", SCM_EOL);
goto tryagain;
@ -331,7 +331,7 @@ scm_lreadr (SCM *tok_buf, SCM port, SCM *copy)
case '[':
if (SCM_ELISP_VECTORS_P)
{
p = scm_lreadparen1 (tok_buf, port, s_vector, copy, ']');
p = scm_i_lreadparen (tok_buf, port, s_vector, copy, ']');
return SCM_NULLP (p) ? scm_nullvect : scm_vector (p);
}
goto read_token;
@ -395,7 +395,7 @@ scm_lreadr (SCM *tok_buf, SCM port, SCM *copy)
switch (c)
{
case '(':
p = scm_lreadparen1 (tok_buf, port, s_vector, copy, ')');
p = scm_i_lreadparen (tok_buf, port, s_vector, copy, ')');
return SCM_NULLP (p) ? scm_nullvect : scm_vector (p);
case 't':
@ -723,15 +723,9 @@ scm_read_token (int ic, SCM *tok_buf, SCM port, int weird)
_Pragma ("opt"); /* # pragma _CRI opt */
#endif
SCM
scm_lreadparen (SCM *tok_buf, SCM port, char *name, SCM *copy)
{
return scm_lreadparen1 (tok_buf, port, name, copy, ')');
}
static SCM
scm_lreadparen1 (SCM *tok_buf, SCM port, char *name, SCM *copy, char term_char)
#define FUNC_NAME "scm_lreadparen"
scm_i_lreadparen (SCM *tok_buf, SCM port, char *name, SCM *copy, char term_char)
#define FUNC_NAME "scm_i_lreadparen"
{
SCM tmp;
SCM tl;

View file

@ -70,7 +70,6 @@ SCM_API int scm_flush_ws (SCM port, const char *eoferr);
SCM_API int scm_casei_streq (char * s1, char * s2);
SCM_API SCM scm_lreadr (SCM * tok_buf, SCM port, SCM *copy);
SCM_API size_t scm_read_token (int ic, SCM * tok_buf, SCM port, int weird);
SCM_API SCM scm_lreadparen (SCM * tok_buf, SCM port, char *name, SCM *copy);
SCM_API SCM scm_lreadrecparen (SCM * tok_buf, SCM port, char *name, SCM *copy);
SCM_API SCM scm_read_hash_extend (SCM chr, SCM proc);
SCM_API void scm_init_read (void);