summaryrefslogtreecommitdiff
path: root/tnslc/c_wrap.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-03-18 17:16:50 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-03-18 17:16:50 -0400
commitd21c66af96878e5efff081ec861af4350d37bffe (patch)
tree9e01632266a4f83095da33f1c602c109e3af26fc /tnslc/c_wrap.tnsl
parentf51b86ff3cf980fa558dfafd24ffd4a327e0890b (diff)
Reference and dereference
Diffstat (limited to 'tnslc/c_wrap.tnsl')
-rw-r--r--tnslc/c_wrap.tnsl6
1 files changed, 3 insertions, 3 deletions
diff --git a/tnslc/c_wrap.tnsl b/tnslc/c_wrap.tnsl
index f35b808..d1004bb 100644
--- a/tnslc/c_wrap.tnsl
+++ b/tnslc/c_wrap.tnsl
@@ -34,7 +34,7 @@
;/
/; _delete (~void ptr)
- # setup call
+ # setup call by clearing most values
asm "mov rdi, rax"
asm "mov rsi, 0"
asm "mov rdx, 0"
@@ -56,7 +56,7 @@ struct Array {
/; method Array
/; resize (int num_el)
- _realloc(dat, num_el * self.el_size)
+ _realloc(self.dat, self.num_el * self.el_size)
;/
/; get (int i) [~void]
@@ -69,4 +69,4 @@ struct Array {
/; set (int i, ~void data)
;/
-;/ \ No newline at end of file
+;/