func.ud = *buf;
ret = ucl_object_emit_full(obj, emit_type, &func);
sbuf_done(*buf);
sbuf_finish(*buf);
return (ret);
}