mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Add "get_ref" to list.
This commit is contained in:
@@ -162,7 +162,7 @@ macro Type List.@item_at(List &list, usz index) @operator([])
|
||||
return list.entries[index];
|
||||
}
|
||||
|
||||
macro Type* List.@item_ref(List &list, usz index) @operator(&[])
|
||||
fn Type* List.get_ref(List* list, usz index) @operator(&[]) @inline
|
||||
{
|
||||
return &list.entries[index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user