mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-08 08:38:51 +00:00
Use proc "c" calling convention in NS Foundation package
This commit is contained in:
+4
-4
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user