X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=gom%2Fsource_citation.c;h=406972a7b57a5df92eceee4765bb2e44fe8b2f7f;hb=866835ac8928d7e40919c2ca59799cb37023856f;hp=3738636fc086c90e207d17209ac0c118e39df7e7;hpb=bb2090762d3ae9355a04286c33b78d24736b783c;p=gedcom-parse.git diff --git a/gom/source_citation.c b/gom/source_citation.c index 3738636..406972a 100644 --- a/gom/source_citation.c +++ b/gom/source_citation.c @@ -49,10 +49,11 @@ Gedcom_ctxt sub_citation_start(_ELT_PARAMS_) else { struct source_citation *cit = SUB_MAKEFUNC(source_citation)(); if (cit) { + int type = ctxt_type(ctxt); if (GEDCOM_IS_XREF_PTR(parsed_value)) cit->reference = GEDCOM_XREF_PTR(parsed_value); - switch (ctxt->ctxt_type) { + switch (type) { case ELT_SUB_PLAC: ADDFUNC2(place,source_citation)(ctxt, cit); break; case ELT_SUB_FAM_EVT: @@ -81,7 +82,7 @@ Gedcom_ctxt sub_citation_start(_ELT_PARAMS_) case REC_NOTE: ADDFUNC2(note,source_citation)(ctxt, cit); break; default: - UNEXPECTED_CONTEXT(ctxt->ctxt_type); + UNEXPECTED_CONTEXT(type); } result = MAKE_GOM_CTXT(elt, source_citation, cit); } @@ -108,7 +109,7 @@ void sub_citation_end(_ELT_END_PARAMS_) cit->description = newvalue; } } - destroy_gom_ctxt(ctxt); + def_elt_end(elt, parent, self, parsed_value); } }