From 55e0f97cc46ae904e27997c576f88e9542af6c48 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Mon, 15 Jul 2024 18:29:06 +0200 Subject: [PATCH] help `fmt` with `Type_Info_Struct` and `Type_Info_Bit_Field` changes --- base/runtime/core.odin | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/base/runtime/core.odin b/base/runtime/core.odin index f9bf57259..56aaefaa9 100644 --- a/base/runtime/core.odin +++ b/base/runtime/core.odin @@ -122,11 +122,11 @@ Type_Info_Struct_Flag :: enum u8 { Type_Info_Struct :: struct { // Slice these with `field_count` - types: [^]^Type_Info, - names: [^]string, - offsets: [^]uintptr, - usings: [^]bool, - tags: [^]string, + types: [^]^Type_Info `fmt:"v,field_count"`, + names: [^]string `fmt:"v,field_count"`, + offsets: [^]uintptr `fmt:"v,field_count"`, + usings: [^]bool `fmt:"v,field_count"`, + tags: [^]string `fmt:"v,field_count"`, field_count: i32, @@ -196,11 +196,11 @@ Type_Info_Soa_Pointer :: struct { } Type_Info_Bit_Field :: struct { backing_type: ^Type_Info, - names: [^]string, - types: [^]^Type_Info, - bit_sizes: [^]uintptr, - bit_offsets: [^]uintptr, - tags: [^]string, + names: [^]string `fmt:"v,field_count"`, + types: [^]^Type_Info `fmt:"v,field_count"`, + bit_sizes: [^]uintptr `fmt:"v,field_count"`, + bit_offsets: [^]uintptr `fmt:"v,field_count"`, + tags: [^]string `fmt:"v,field_count"`, field_count: int, }