diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-28 20:29:30 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2023-03-28 20:29:30 +0200 |
| commit | 4c12addcafc5be4337d1b4c8be8f0c8be76a1203 (patch) | |
| tree | dd05c6be1a1907d845448b68fef9e8c9b26ba95d | |
| parent | 0bd27381c38827c5d6da5e837d531fa57eeee08e (diff) | |
Update builtin.odin
| -rw-r--r-- | core/builtin/builtin.odin | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/builtin/builtin.odin b/core/builtin/builtin.odin index d3679e7cd..211db9770 100644 --- a/core/builtin/builtin.odin +++ b/core/builtin/builtin.odin @@ -94,13 +94,14 @@ cap :: proc(array: Array_Type) -> int --- size_of :: proc($T: typeid) -> int --- align_of :: proc($T: typeid) -> int --- + // e.g. offset_of(t.f), where t is an instance of the type T -offset_of_selector :: proc(selector: $T) -> int --- +offset_of_selector :: proc(selector: $T) -> uintptr --- // e.g. offset_of(T, f), where T can be the type instead of a variable -offset_of_member :: proc($T: typeid, member: $M) -> int --- +offset_of_member :: proc($T: typeid, member: $M) -> uintptr --- offset_of :: proc{offset_of_selector, offset_of_member} // e.g. offset_of(T, "f"), where T can be the type instead of a variable -offset_of_by_string :: proc($T: typeid, member: string) -> int --- +offset_of_by_string :: proc($T: typeid, member: string) -> uintptr --- type_of :: proc(x: expr) -> type --- type_info_of :: proc($T: typeid) -> ^runtime.Type_Info --- |