summaryrefslogtreecommitdiff
path: root/loadlib.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* create error messages with a single concat, to avoid problems withRoberto Ierusalimschy2011-11-091-20/+33
| | | | creating strings piecemeal
* configurable 'directory separator' in 'package.searchpath'Roberto Ierusalimschy2011-11-091-11/+34
|
* avoid calling "extra value" as if it were a function optionRoberto Ierusalimschy2011-11-061-4/+6
|
* removed and deprecated functions really removed from the code baseRoberto Ierusalimschy2011-07-051-12/+5
|
* 'package.loaders' -> 'package.searchers'Roberto Ierusalimschy2011-06-281-24/+28
|
* 'luaL_findtable' -> 'luaL_getsubtable'Roberto Ierusalimschy2011-04-081-3/+3
|
* loaders receive an extra argument returned by the searcherRoberto Ierusalimschy2011-03-011-23/+32
| | | | (typically the file name)
* trying to avoid assumption that sizeof(char)==1Roberto Ierusalimschy2011-02-071-2/+2
|
* optional argument 'sep' to 'searchpath'Roberto Ierusalimschy2011-01-071-5/+9
|
* no more sentinel to detect loops in module dependencies;Roberto Ierusalimschy2010-11-101-12/+3
| | | | usual message for infinite recursion is good enough.
* new function 'luaL_setmetatable'Roberto Ierusalimschy2010-11-101-3/+2
|
* detail (ununsed parameter)Roberto Ierusalimschy2010-10-291-3/+3
|
* name "_ENV" configurable through 'luaconf.h'Roberto Ierusalimschy2010-09-071-2/+2
|
* detail: registry._PRELOAD must be a table, no need to checkRoberto Ierusalimschy2010-08-021-3/+1
|
* 'module'/'luaL_register' and associates are deprecatedRoberto Ierusalimschy2010-07-281-5/+15
|
* environment variables consulted by Lua may be version-specificRoberto Ierusalimschy2010-07-251-11/+19
|
* 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.