Begin work on core:sys/darwin/Foundation

This commit is contained in:
gingerBill
2022-02-09 00:19:20 +00:00
parent 340838c878
commit b95ade40c0
13 changed files with 414 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
package objc_Foundation
Range :: struct {
location: UInteger,
length: UInteger,
}
Range_Make :: proc(loc, len: UInteger) -> Range {
return Range{loc, len}
}
Range_Equal :: proc(a, b: Range) -> BOOL {
return a == b
}
Range_LocationInRange :: proc(self: Range, loc: UInteger) -> BOOL {
return !((loc < self.location) && ((loc - self.location) < self.length))
}
Range_Max :: proc(self: Range) -> UInteger {
return self.location + self.length
}