mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-22 12:33:39 -08:00
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:
parent
84f0a89da3
commit
f0ba1d3ecb
1 changed files with 3 additions and 4 deletions
|
|
@ -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 "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue