2009-05-04 02:46:13 -04:00
|
|
|
namespace factor
|
|
|
|
{
|
|
|
|
|
2009-09-29 14:53:10 -04:00
|
|
|
struct growable_byte_array {
|
|
|
|
cell count;
|
|
|
|
gc_root<byte_array> elements;
|
|
|
|
|
2009-10-18 21:31:59 -04:00
|
|
|
explicit growable_byte_array(factor_vm *parent,cell capacity = 40) : count(0), elements(parent->allot_byte_array(capacity),parent) { }
|
2009-09-29 14:53:10 -04:00
|
|
|
|
|
|
|
void append_bytes(void *elts, cell len);
|
|
|
|
void append_byte_array(cell elts);
|
|
|
|
|
|
|
|
void trim();
|
|
|
|
};
|
|
|
|
|
2009-05-04 02:46:13 -04:00
|
|
|
}
|