Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 'luaL_execresult' does not assume -1 status as error | Roberto Ierusalimschy | 2020-05-22 | 1 | -0/+1 |
| | | | | | | | | | | | ISO C is silent about the return of 'system'. Windows sets 'errno' in case of errors. Linux has several different error cases, with different return values. ISO C allows 'system' to set 'errno' even if there are no errors. Here we assume that a status==0 is success (which is the case on several platforms), otherwise it is an error. If there is an error number, gives the error based on it. (The worst a spurious 'errno' can do is to generate a bad error message.) Otherwise uses the normal results. | ||||
* | Clearer distinction between types and tags | Roberto Ierusalimschy | 2020-01-31 | 1 | -2/+2 |
| | | | | | LUA_T* represents only types; tags (types + Variants) are represented by LUA_V* constants. | ||||
* | Added macro 'luaL_pushfail' | Roberto Ierusalimschy | 2019-08-16 | 1 | -5/+5 |
| | | | | | | | | The macro 'luaL_pushfail' documents all places in the standard libraries that return nil to signal some kind of failure. It is defined as 'lua_pushnil'. The manual also got a notation (@fail) to document those returns. The tests were changed to be agnostic regarding whether 'fail' is 'nil' or 'false'. | ||||
* | Correction in the documentation of 'io.lines' | Roberto Ierusalimschy | 2019-07-31 | 1 | -1/+1 |
| | | | | | | The loop does not end on end of file, but when the iterator function fails to read a value. (In particular, the format "a" never fails, so a loop with 'io.lines(fname, "a")' never ends.) | ||||
* | Details (typos in comments) | Roberto Ierusalimschy | 2019-07-05 | 1 | -1/+1 |
| | |||||
* | Methods separated from metamethods in 'io' | Roberto Ierusalimschy | 2019-07-01 | 1 | -10/+20 |
| | | | | | | | In the 'io' library, changed the use of the metatable also as its own "method table", so that metamethods cannot be accessed as if they were methods. (For instance, 'io.stdin.__gc' does not result in the finalizer metamethod anymore.) | ||||
* | Details | Roberto Ierusalimschy | 2019-05-28 | 1 | -5/+5 |
| | | | | | | | - new error message for "attempt to assign to const variable" - note in the manual about compatibility options - comments - small changes in 'read_line' and 'pushstr' | ||||
* | Details | Roberto Ierusalimschy | 2019-05-13 | 1 | -1/+1 |
| | | | | | | - 'luaL_setfuncs' avoids creating closures for placeholders. - Fixed some warnings about unused values in comma expressions. - Comments. | ||||
* | To-be-closed variable in 'for' loop separated from the state | Roberto Ierusalimschy | 2018-11-07 | 1 | -2/+4 |
| | | | | | | | | | The variable to be closed in a generic 'for' loop now is the 4th value produced in the loop initialization, instead of being the loop state (the 2nd value produced). That allows a loop to use a state with a '__toclose' metamethod but do not close it. (As an example, 'f:lines()' might use the file 'f' as a state for the loop, but it should not close the file when the loop ends.) | ||||
* | Removed resource-related "emergency collections" | Roberto Ierusalimschy | 2018-10-31 | 1 | -19/+2 |
| | | | | | New to-be-closed variables is a better way to ensure the proper release of resources. | ||||
* | State in generic 'for' acts as a to-be-closed variable | Roberto Ierusalimschy | 2018-10-31 | 1 | -6/+29 |
| | | | | | | | | | | | The implicit variable 'state' in a generic 'for' is marked as a to-be-closed variable, so that the state will be closed as soon as the loop ends, no matter how. Taking advantage of this new facility, the call 'io.lines(filename)' now returns the open file as a second result. Therefore, an iteraction like 'for l in io.lines(name)...' will close the file even when the loop ends with a break or an error. | ||||
* | Added a '__close' metamethod to file handles | Roberto Ierusalimschy | 2018-10-23 | 1 | -0/+1 |
| | |||||
* | Added "emergency collection" to 'io.tmpfile' and 'os.tmpname' | Roberto Ierusalimschy | 2018-07-27 | 1 | -48/+6 |
| | | | | | | | | 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. | ||||
* | File operations try an "emergency collection" when failing | Roberto Ierusalimschy | 2018-07-25 | 1 | -4/+64 |
| | | | | | | | | | 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. | ||||
* | back to one format per argument | Roberto Ierusalimschy | 2018-03-02 | 1 | -30/+26 |
| | |||||
* | using new 'lua_newuserdatauv' instead of 'lua_newuserdata' | Roberto Ierusalimschy | 2018-02-21 | 1 | -2/+2 |
| | |||||
* | 'io.read' accepts multiple formats in a single string argument | Roberto Ierusalimschy | 2017-11-16 | 1 | -27/+31 |
| | |||||
* | detail ('signal' -> 'sign' in comments) | Roberto Ierusalimschy | 2017-11-16 | 1 | -3/+3 |
| | |||||
* | error when calling close method without arguments (e.g., | Roberto Ierusalimschy | 2017-02-09 | 1 | -4/+9 |
| | | | | |io.stdin.close()|) | ||||
* | Using LUAI_UAC* types more consistently on vararg calls | Roberto Ierusalimschy | 2016-12-20 | 1 | -3/+5 |
| | |||||
* | detail (macro 'l_checkmode' reimplemented as function) | Roberto Ierusalimschy | 2016-09-01 | 1 | -5/+6 |
| | |||||
* | 'io.read("n")' accepts both a dot and the locale point as its | Roberto Ierusalimschy | 2016-05-02 | 1 | -8/+11 |
| | | | | | radix character + 'MAXRN' -> 'L_MAXLENNUM' + small detail in 'test2' | ||||
* | easy the way to accept other modifiers for 'mode' in 'io.open' | Roberto Ierusalimschy | 2015-11-23 | 1 | -7/+13 |
| | |||||
* | bug: 'io.lines' does not check maximum number of options | Roberto Ierusalimschy | 2015-07-15 | 1 | -1/+8 |
| | |||||
* | detail (comment) | Roberto Ierusalimschy | 2015-07-07 | 1 | -2/+2 |
| | |||||
* | detail | Roberto Ierusalimschy | 2015-06-21 | 1 | -2/+2 |
| | |||||
* | more consistent use of locale radix character across Lua | Roberto Ierusalimschy | 2015-04-03 | 1 | -9/+4 |
| | |||||
* | detail (use 'lua_pushliteral' to push an empty string) | Roberto Ierusalimschy | 2015-03-06 | 1 | -2/+2 |
| | |||||
* | clearer(?) code (also avoids a warning about 'c' being used | Roberto Ierusalimschy | 2015-01-02 | 1 | -5/+3 |
| | | | | without initialization) | ||||
* | avoid memory errors while a file is locked (when reading a line) | Roberto Ierusalimschy | 2014-11-21 | 1 | -7/+16 |
| | |||||
* | comments (references to "ANSI C" changed to "ISO C", which is the | Roberto Ierusalimschy | 2014-11-02 | 1 | -3/+3 |
| | | | | international name | ||||
* | added include for 'lprefix.h', for stuff that must be added before | Roberto Ierusalimschy | 2014-11-02 | 1 | -12/+4 |
| | | | | any other header file | ||||
* | LUA_WIN -> LUA_USE_WINDOWS | Roberto Ierusalimschy | 2014-10-31 | 1 | -3/+3 |
| | |||||
* | `name' in comments changed to 'name' | Roberto Ierusalimschy | 2014-10-25 | 1 | -2/+2 |
| | |||||
* | detail (using 'sizeof' instead of 'strlen' for length of a constantv5.3-beta | Roberto Ierusalimschy | 2014-10-22 | 1 | -2/+3 |
| | | | | string) | ||||
* | added 'l_' prefix for names that can be redefined externally | Roberto Ierusalimschy | 2014-10-22 | 1 | -4/+4 |
| | |||||
* | 'lua_stringtonum' -> 'lua_stringtonumber' | Roberto Ierusalimschy | 2014-10-17 | 1 | -4/+4 |
| | |||||
* | macros 'LUA_QL'/'LUA_QL' deprecated | Roberto Ierusalimschy | 2014-10-17 | 1 | -3/+3 |
| | |||||
* | 'lua_strtonum' -> 'lua_stringtonum' | Roberto Ierusalimschy | 2014-10-15 | 1 | -3/+3 |
| | |||||
* | details (comments) | Roberto Ierusalimschy | 2014-10-03 | 1 | -2/+2 |
| | |||||
* | detail | Roberto Ierusalimschy | 2014-10-01 | 1 | -2/+2 |
| | |||||
* | small change to avoid bug in some versions of the clang compiler | Roberto Ierusalimschy | 2014-09-26 | 1 | -2/+7 |
| | |||||
* | added some casts between integral types (to avoid warnings) | Roberto Ierusalimschy | 2014-07-29 | 1 | -2/+2 |
| | |||||
* | detail (typos in comments) | Roberto Ierusalimschy | 2014-06-30 | 1 | -9/+9 |
| | |||||
* | if numeral overflows the reading buffer, signal it as invalid input | Roberto Ierusalimschy | 2014-06-02 | 1 | -3/+5 |
| | | | | (resulting in nil) | ||||
* | no more use of 'scanf' for reading numbers | Roberto Ierusalimschy | 2014-05-21 | 1 | -17/+81 |
| | |||||
* | using a more conventional handling of stack space in 'io_readline' | Roberto Ierusalimschy | 2014-05-15 | 1 | -3/+2 |
| | |||||
* | new API function 'lua_rotate' | Roberto Ierusalimschy | 2014-05-13 | 1 | -4/+2 |
| | |||||
* | old POSIX systems need '<sys/types.h>' for 'off_t' | Roberto Ierusalimschy | 2014-05-11 | 1 | -1/+3 |
| | |||||
* | initial '*' in 'io.read' formats is deprecated | Roberto Ierusalimschy | 2014-04-15 | 1 | -4/+4 |
| |