Roberto Ierusalimschy
0eb6aa4013
Some improvements in date/time functions
- Range in date table extended to full 32 bits.
- Easier support for times represented as floats.
- Added more tests.
5 years ago
Roberto Ierusalimschy
2fc6b55dae
Removed resource-related "emergency collections"
New to-be-closed variables is a better way to ensure the proper release
of resources.
6 years ago
Roberto Ierusalimschy
3d838f635c
Added "emergency collection" to 'io.tmpfile' and 'os.tmpname'
These operations also can give errors for lack of resources, so they
also will try "emergency collections" in case of resource errors.
Because there are now two libraries with that kind of handling,
'resourcetryagain' was moved to the auxiliary library to be shared
by the libraries.
6 years ago
Roberto Ierusalimschy
e885dee5ab
File operations try an "emergency collection" when failing
If a file operation fails do to lack of resources (too many open
files or not enough memory), it does a full garbage collection and
tries the operation again. Lack of resources are "too many open
files" (process wise and system wise) and "not enough memory".
The code is full of '#if's because error codes are not part
of the standard ISO C.
6 years ago
Roberto Ierusalimschy
1a1b2f3d7f
added 'return' to calls to 'luaL_error' (to signal to the compiler
that the function cannot continue past that call)
8 years ago
Roberto Ierusalimschy
de96e26afc
bug: 'checkoption' could read past end of string + 'os.date' can
handle embedded zeros
8 years ago
Roberto Ierusalimschy
48baa5e89c
'os.time(t)' normalizes 't' fields
9 years ago
Roberto Ierusalimschy
5f3ad5731e
simpler yet definition for 'checkoption'
9 years ago
Roberto Ierusalimschy
494e9ba0f4
simpler code for 'checkoption' + added conversion specifiers specific
to Windows
9 years ago
Roberto Ierusalimschy
9945253d57
details (comments + text of error messages)
9 years ago
Roberto Ierusalimschy
d103312661
details (typos in comments)
9 years ago
Roberto Ierusalimschy
403e181d81
'strftime' puts its result directly into 'lua_Buffer'
9 years ago
Roberto Ierusalimschy
4af03c5ae1
better treatment for integer overflows + all errors throw an error
(instead of returning nil)
9 years ago
Roberto Ierusalimschy
0d4a1f71db
re-organization of initial configuration options
10 years ago
Roberto Ierusalimschy
0705e7b39f
detail (no need to write 'double' in source)
10 years ago
Roberto Ierusalimschy
f31cc8e342
typo in error message
10 years ago
Roberto Ierusalimschy
900bdd5761
detail (to avoid warnings)
10 years ago
Roberto Ierusalimschy
81ecaf6178
new specifiers in 'strftime' are defined in C99 (not Posix)
10 years ago
Roberto Ierusalimschy
e75c0148c3
comments (references to "ANSI C" changed to "ISO C", which is the
international name
10 years ago
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
any other header file
10 years ago
Roberto Ierusalimschy
bdf566a8a3
`name' in comments changed to 'name'
10 years ago
Roberto Ierusalimschy
f97c64d7bf
macros 'LUA_QL'/'LUA_QL' deprecated
10 years ago
Roberto Ierusalimschy
65ec3379b1
added some casts for the cases when lua_Number != double
10 years ago
Roberto Ierusalimschy
798660c9cd
deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)
10 years ago
Roberto Ierusalimschy
a0d4f0fc8a
template for 'mkstemp' is configurable (via LUA_TMPNAMTEMPLATE)
11 years ago
Roberto Ierusalimschy
469daa16ee
configuration for Lua type corresponding to 'time_t'
11 years ago
Roberto Ierusalimschy
a3addae036
lua_gettable and similars return type of gotten value
11 years ago
Roberto Ierusalimschy
986c11daa6
removal of weird construction in definition of LUA_STRFTIMEOPTIONS
(two empty strings concatenated as in "" "")
11 years ago
Roberto Ierusalimschy
c6c41e85b2
more uniformity for defining system-dependent features
11 years ago
Roberto Ierusalimschy
4ad9970649
uses integers for time
12 years ago
Roberto Ierusalimschy
bc84180d12
error message in 'os.rename' does not include file name, because error
may be caused both by 'fromname' or 'toname'
12 years ago
Roberto Ierusalimschy
054c20cd5b
spaces -> tabs in #defines
13 years ago
Roberto Ierusalimschy
0f388193b3
'lUA' -> 'LUA'
13 years ago
Roberto Ierusalimschy
7948b8568e
when available, use '*_r' versions of 'gmtime' and 'localtime'
13 years ago
Roberto Ierusalimschy
61b1d9a466
another try to avoid warnings about unreachable 'return' after 'exit'
13 years ago
Roberto Ierusalimschy
43f13729a2
comment
14 years ago
Roberto Ierusalimschy
d806710ab5
returns for file-related functions and process-related functions
unified in 'auxlib'
14 years ago
Roberto Ierusalimschy
c4ea0c3b29
detail (cleaning trailing spaces)
14 years ago
Roberto Ierusalimschy
8bc33a088c
'os.exit' acceps booleans as status (for EXIT_SUCESS and EXIT_FAILURE)
14 years ago
Roberto Ierusalimschy
a9dc7c8828
functions lua_tonumber/lua_tointeger replaced by lua_tonumberx/lua_tointegerx
that have an extra out parameter with conversion status
15 years ago
Roberto Ierusalimschy
7192afafee
new module policy: C modules do not create globals and do not register
themselves with 'require' (let 'require' do its work); new auxiliary
functions luaL_newlib/luaL_newlibtable/luaL_setfuncs/luaL_requiref.
Old luaL_register will be deprecated.
15 years ago
Roberto Ierusalimschy
b3b8dfaaea
yet more options moved from luaconf.h into internal files
15 years ago
Roberto Ierusalimschy
de6fc75d63
several configuration options that do not change often moved out of
luaconf.h and into more internal files
15 years ago
Roberto Ierusalimschy
a6f465f558
new mark LUAMOD_API for all luaopen_* functions
15 years ago
Roberto Ierusalimschy
9a41506b8f
'os.exit' should close state only when second argument is true
15 years ago
Roberto Ierusalimschy
f096ab5421
correct way to check arguments to 'strftime'
15 years ago
Roberto Ierusalimschy
5d09be4832
by default, 'os.exit' closes current state
17 years ago
Roberto Ierusalimschy
6f8257ec5f
it seems useless trying to avoid this warning...
17 years ago
Roberto Ierusalimschy
9cb0607f6f
avoid warnings about exit; return
17 years ago
Roberto Ierusalimschy
e7fb0d8a6f
'os.date' checks arguments before passing them to 'strftime'
18 years ago