]> gitweb.factorcode.org Git - factor.git/blob - vm/byte_arrays.hpp
merge project-euler.factor
[factor.git] / vm / byte_arrays.hpp
1 namespace factor
2 {
3
4 struct growable_byte_array {
5         cell count;
6         gc_root<byte_array> elements;
7
8         explicit growable_byte_array(factor_vm *myvm,cell capacity = 40) : count(0), elements(myvm->allot_byte_array(capacity),myvm) { }
9
10         void append_bytes(void *elts, cell len);
11         void append_byte_array(cell elts);
12
13         void trim();
14 };
15
16 }