mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Add missing package qualifier to alloc
This commit is contained in:
@@ -906,7 +906,7 @@ parametric_polymorphism :: proc() {
|
|||||||
|
|
||||||
// This is how `new` is implemented
|
// This is how `new` is implemented
|
||||||
alloc_type :: proc($T: typeid) -> ^T {
|
alloc_type :: proc($T: typeid) -> ^T {
|
||||||
t := cast(^T)alloc(size_of(T), align_of(T))
|
t := cast(^T)mem.alloc(size_of(T), align_of(T))
|
||||||
t^ = T{} // Use default initialization value
|
t^ = T{} // Use default initialization value
|
||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user