From f167f5f2158ed3fe356c1e5a3233967dd26f88dc Mon Sep 17 00:00:00 2001 From: lyken Date: Tue, 27 Aug 2024 17:31:44 +0800 Subject: [PATCH] Ptr::copy_from to use SizeT --- nac3core/src/codegen/model/ptr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nac3core/src/codegen/model/ptr.rs b/nac3core/src/codegen/model/ptr.rs index 740696de..10c0a97c 100644 --- a/nac3core/src/codegen/model/ptr.rs +++ b/nac3core/src/codegen/model/ptr.rs @@ -204,8 +204,8 @@ impl<'ctx, Item: Model<'ctx>> Instance<'ctx, Ptr> { ) { // Force extend `num_items` and `itemsize` to `i64` so their types would match. let itemsize = self.model.size_of(generator, ctx.ctx); - let itemsize = Int(Int64).z_extend_or_truncate(generator, ctx, itemsize); - let num_items = Int(Int64).z_extend_or_truncate(generator, ctx, num_items); + let itemsize = Int(SizeT).z_extend_or_truncate(generator, ctx, itemsize); + let num_items = Int(SizeT).z_extend_or_truncate(generator, ctx, num_items); let totalsize = itemsize.mul(ctx, num_items); let is_volatile = ctx.ctx.bool_type().const_zero(); // is_volatile = false