From d6565feed349182eafa4d372f95fc3dc043859a6 Mon Sep 17 00:00:00 2001 From: lyken Date: Thu, 4 Jul 2024 12:24:52 +0800 Subject: [PATCH] core: ndarray_from_ndlist_impl cast size_of to usize --- nac3core/src/codegen/numpy.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nac3core/src/codegen/numpy.rs b/nac3core/src/codegen/numpy.rs index 3fab259e..3811ac0b 100644 --- a/nac3core/src/codegen/numpy.rs +++ b/nac3core/src/codegen/numpy.rs @@ -739,6 +739,8 @@ fn ndarray_from_ndlist_impl<'ctx, G: CodeGenerator + ?Sized>( _ => { let lst_len = src_lst.load_size(ctx, None); let sizeof_elem = ctx.get_llvm_type(generator, elem_ty).size_of().unwrap(); + let sizeof_elem = ctx.builder.build_int_cast(sizeof_elem, llvm_usize, "").unwrap(); + let cpy_len = ctx .builder .build_int_mul(