X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fnote_sub.c;h=f8dedefa46ff1496b7a7d6ee1d48e2060dbe0f08;hb=60162324857b1e8d84b8346d99f8b7dce07d0d40;hp=8104aaeb8d19dcb09f1bbc0a6ad36d92576c08e3;hpb=bb2090762d3ae9355a04286c33b78d24736b783c;p=gedcom-parse.git diff --git a/gom/note_sub.c b/gom/note_sub.c index 8104aae..f8dedef 100644 --- a/gom/note_sub.c +++ b/gom/note_sub.c @@ -54,10 +54,11 @@ Gedcom_ctxt sub_note_start(_ELT_PARAMS_) 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: @@ -101,7 +102,7 @@ Gedcom_ctxt sub_note_start(_ELT_PARAMS_) 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); } @@ -126,7 +127,7 @@ void sub_note_end(_ELT_END_PARAMS_) else obj->text = newvalue; } - destroy_gom_ctxt(ctxt); + def_elt_end(elt, parent, self, parsed_value); } } }