summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-09-11 13:35:55 -0400
committerpommicket <pommicket@gmail.com>2025-09-11 13:35:55 -0400
commit81d3c4962cc482023327a13bbbfc884421f0a00f (patch)
tree01e0b1640a010a74b627005101d65855885f93a8
parent4dbbeb1e85390d7c5e24fce4e61c8d29dda6aa00 (diff)
Clarify lifetimes
-rw-r--r--pom.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/pom.h b/pom.h
index ca90568..1cad0ca 100644
--- a/pom.h
+++ b/pom.h
@@ -156,12 +156,16 @@ POM__MUST_USE_R;
///
/// This will be a string such as `"Duplicate key: foo.bar"`
///
+/// The returned pointer is valid until the error is freed.
+///
/// See also \ref pom_error_print and \ref pom_error_to_string, which
/// are probably actually what you want in most cases.
const char *
pom_error_message(const pom_error *error);
/// Get the name of the file where this error occured.
+///
+/// The returned pointer is valid until \ref pom_conf_free is called.
const char *
pom_error_file(const pom_error *error);