mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-17 19:32:23 -07:00
Move #assert to types file
This commit is contained in:
+2
-6
@@ -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)
|
||||
|
||||
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user