aboutsummaryrefslogtreecommitdiff
path: root/manual (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lua_settop/lua_pop closes to-be-closed variablesRoberto Ierusalimschy2021-03-091-12/+11
| | | | | | The existence of 'lua_closeslot' is no reason for lua_pop not to close to-be-closed variables too. It is too error-prone for lua_pop not to close tbc variables being popped from the stack.
* New release number (5.4.3)Roberto Ierusalimschy2021-03-031-1/+1
|
* Normalization of metamethod typography in the manualRoberto Ierusalimschy2021-03-021-10/+10
|
* '__close' methods can yield in the return of a C functionRoberto Ierusalimschy2021-02-121-0/+3
| | | | | | | When, inside a coroutine, a C function with to-be-closed slots return, the corresponding metamethods can yield. ('__close' metamethods called through 'lua_closeslot' still cannot yield, as there is no continuation to go when resuming.)
* Simpler handling of errors when creating tbc variablesRoberto Ierusalimschy2021-01-191-4/+0
| | | | | | New field 'lua_State.ptbc' keeps to-be-closed variable until its upvalue is created, so that it can be closed in case of a memory-allocation error.
* Corrected documentation for 'table.sort'Roberto Ierusalimschy2021-01-141-8/+8
| | | | | The sort function must define a (strict) weak order for a correct sorting. A partial order is not enough.
* New API function 'lua_closeslot'Roberto Ierusalimschy2021-01-111-10/+23
| | | | | | Closing a to-be-closed variable with 'lua_settop' is too restrictive, as it erases all slots above the variable. Moreover, it adds side effects to 'lua_settop', which should be a fairly basic function.
* Report last error in closing methodsRoberto Ierusalimschy2020-12-221-5/+0
| | | | | When there are multiple errors around closing methods, report the last error instead of the original.
* Upvalues removed from 'openupval' before being closedRoberto Ierusalimschy2020-12-211-1/+0
| | | | | | | Undo commit c220b0a5d0: '__close' is not called again in case of errors. (Upvalue is removed from the list before the call.) The common error that justified that change was C stack overflows, which are much rarer with the stackless implementation.
* 'coroutine.close'/'lua_resetthread' report original errorsRoberto Ierusalimschy2020-12-181-3/+7
| | | | | | Besides errors in closing methods, 'coroutine.close' and 'lua_resetthread' also consider the original error that stopped the thread, if any.
* Details (do not affect regular code)Roberto Ierusalimschy2020-12-071-0/+5
| | | | | | | * Avoids multiple definitions of 'lua_assert' in test file. * Smaller C-stack limit in test mode. * Note in the manual about the use of false * Extra test for constant reuse.
* DetailsRoberto Ierusalimschy2020-10-301-3/+10
| | | | | | - small corrections in the manual - ldo.c: 'docall' -> 'ccall' ('docall' already used in 'lua.c') - comments
* Revision of stackless implementationRoberto Ierusalimschy2020-10-121-55/+17
| | | | | | - more organized handling of 'nCcalls' - comments - deprecation of 'setcstacklimit'
* Details in the manualRoberto Ierusalimschy2020-09-251-6/+9
|
* Details in comments and documentationRoberto Ierusalimschy2020-09-161-0/+10
|
* Better documentation for the GC of strings in the C APIRoberto Ierusalimschy2020-09-091-20/+58
| | | | Plus some other small changes.
* Detailsv5.4.0Roberto Ierusalimschy2020-06-181-0/+11
| | | | Added as incompatibility, in the manual, the extra return of 'io.lines'.
* DetailsRoberto Ierusalimschy2020-06-101-1/+1
|
* Improvements in the manualRoberto Ierusalimschy2020-05-291-45/+86
| | | | | | | | - more consistent nomenclature for error handling - more precise definition for dead objects - added algorithm used by 'math.random' - added luaL_pushfail - some other minor changes
* Several details about 5.4.0 rc1Roberto Ierusalimschy2020-04-231-1/+1
| | | | | Corrected several small details: added 'const', adjusts in tabs x spaces, removed unused #includes and #defines, misspellings, etc.
* Added 'simplesect' sections to the manualRoberto Ierusalimschy2020-04-131-2/+52
| | | | | | | 'simplesect' encloses the introductory text of sections with subsections, so that each section either is all text or is all subsections. (This commit also corrects a small brace error in the manual and extra spaces/tabs in some other files.)
* Improvements in the manualRoberto Ierusalimschy2020-04-101-46/+64
| | | | | Several small improvements, in particular a new subsection consolidating all status codes in the API.
* Copyright year changed to 2020Roberto Ierusalimschy2019-12-271-1/+1
|
* Manual a little more clear about string->number coersionsRoberto Ierusalimschy2019-12-051-16/+25
|
* DetailsRoberto Ierusalimschy2019-11-181-2/+3
|
* Using 'metavalues' for "metamethods" that are not methodsRoberto Ierusalimschy2019-11-081-21/+26
| | | | | | Several "metamethods" are not required to be methods (functions), so it seems clearer not to call them metamethods. The manual now uses the word 'metavalue' for those values.
* Added function 'luaL_buffsub'Roberto Ierusalimschy2019-10-231-9/+17
|
* Several enhancements in the manualRoberto Ierusalimschy2019-10-231-43/+54
|
* Improvements in the manual around metamethodsv5.4-betaRoberto Ierusalimschy2019-10-081-35/+42
|
* 'setCstacklimit' renamed to 'setcstacklimit'Roberto Ierusalimschy2019-09-241-6/+6
| | | | Function names in the API use only lowercase letters.
* Default for warnings changed to "off"Roberto Ierusalimschy2019-08-201-2/+2
| | | | | Warnings are mostly a tool to help developers (e.g., by showing hidden error messages); regular users usually don't need to see them.
* Manual corrected with the new syntax for attributesRoberto Ierusalimschy2019-08-161-5/+5
| | | | | Commit 0d529138042, with the change in the syntax of attributes, did not update the manual accordingly.
* Added macro 'luaL_pushfail'Roberto Ierusalimschy2019-08-162-36/+52
| | | | | | | | 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'.
* Supressed errors in '__close' generate warningsRoberto Ierusalimschy2019-08-161-1/+1
|
* Added control messages to warningsRoberto Ierusalimschy2019-08-151-7/+22
| | | | | | | Added the concept of control messages to the warning system, plus the implementation of the controls "@on"/"@off" to turn warnings on/off. Moreover, the warning system in the test library adds some other controls to ease the test of warnings.
* Detail in the manual (method 'file:setvbuf')Roberto Ierusalimschy2019-08-121-16/+8
| | | | | ANSI C is vague about 'setvbuf'; most details are implementation defined. So, the manual cannot give any guaranties, either.
* Correction in the documentation of 'io.lines'Roberto Ierusalimschy2019-07-311-6/+4
| | | | | | 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.)
* To-be-closed variables must be closed on initializationRoberto Ierusalimschy2019-07-311-8/+11
| | | | | | | | | When initializing a to-be-closed variable, check whether it has a '__close' metamethod (or is a false value) and raise an error if if it hasn't. This produces more accurate error messages. (The check before closing still need to be done: in the C API, the value is not constant; and the object may lose its '__close' metamethod during the block.)
* 'math.randomseed' always returns the two seed componentsRoberto Ierusalimschy2019-07-191-2/+4
|
* 'math.randomseed()' returns the seeds it usedRoberto Ierusalimschy2019-07-171-0/+3
| | | | | A call to 'math.randomseed()' returns the two components of the seed it set, so that they can be used to set that same seed again.
* '__close' method may be called again in case of errorRoberto Ierusalimschy2019-07-161-5/+6
| | | | | | | | | An error in a closing method may be caused by a lack of resources, such as memory or stack space, and the error may free enough resources (by unwinding the stack) to allow the method to work if called again. If the closing method is already running after some error (including its own), it is not called again.
* First implementation of constant propagationRoberto Ierusalimschy2019-07-121-12/+19
| | | | | Local constant variables initialized with compile-time constants are optimized away from the code.
* Local attributes can be used in list of local variablesRoberto Ierusalimschy2019-07-031-26/+34
| | | | | | | | | | | | The syntax for local attributes ('const'/'toclose') was unified with the regular syntax for local variables, so that we can have variables with attributes in local definitions with multiple names; for instance: local <toclose> f, <const> err = io.open(fname) This new syntax does not implement constant propagation, yet. This commit also has some small improvements to the manual.
* New function 'setCstacklimit'Roberto Ierusalimschy2019-06-181-0/+42
| | | | | Added new functions to dynamically set the C-stack limit ('lua_setCstacklimit' in the C-API, 'debug.setCstacklimit' in Lua).
* Detail in the manualRoberto Ierusalimschy2019-06-101-5/+6
| | | | | More precision describing the variables that won't be closed if a coroutine yields forever.
* Updated the documentation for the API function 'lua_gc'v5.4-alphaRoberto Ierusalimschy2019-06-061-53/+62
|
* Multiple errors in '__toclose' report the first oneRoberto Ierusalimschy2019-06-051-6/+15
| | | | | | | | When there are multiple errors when closing objects, the error reported by the protected call is the first one, for two reasons: First, other errors may be caused by this one; second, the first error is handled in the original execution context, and therefore has the full traceback.
* Function 'warn' is varargRoberto Ierusalimschy2019-06-041-5/+3
| | | | | | | Instead of a 'tocont' flag, the function 'warn' in Lua now receives all message pieces as multiple arguments in a single call. Besides being simpler to use, this implementation ensures that Lua code cannot create unfinished warnings.
* 'coroutine.kill' renamed 'coroutine.close'Roberto Ierusalimschy2019-06-031-14/+15
|
* DetailsRoberto Ierusalimschy2019-06-031-3/+2
| | | | | Several small changes from feedback on 5.4 alhpa rc1 (warnings, typos in the manual, and the like)