Move vendor:darwin/Foundation to core:sys/darwin/Foundation
This commit is contained in:
1 parent
16dc79fc5c
commit
ef82f3e71e
41 files changed
+9
-9
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package objc_Foundation
|
||||
|
||||
Range :: struct {
|
||||
location: UInteger,
|
||||
length: UInteger,
|
||||
}
|
||||
|
||||
Range_Make :: proc "c" (loc, len: UInteger) -> Range {
|
||||
return Range{loc, len}
|
||||
}
|
||||
|
||||
Range_Equal :: proc "c" (a, b: Range) -> BOOL {
|
||||
return a == b
|
||||
}
|
||||
|
||||
Range_LocationInRange :: proc "c" (self: Range, loc: UInteger) -> BOOL {
|
||||
return !((loc < self.location) && ((loc - self.location) < self.length))
|
||||
}
|
||||
|
||||
Range_Max :: proc "c" (self: Range) -> UInteger {
|
||||
return self.location + self.length
|
||||
}
|
||||
Reference in new issue
Block a user