@@ -10,12 +10,8 @@ when ODIN_OS == .Windows {
1010 }
1111}
1212
13- import " core:c"
1413import " core:mem"
1514
16- #assert (size_of (c.int ) == size_of (b32 ))
17- #assert (size_of (u32 ) == size_of (b32 ))
18-
1915@ (default_calling_convention=" c" , link_prefix=" kbts_" , require_results)
2016foreign lib {
2117 FontIsValid :: proc (Font: ^font) -> b32 ---
@@ -29,7 +25,7 @@ foreign lib {
2925
3026 Shape :: proc (State: ^shape_state, Config: ^shape_config,
3127 MainDirection, RunDirection: direction,
32- Glyphs: [^]glyph, GlyphCount: ^u32 , GlyphCapacity: u32 ) -> c. int ---
28+ Glyphs: [^]glyph, GlyphCount: ^u32 , GlyphCapacity: u32 ) -> b32 ---
3329
3430 Cursor :: proc (Direction: direction) -> cursor ---
3531 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) {
153149@(require_results)
154150ShapeDynamic :: proc (State: ^shape_state, Config: ^shape_config,
155151 MainDirection, RunDirection: direction,
156- Glyphs: ^[dynamic ]glyph) -> c. int {
152+ Glyphs: ^[dynamic ]glyph) -> b32 {
157153 GlyphCount := u32 (len (Glyphs^))
158154 GlyphCapacity := u32 (cap (Glyphs^))
159155 Res := Shape (State, Config, MainDirection, RunDirection, raw_data (Glyphs^), &GlyphCount, GlyphCapacity)
0 commit comments