From 81c1cecf40b0733446fb0d945505155d87bf74c6 Mon Sep 17 00:00:00 2001 From: pommicket Date: Fri, 12 Sep 2025 13:10:53 -0400 Subject: Getting items --- pom.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pom.h') diff --git a/pom.h b/pom.h index 50897b8..75fefd1 100644 --- a/pom.h +++ b/pom.h @@ -162,6 +162,8 @@ POM__MUST_USE_R; /// /// This will be a string such as `"Duplicate key: foo.bar"` /// +/// Error messages may change arbitrarily in future versions. +/// /// The returned pointer is valid until the error is freed. /// /// See also \ref pom_error_print and \ref pom_error_to_string, which @@ -357,6 +359,8 @@ pom_conf_section(const pom_conf *conf, const char *section); /// you should still call this function repeatedly until you get `NULL`; /// otherwise memory associated with the iterator may be leaked. /// +/// The iterator is invalidated if \ref pom_conf_merge is called. +/// /// The correct usage for this function is: /// /// ```C @@ -384,6 +388,8 @@ pom_conf_next_key(const pom_conf *conf, pom_key_iter **iter); /// you should still call this function repeatedly until you get `NULL`; /// otherwise memory associated with the iterator may be leaked. /// +/// The iterator is invalidated if \ref pom_conf_merge is called. +/// /// The returned pointer is only valid until the next call to \ref pom_conf_next_item. /// /// The correct usage for this function is: @@ -413,6 +419,9 @@ POM__MUST_USE_R; /// Merge keys from `other` into `conf`, preferring keys in `other`. This invalidates /// all sections made with \ref pom_conf_section. +/// +/// It also invalidates any iterators from \ref pom_conf_next_item, \ref pom_conf_next_unread_key, +/// \ref pom_conf_next_key. void pom_conf_merge(pom_conf *conf, const pom_conf *other); @@ -431,6 +440,8 @@ pom_conf_merge(pom_conf *conf, const pom_conf *other); /// you should still call this function repeatedly until you get `NULL`; /// otherwise memory associated with the iterator may be leaked. /// +/// The iterator is invalidated if \ref pom_conf_merge is called. +/// /// The correct usage for this function is: /// /// ```C -- cgit v1.2.3