aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2025-06-20 10:48:30 +0100
committergingerBill <bill@gingerbill.org>2025-06-20 10:48:30 +0100
commit293267c7b24713a4559a305e8b64b75bc6ec0676 (patch)
tree491fae50362174367a9b435dbdef8106c5b05ea6 /vendor
parent62db888ac159a613bb44320d460e4e01639339c0 (diff)
Move `#assert` to types file
Diffstat (limited to 'vendor')
-rw-r--r--vendor/kb_text_shape/kb_text_shape_procs.odin8
-rw-r--r--vendor/kb_text_shape/kb_text_shape_types.odin4
2 files changed, 5 insertions, 7 deletions
diff --git a/vendor/kb_text_shape/kb_text_shape_procs.odin b/vendor/kb_text_shape/kb_text_shape_procs.odin
index 2e5a4706b..b45a40eaa 100644
--- a/vendor/kb_text_shape/kb_text_shape_procs.odin
+++ b/vendor/kb_text_shape/kb_text_shape_procs.odin
@@ -10,12 +10,8 @@ when ODIN_OS == .Windows {
}
}
-import "core:c"
import "core:mem"
-#assert(size_of(c.int) == size_of(b32))
-#assert(size_of(u32) == size_of(b32))
-
@(default_calling_convention="c", link_prefix="kbts_", require_results)
foreign lib {
FontIsValid :: proc(Font: ^font) -> b32 ---
@@ -29,7 +25,7 @@ foreign lib {
Shape :: proc(State: ^shape_state, Config: ^shape_config,
MainDirection, RunDirection: direction,
- Glyphs: [^]glyph, GlyphCount: ^u32, GlyphCapacity: u32) -> c.int ---
+ Glyphs: [^]glyph, GlyphCount: ^u32, GlyphCapacity: u32) -> b32 ---
Cursor :: proc(Direction: direction) -> cursor ---
BeginBreak :: proc(State: ^break_state, MainDirection: direction, JapaneseLineBreakStyle: japanese_line_break_style) ---
@@ -153,7 +149,7 @@ PositionGlyph :: proc(Cursor: ^cursor, Glyph: ^glyph) -> (X, Y: i32) {
@(require_results)
ShapeDynamic :: proc(State: ^shape_state, Config: ^shape_config,
MainDirection, RunDirection: direction,
- Glyphs: ^[dynamic]glyph) -> c.int {
+ Glyphs: ^[dynamic]glyph) -> b32 {
GlyphCount := u32(len(Glyphs^))
GlyphCapacity := u32(cap(Glyphs^))
Res := Shape(State, Config, MainDirection, RunDirection, raw_data(Glyphs^), &GlyphCount, GlyphCapacity)
diff --git a/vendor/kb_text_shape/kb_text_shape_types.odin b/vendor/kb_text_shape/kb_text_shape_types.odin
index 8f34f2589..40be5727a 100644
--- a/vendor/kb_text_shape/kb_text_shape_types.odin
+++ b/vendor/kb_text_shape/kb_text_shape_types.odin
@@ -2,7 +2,9 @@ package vendor_kb_text_shape
import "core:c"
-#assert(size_of(b8) == size_of(bool))
+#assert(size_of(b8) == size_of(bool))
+#assert(size_of(b32) == size_of(u32))
+#assert(size_of(b32) == size_of(c.int))
un :: distinct (
uint when (size_of(uintptr) == size_of(uint)) else