| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Several tools inspect 'lua.h' to extract version information, and
they assume the file will have some specific format.
|
| |
|
|
|
|
|
|
| |
Assume that no function will put garbage on errno (although ISO C allows
that). If any function during an operation set errno, and the operation
result in an error, assume that errno has something to say.
|
| |
|
|
|
|
|
| |
ISO C forbids assignment of a union field to another field of the same
union.
|
|
|
|
|
|
| |
Set errno to zero before calling any function where we may use its
errno, and check errno for zero before using it (as functions may
not set it even in error).
|
|
|
|
|
| |
Function 'lua_toclose' can raise a non-memory error (but not a
memory error).
|
|
|
|
| |
Typos in comments.
|
|
|
|
|
| |
Lua seg. faults when asked to create the 'activelines' table for a
vararg function with no debug information.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Yielding in a hook must decrease the program counter, because it already
counted an instruction that, in the end, was not executed. However,
that decrement should be done only when about to restart the thread.
Otherwise, inspecting the thread with the debug library shows it one
instruction behind of where it really is.
|
|
|
|
|
| |
Even if the string fits in size_t, the whole size of the TString object
can overflow when we add the header.
|
|
|
|
|
| |
The standard panic function was using 'lua_tostring', which may raise
a memory-allocation error if error value is a number.
|
|
|
|
|
|
| |
'getobjname' now broken in two, a basic version that handles locals,
upvalues, and constants, and a full version, which uses the basic
version to handle table accesses (globals and fields).
|
|
|
|
|
| |
The test whether key is inside the array part of a table uses a bit
trick to avoid computing the real size of the array part.
|
|
|
|
|
| |
Test is too non portable. (For instance, it does not work for
different number types.)
|
|
|
|
| |
Old Microsoft compilers do not support those casts.
|
| |
|
|
|
|
|
| |
Registry field "LUA_NOENV" (that signals to libraries that option -E
is on) now part of the "official" API of Lua stand-alone.
|
| |
|
|
|
|
|
| |
We may want to add other string variants in the future; this change
documents better where the code may need to handle those variants.
|
|
|
|
|
| |
The few UTF-8 test files are commented as such, and there is only one
non UTF-8 test file (to test non UTF-8 sources).
|
|
|
|
|
| |
Took the opportunity and moved the code that controls call hooks
in 'luaV_execute' into a function.
|
|
|
|
|
|
|
| |
Although stack resize can be a little expensive, it seems unusual to
have too many threads needing resize during one GC cycle. On the other
hand, the change allows full collections to skip the propagate phase,
going straight from a pause to the atomic phase.
|
| |
|
|
|
|
| |
String rendering now derived from the numeric original definitions.
|
| |
|
|
|
|
|
| |
Equality according to 'strcoll' does not imply that strings have
the same length.
|
|
|
|
|
| |
Several functions that were already being used only inside their
own file have been declared as 'static'.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
- Better comments about short strings in opcodes.
- luaH_newkey made static.
|
|
|
|
|
|
| |
'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.
|
|
|
|
| |
Typos in comments and details in the manual.
|
|
|
|
|
| |
Also, small tweak in makefile. (-Wsign-compare is already enabled by
-Wextra.)
|
| |
|
| |
|
|
|
|
|
| |
The size of the list of upvalue names are stored separated from the
size of the list of upvalues, but they share the same array.
|
|
|
|
| |
Comments in 'onelua.c'
|
|
|
|
|
| |
We still need access to a 16-bit system to correctly test
these changes.
|
|
|
|
|
| |
It also causes 'L->top' to be wrong when the error happens,
triggering an 'assert'.
|
|
|
|
| |
There is no need for those intermediate definitions.
|
|
|
|
|
| |
Do not try to detect automatically whether system is iOS; it is
simpler and more reliable to let the programmer inform that.
|
|
|
|
|
| |
When converting from pointer to integer, use 'uintptr_t' if available;
otherwise try 'uintmax_t', and use 'size_t' as last resource.
|
|
|
|
|
| |
Despite claiming to be ISO, the C library in some Apple platforms
does not implement 'system'.
|
|
|
|
|
| |
Test files are more polite regarding the use of globals when locals
would do, and when globals are necessary deleting them after use.
|
|
|
|
| |
Everything depends on the Lua version (as given by 'lua.h')
|
|
|
|
| |
Reuse macros for objects when defining the macros for values.
|
|
|
|
|
|
| |
Added some auxiliary macros + fixed a bug in compilation option
EMERGENCYGCTESTS. (It should not try to force an emergency collection
when it cannot run one.)
|