diff options
author | pommicket <pommicket@gmail.com> | 2025-09-14 14:35:56 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-14 14:41:58 -0400 |
commit | 0cc0c89d08994e66fa4fae5c0891b8fa14960e50 (patch) | |
tree | dcff3633138512ff7c7b453e54ae12c00f69436a /pom.h | |
parent | ee7e2dbf3d6bc4ef8d4019c666a8960976c1af75 (diff) |
Error translations
Diffstat (limited to 'pom.h')
-rw-r--r-- | pom.h | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -6,7 +6,9 @@ /// Of course, you should not free or \ref pom_conf_merge into /// a configuration while another thread is using it. /// -/// Other than that, all these functions are fully thread-safe +/// \ref pom_set_error_language is not thread-safe — see its documentation for more notes. +/// +/// Otherwise, libpom is fully thread-safe /// provided that C11 atomics are available /// (`__STDC_VERSION__ >= 201112L && !defined(__STDC_NO_ATOMICS__)`). /// But beware of race conditions when using \ref pom_conf_next_unread_key @@ -93,6 +95,18 @@ typedef struct pom_item { uint64_t line; } pom_item; +/// Set language for error messages. +/// +/// This function is **not** thread-safe. Ensure synchronization between calling +/// this and any functions which can return errors. +/// +/// If `lang` is `NULL` or unrecognized, the default of `"en-US"` will be used. +/// +/// Currently supported languages: +/// +/// - `en-US` +void pom_set_error_language(const char *lang); + /// Load a configuration using a `read`-like function. /// /// Most of the time, you won't need this function: |