Allow elements out of context in GOM.
[gedcom-parse.git] / gom / multimedia.c
index 38ffa3ff6f8973ad04b30bdcc8a7e78cdc61b636..b7514e48d8f6022b7a88fdecf545163cd126ea92 100644 (file)
@@ -61,7 +61,7 @@ Gedcom_ctxt obje_blob_cont_start(_ELT_PARAMS_)
   if (! ctxt)
     NO_CONTEXT;
   else
-    result = make_gom_ctxt(elt, ctxt->obj_type, ctxt->ctxt_ptr);
+    result = dup_gom_ctxt(ctxt, elt);
   
   return (Gedcom_ctxt)result;
 }
@@ -77,6 +77,17 @@ void multimedia_subscribe()
   gedcom_subscribe_to_element(ELT_OBJE_OBJE, obje_obje_start, def_elt_end);
 }
 
+void UNREFALLFUNC(multimedia)(struct multimedia *obj)
+{
+  if (obj) {
+    UNREFALLFUNC(note_sub)(obj->note);
+    unref_xref_value(obj->continued);
+    UNREFALLFUNC(user_ref_number)(obj->ref);
+    UNREFALLFUNC(change_date)(obj->change_date);
+    UNREFALLFUNC(user_data)(obj->extra);
+  }
+}
+
 void CLEANFUNC(multimedia)(struct multimedia* obj)
 {
   if (obj) {