Roberto Ierusalimschy
e4f418f07c
Local declaration in the REPL generates a warning
2024-09-27 10:00:35 -03:00
Roberto Ierusalimschy
0acd55898d
Added gcc option '-Wconversion'
...
No warnings for standard numerical types. Still pending alternative
numerical types.
2024-07-27 13:32:59 -03:00
Roberto Ierusalimschy
6b45ccf4ed
Removed compatibility with "= exp" in the REPL
2024-07-05 15:19:11 -03:00
Roberto Ierusalimschy
93fd6892f8
Fixed bug in 'multiline'
...
'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.
2024-07-05 15:13:46 -03:00
Roberto Ierusalimschy
366c855648
lua.c loads 'readline' dynamically
...
(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.
2024-07-04 17:11:58 -03:00
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.
2024-06-20 14:46:06 -03:00
Roberto Ierusalimschy
aaf3533653
Tricky _PROMPT may trigger undefined behavior in lua.c
2024-06-12 16:04:25 -03:00
Roberto Ierusalimschy
262dc5729a
Details
...
Corrections in comments and manual. Added note in the manual about
local variables in the REPL.
2024-05-08 17:50:10 -03:00
Roberto Ierusalimschy
165389b27b
New interface to function 'luaL_openselectedlibs'
...
Instead of preloading all non-loaded libraries, there is another
mask to select which libraries to preload.
2024-02-15 11:17:39 -03:00
Roberto Ierusalimschy
e81f586001
Removed compatibility option LUA_COMPAT_GCPARAMS
...
The meaning of different GC parameters changed, so there is point in
supporting old values for them. The new code simply ignores the
parameters when changing the GC mode, so the incompatibility is small.
2023-12-22 14:57:43 -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
925fe8a0f2
First criteria for shifts minor<->major
2023-12-07 15:45:11 -03:00
Roberto Ierusalimschy
ab6a949522
Merge branch 'master' into nextversion
2023-06-22 11:41:48 -03:00
Roberto Ierusalimschy
09f3c2372f
Option '-l' discards version sufix from file name
...
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.
2023-05-15 13:46:38 -03:00
Roberto Ierusalimschy
e15f1f2bb7
Details
...
Typos in comments and details in the manual.
2023-04-18 09:44:10 -03:00
Roberto Ierusalimschy
d738c8d18b
New function 'luaL_openselectedlibs'
...
Makes it easier to start Lua with only some standard libraries.
2022-12-07 15:12:52 -03:00
Roberto Ierusalimschy
f356d5acdd
First version of GC counting objects for control
...
Still needs to review generational mode.
2022-11-23 17:17:20 -03:00
Roberto Ierusalimschy
9a77f57edc
Stop GC while building initial state
2022-11-23 14:17:28 -03:00
Roberto Ierusalimschy
25b143dd34
Bug: lua.c assumes that argv has at least one element
2022-02-07 10:16:35 -03:00
Roberto Ierusalimschy
65434b4d1b
Option '-l' can give a name for the global variable.
...
Sintax for this option now is '-l [globname=]modname'.
2021-08-16 13:57:19 -03:00
Roberto Ierusalimschy
131e3fd814
Avoid using 'signal' when 'sigaction' is available
...
The semantics of 'signal' varies a lot among different implementations;
'sigaction' ensures a more consistent behavior.
2020-11-24 14:41:50 -03:00
Roberto Ierusalimschy
69b71a6919
_PROMPT can have non-string values
...
'get_prompt' uses 'luaL_tolstring' to convert _PROMPT or _PROMPT2
value to a string. That conversion may invoke a '__tostring'
metamethod.
2020-10-26 11:15:51 -03:00
Roberto Ierusalimschy
17dbaa8639
Improvements in the handling of signals
...
Added 'volatile' to 'l_signalT' variables plus some minor changes.
2020-05-22 11:40:34 -03:00
Roberto Ierusalimschy
be78aeae4c
Default for warnings changed to "off"
...
Warnings are mostly a tool to help developers (e.g., by showing hidden
error messages); regular users usually don't need to see them.
2019-08-20 13:42:26 -03:00
Roberto Ierusalimschy
a1d8eb2743
Added control messages to warnings
...
Added the concept of control messages to the warning system, plus the
implementation of the controls "@on"/"@off" to turn warnings on/off.
Moreover, the warning system in the test library adds some other
controls to ease the test of warnings.
2019-08-15 13:44:36 -03:00
Roberto Ierusalimschy
faaf7e481f
Removed use of 'rl_inhibit_completion' in 'lua.c'
...
Some old systems (e.g., Mac OS X 10.4) do not define
'rl_inhibit_completion', even when line history is available.
Anyway, the user can configure this option externally, using '~/.inputrc'.
2018-08-16 14:38:05 -03:00
Roberto Ierusalimschy
c3cb31fa9a
some extra goodies for 'readline'
...
('rl_readline_name' and 'rl_inhibit_completion')
2018-03-16 11:23:08 -03:00
Roberto Ierusalimschy
464658b16a
better modularization of the code for the REPL
2018-03-06 17:30:17 -03:00
Roberto Ierusalimschy
fc3eaa2559
GC default mode for the stand-alone interpreter is generational mode
2018-02-06 13:32:36 -02:00
Roberto Ierusalimschy
4804bbd9bb
include first standard header files
...
(Some broken compiler has problems with 'signal.h' being included
without a definition for 'size_t'.)
2017-05-24 18:11:19 -03:00
Roberto Ierusalimschy
9e1f1b1f62
detail in usage message for '-l' option
2017-04-19 09:49:17 -03:00
Roberto Ierusalimschy
94c1b3a8ee
Handling of LUA_PATH/LUA_CPATH moved back to 'package' library
...
to avoid incompatibilites with previous releases
2017-01-12 15:14:26 -02:00
Roberto Ierusalimschy
2a235312f0
detail (removing spaces at end of lines)
2016-12-22 11:08:50 -02:00
Roberto Ierusalimschy
9f594ca6f5
LUA_PATHSUFFIX -> LUA_VERSUFFIX + LUA_VERSUFFIX used in the
...
definition of LUA_INITVARVERSION, too.
2016-12-13 13:50:58 -02:00
Roberto Ierusalimschy
de3fd8ab83
Handling of LUA_PATH/LUA_CPATH moved from package library to stand
...
alone interpreter (so that 'lua.c' concentrates all handling of
environment variables)
2016-07-18 14:55:59 -03:00
Roberto Ierusalimschy
ed19fe766c
added ';' at the end of "expression lines" ("return exp;") so that
...
an extra ";" at the end is enough to stop Lua printing the result
("return exp;;" is not valid)
2015-08-14 16:11:20 -03:00
Roberto Ierusalimschy
3a91274547
details (avoid 'lint' warnings)
2015-03-30 12:42:59 -03:00
Roberto Ierusalimschy
fd6e680e21
detail
2015-03-10 11:15:06 -03:00
Roberto Ierusalimschy
57c0db219b
line history keep lines without added 'return'
2015-03-09 18:57:05 -03:00
Roberto Ierusalimschy
87b179e71d
detail (use new returned value from 'lua_getglobal' )
2014-11-11 17:41:27 -02:00
Roberto Ierusalimschy
e75c0148c3
comments (references to "ANSI C" changed to "ISO C", which is the
...
international name
2014-11-02 17:33:33 -02:00
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
...
any other header file
2014-11-02 17:19:04 -02:00
Roberto Ierusalimschy
1a69a3ecea
LUA_WIN -> LUA_USE_WINDOWS
2014-10-31 13:54:06 -02:00
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)
2014-10-29 14:12:30 -02:00
Roberto Ierusalimschy
6d613817d4
comments
2014-10-20 20:21:05 -02:00
Roberto Ierusalimschy
961760c9b6
message handler always adds a traceback to messages (even if they
...
are not strings), unless they have a __tostring method.
2014-10-20 16:19:26 -02:00
Roberto Ierusalimschy
f97c64d7bf
macros 'LUA_QL'/'LUA_QL' deprecated
2014-10-17 13:28:21 -03:00
Roberto Ierusalimschy
8ede2c353c
detail in 'report' + message handler always is called with an
...
argument + 'report' already handles non-string error messages
2014-09-25 11:20:37 -03:00
Roberto Ierusalimschy
b9dcf9974d
detail (typos in comments)
2014-06-30 16:48:08 -03:00
Roberto Ierusalimschy
10200585a7
var-arguments to the script come from 'arg' table (not from original
...
'argv' array)
2014-06-26 14:08:52 -03:00