Add "get_ref" to list.

This commit is contained in:
Christoffer Lerno
2022-12-21 15:59:29 +01:00
parent 352e09970c
commit 03cdc8e3b1

View File

@@ -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];
}