aboutsummaryrefslogtreecommitdiff
path: root/loadlib.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Renaming two new functionsRoberto Ierusalimschy2025-01-271-1/+1
| | | | | 'lua_numbertostrbuff' -> 'lua_numbertocstring' 'lua_pushextlstring' -> 'lua_pushexternalstring'
* Added gcc option '-Wconversion'Roberto Ierusalimschy2024-07-271-4/+4
| | | | | No warnings for standard numerical types. Still pending alternative numerical types.
* Small changes in casts from void* to functionsRoberto Ierusalimschy2024-07-021-22/+6
| | | | | | Macro moved to llimits.h, and casts from void* to lua_CFunction first go through 'voidf' (a pointer to a function from void to void), a kind of void* for functions.
* 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.
* Small simplification in 'findloader'Roberto Ierusalimschy2024-04-031-5/+4
| | | | | Instead of allways adding a prefix for the next message, and then removing it if there is no message, add the prefix after each message.
* Default paths stored as external stringsRoberto Ierusalimschy2023-11-131-2/+3
|
* Option '-l' discards version sufix from file nameRoberto Ierusalimschy2023-05-151-9/+0
| | | | | | Like 'require', the command-line option '-l' discards an optional version suffix (everything after an hyphen) from a file name when creating the module name.
* DetailsRoberto Ierusalimschy2022-04-011-2/+7
| | | | | Comments + manual + identation + asserts about stack limits that were not allowing the use of the full stack
* Broadening the use of branch hintsRoberto Ierusalimschy2021-02-241-7/+10
| | | | | | 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).
* Back to old encoding of versions in binary filesRoberto Ierusalimschy2020-05-061-1/+1
| | | | | | (Undoing part of commit f53eabeed8.) It is better to keep this encoding stable, so that all Lua versions can read at least the version of a binary file.
* Fixed warning about casts between function pointersRoberto Ierusalimschy2020-04-291-1/+8
| | | | | | gcc now warns (with -Wextra) about casts between pointers to different function types. The type 'void(*)(void)' works as a 'void*' for function pointers, cleaning the warning.
* Several details about 5.4.0 rc1Roberto Ierusalimschy2020-04-231-2/+0
| | | | | Corrected several small details: added 'const', adjusts in tabs x spaces, removed unused #includes and #defines, misspellings, etc.
* Change in the prefix of messages from searchersRoberto Ierusalimschy2019-10-241-5/+9
| | | | | | The initial "\n\t" to properly indent a searcher message is being added by 'findloader' when building the error message, instead of being included in the original message by each searcher itself.
* Fixed a warning and other minor issuesRoberto Ierusalimschy2019-10-041-1/+1
| | | | Fixed some minor issues from the feedback for 5.4-beta rc1.
* Added macro 'luaL_pushfail'Roberto Ierusalimschy2019-08-161-4/+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'.
* Avoid using addresses of static variables as unique keysRoberto Ierusalimschy2019-07-191-6/+5
| | | | | | The addresses of static variables may be different for different instances of Lua, making these instances incompatible if they use these addresses as unique keys in the registry (or other tables).
* Details (typos in comments)Roberto Ierusalimschy2019-07-051-1/+1
|
* Avoid the creation of too many strings in 'package'Roberto Ierusalimschy2019-05-031-31/+58
| | | | | | | | | Both when setting a path and searching for a file ('searchpath'), this commit reduces the number of intermediate strings created in Lua. (For setting a path the change is not relevant, because this is done only twice when loading the module. Anyway, it is a nice example of how to use auxlib buffers to manipulate strings in the C API.)
* 'require' returns where module was foundRoberto Ierusalimschy2019-04-171-6/+17
| | | | | The function 'require' returns the *loader data* as a second result. For file searchers, this data is the path where they found the module.
* 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.
* 'searchpath' creates less temporary stringsRoberto Ierusalimschy2018-07-091-18/+34
| | | | | | | When creating error messages, package loaders may create dozens of temporary strings (one or more for each tried template). This change reduces the number of these strings, and avoid creating some of them if the search is successful.
* removed compatibility code with older versionsRoberto Ierusalimschy2018-02-271-94/+1
|
* Code should not change the stack level after the initialization of aRoberto Ierusalimschy2017-12-131-3/+3
| | | | string buffer.
* Handling of LUA_PATH/LUA_CPATH moved back to 'package' libraryRoberto Ierusalimschy2017-01-121-5/+92
| | | | to avoid incompatibilites with previous releases
* using constants for "_LOADED" and "PRELOAD"Roberto Ierusalimschy2016-12-041-9/+9
|
* Handling of LUA_PATH/LUA_CPATH moved from package library to standRoberto Ierusalimschy2016-07-181-89/+5
| | | | | alone interpreter (so that 'lua.c' concentrates all handling of environment variables)
* details (comments)Roberto Ierusalimschy2015-11-231-2/+2
|
* detail ('fopen' needs 'stdio.h')Roberto Ierusalimschy2015-02-161-1/+2
|
* typo in commentRoberto Ierusalimschy2015-01-131-3/+3
|
* new macro 'cast_func' adds '__extension__' (in gnu compilers) whenRoberto Ierusalimschy2015-01-051-2/+14
| | | | converting void* to function, to avoid warnings
* uses return value from lua_getfieldRoberto Ierusalimschy2014-11-121-3/+3
|
* using address instead of string for key for table 'CLIBS' in theRoberto Ierusalimschy2014-11-101-6/+10
| | | | registry
* keep "#include <windows.h>" in this file, but without theRoberto Ierusalimschy2014-11-031-1/+3
| | | | | previous requirement that it must be included before any other header file (it doesn't seem to matter)
* added include for 'lprefix.h', for stuff that must be added beforeRoberto Ierusalimschy2014-11-021-11/+4
| | | | any other header file
* commentsRoberto Ierusalimschy2014-10-271-5/+5
|
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-5/+5
|
* macros 'LUA_QL'/'LUA_QL' deprecatedRoberto Ierusalimschy2014-10-171-11/+8
|
* added some casts between integral types (to avoid warnings)Roberto Ierusalimschy2014-07-291-2/+2
|
* some janitorial work (comments, small refactoring)Roberto Ierusalimschy2014-07-281-45/+96
|
* detail (added placeholders for non-function fields to preallocateRoberto Ierusalimschy2014-07-161-1/+7
| | | | space for them)
* lua_gettable and similars return type of gotten valueRoberto Ierusalimschy2014-03-121-10/+6
|
* detail (changing some names of macros)Roberto Ierusalimschy2013-10-071-10/+10
|
* typos in commentsRoberto Ierusalimschy2012-05-301-3/+3
|
* detail (separate code to create 'searchers' table into a new function)Roberto Ierusalimschy2012-04-261-12/+15
|
* bug: C libraries must be unloaded after all other finalizers have run,Roberto Ierusalimschy2012-04-111-33/+41
| | | | because a finalizer may use a C function from a C library
* new way to handle -E option (write a mark in the registry to avoidv5.2.0Roberto Ierusalimschy2011-12-121-2/+15
| | | | reading environment variables)
* commentsRoberto Ierusalimschy2011-11-301-5/+5
|
* explicit option RTLD_LOCAL instead of 0 (Posix does not fixRoberto Ierusalimschy2011-11-281-2/+2
| | | | a default for dlopen)
* 'LUA_DL_DLL' is not yet defined before the inclusion of 'lua.h'Roberto Ierusalimschy2011-11-251-2/+2
|
* using Lua buffers to build error messagesRoberto Ierusalimschy2011-11-101-9/+9
|