compose/doc: note that it is safe to pass the result of getenv() as locale
authorRan Benita <ran234@gmail.com>
Sun, 15 Jan 2017 16:27:22 +0000 (18:27 +0200)
committerRan Benita <ran234@gmail.com>
Sun, 15 Jan 2017 16:32:02 +0000 (18:32 +0200)
See the NOTES section of getenv(3). Somewhat obscure but it doesn't hurt
to reassure the readers who know about this.

Signed-off-by: Ran Benita <ran234@gmail.com>
xkbcommon/xkbcommon-compose.h

index 7414c37..81b0d3f 100644 (file)
@@ -211,7 +211,11 @@ enum xkb_compose_format {
  * @param context
  *     The library context in which to create the compose table.
  * @param locale
- *     The current locale.  See @ref compose-locale.
+ *     The current locale.  See @ref compose-locale.\n
+ *
+ *     The value is copied, so it is safe to pass the result of getenv(3)
+ *     (or similar) without fear of it being invalidated by a subsequent
+ *     setenv(3) (or similar).
  * @param flags
  *     Optional flags for the compose table, or 0.
  *