ffi: fix bug in si_make_foreign_data_from_array

Use ECL_ARRAYP instead of testing for a specific types of array. It's
worth to keep in mind, that STRING will be an array of integers, while
BASE-STRING will be an array of the ordinary chars. Fixes #142.
This commit is contained in:
Daniel Kochmański 2016-01-04 10:35:45 +01:00
parent 84f0a89da3
commit f0ba1d3ecb

View file

@ -282,10 +282,9 @@ cl_object
si_make_foreign_data_from_array(cl_object array)
{
cl_object tag;
if (ecl_unlikely(ecl_t_of(array) != t_array && ecl_t_of(array) != t_vector)) {
FEwrong_type_only_arg(@[si::make-foreign-data-from-array], array,
@[array]);
}
if (!ECL_ARRAYP (array))
FEwrong_type_only_arg(@[si::make-foreign-data-from-array],
array, @[array]);
tag = ecl_aet_to_ffi_table[array->array.elttype];
if (ecl_unlikely(Null(tag))) {
FEerror("Cannot make foreign object from array "