Allow elements out of context in GOM.
[gedcom-parse.git] / gom / func_template.h
index d5b22c5e21032d177283f20259362807b59b8020..dd17527302192260eff670fe246dad7d325aa514 100644 (file)
@@ -438,7 +438,7 @@ void ADDFUNC2_STRN(STRUCTTYPE,FIELD)(Gom_ctxt ctxt, const char *str)          \
        else                                                                  \
          obj->FIELD = newvalue;                                              \
       }                                                                       \
-      destroy_gom_ctxt(ctxt);                                                 \
+      def_elt_end(elt, parent, self, parsed_value);                           \
     }                                                                         \
   }
 
@@ -458,7 +458,7 @@ void ADDFUNC2_STRN(STRUCTTYPE,FIELD)(Gom_ctxt ctxt, const char *str)          \
        else                                                                  \
          obj->FIELD = newvalue;                                              \
       }                                                                       \
-      destroy_gom_ctxt(ctxt);                                                 \
+      def_rec_end(rec, self, parsed_value);                                   \
     }                                                                         \
   }