types CHANGE redesign storing canonical values
Canonical values are not available for all the types and the type's
printer should be used to get string representation instead of trying to
get string value directly from the lyd_value. So, the canonical value is
now much more hidden in lyd_value structure. On the other hand, there is
newly available original string representation of the value (some of the
types already needed it), which is always present no matter of the
value's type.
diff --git a/src/tree_schema_compile.c b/src/tree_schema_compile.c
index d97328c..c241077 100644
--- a/src/tree_schema_compile.c
+++ b/src/tree_schema_compile.c
@@ -7048,7 +7048,7 @@
for (u = 0; u < ctx.dflts.count; ++u) {
struct ly_err_item *err = NULL;
struct lysc_incomplete_dflt *r = ctx.dflts.objs[u];
- ret = r->dflt->realtype->plugin->store(ctx.ctx, r->dflt->realtype, r->dflt->canonized, strlen(r->dflt->canonized),
+ ret = r->dflt->realtype->plugin->store(ctx.ctx, r->dflt->realtype, r->dflt->original, strlen(r->dflt->original),
LY_TYPE_OPTS_SCHEMA | LY_TYPE_OPTS_STORE | LY_TYPE_OPTS_SECOND_CALL, lys_resolve_prefix,
(void*)r->dflt_mod, LYD_XML, r->context_node, NULL, r->dflt, NULL, &err);
if (err) {