+/* Returns ITEM's notes, which is a null pointer if ITEM has no notes. */
+const char *
+table_item_get_notes (const struct table_item *item)
+{
+ return item->notes;
+}
+
+/* Sets ITEM's notes to NOTES, replacing any previous notes. Specify NULL for
+ NOTES to clear any notes from ITEM. The caller retains ownership of
+ NOTES.
+
+ This function may only be used on a table_item that is unshared.*/
+void
+table_item_set_notes (struct table_item *item, const char *notes)
+{
+ assert (!table_item_is_shared (item));
+ free (item->notes);
+ item->notes = notes ? xstrdup (notes) : NULL;
+}
+