Browse Source

Clarify localeconv mutability

Jeremy Soller 2 years ago
parent
commit
21efe2d3a1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/header/locale/mod.rs

+ 2 - 1
src/header/locale/mod.rs

@@ -32,7 +32,8 @@ pub struct lconv {
 }
 }
 unsafe impl Sync for lconv {}
 unsafe impl Sync for lconv {}
 
 
-//TODO: thread local?
+// Mutable because POSIX demands a mutable pointer, even though it warns
+// against mutating it
 static mut CURRENT_LOCALE: lconv = lconv {
 static mut CURRENT_LOCALE: lconv = lconv {
     currency_symbol: EMPTY_PTR,
     currency_symbol: EMPTY_PTR,
     decimal_point: ".\0" as *const _ as *const c_char,
     decimal_point: ".\0" as *const _ as *const c_char,