diff options
author | Ludovic Courtès <ludo@gnu.org> | 2009-09-23 22:04:55 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2009-09-24 00:06:54 +0200 |
commit | ec370c6ffb560a718280e906c193dcc912923059 (patch) | |
tree | 629e2b437aa25ce36c1719ae7342d9e8b0305972 /libguile/generalized-arrays.c | |
parent | 27f3413eb8f505b8cab8850ea2f35139ea5707d2 (diff) | |
download | guile-ec370c6ffb560a718280e906c193dcc912923059.tar.gz |
Reinstate backward-compatible `scm_array_p ()'.
* libguile/generalized-arrays.c (scm_array_p_2): New, formerly
`scm_array_p ()'.
(scm_array_p): Add second argument, for compatibility with 1.8 and
earlier and to match what the doc says and what `SCM_VALIDATE_ARRAY'
expects.
* libguile/generalized-arrays.h (scm_array_p_2): New.
(scm_array_p): Adjust.
Diffstat (limited to 'libguile/generalized-arrays.c')
-rw-r--r-- | libguile/generalized-arrays.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/libguile/generalized-arrays.c b/libguile/generalized-arrays.c index 6394405dd..13f66fdca 100644 --- a/libguile/generalized-arrays.c +++ b/libguile/generalized-arrays.c @@ -39,8 +39,8 @@ scm_is_array (SCM obj) return scm_i_array_implementation_for_obj (obj) ? 1 : 0; } -SCM_DEFINE (scm_array_p, "array?", 1, 0, 0, - (SCM obj), +SCM_DEFINE (scm_array_p_2, "array?", 1, 0, 0, + (SCM obj), "Return @code{#t} if the @var{obj} is an array, and @code{#f} if\n" "not.") #define FUNC_NAME s_scm_array_p @@ -49,6 +49,16 @@ SCM_DEFINE (scm_array_p, "array?", 1, 0, 0, } #undef FUNC_NAME +/* The array type predicate, with an extra argument kept for backward + compatibility. Note that we can't use `SCM_DEFINE' directly because there + would be an argument count mismatch that would be caught by + `snarf-check-and-output-texi.scm'. */ +SCM +scm_array_p (SCM obj, SCM unused) +{ + return scm_array_p_2 (obj); +} + int scm_is_typed_array (SCM obj, SCM type) { |