summaryrefslogtreecommitdiff
path: root/tnslc/vector.tnsl
diff options
context:
space:
mode:
Diffstat (limited to 'tnslc/vector.tnsl')
-rw-r--r--tnslc/vector.tnsl8
1 files changed, 6 insertions, 2 deletions
diff --git a/tnslc/vector.tnsl b/tnslc/vector.tnsl
index d21f83c..87a49e9 100644
--- a/tnslc/vector.tnsl
+++ b/tnslc/vector.tnsl
@@ -10,9 +10,7 @@ struct Vector {
/; resize (uint num_el)
self.dat_size = num_el
- _print_num(~_ptr{0}, ~self.dat)
self.dat = _realloc(self.dat, num_el * self.el_size)
- _print_num(~_ptr{0}, ~self.dat)
;/
/; get (uint i) [~uint8]
@@ -66,6 +64,12 @@ struct Vector {
self.set(i, v.dat + i * self.el_size)
;/
;/
+
+ /; add (Vector v)
+ /; loop (int i = 0; i < v._len()) [i++]
+ self.push(v.get(i))
+ ;/
+ ;/
/; start (int el_size)
self.num_el = 0