Skip to content

Commit 293267c

Browse files
committed
Move #assert to types file
1 parent 62db888 commit 293267c

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

vendor/kb_text_shape/kb_text_shape_procs.odin

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@ when ODIN_OS == .Windows {
1010
}
1111
}
1212

13-
import "core:c"
1413
import "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)
2016
foreign 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)
154150
ShapeDynamic :: 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)

vendor/kb_text_shape/kb_text_shape_types.odin

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ package vendor_kb_text_shape
22

33
import "core:c"
44

5-
#assert(size_of(b8) == size_of(bool))
5+
#assert(size_of(b8) == size_of(bool))
6+
#assert(size_of(b32) == size_of(u32))
7+
#assert(size_of(b32) == size_of(c.int))
68

79
un :: distinct (
810
uint when (size_of(uintptr) == size_of(uint)) else

0 commit comments

Comments
 (0)