From b29a084257bc3f46d92f171f8840a5a28869df88 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 23 Jul 2023 18:53:19 +0300 Subject: [PATCH] builtin: move array.data to the top of the struct --- vlib/builtin/array.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/builtin/array.v b/vlib/builtin/array.v index 2fa592c961..f33558f0c0 100644 --- a/vlib/builtin/array.v +++ b/vlib/builtin/array.v @@ -10,14 +10,14 @@ import strings // which avoids using generics and thus without generating extra // code for every type. pub struct array { -pub: - element_size int // size in bytes of one element in the array. pub mut: data voidptr offset int // in bytes (should be `usize`), to avoid copying data while making slices, unless it starts changing len int // length of the array in elements. cap int // capacity of the array in elements. flags ArrayFlags +pub: + element_size int // size in bytes of one element in the array. } [flag]