diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 2.95 2011/06/02 19:31:40 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 2.96 2011/06/18 17:08:58 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -624,7 +624,7 @@ static Proto *callparser (lua_State *L, struct SParser *p, int c) { | |||
624 | const char *oldloc = setlocale(LC_ALL, NULL); /* get current locale */ | 624 | const char *oldloc = setlocale(LC_ALL, NULL); /* get current locale */ |
625 | p->savedlocale = luaS_new(L, oldloc); /* make a copy */ | 625 | p->savedlocale = luaS_new(L, oldloc); /* make a copy */ |
626 | setsvalue2s(L, L->top - 1, p->savedlocale); /* anchor it */ | 626 | setsvalue2s(L, L->top - 1, p->savedlocale); /* anchor it */ |
627 | setlocale(LC_ALL, "C"); /* standard locale for parsing Lua files */ | 627 | (void)setlocale(LC_ALL, "C"); /* standard locale for parsing Lua files */ |
628 | return luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c); | 628 | return luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c); |
629 | } | 629 | } |
630 | 630 | ||
@@ -663,7 +663,7 @@ int luaD_protectedparser (lua_State *L, ZIO *z, const char *name) { | |||
663 | luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size); | 663 | luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size); |
664 | L->nny--; | 664 | L->nny--; |
665 | if (p.savedlocale) /* locale was changed? */ | 665 | if (p.savedlocale) /* locale was changed? */ |
666 | setlocale(LC_ALL, getstr(p.savedlocale)); /* restore old locale */ | 666 | (void)setlocale(LC_ALL, getstr(p.savedlocale)); /* restore old locale */ |
667 | setobjs2s(L, L->top - 2, L->top - 1); /* remove reserved space */ | 667 | setobjs2s(L, L->top - 2, L->top - 1); /* remove reserved space */ |
668 | --L->top; | 668 | --L->top; |
669 | return status; | 669 | return status; |