]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/byte_arrays.hpp
webapps.wiki: adding search bar
[factor.git] / vm / byte_arrays.hpp
index 3a388f0dd69158e84434cdc33d94ff0c484d1442..2978d94de1f4c22cc61b88431351684e686daa6a 100644 (file)
@@ -4,9 +4,11 @@ struct growable_byte_array {
   cell count;
   data_root<byte_array> elements;
 
-  explicit growable_byte_array(factor_vm* parent, cell capacity = 40)
+  // Allocates memory
+  growable_byte_array(factor_vm* parent, cell capacity = 40)
       : count(0), elements(parent->allot_byte_array(capacity), parent) {}
 
+  void reallot_array(cell count);
   void grow_bytes(cell len);
   void append_bytes(void* elts, cell len);
   void append_byte_array(cell elts);
@@ -14,7 +16,7 @@ struct growable_byte_array {
   void trim();
 };
 
-/* Allocates memory */
+// Allocates memory
 template <typename Type>
 byte_array* factor_vm::byte_array_from_value(Type* value) {
   byte_array* data = allot_uninitialized_array<byte_array>(sizeof(Type));