Roberto Ierusalimschy
e3ce88c9e8
New function 'lua_numbertostrbuff'
...
It converts a Lua number to a string in a buffer, without creating
a new Lua string.
2024-10-23 17:16:17 -03:00
Roberto Ierusalimschy
cd4de92762
Maximum stack size may not fit in unsigned short
...
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.
2024-07-16 11:33:30 -03:00
Roberto Ierusalimschy
9d985db7bb
New year (2024)
2024-05-02 12:03:30 -03:00
Roberto Ierusalimschy
52aa2b5d24
Details
...
- 'unsigned int' -> 'unsigned'
- Some explicit casts to avoid warnings
- Test avoids printing the value of 'fail' (which may not be nil)
2024-03-13 09:20:34 -03:00
Roberto Ierusalimschy
7360f8d0fd
Removed deprecated function 'setcstacklimit'
2024-02-07 14:20:43 -03:00
Roberto Ierusalimschy
0c9bec0d38
Better handling of size limit when resizing a table
...
Avoid silent conversions from int to unsigned int when calling
'luaH_resize'; avoid silent conversions from lua_Integer to int in
'table.create'; MAXASIZE corrected for the new implementation of arrays;
'luaH_resize' checks explicitly whether new size respects MAXASIZE.
(Even constructors were bypassing that check.)
2024-02-07 13:39:54 -03:00
Roberto Ierusalimschy
4a8e480864
New mechanism to query GC parameters
2024-01-16 17:02:55 -03:00
Roberto Ierusalimschy
17e0c29d9b
Clear interface between references and predefines
...
The reference system has a defined way to add initial values to the
table where it operates.
2024-01-15 11:31:49 -03:00
Roberto Ierusalimschy
8eb0abc9db
Removed uses of LUA_NUMTAGS
...
That constant was already deprecated (see commit 6aabf4b15e
).
2024-01-13 18:10:50 -03:00
Roberto Ierusalimschy
e2cc179454
New option "setparms" for 'collectgarbage'
...
The generational mode also uses the parameters for the incremental
mode in its major collections, so it should be easy to change those
parameters without having to change the GC mode.
2023-12-22 14:48:07 -03:00
Roberto Ierusalimschy
35a2fed2d1
Removed deprecated options in 'lua_gc'
...
Options 'setpause' and 'setstepmul' were deprecated in Lua 5.4.
2023-11-30 15:51:02 -03:00
Roberto Ierusalimschy
024f9064f1
External strings
...
Strings can use external buffers to store their contents.
2023-11-09 17:05:42 -03:00
Roberto Ierusalimschy
ab6a949522
Merge branch 'master' into nextversion
2023-06-22 11:41:48 -03:00
Roberto Ierusalimschy
ea39042e13
Removed redundancy in definitions of version/release
...
String rendering now derived from the numeric original definitions.
2023-06-21 15:04:24 -03:00
Roberto Ierusalimschy
6443185167
"Emergency" new version 5.4.6
...
'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.
2023-05-02 16:41:43 -03:00
Roberto Ierusalimschy
b5c65705ca
New year (2023)
...
Also, small tweak in makefile. (-Wsign-compare is already enabled by
-Wextra.)
2023-03-31 11:47:31 -03:00
Roberto Ierusalimschy
5a04f1851e
New function 'luaL_makeseed'
...
This function unifies code from 'lua_newstate', 'math.randomseed',
and 'table.sort' that tries to create a value with a minimum level
of randomness.
2023-03-20 16:13:17 -03:00
Roberto Ierusalimschy
540d805226
Towards Lua 5.5
2022-12-20 13:24:43 -03:00
Roberto Ierusalimschy
6aabf4b15e
Details in some header files
...
Identifier LUA_NUMTAGS was deprecated (changed to LUA_NUMTYPES) +
better handling of some inclusion loops.
2022-12-14 16:20:39 -03:00
Roberto Ierusalimschy
1e64c1391f
Bug: stack overflow with nesting of coroutine.close
2022-10-25 16:44:06 -03:00
Roberto Ierusalimschy
295cde9454
New release number (5.4.5)
2022-04-07 10:52:15 -03:00
Roberto Ierusalimschy
05ac2409ee
New year (2022)
2022-01-02 07:11:08 -03:00
Roberto Ierusalimschy
ba81adaad9
Next release number (5.4.4)
2021-03-29 11:26:07 -03:00
Roberto Ierusalimschy
e7803f7dbc
New release number (5.4.3)
2021-03-03 09:44:20 -03:00
Roberto Ierusalimschy
cc1692515e
New API function 'lua_closeslot'
...
Closing a to-be-closed variable with 'lua_settop' is too restrictive,
as it erases all slots above the variable. Moreover, it adds side
effects to 'lua_settop', which should be a fairly basic function.
2021-01-11 15:03:01 -03:00
Roberto Ierusalimschy
849b2ecbd2
New release number (5.4.2)
2020-10-12 14:52:39 -03:00
Roberto Ierusalimschy
b6888a158b
New release number (5.4.1)
2020-09-15 14:27:10 -03:00
Roberto Ierusalimschy
46c3587a6f
Clearer distinction between types and tags
...
LUA_T* represents only types; tags (types + Variants) are represented
by LUA_V* constants.
2020-01-31 11:09:53 -03:00
Roberto Ierusalimschy
d7bb8df841
Copyright year changed to 2020
2019-12-27 10:38:53 -03:00
Roberto Ierusalimschy
03cde80b58
'setCstacklimit' renamed to 'setcstacklimit'
...
Function names in the API use only lowercase letters.
2019-09-24 14:31:06 -03:00
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).
2019-06-18 16:52:22 -03:00
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.
2019-04-04 11:45:26 -03:00
Roberto Ierusalimschy
f9b0cf0e2e
Year in copyright notice updated to 2019
2019-03-25 14:00:09 -03:00
Roberto Ierusalimschy
b56d4e570a
Changes in the warning system
...
- The warning functions get an extra parameter that tells whether
message is to be continued (instead of using end-of-lines as a signal).
- The user data for the warning function is a regular value, instead
of a writable slot inside the Lua state.
2019-03-14 15:30:54 -03:00
Roberto Ierusalimschy
c6f7181e91
No more LUA_ERRGCMM errors
...
Errors in finalizers (__gc metamethods) are never propagated.
Instead, they generate a warning.
2019-01-01 12:14:56 -02:00
Roberto Ierusalimschy
437a5b07d4
Added a warning system to Lua
...
The warning system is just a way for Lua to emit warnings, messages
to the programmer that do not interfere with the running program.
2018-12-28 15:42:34 -02:00
Roberto Ierusalimschy
fdc25a1ebf
New functions 'lua_resetthread' and 'coroutine.kill'
...
New functions to reset/kill a thread/coroutine, mainly (only?) to
close any pending to-be-closed variable. ('lua_resetthread' also
allows a thread to be reused...)
2018-12-13 13:07:53 -02:00
Roberto Ierusalimschy
5fda30b4f9
'lua_toclose' gets the index to be closed as an argument
...
Sometimes it is useful to mark to-be-closed an index that is not
at the top of the stack (e.g., if the value to be closed came from
a function call returning multiple values).
2018-11-12 14:15:50 -02:00
Roberto Ierusalimschy
b8fed93215
New syntax for to-be-closed variables
...
The new syntax is <local *toclose x = f()>. The mark '*' allows other
attributes to be added later without the need of new keywords; it
also allows better error messages. The API function was also renamed
('lua_tobeclosed' -> 'lua_toclose').
2018-11-07 10:03:05 -02:00
Roberto Ierusalimschy
34840301b5
To-be-closed variables in the C API
2018-10-25 15:30:15 -03:00
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.
2018-08-23 14:26:12 -03:00
Roberto Ierusalimschy
84058b1506
Added definition for LUA_VERSION_RELEASE_NUM
...
LUA_VERSION_RELEASE_NUM is set to the release number of the Lua
interpreter (e.g., 5.4.0 becomes the integer 50400).
2018-07-11 13:17:46 -03:00
Roberto Ierusalimschy
af70905246
no need to check whether libraries and host use the same kernel;
...
Lua should work correctly with several copies of the kernel
2018-06-18 09:08:10 -03:00
Roberto Ierusalimschy
03c6a05ec8
no more nil-in-table
2018-04-04 11:23:41 -03:00
Roberto Ierusalimschy
4907444db9
'fTransfer' -> 'ftransfer' / 'nTransfer' -> 'ntransfer'
...
(keep the standard of names in lower case)
2018-03-16 12:33:34 -03:00
Roberto Ierusalimschy
8b0434e5e6
both 'fTransfer' and 'nTransfer' may not fit in a 'char'
2018-03-05 11:15:32 -03:00
Roberto Ierusalimschy
df49384516
year in copyright changed to 2018
2018-03-02 13:30:47 -03:00
Roberto Ierusalimschy
d766e2ae17
first (parcial) implementation of 'keyin'/'removekey'
...
(still no metamethods, no raw verssions)
2018-02-25 09:48:16 -03:00
Roberto Ierusalimschy
ca6fe7449a
userdata can have multiple user values
2018-02-20 13:52:50 -03:00
Roberto Ierusalimschy
422318f677
two new fields 'fTransfer'/'nTransfer' in 'lua_Debug' structure
...
(for information about values being given and returned in function calls)
2018-02-17 17:29:29 -02:00