lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 13 August 2012 09:39, Doug <douglas.linder@gmail.com> wrote:
> --- a/deps/lua/lua-5.2.1/src/llex.c
> +++ b/deps/lua/lua-5.2.1/src/llex.c
> @@ -211,7 +211,7 @@ static void buffreplace (LexState *ls, char from, char to) {
>  */
>  static void trydecpoint (LexState *ls, SemInfo *seminfo) {
>    char old = ls->decpoint;
> -  ls->decpoint = getlocaledecpoint();
> +  ls->decpoint = '.';
>    buffreplace(ls, old, ls->decpoint);  /* try new decimal separator */
>    if (!buff2d(ls->buff, &seminfo->r)) {
>      /* format error with correct decimal point: no more options */
>
> Just wondered if anyone's done this before, and I'm just invoking the NDK wrong?

This is very similar to what I had to do in Androlua [1]. The Android
Bionic [2] library has very limited locale support. I feel there is
nothing wrong with this approach.

[1] https://github.com/mkottman/AndroLua
[2] http://en.wikipedia.org/wiki/Bionic_(software)