aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin7
1 files changed, 4 insertions, 3 deletions
diff --git a/code/demo.odin b/code/demo.odin
index 4639588e1..cda53e35b 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -2,11 +2,12 @@ import (
"fmt.odin";
)
-proc new_type(T: type) -> ^T {
- return ^T(alloc(size_of(T), align_of(T)));
-}
proc main() {
+ proc new_type(T: type) -> ^T {
+ return ^T(alloc(size_of(T), align_of(T)));
+ }
+
var ptr = new_type(int);
ptr^ = 123;