push_struct.core
This commit is contained in:
15
examples/push_struct.core
Normal file
15
examples/push_struct.core
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#import "Arena.core"
|
||||||
|
|
||||||
|
// @todo:
|
||||||
|
// Add new special type #Type_Size
|
||||||
|
|
||||||
|
PushStruct :: (a: *Arena, type: Type /*#Type_Size*/): *void
|
||||||
|
ti := GetTypeInfo(type)
|
||||||
|
result := PushSize(a, ti.size->Base.SizeU)
|
||||||
|
return result
|
||||||
|
|
||||||
|
main :: (argc: int, argv: **char): int
|
||||||
|
arena: Arena
|
||||||
|
a: *int = PushStruct(&arena, int)
|
||||||
|
|
||||||
|
return 0
|
||||||
Reference in New Issue
Block a user