else {
struct note_sub *note = SUB_MAKEFUNC(note_sub)();
if (note) {
+ int type = ctxt_type(ctxt);
if (GEDCOM_IS_XREF_PTR(parsed_value))
note->reference = GEDCOM_XREF_PTR(parsed_value);
- switch (ctxt->ctxt_type) {
+ switch (type) {
case ELT_SUB_PLAC:
ADDFUNC2(place,note_sub)(ctxt, note); break;
case ELT_SUB_FAM_EVT:
case REC_SOUR:
ADDFUNC2(source,note_sub)(ctxt, note); break;
default:
- UNEXPECTED_CONTEXT(ctxt->ctxt_type);
+ UNEXPECTED_CONTEXT(type);
}
result = MAKE_GOM_CTXT(elt, note_sub, note);
}
else
obj->text = newvalue;
}
- destroy_gom_ctxt(ctxt);
+ def_elt_end(elt, parent, self, parsed_value);
}
}
}