* if both key and value are set, it appends a KV pair
* returns the new KV offset
*/
-u32 vg_kv_append( vg_kvs *kvs, u32 parent_offset, const char *key, const char *value )
+u32 vg_kv_append( vg_kvs *kvs, u32 parent_offset, const char *key, const char *value );
/* Writing KV files. w should be initialized with depth 0, and fp to a valid C stream pointer */
void vg_kv_write_block( vg_kv_write *w, const char *name, u32 name_length );
u32 new_usage = stack->used + block_size + alignment;
vg_stack_growmaybe( stack, new_usage );
- while( stack->used & (alignment-1) )
+ while( ((u64)stack->data + stack->used) & (alignment-1) )
stack->used ++;
void *block = (void *)stack->data + stack->used;