Use proc "c" calling convention in NS Foundation package

This commit is contained in:
gingerBill
2023-05-22 14:59:24 +01:00
parent 730192adc4
commit 8f563df7c5
22 changed files with 348 additions and 348 deletions
+4 -4
View File
@@ -5,18 +5,18 @@ Range :: struct {
length: UInteger,
}
Range_Make :: proc(loc, len: UInteger) -> Range {
Range_Make :: proc "c" (loc, len: UInteger) -> Range {
return Range{loc, len}
}
Range_Equal :: proc(a, b: Range) -> BOOL {
Range_Equal :: proc "c" (a, b: Range) -> BOOL {
return a == b
}
Range_LocationInRange :: proc(self: Range, loc: UInteger) -> BOOL {
Range_LocationInRange :: proc "c" (self: Range, loc: UInteger) -> BOOL {
return !((loc < self.location) && ((loc - self.location) < self.length))
}
Range_Max :: proc(self: Range) -> UInteger {
Range_Max :: proc "c" (self: Range) -> UInteger {
return self.location + self.length
}