return ret;
}
-/* These helpers are not mentioned in the libid3tag header file. */
+/*
+ * The two helpers below are called during tag replacement if libid3tag is
+ * present. They are implemented and exported in the library but libid3tag.h
+ * does not declare them, so we declare them here.
+ */
+
+/** \cond libid3tag */
+
+/*
+ * To replace a tag with libid3tag one has to pass frames of id3 fields
+ * to particular functions of the id3tag library. The various field types
+ * specify text encoding, language, string, etc. This function initializes
+ * a field to the default value for the given type. It does not allocate
+ * memory and always succeeds.
+ */
void id3_field_init(union id3_field *field, enum id3_field_type type);
+
+/*
+ * Reset a field, deallocating memory if necessary.
+ *
+ * This first frees any memory already allocated, then calls id3_field_init()
+ * to initialize the field, re-using the old field type. The field pointer
+ * must not be NULL.
+ */
void id3_field_finish(union id3_field *field);
+/** \endcond libid3tag */
+
/*
* Frames of type ID3_FRAME_COMMENT contain three fields of type language,
* string, and fullstring. The third field contains the actual comment.