From dc37ff50368f30742f422ea15d6373df67bcb13e Mon Sep 17 00:00:00 2001 From: StudebakerGuy <> Date: Wed, 7 Jan 2026 18:44:30 -0500 Subject: [PATCH 1/5] Comments before first emlement not being captured The xml library was not correctly detect that a comment occured before the first element. This addresses the issue, but the comment incorrectly includes --. --- core/encoding/xml/xml_reader.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/encoding/xml/xml_reader.odin b/core/encoding/xml/xml_reader.odin index 99d73670b..5e056177e 100644 --- a/core/encoding/xml/xml_reader.odin +++ b/core/encoding/xml/xml_reader.odin @@ -294,7 +294,7 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha comment := scan_comment(t) or_return if .Intern_Comments in opts.flags { - if len(doc.elements) == 0 { + if doc.element_count == 0 { append(&doc.comments, comment) } else { el := new_element(doc) From 14d63710586ef6ca0096c170cb758ce5ae1fe6c1 Mon Sep 17 00:00:00 2001 From: StudebakerGuy <> Date: Wed, 7 Jan 2026 19:24:02 -0500 Subject: [PATCH 2/5] Comment includiing -- at end Comments are incorrectly including -- a the end. This was due to the comment slice being returned 2 charachters too long. --- core/encoding/xml/tokenizer.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/encoding/xml/tokenizer.odin b/core/encoding/xml/tokenizer.odin index 71fa0bdf5..d07f41580 100644 --- a/core/encoding/xml/tokenizer.odin +++ b/core/encoding/xml/tokenizer.odin @@ -264,7 +264,7 @@ scan_comment :: proc(t: ^Tokenizer) -> (comment: string, err: Error) { expect(t, .Dash) expect(t, .Gt) - return string(t.src[offset : t.offset - 1]), .None + return string(t.src[offset : t.offset - 3]), .None } // Skip CDATA From fb479b3aaec5a9a715bcff7d65498ba18020f4f0 Mon Sep 17 00:00:00 2001 From: StudebakerGuy <> Date: Thu, 8 Jan 2026 11:34:50 -0500 Subject: [PATCH 3/5] Corrected CRC's CRC's were correct in relation to changes to address comments containing -- at the end. --- tests/core/encoding/xml/test_core_xml.odin | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/core/encoding/xml/test_core_xml.odin b/tests/core/encoding/xml/test_core_xml.odin index 409a8c9c0..23d583e98 100644 --- a/tests/core/encoding/xml/test_core_xml.odin +++ b/tests/core/encoding/xml/test_core_xml.odin @@ -114,7 +114,7 @@ xml_test_entities :: proc(t: ^testing.T) { }, expected_doctype = "html", }, - crc32 = 0x48f41216, + crc32 = 0x98791215, }) } @@ -128,7 +128,7 @@ xml_test_entities_unbox :: proc(t: ^testing.T) { }, expected_doctype = "html", }, - crc32 = 0xd0567818, + crc32 = 0x5fd5ab4e, }) } @@ -142,7 +142,7 @@ xml_test_entities_unbox_decode :: proc(t: ^testing.T) { }, expected_doctype = "html", }, - crc32 = 0x68d2571e, + crc32 = 0x3c0973e2, }) } @@ -298,4 +298,4 @@ doc_to_string :: proc(doc: ^xml.Document) -> (result: string) { print(strings.to_writer(&buf), doc) return strings.clone(strings.to_string(buf)) -} \ No newline at end of file +} From ab0de6d33a121650803206e8e889e33f03cbdcec Mon Sep 17 00:00:00 2001 From: Karl Zylinski Date: Tue, 20 Jan 2026 14:11:30 +0100 Subject: [PATCH 4/5] Added target freestanding_amd64_mingw for building freestanding on windows without MSVC installed (use for example clang-mingw) --- src/build_settings.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 31a07aa69..7d43788cd 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -840,6 +840,15 @@ gb_global TargetMetrics target_freestanding_amd64_win64 = { TargetABI_Win64, }; +gb_global TargetMetrics target_freestanding_amd64_mingw = { + TargetOs_freestanding, + TargetArch_amd64, + 8, 8, AMD64_MAX_ALIGNMENT, 32, + str_lit("x86_64-pc-windows-gnu"), + TargetABI_Win64, +}; + + gb_global TargetMetrics target_freestanding_arm64 = { TargetOs_freestanding, TargetArch_arm64, @@ -902,6 +911,7 @@ gb_global NamedTargetMetrics named_targets[] = { { str_lit("freestanding_amd64_sysv"), &target_freestanding_amd64_sysv }, { str_lit("freestanding_amd64_win64"), &target_freestanding_amd64_win64 }, + { str_lit("freestanding_amd64_mingw"), &target_freestanding_amd64_mingw }, { str_lit("freestanding_arm64"), &target_freestanding_arm64 }, { str_lit("freestanding_arm32"), &target_freestanding_arm32 }, From 4acdd3f60b39c95c2700618feb828b4cf687bb92 Mon Sep 17 00:00:00 2001 From: Jeroen van Rijn Date: Thu, 22 Jan 2026 11:49:47 +0100 Subject: [PATCH 5/5] Fix CRC --- tests/core/encoding/xml/test_core_xml.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/core/encoding/xml/test_core_xml.odin b/tests/core/encoding/xml/test_core_xml.odin index 9f233e00e..09cca4a63 100644 --- a/tests/core/encoding/xml/test_core_xml.odin +++ b/tests/core/encoding/xml/test_core_xml.odin @@ -142,7 +142,7 @@ xml_test_entities_unbox_decode :: proc(t: ^testing.T) { }, expected_doctype = "html", }, - crc32 = 0x6e45a697, + crc32 = 0xda1ac384, }) }