[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua crashing on unrecognized strings
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 24 Aug 2009 10:52:03 -0300
> * On 2009-08-24 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote :
>
> > > Using the lua.exe interpreter provided with Lua for Windows, passing any
> > > letter to (os.date("%"..letter)) other than a-d, j, m, p, w-z, A, B, H, I,
> > > M, S, U, or W-Z is causing to crash (as in "has encountered a problem and
> > > needs to close" crash). This also happens when calling io.open with any
> > > undefined format string.
> >
> > In 5.2 we'll be limited to the directives listed in ANSI C, even if the
> > underlying C library supports the full POSIX set. Sad, I know.
>
> Would it not be possible to make this configurable at build time ? If
> the 'posix' target is chosen to build the lua sources, it would be sane
> to allow POSIX directives to be used, imho.
It will be. luaconf.h will have the following macros that control the
valid options:
#define LUA_STRFTIMEOPTIONS "aAbBcdHIjmMpSUwWxXyYz%"
#define LUA_STRFTIMEPREFIX ""
-- Roberto