Roberto Ierusalimschy
a08d82eb13
llimits.h being used by all Lua code
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.
5 months ago
Roberto Ierusalimschy
7360f8d0fd
Removed deprecated function 'setcstacklimit'
9 months ago
Roberto Ierusalimschy
59c88f846d
Broadening the use of branch hints
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).
4 years ago
Roberto Ierusalimschy
38cc7d40a4
Bug: cannot allow the call 'debug.getinfo(0, ">")'
A 'what' argument starting with '>' indicates that there is a function
in the C stack, which won't be there if the first argument is not a
function.
4 years ago
Roberto Ierusalimschy
d9d2904f09
Details
Names in the parser and other details that do not change actual code.
4 years ago
Roberto Ierusalimschy
30528049f1
'lua_upvalueid' returns NULL on invalid upvalue index
4 years ago
Roberto Ierusalimschy
287b302acb
Revision of stackless implementation
- more organized handling of 'nCcalls'
- comments
- deprecation of 'setcstacklimit'
4 years ago
Roberto Ierusalimschy
364e569945
Avoid calling 'fprintf' with NULL
Avoid undefined behavior in calls like «fprintf("%s", NULL)».
('lua_writestringerror' is implemented as 'fprintf', and 'lua_tostring'
can return NULL if object is not a string.)
4 years ago
Roberto Ierusalimschy
6eb53b7526
Details
Several details in code (e.g., moving a variable to the most inner
scope that encloses its uses), comments, parameter names, extra tests.
5 years ago
Roberto Ierusalimschy
7bd1e53753
Fixed a warning and other minor issues
Fixed some minor issues from the feedback for 5.4-beta rc1.
5 years ago
Roberto Ierusalimschy
03cde80b58
'setCstacklimit' renamed to 'setcstacklimit'
Function names in the API use only lowercase letters.
5 years ago
Roberto Ierusalimschy
b96b0b5abb
Added macro 'luaL_pushfail'
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'.
5 years ago
Roberto Ierusalimschy
3c0d3c6fbe
Avoid using addresses of static variables as unique keys
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).
5 years ago
Roberto Ierusalimschy
be73f72fcc
New function 'setCstacklimit'
Added new functions to dynamically set the C-stack limit
('lua_setCstacklimit' in the C-API, 'debug.setCstacklimit' in Lua).
5 years ago
Roberto Ierusalimschy
5ca1075b71
Added field 'srclen' to structure 'lua_Debug'
This new field gets the length of 'source' in the same structure.
Unlike the other strings in that structure, 'source' can be
relatively large, and Lua already has its length readily available.
6 years ago
Roberto Ierusalimschy
46beca5bed
Better error messages for some polymorphic functions
New auxiliary functions/macros 'luaL_argexpected'/'luaL_typeerror'
ease the creation of error messages such as
bad argument #2 to 'setmetatable' (nil or table expected, got boolean)
(The novelty being the "got boolean" part...)
6 years ago
Roberto Ierusalimschy
f99509581e
Removed extra information from RCS keyword strings
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
6 years ago
Roberto Ierusalimschy
4907444db9
'fTransfer' -> 'ftransfer' / 'nTransfer' -> 'ntransfer'
(keep the standard of names in lower case)
7 years ago
Roberto Ierusalimschy
8b0b675149
added casts (warnings in VS)
7 years ago
Roberto Ierusalimschy
ca6fe7449a
userdata can have multiple user values
7 years ago
Roberto Ierusalimschy
422318f677
two new fields 'fTransfer'/'nTransfer' in 'lua_Debug' structure
(for information about values being given and returned in function calls)
7 years ago
Roberto Ierusalimschy
c5112f7b15
details (comments)
9 years ago
Roberto Ierusalimschy
d103312661
details (typos in comments)
9 years ago
Roberto Ierusalimschy
97f2aa5a44
bug: when manipulating other threads, there is no garanties about
their stack space
10 years ago
Roberto Ierusalimschy
3a29087cb7
'lua_setlocal' should not pop value when failing (to be consistent
with the manual and with 'lua_setupvalue')
10 years ago
Roberto Ierusalimschy
6909b5a2b4
In 'debug.gethook', does not query hook table (which may not exist) if
there is no hook set
10 years ago
Roberto Ierusalimschy
fee3aa518d
using address key (light userdata) for hook table, instead of
string
10 years ago
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
any other header file
10 years ago
Roberto Ierusalimschy
05afee0f50
definitions for 'luai_writestring'/'luai_writeline'/'luai_writestringerror'
moved to 'lauxlib.h' (they do not need to be stable or configurable) +
prefixes changed from 'luai_' to 'lua_' (they are not part of the core)
10 years ago
Roberto Ierusalimschy
ea3155e380
'debug.sizeof' removed
10 years ago
Roberto Ierusalimschy
798660c9cd
deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)
10 years ago
Roberto Ierusalimschy
e401513086
new option 'p' for 'debug.sizeof' (size of a pointer)
10 years ago
Roberto Ierusalimschy
01549fb1ed
'Csize' -> 'sizeof' + removed its 'b' option
10 years ago
Roberto Ierusalimschy
6a5d87771f
added lots of new comments + small changes in code
11 years ago
Roberto Ierusalimschy
6b630c0fa0
debug.numbits replaced by debug.Csize
11 years ago
Roberto Ierusalimschy
a3addae036
lua_gettable and similars return type of gotten value
11 years ago
Roberto Ierusalimschy
c86b9da022
userdata can have any Lua value as uservalue
11 years ago
Roberto Ierusalimschy
4244da96bf
'debug.subtype' -> 'math.type' (to distinguish integers and floats)
11 years ago
Roberto Ierusalimschy
fcf99bf788
'math.isfloat' replaced by 'debug.subtype'
11 years ago
Roberto Ierusalimschy
15fdbd26fe
'numbits' moved from 'math' to 'debug' library
12 years ago
Roberto Ierusalimschy
7dcc02b165
BUG: coroutine hooks were not collected together with coroutine
13 years ago
Roberto Ierusalimschy
af00a0772c
new functions lua_rawsetp/lua_rawgetp
13 years ago
Roberto Ierusalimschy
19fbdf6cae
'luaL_findtable' -> 'luaL_getsubtable'
14 years ago
Roberto Ierusalimschy
c4ea0c3b29
detail (cleaning trailing spaces)
14 years ago
Roberto Ierusalimschy
c2e3cc4c89
using 'luaL_findtable' to manage hook table
14 years ago
Roberto Ierusalimschy
8d579c5bc5
'debug.setmetatable' returns object (like 'setmetatable')
14 years ago
Roberto Ierusalimschy
566758de79
'getuservalue' accepts any type of argument
14 years ago
Roberto Ierusalimschy
1b54197491
better error message when light userdata is used instead of a
full userdata
14 years ago
Roberto Ierusalimschy
8b7cf8c62d
'lua_[gs]etenv' -> 'lua_[gs]etuservalue'
14 years ago
Roberto Ierusalimschy
7192afafee
new module policy: C modules do not create globals and do not register
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.
15 years ago