From 56d1fbabacf5af05ab1be43a5018f783c0c24b1a Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Thu, 25 Feb 2010 21:40:17 +0100 Subject: [PATCH] Eliminated assert_type_vector --- src/c/array.d | 9 +++++---- src/c/typespec.d | 7 ------- src/h/external.h | 1 - 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/c/array.d b/src/c/array.d index 60fb130e4..acd7cb2a1 100644 --- a/src/c/array.d +++ b/src/c/array.d @@ -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); diff --git a/src/c/typespec.d b/src/c/typespec.d index 173bf9947..8bbd1cf22 100644 --- a/src/c/typespec.d +++ b/src/c/typespec.d @@ -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) { diff --git a/src/h/external.h b/src/h/external.h index fb149b9ec..0aa3a84cd 100755 --- a/src/h/external.h +++ b/src/h/external.h @@ -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);