aboutsummaryrefslogtreecommitdiff
path: root/lcorolib.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* llimits.h being used by all Lua codeRoberto Ierusalimschy2024-06-201-0/+1
| | | | | | The definitions in llimits.h are useful not only for the core. That header only defines types and '#define's, so libs and core still do not share any real code/data.
* "Emergency" new version 5.4.6v5.4.6Roberto Ierusalimschy2023-05-021-2/+2
| | | | | | 'lua_resetthread' is back to its original signature, to avoid incompatibilities in the ABI between releases of the same version. New function 'lua_closethread' added with the "correct" signature.
* Bug: stack overflow with nesting of coroutine.closeRoberto Ierusalimschy2022-10-251-2/+2
|
* Bug: Wrong status in coroutine during resetRoberto Ierusalimschy2021-11-081-2/+2
| | | | | | | | | When closing variables during 'coroutine.close' or 'lua_resetthread', the status of a coroutine must be set to LUA_OK; a coroutine should not run with any other status. (See assertion in 'lua_callk'.) After the reset, the status should be kept as normal, as any error was already reported.
* Broadening the use of branch hintsRoberto Ierusalimschy2021-02-241-5/+5
| | | | | | More uses of macros 'likely'/'unlikely' (renamed to 'l_likely'/'l_unlikely'), both in range (extended to the libraries) and in scope (extended to hooks, stack growth).
* Report last error in closing methodsRoberto Ierusalimschy2020-12-221-2/+5
| | | | | When there are multiple errors around closing methods, report the last error instead of the original.
* Keep memory errors as memory errorsRoberto Ierusalimschy2020-07-061-4/+5
| | | | | | | Allow memory errors to be raised through the API (throwing the error with the memory error message); error in external allocations raises a memory error; memory errors in coroutines are re-raised as memory errors.
* Fixed a warning and other minor issuesRoberto Ierusalimschy2019-10-041-1/+2
| | | | Fixed some minor issues from the feedback for 5.4-beta rc1.
* Multiple errors in '__toclose' report the first oneRoberto Ierusalimschy2019-06-051-5/+2
| | | | | | | | 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.
* 'coroutine.kill' renamed 'coroutine.close'Roberto Ierusalimschy2019-06-031-3/+3
|
* Test for dead coroutine moved to 'lua_resume'Roberto Ierusalimschy2019-05-091-4/+0
| | | | | | The test for dead coroutines done in the 'coro' library was moved to 'lua_resume', in the kernel, which already does other similar tests.
* Coroutines do not unwind the stack in case of errorsRoberto Ierusalimschy2019-05-091-1/+11
| | | | | | | | | | | Back to how it was, a coroutine does not unwind its stack in case of errors (and therefore do not close its to-be-closed variables). This allows the stack to be examined after the error. The program can use 'coroutine.kill' to close the variables. The function created by 'coroutine.wrap', however, closes the coroutine's variables in case of errors, as it is impossible to examine the stack any way.
* Added an optional parameter to 'coroutine.isyieldable'Roberto Ierusalimschy2019-04-101-1/+2
|
* New functions 'lua_resetthread' and 'coroutine.kill'Roberto Ierusalimschy2018-12-131-12/+46
| | | | | | New functions to reset/kill a thread/coroutine, mainly (only?) to close any pending to-be-closed variable. ('lua_resetthread' also allows a thread to be reused...)
* Better error messages for some polymorphic functionsRoberto Ierusalimschy2018-12-101-1/+1
| | | | | | | | | New auxiliary functions/macros 'luaL_argexpected'/'luaL_typeerror' ease the creation of error messages such as bad argument #2 to 'setmetatable' (nil or table expected, got boolean) (The novelty being the "got boolean" part...)
* Removed extra information from RCS keyword stringsRoberto Ierusalimschy2018-08-231-1/+1
| | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept.
* new API for 'lua_resume' + cleaning the uses of the 'extra' field inRoberto Ierusalimschy2017-11-021-4/+3
| | | | 'CallInfo'
* error handling in 'wrap' does not coerce numbers into string messagesRoberto Ierusalimschy2016-04-111-2/+2
|
* added include for 'lprefix.h', for stuff that must be added beforeRoberto Ierusalimschy2014-11-021-4/+5
| | | | any other header file
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-2/+2
|
* detail (error message from 'coroutine.status')Roberto Ierusalimschy2014-09-011-2/+2
|
* new function 'lua_isyieldable' (and 'coroutine.isyieldable')Roberto Ierusalimschy2014-05-081-5/+17
|
* added 'return' (when possible) to calls to error functionsRoberto Ierusalimschy2013-02-211-2/+2
|
* wrong error message when 'coroutine.create' or 'coroutine.wrap' areRoberto Ierusalimschy2012-04-271-2/+3
| | | | | called with no arguments (new thread is assumed to be the missing argument).
* 'nCcalls' should be local to each thread, as each thread may have itsRoberto Ierusalimschy2011-08-231-2/+2
| | | | own C stack (with LuaThreads or something similar)
* new module policy: C modules do not create globals and do not registerRoberto Ierusalimschy2010-07-021-2/+2
| | | | | | 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.
* 'coroutine' library separated from 'baselib'Roberto Ierusalimschy2010-06-101-0/+154