summaryrefslogtreecommitdiffstats
path: root/wscript_build.py
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-01-20 21:10:44 +0100
committerwm4 <wm4@nowhere>2015-01-20 21:10:44 +0100
commit21322a016e74ddf20cffaab5d621db1cf694eaa5 (patch)
tree9b837c6088bd758950524aa489af54c690bf6572 /wscript_build.py
parent9f63b9f6733869ddcd1118545d32cde850885056 (diff)
downloadmpv-21322a016e74ddf20cffaab5d621db1cf694eaa5.tar.bz2
mpv-21322a016e74ddf20cffaab5d621db1cf694eaa5.tar.xz
client API: check locale, and reject anything other than "C" locale
Sigh... The C locale system is incredibly shitty, and if used, breaks basic string functions. The locale can change the decimal mark from "." to ",", which affects conversion between floats and strings: snprintf() and strtod() respect the locale decimal mark, and change behavior. (What's even better, the behavior of these functions can change asynchronously, if setlocale() is called after threads were started.) So just check the locale in the client API, and refuse to work if it's wrong. This also makes the lib print to stderr, which I consider the lesser evil in this specific situation.
Diffstat (limited to 'wscript_build.py')
0 files changed, 0 insertions, 0 deletions