mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 05:43:19 -08:00
Eliminated assert_type_array
This commit is contained in:
parent
56d1fbabac
commit
8281a9de7f
3 changed files with 8 additions and 12 deletions
|
|
@ -798,7 +798,8 @@ ecl_array_elttype(cl_object x)
|
|||
cl_object
|
||||
cl_array_rank(cl_object a)
|
||||
{
|
||||
assert_type_array(a);
|
||||
if (!ECL_ARRAYP(a))
|
||||
FEwrong_type_only_arg(@'array-rank', a, @'array');
|
||||
@(return ((type_of(a) == t_array) ? MAKE_FIXNUM(a->array.rank)
|
||||
: MAKE_FIXNUM(1)))
|
||||
}
|
||||
|
|
@ -833,14 +834,16 @@ ecl_array_dimension(cl_object a, cl_index index)
|
|||
cl_object
|
||||
cl_array_total_size(cl_object a)
|
||||
{
|
||||
assert_type_array(a);
|
||||
if (!ECL_ARRAYP(a))
|
||||
FEwrong_type_only_arg(@'array-total-size', a, @'array');
|
||||
@(return MAKE_FIXNUM(a->array.dim))
|
||||
}
|
||||
|
||||
cl_object
|
||||
cl_adjustable_array_p(cl_object a)
|
||||
{
|
||||
assert_type_array(a);
|
||||
if (!ECL_ARRAYP(a))
|
||||
FEwrong_type_only_arg(@'adjustable-array-p', a, @'array');
|
||||
@(return (ECL_ADJUSTABLE_ARRAY_P(a) ? Ct : Cnil))
|
||||
}
|
||||
|
||||
|
|
@ -854,7 +857,8 @@ cl_array_displacement(cl_object a)
|
|||
cl_object to_array;
|
||||
cl_index offset;
|
||||
|
||||
assert_type_array(a);
|
||||
if (!ECL_ARRAYP(a))
|
||||
FEwrong_type_only_arg(@'adjustable-displacement', a, @'array');
|
||||
to_array = a->array.displaced;
|
||||
if (Null(to_array)) {
|
||||
offset = 0;
|
||||
|
|
|
|||
|
|
@ -259,13 +259,6 @@ assert_type_hash_table(cl_object p)
|
|||
FEwrong_type_argument(@'hash-table', p);
|
||||
}
|
||||
|
||||
void
|
||||
assert_type_array(cl_object p)
|
||||
{
|
||||
if (!ECL_ARRAYP(p))
|
||||
FEwrong_type_argument(@'array', p);
|
||||
}
|
||||
|
||||
cl_object
|
||||
cl_type_of(cl_object x)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1690,7 +1690,6 @@ extern ECL_API void assert_type_string(cl_object p);
|
|||
extern ECL_API void assert_type_cons(cl_object p);
|
||||
extern ECL_API void assert_type_readtable(cl_object p);
|
||||
extern ECL_API void assert_type_hash_table(cl_object p);
|
||||
extern ECL_API void assert_type_array(cl_object p);
|
||||
extern ECL_API void assert_type_list(cl_object p);
|
||||
extern ECL_API void assert_type_proper_list(cl_object p);
|
||||
extern ECL_API cl_object cl_type_of(cl_object x);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue