void _dict_recurse_end_cmd(t_dict_recurse *x) { TRACE("_dict_recurse_end_cmd"); // Release the dictionary or dictionaries if (x->dict) { dictobj_release(x->dict); } if (x->replace_dict) { dictobj_release(x->replace_dict); } // Reset the object variables _dict_recurse_reset(x); // Indicate the completion of the cmd with a bang outlet_bang(x->outl_bang); }
void dict_route_dictionary(t_dict_route *x, t_symbol *s) { t_dictionary *d = dictobj_findregistered_retain(s); if (!d) { object_error((t_object*)x, "unable to reference dictionary named %s", s); return; } if (proxy_getinlet((t_object*)x) == 0) { // left inlet : validate the input against the schema long validates = false; t_atom a; validates = dictobj_validate(x->schema_dict, d); atom_setsym(&a, s); if (validates) outlet_anything(x->outlet_dict, _sym_dictionary, 1, &a); else outlet_anything(x->outlet_nomatch, _sym_dictionary, 1, &a); } else { // right inlet : set the contents of the schema with a copy of the incoming dictionary if (d) { dictionary_clear(x->schema_dict); dictionary_clone_to_existing(d, x->schema_dict); } } dictobj_release(d); }