Roberto Ierusalimschy
a00013c8d0
'point2int' -> 'point2uint' (to reflect its actual result type)
2015-03-03 16:53:13 -03:00
Roberto Ierusalimschy
b9a1f27250
do not attempt emergency collection while building state (it is
...
useless, and state can be inconsistent)
2015-03-03 15:18:29 -03:00
Roberto Ierusalimschy
29aed28802
detail (use 'luaS_newliteral' when possible)
2015-03-03 15:17:04 -03:00
Roberto Ierusalimschy
951b562cf8
configuration for numerical types through only one #define for
...
each type
2015-03-02 13:59:01 -03:00
Roberto Ierusalimschy
6408bc0b7f
new macros 'chgfltvalue'/'chgivalue' (numerical for loop does
...
not need to set the type of its internal variable at each iteration)
2015-03-02 13:04:52 -03:00
Roberto Ierusalimschy
91efb4b895
LUA_COMPAT_5_1 needs some options deprecated from 5.2 to 5.3
2015-02-28 16:22:31 -03:00
Roberto Ierusalimschy
27c5b1b237
added patches to two bugs
2015-02-23 16:20:43 -03:00
Roberto Ierusalimschy
d51bdc166d
bug: 'string.format("%f")' can cause a buffer overflow (with long doubles)
...
bug: 'debug.getlocal' on a coroutine suspended in a hook can crash
the interpreter
2015-02-20 16:21:29 -02:00
Roberto Ierusalimschy
81245b1ad5
'numisinteger' (for table keys) replaced by 'luaV_tointeger' (old
...
'tointeger_aux'), which can do the same job.
2015-02-20 12:27:53 -02:00
Roberto Ierusalimschy
397ce11996
make 'hashfloat' configurable
2015-02-20 12:05:01 -02:00
Roberto Ierusalimschy
97f2aa5a44
bug: when manipulating other threads, there is no garanties about
...
their stack space
2015-02-19 15:06:21 -02:00
Roberto Ierusalimschy
419e2cb01d
detail (file does not need 'string.h')
2015-02-16 11:15:00 -02:00
Roberto Ierusalimschy
374f6c4612
detail ('fopen' needs 'stdio.h')
2015-02-16 11:14:33 -02:00
Roberto Ierusalimschy
4bdf9962bf
bug: suspended function can have its 'func' field not pointing to
...
its function, crashing debug functions
2015-02-13 14:01:17 -02:00
Roberto Ierusalimschy
e0306e386f
some changes in 'hashfloat' to avoid undefined (in ISO C) numerical
...
conversions
2015-02-13 11:05:34 -02:00
Roberto Ierusalimschy
2e6e53c7cc
added API checks to some unprotected 'top' increments
2015-02-11 16:47:22 -02:00
Roberto Ierusalimschy
2a57d2346e
detail
2015-02-09 16:05:46 -02:00
Roberto Ierusalimschy
7e425be975
bug (in 5.2): Chunk with too many lines can seg. fault
2015-02-09 15:57:45 -02:00
Roberto Ierusalimschy
0705e7b39f
detail (no need to write 'double' in source)
2015-02-09 15:41:54 -02:00
Roberto Ierusalimschy
4ccc4578b3
detail (use 'l_floor' instead of 'l_mathop(floor)')
2015-02-09 13:41:56 -02:00
Roberto Ierusalimschy
5e8c162b6c
detail
2015-02-05 15:50:24 -02:00
Roberto Ierusalimschy
c8d6cb0136
macros 'luai_num*' (for float arithmetic operations) moved to
...
llimits.h.
2015-02-05 15:15:33 -02:00
Roberto Ierusalimschy
0edcdf49c0
added comments documenting LUA_NOCVTN2S/LUA_NOCVTS2N
2015-02-05 14:53:34 -02:00
Roberto Ierusalimschy
b7dfd18612
make buffer for format specification a little larger (length modifier
...
can be larger than 2, e.g. "I64")
2015-02-04 10:54:31 -02:00
Roberto Ierusalimschy
8efcd411fe
own implementation for 'string.format("%a")' for C89 platforms
2015-02-04 10:52:57 -02:00
Roberto Ierusalimschy
90d016980f
detail ('luaL_getmetatable' does not return a boolean, but a tag)
2015-02-03 15:38:24 -02:00
Roberto Ierusalimschy
b3996c55f6
LUAL_BUFFERSIZE affects the API, so it is better not to change it
...
between releases of the same version. (The long double case seems
to be too rare, so that should not be a problem; moreover, that
case is related to a bug)
2015-01-16 15:26:56 -02:00
Roberto Ierusalimschy
438a9fcc78
LUAI_MAXSHORTLEN moved from 'luaconf.h' to 'llimits.h' (does not
...
affect the API and is seldom modified)
2015-01-16 15:15:52 -02:00
Roberto Ierusalimschy
7e2015a46d
size of short strings stored in a single byte, to reduce the size
...
of struct 'TString'
2015-01-16 14:54:37 -02:00
Roberto Ierusalimschy
5b01cb39b5
larger MINSTRTABSIZE (standard Lua starts with ~230 strings, after
...
oppening the standard libraries)
2015-01-16 13:41:03 -02:00
Roberto Ierusalimschy
a0503305bd
comments
2015-01-16 11:26:55 -02:00
Roberto Ierusalimschy
965f74525b
removed macro LUAI_FIRSTPSEUDOIDX (that stuff does not need
...
to be configurable)
2015-01-13 17:50:30 -02:00
Roberto Ierusalimschy
3f2e21f0ea
Long double needs a larger LUAL_BUFFERSIZE (because
...
'string.format("%.99f", 1e4900)' can generate quite long strings),
but otherwise buffer can be 1~2K
2015-01-13 15:24:22 -02:00
Roberto Ierusalimschy
3509914916
BUG (when compiled with long double): buffer overflow when formatting
...
string.format("%.99f", 1e4930)
2015-01-13 15:18:25 -02:00
Roberto Ierusalimschy
ae27be40c9
better check for overflows in 'table.move' (removes restriction that
...
initial position should be positive)
2015-01-13 14:27:29 -02:00
Roberto Ierusalimschy
cdd26700e8
definition for 'MAXUPVAL' moved for a more "private" place and its
...
value and comment corrected to reflect current implementation
2015-01-13 13:49:11 -02:00
Roberto Ierusalimschy
a9a4bf68b0
typo in comment
2015-01-13 11:18:04 -02:00
Roberto Ierusalimschy
f31cc8e342
typo in error message
2015-01-12 17:32:32 -02:00
Roberto Ierusalimschy
3c55790ebe
'setkey' -> 'setnodekey' (to avoid conflicts with POSIX)
2015-01-05 11:52:37 -02:00
Roberto Ierusalimschy
0adfa773b9
new macro 'cast_func' adds '__extension__' (in gnu compilers) when
...
converting void* to function, to avoid warnings
2015-01-05 11:51:39 -02:00
Roberto Ierusalimschy
3317f5c6d9
includes 'stddef.h' (as it uses NULL)
2015-01-05 11:48:33 -02:00
Roberto Ierusalimschy
dbf911c516
detail (added -Wconversion as a comment, to be used ocasionally)
2015-01-02 11:03:52 -02:00
Roberto Ierusalimschy
3a29087cb7
'lua_setlocal' should not pop value when failing (to be consistent
...
with the manual and with 'lua_setupvalue')
2015-01-02 10:52:22 -02:00
Roberto Ierusalimschy
234fb7f695
clearer(?) code (also avoids a warning about 'c' being used
...
without initialization)
2015-01-02 10:50:28 -02:00
Roberto Ierusalimschy
c077d47465
does not define _XOPEN_SOURCE when LUA_USE_C89 is defined + defining
...
_XOPEN_SOURCE==0 undefines that macro
2014-12-29 14:54:13 -02:00
Roberto Ierusalimschy
8e5290d81e
all "divisions" (div,idiv,mod) by zero are not folded, to avoid
...
problems during compilation + does not fold zero results, as they
can collapse with -0.0 and the ANSI test to distinguish both needs
a division by zero (which we are trying to avoid) + removed macro
'luai_numinvalidop' (as its main use case were divisions by zero)
2014-12-29 14:49:25 -02:00
Roberto Ierusalimschy
a1c37f834a
detail (macro 'luai_numidiv' uses 'luai_numdiv' to compute the division)
2014-12-29 11:27:55 -02:00
Roberto Ierusalimschy
1a7868c1d5
bug: 'random' limit is 2^31-1, not RAND_MAX
2014-12-27 18:32:26 -02:00
Roberto Ierusalimschy
de3933480e
details
2014-12-27 18:31:43 -02:00
Roberto Ierusalimschy
50e2eb8954
change in macro 'vmcase', avoding code inside it. (Code inside the
...
macro harms tools such as debuggers.)
2014-12-27 18:30:38 -02:00