summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Jerram <neil@ossau.uklinux.net>2004-02-20 22:04:24 +0000
committerNeil Jerram <neil@ossau.uklinux.net>2004-02-20 22:04:24 +0000
commit1e55d28813c6dba90ea05ba3e7703eea191be691 (patch)
treed78993792d173ca328653df4a8b5fc55cbfd008d
parenteb741d98e2f898974923cb0c1b3c8b1913878cd2 (diff)
downloadguile-1e55d28813c6dba90ea05ba3e7703eea191be691.tar.gz
* 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.
-rw-r--r--libguile/ChangeLog8
-rw-r--r--libguile/list.c3
-rw-r--r--libguile/read.c18
-rw-r--r--libguile/read.h1
4 files changed, 16 insertions, 14 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog
index e7d61a612..68fbd2aa3 100644
--- a/libguile/ChangeLog
+++ b/libguile/ChangeLog
@@ -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;
diff --git a/libguile/list.c b/libguile/list.c
index e36797f4a..0088bb39f 100644
--- a/libguile/list.c
+++ b/libguile/list.c
@@ -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);
diff --git a/libguile/read.c b/libguile/read.c
index 10e8d8264..8a90b33ec 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -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;
diff --git a/libguile/read.h b/libguile/read.h
index 2f7251492..70f6521eb 100644
--- a/libguile/read.h
+++ b/libguile/read.h
@@ -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);