| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
No warnings for standard numerical types. Still pending alternative
numerical types.
|
|
|
|
| |
That gives us more free bits in 'callstatus', for future use.
|
|
|
|
|
| |
The callstatus flag CIST_CLSRET is used in all tests for the
presence of variables to be closed in C functions.
|
|
|
|
|
|
| |
The parameter 'nresults' in 'lua_call' and similar functions has a
limit of 250. It already had an undocumented (and unchecked) limit of
SHRT_MAX, but it is seldom larger than 2.
|
|
|
|
|
|
| |
Therefore, fields ftransfer/ntransfer in lua_Debug must have type
'int'. (Maximum stack size must fit in an 'int'.) Also, this commit
adds check that maximum stack size respects size_t for size in bytes.
|
| |
|
|
|
|
|
|
| |
'incomplete' was popping error message that should be used in case
there is no more lines to complete the input, that is, 'pushline'
returns NULL, due to end of file.
|
|
|
|
| |
That function is useful for debugging the API.
|
|
|
|
|
|
|
| |
(See comments in luaconf.h.) This change allows easier compilation,
as Lua compiles and works even if the package 'readline' is absent
from the system. Moreover, non-interactive uses don't load the library,
making the stand-alone slightly faster for small loads.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Mainly to include 'llimits.h' in the non-kernel files
|
|
|
|
|
|
| |
New instruction format 'ivABC' (a variant of iABC where parameter vC has
10 bits) allows constructors of up to 1024 elements to be coded without
EXTRAARG.
|
| |
|
|
|
|
|
|
|
|
| |
Instead of a fixed limit of 50 registers (which, in a bad worst case,
can limit the nesting of constructors to 5 levels), the compiler
computes an individual limit for each constructor based on how many
registers are available when it runs. This limit then controls the
frequency of SETLIST instructions.
|
|
|
|
| |
Plus, added a test to check that limit.
|
|
|
|
| |
(As the length of any string in Lua.)
|
| |
|
| |
|
| |
|
|
|
|
| |
They don't need to be visible by clients of Lua.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Several definitions that don't need to be "global" (that is, that
concerns only specific parts of the code) moved out of llimits.h,
to more appropriate places.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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). The code assumes 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.
|
|
|
|
|
| |
As the encoding of array indices is (~index), 0 is encoded as -1 and
INT_MAX is encoded as INT_MIN.
|
|
|
|
|
| |
Lua seg. faults when asked to create the 'activelines' table for a
vararg function with no debug information.
|
|
|
|
| |
Instead of listing what it does not accept, which is always relative.
|
|
|
|
|
| |
'utf8.offset' returns two values: the initial and the final position
of the given character.
|
| |
|
|
|
|
|
| |
Corrections in comments and manual. Added note in the manual about
local variables in the REPL.
|
| |
|
|
|
|
|
|
| |
The name 'getmode' conficts with a function from BSD, defined
in <unistd.h>. Although 'lbaselib.c' cannot include that header,
'onelua.c' can.
|
|
|
|
|
|
| |
This "linear" representation (see ltable.h for details) has worse
locality than cells, but the simpler access code seems to compensate
that.
|
|
|
|
|
| |
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.
|
|
|
|
| |
Bug introduced in 05932567.
|
| |
|
|
|
|
|
| |
'unsigned int' is too long sometimes. (We already write 'long' instead
of 'long int'...)
|
|
|
|
|
|
|
| |
Undoing previous commit. Returning TValue increases code size without
any visible gains. Returning the tag is a little simpler than returning
a special code (HOK/HNOTFOUND) and the tag is useful by itself in
some cases.
|
|
|
|
|
|
| |
Instead of receiving a parameter telling them where to put the result
of the query, these functions return the TValue directly. (That is,
they return a structure.)
|
|
|
|
| |
Negligible performance gains don't justify extra complexity.
|
|
|
|
|
| |
A few operations on arrays can be performed "in bulk", treating all
tags of a cell as a simple (or a few) word(s).
|
|
|
|
|
|
| |
- 'unsigned int' -> 'unsigned'
- Some explicit casts to avoid warnings
- Test avoids printing the value of 'fail' (which may not be nil)
|
|
|
|
|
|
| |
size_t should be big enough to count the number of strings in a dump.
(And, by definition, it is big enough to count the length of each
string.)
|
| |
|
| |
|
|
|
|
|
| |
Instead of preloading all non-loaded libraries, there is another
mask to select which libraries to preload.
|
|
|
|
|
|
|
|
| |
- Usign lua_Unsigned to count strings.
- Varint uses a type large enough both for size_t and lua_Unsigned.
- Most-Significant Bit 0 means last byte, to conform to common usage.
- (unrelated) Change in macro 'getaddr' so that multiplication is
by constants.
|