+/* Inserts a row of units into a hashtable, starting with the specified column.
+ Returns the number of elements that were written. This function will not
+ overflow internal buffers, but will return a short count (lower than the
+ provided 'units') when truncation of source data occurs. */
+STON_FUNC
+size_t
+ston_ht32_insertx
+( struct ston_ht_header_t* ht,
+ uint32_t key,
+ uint32_t* data_src,
+ size_t start_column,
+ size_t units
+)
+{ uint32_t* data_row = ston_ht32_row(ht,key);
+ uint32_t* data_limit = data_row + ston_ht_cols(ht);
+ uint32_t* data_trg = data_row + start_column;
+ if (data_row == NULL)
+ return 0;
+ while (units-- && data_trg < data_limit)
+ *data_trg++ = *data_src++;
+ return (size_t)(data_trg - data_row);
+}
+
+