mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
(scm_array_p): When no prototype is given, explicitely test for
allowable types, do not simply return true. Thanks to Roland Orre for reporting this!
This commit is contained in:
parent
5000379b92
commit
9b0018a113
1 changed files with 23 additions and 1 deletions
|
@ -262,8 +262,30 @@ SCM_DEFINE (scm_array_p, "array?", 1, 1, 0,
|
|||
return SCM_BOOL_F;
|
||||
v = SCM_ARRAY_V (v);
|
||||
}
|
||||
|
||||
if (nprot)
|
||||
return scm_from_bool(nprot);
|
||||
{
|
||||
switch (SCM_TYP7 (v))
|
||||
{
|
||||
case scm_tc7_bvect:
|
||||
case scm_tc7_string:
|
||||
case scm_tc7_byvect:
|
||||
case scm_tc7_uvect:
|
||||
case scm_tc7_ivect:
|
||||
case scm_tc7_svect:
|
||||
#if SCM_SIZEOF_LONG_LONG != 0
|
||||
case scm_tc7_llvect:
|
||||
#endif
|
||||
case scm_tc7_fvect:
|
||||
case scm_tc7_dvect:
|
||||
case scm_tc7_cvect:
|
||||
case scm_tc7_vector:
|
||||
case scm_tc7_wvect:
|
||||
return SCM_BOOL_T;
|
||||
default:
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int protp = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue