| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
That complicates a little object equality (and therefore table access
for long strings), but the old behavior was somewhat weird. (Short
strings, a concept otherwise absent from the manual, could not be
external.)
|
| |
|
|
|
|
|
|
|
|
| |
External strings created by DLLs may need the DLL code to be
deallocated. This implies that a DLL can only be unloaded after all
its strings were deallocated, which happen only after the run of all
finalizers. To ensure that order, we create a 'library string' to
represent each DLL and keep it locked. When this string is deallocated
(after the deallocation of any string created by the DLL) it closes its
corresponding DLL.
|
| |
|
|
|
| |
'lua_numbertostrbuff' -> 'lua_numbertocstring'
'lua_pushextlstring' -> 'lua_pushexternalstring'
|
| |
|
|
|
| |
No warnings for standard numerical types. Still pending alternative
numerical types.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Comments + manual + identation + asserts about stack limits that were
not allowing the use of the full stack
|
| |
|
|
|
|
| |
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).
|
| |
|
|
|
|
| |
(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.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Corrected several small details: added 'const', adjusts in tabs x
spaces, removed unused #includes and #defines, misspellings, etc.
|
| |
|
|
|
|
| |
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 some minor issues from the feedback for 5.4-beta rc1.
|
| |
|
|
|
|
|
|
| |
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'.
|
| |
|
|
|
|
| |
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).
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|
|
| |
The function 'require' returns the *loader data* as a second result.
For file searchers, this data is the path where they found the module.
|
| |
|
|
|
| |
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
|
| |
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
string buffer.
|
| |
|
|
| |
to avoid incompatibilites with previous releases
|
| | |
|
| |
|
|
|
| |
alone interpreter (so that 'lua.c' concentrates all handling of
environment variables)
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
converting void* to function, to avoid warnings
|
| | |
|
| |
|
|
| |
registry
|
| |
|
|
|
| |
previous requirement that it must be included before any other
header file (it doesn't seem to matter)
|
| |
|
|
| |
any other header file
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
space for them)
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
because a finalizer may use a C function from a C library
|
| |
|
|
| |
reading environment variables)
|
| | |
|
| |
|
|
| |
a default for dlopen)
|