From 5c7a183f8ae67979aed262a12cef5a970c96244b Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Sat, 28 Dec 2024 22:46:18 +0100 Subject: [PATCH] Change CBool to be 1 byte. --- lib/std/core/cinterop.c3 | 2 +- releasenotes.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/core/cinterop.c3 b/lib/std/core/cinterop.c3 index 13480a64b..5cb9e6ca9 100644 --- a/lib/std/core/cinterop.c3 +++ b/lib/std/core/cinterop.c3 @@ -29,7 +29,7 @@ def CUChar = char; def CChar = $typefrom($$C_CHAR_IS_SIGNED ? ichar.typeid : char.typeid); -enum CBool : CInt +enum CBool : char { FALSE, TRUE diff --git a/releasenotes.md b/releasenotes.md index b23b0b255..2ef396494 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -30,6 +30,7 @@ - Use `weak` on dyn-symbols on Linux. - Fix crash on project.json not having an empty set of targets. - Miscompile when indexing an array with small unsigned types for enums. +- Change CBool to be 1 byte. ### Stdlib changes - Increase BitWriter.write_bits limit up to 32 bits.