mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 02:00:26 +02:00
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.
This commit is contained in:
parent
27f3413eb8
commit
ec370c6ffb
2 changed files with 14 additions and 3 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue