bool ext_include_variables_save (struct sieve_binary_block *sblock, struct sieve_variable_scope_binary *global_vars) { struct sieve_variable_scope *global_scope = sieve_variable_scope_binary_get(global_vars); unsigned int count = sieve_variable_scope_size(global_scope); sieve_size_t jump; sieve_binary_emit_unsigned(sblock, count); jump = sieve_binary_emit_offset(sblock, 0); if ( count > 0 ) { unsigned int size, i; struct sieve_variable *const *vars = sieve_variable_scope_get_variables(global_scope, &size); for ( i = 0; i < size; i++ ) { sieve_binary_emit_cstring(sblock, vars[i]->identifier); } } sieve_binary_resolve_offset(sblock, jump); return TRUE; }
void sieve_jumplist_resolve(struct sieve_jumplist *jlist) { unsigned int i; for ( i = 0; i < array_count(&jlist->jumps); i++ ) { const sieve_size_t *jump = array_idx(&jlist->jumps, i); sieve_binary_resolve_offset(jlist->block, *jump); } }