From: Ran Benita Date: Sun, 15 Jan 2017 16:27:22 +0000 (+0200) Subject: compose/doc: note that it is safe to pass the result of getenv() as locale X-Git-Tag: xkbcommon-0.7.1~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47d6e5a8d9a5260a57a51f2620f193b105281133;p=platform%2Fupstream%2Flibxkbcommon.git compose/doc: note that it is safe to pass the result of getenv() as locale 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 --- diff --git a/xkbcommon/xkbcommon-compose.h b/xkbcommon/xkbcommon-compose.h index 7414c37..81b0d3f 100644 --- a/xkbcommon/xkbcommon-compose.h +++ b/xkbcommon/xkbcommon-compose.h @@ -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. *