aboutsummaryrefslogtreecommitdiff
path: root/lauxlib.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* DetailHEADmasterRoberto Ierusalimschy2025-02-281-0/+4
| | | | | Added macro LUA_FAILISFALSE to make easier to change the fail value from nil to false.
* lua_writestring & co. moved to llimits.hRoberto Ierusalimschy2024-06-211-24/+0
| | | | They don't need to be visible by clients of Lua.
* llimits.h being used by all Lua codeRoberto Ierusalimschy2024-06-201-15/+0
| | | | | | 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.
* DetailsRoberto Ierusalimschy2024-03-131-1/+1
| | | | | | - 'unsigned int' -> 'unsigned' - Some explicit casts to avoid warnings - Test avoids printing the value of 'fail' (which may not be nil)
* New function 'luaL_makeseed'Roberto Ierusalimschy2023-03-201-0/+2
| | | | | | This function unifies code from 'lua_newstate', 'math.randomseed', and 'table.sort' that tries to create a value with a minimum level of randomness.
* Removed goto's in 'luaD_precall'Roberto Ierusalimschy2021-10-181-1/+1
| | | | (plus a detail in lauxlib.h.)
* Avoid overflows when incrementing parameters in CRoberto Ierusalimschy2021-09-221-0/+8
| | | | | | Any C function can receive maxinteger as an integer argument, and therefore cannot increment it without some care (e.g., doing unsigned arithmetic as the core does).
* Uses of "likely" in macros active to all usersRoberto Ierusalimschy2021-03-091-6/+3
| | | | | | | The use of 'l_likely' in auxlib macros 'luaL_argcheck' and 'luaL_argexpected' should not be restricted to Lua's own code. For that, 'l_likely' was renamed to 'luai_likely' to be exported to external code.
* Broadening the use of branch hintsRoberto Ierusalimschy2021-02-241-2/+6
| | | | | | 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).
* Details (do not affect regular code)Roberto Ierusalimschy2020-12-071-3/+7
| | | | | | | * 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.
* 'lua_assert' moved from 'lualib.h' to 'lauxlib.h'Roberto Ierusalimschy2020-12-031-0/+12
| | | | | | The macro is useful also in 'lauxlib.c', which does not include 'lualib.h'. Also, the definition was corrected to be "on" when LUAI_ASSERT is defined.
* Added 'simplesect' sections to the manualRoberto Ierusalimschy2020-04-131-1/+1
| | | | | | | '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.)
* Added function 'luaL_buffsub'Roberto Ierusalimschy2019-10-231-0/+2
|
* Added macro 'luaL_pushfail'Roberto Ierusalimschy2019-08-161-0/+4
| | | | | | | | 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'.
* New function 'luaL_addgsub'Roberto Ierusalimschy2019-04-241-4/+12
| | | | | | | | Added a new function 'luaL_addgsub', similar to 'luaL_gsub' but that adds its result directly to a preexisting buffer, avoiding the creation of one extra intermediate string. Also added two simple macros, 'luaL_bufflen' and 'luaL_buffaddr', to query the current length and the contents address of a buffer.
* Better error messages for some polymorphic functionsRoberto Ierusalimschy2018-12-101-0/+5
| | | | | | | | | 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 resource-related "emergency collections"Roberto Ierusalimschy2018-10-311-2/+0
| | | | | New to-be-closed variables is a better way to ensure the proper release of resources.
* Added "emergency collection" to 'io.tmpfile' and 'os.tmpname'Roberto Ierusalimschy2018-07-271-1/+4
| | | | | | | | 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.
* removed compatibility code with older versionsRoberto Ierusalimschy2018-02-271-16/+1
|
* new constant 'LUA_GNAME' for the name of the global table "_G"Roberto Ierusalimschy2017-06-271-1/+5
|
* type 'L_Umaxalign' replaced by macro 'LUAI_MAXALIGN', which is also addedRoberto Ierusalimschy2017-04-241-2/+5
| | | | to the auxlib buffer
* detail (wrong comment)Roberto Ierusalimschy2016-12-061-2/+2
|
* using constants for "_LOADED" and "PRELOAD"Roberto Ierusalimschy2016-12-041-1/+9
|
* details (comments)Roberto Ierusalimschy2015-11-231-2/+2
|
* definitions for 'luai_writestring'/'luai_writeline'/'luai_writestringerror'Roberto Ierusalimschy2014-10-291-1/+26
| | | | | moved to 'lauxlib.h' (they do not need to be stable or configurable) + prefixes changed from 'luai_' to 'lua_' (they are not part of the core)
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-2/+2
|
* deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)Roberto Ierusalimschy2014-10-011-8/+10
|
* unsigned-manipulation functions (lua_puhsunsigned, lua_tounsigned, etc.)Roberto Ierusalimschy2014-06-261-4/+17
| | | | deprecated
* keep 'luaL_checkversion_' with its signature in version 5.2, forRoberto Ierusalimschy2014-04-151-2/+2
| | | | correct error messages in case of version mixings
* 'arg' arguments (previously called 'narg', 'nArg', 'numArg', etc.)Roberto Ierusalimschy2014-01-051-15/+15
| | | | renamed all to 'arg'
* no need to check "bad conversion number->int;" in luaL_checkversion,Roberto Ierusalimschy2013-06-271-4/+8
| | | | | | as now Lua does not use tricks for the conversion, but there is a need to check the sizes of number types, as they can be different in two modules
* 'luaL_len' returns lua_Integer instead of 'int'Roberto Ierusalimschy2013-06-251-2/+2
|
* 'lua_load' has an extra argument 'mode'Roberto Ierusalimschy2011-11-291-3/+5
|
* new function 'luaL_loadfilex'Roberto Ierusalimschy2011-11-141-5/+9
|
* strutcture for file handles exported in 'lauxlib.h'Roberto Ierusalimschy2011-11-111-1/+26
|
* declarations should be present only when implementations areRoberto Ierusalimschy2011-06-161-1/+4
|
* 'luaL_findtable' -> 'luaL_getsubtable'Roberto Ierusalimschy2011-04-081-2/+2
|
* returns for file-related functions and process-related functionsRoberto Ierusalimschy2011-03-031-1/+4
| | | | unified in 'auxlib'
* 'luaL_findtable' returns boolean about whether it created a newRoberto Ierusalimschy2011-01-101-2/+2
| | | | table (to easy initializing table)
* comment about compatibility-only functionsRoberto Ierusalimschy2010-11-161-3/+5
|
* no more compatibility with (veryyyy) old ref systemRoberto Ierusalimschy2010-11-161-18/+5
|
* new function 'luaL_setmetatable'Roberto Ierusalimschy2010-11-101-1/+2
|
* 'luaL_typeerror' deprecatedRoberto Ierusalimschy2010-11-101-2/+1
|
* new type lua_Unsigned and corresponding projection/injection functionsRoberto Ierusalimschy2010-10-251-1/+4
|
* new module policy: C modules do not create globals and do not registerRoberto Ierusalimschy2010-07-021-5/+17
| | | | | | 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.
* old (and complex) luaL_findtable now used only in compatibility codeRoberto Ierusalimschy2010-06-301-3/+2
| | | | inside lauxlib.c
* factoring out common code in 'module' and 'luaL_openlib'Roberto Ierusalimschy2010-05-311-1/+3
|
* missing parentheses in declarationRoberto Ierusalimschy2010-05-041-2/+2
|
* missing parentheses around 'luaL_pushresultsize' declarationRoberto Ierusalimschy2010-04-191-2/+2
|
* no more 'ccall' nor 'cpcall' functions. (With light C functions theyRoberto Ierusalimschy2010-04-141-4/+1
| | | | are obsolete.)