for use with edit expressions
void tmpl_set_dict_def(tmpl_t *vpt, fr_dict_t const *dict) CC_HINT(nonnull);
+void tmpl_set_xlat(tmpl_t *vpt, xlat_exp_head_t *xlat) CC_HINT(nonnull);
+
int tmpl_afrom_value_box(TALLOC_CTX *ctx, tmpl_t **out, fr_value_box_t *data, bool steal) CC_HINT(nonnull);
void tmpl_attr_ref_debug(const tmpl_attr_t *ar, int idx) CC_HINT(nonnull);
vpt->rules.attr.dict_def = dict;
}
+/** Change the default dictionary in the tmpl's resolution rules
+ *
+ * @param[in] vpt to alter.
+ * @param[in] xlat to set.
+ */
+void tmpl_set_xlat(tmpl_t *vpt, xlat_exp_head_t *xlat)
+{
+ fr_assert(vpt->type == TMPL_TYPE_XLAT);
+
+ tmpl_xlat(vpt) = xlat;
+}
+
+
/** Initialise a tmpl using a format string to create the name
*
* @param[in] vpt to initialise.