mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 13:52:16 -08:00
Eliminated assert_type_vector
This commit is contained in:
parent
4d3464e0be
commit
56d1fbabac
3 changed files with 5 additions and 12 deletions
|
|
@ -979,7 +979,8 @@ cl_object
|
|||
cl_fill_pointer(cl_object a)
|
||||
{
|
||||
const cl_env_ptr the_env = ecl_process_env();
|
||||
assert_type_vector(a);
|
||||
if (!ECL_VECTORP(a))
|
||||
FEwrong_type_only_arg(@'fill-pointer', a, @'vector');
|
||||
if (!ECL_ARRAY_HAS_FILL_POINTER_P(a)) {
|
||||
const char *type = "(AND VECTOR (SATISFIES ARRAY-HAS-FILL-POINTER-P))";
|
||||
FEwrong_type_nth_arg(@'fill-pointer', 1, a, ecl_read_from_cstring(type));
|
||||
|
|
@ -994,10 +995,10 @@ cl_object
|
|||
si_fill_pointer_set(cl_object a, cl_object fp)
|
||||
{
|
||||
const cl_env_ptr the_env = ecl_process_env();
|
||||
assert_type_vector(a);
|
||||
if (!ECL_ARRAY_HAS_FILL_POINTER_P(a)) {
|
||||
if (!ECL_VECTORP(a) || !ECL_ARRAY_HAS_FILL_POINTER_P(a)) {
|
||||
const char *type = "(AND VECTOR (SATISFIES ARRAY-HAS-FILL-POINTER-P))";
|
||||
FEwrong_type_nth_arg(@'fill-pointer', 1, a, ecl_read_from_cstring(type));
|
||||
FEwrong_type_nth_arg(@'si::fill-pointer-set', 1, a,
|
||||
ecl_read_from_cstring(type));
|
||||
}
|
||||
a->vector.fillp = ecl_fixnum_in_range(@'adjust-array',"fill pointer",fp,
|
||||
0,a->vector.dim);
|
||||
|
|
|
|||
|
|
@ -266,13 +266,6 @@ assert_type_array(cl_object p)
|
|||
FEwrong_type_argument(@'array', p);
|
||||
}
|
||||
|
||||
void
|
||||
assert_type_vector(cl_object p)
|
||||
{
|
||||
if (!ECL_VECTORP(p))
|
||||
FEwrong_type_argument(@'vector', p);
|
||||
}
|
||||
|
||||
cl_object
|
||||
cl_type_of(cl_object x)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1691,7 +1691,6 @@ 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_vector(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