1
0
mirror of https://github.com/lua/lua.git synced 2025-01-14 05:43:00 +08:00

4649 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
cfc84c856d 'LUA_REAL_*' -> 'LUA_FLOAT_*' (everywhere else we are using 'float') 2015-03-31 09:00:07 -03:00
Roberto Ierusalimschy
63720a4290 janitor work (comments, variable names, some other details) 2015-03-30 16:51:00 -03:00
Roberto Ierusalimschy
484bf14a6b calls to 'luaC_checkGC' in luaD_precall moved near to 'luaD_checkstack'
(which is what can need memory)
2015-03-30 13:05:23 -03:00
Roberto Ierusalimschy
abb2f5511d detail ('b + base' -> 'base + b' to follow all other similar uses) 2015-03-30 12:45:01 -03:00
Roberto Ierusalimschy
fcc6e1220e avoid expression with side effect (in debug mode) inside 'sizeof' 2015-03-30 12:43:51 -03:00
Roberto Ierusalimschy
3a91274547 details (avoid 'lint' warnings) 2015-03-30 12:42:59 -03:00
Roberto Ierusalimschy
f2a813ae10 details (avoid some 'lint' warnings) 2015-03-28 16:16:55 -03:00
Roberto Ierusalimschy
e723c75c02 details (avoid 'lint' warnings) 2015-03-28 16:14:47 -03:00
Roberto Ierusalimschy
b436ed58a3 'clearapihash' -> 'luaS_clearcache' and moved to 'lstring.c' (which
keeps all code related to this cache)
2015-03-25 10:42:19 -03:00
Roberto Ierusalimschy
2b37f2150e comments 2015-03-14 14:58:57 -03:00
Roberto Ierusalimschy
331632e8d8 code detail ('if' -> '?:') 2015-03-13 13:24:50 -03:00
Roberto Ierusalimschy
7d930ec694 use 'log2' when available 2015-03-12 11:04:04 -03:00
Roberto Ierusalimschy
0cf3b6495a 'ci_func' don't need to be exported 2015-03-11 13:10:41 -03:00
Roberto Ierusalimschy
b66fedadae 'lua_pushliteral' implemented with 'lua_pushstring' (to take
advantage of the cache)
2015-03-10 11:17:51 -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
4ba0cb4580 always use macros to operate on lua_Numbers 2015-03-07 16:30:16 -03:00
Roberto Ierusalimschy
a30c66f0fc macro 'luai_apicheck'/'api_check' back with a 'lua_State' parameter
(some people use it)
2015-03-06 16:49:50 -03:00
Roberto Ierusalimschy
bb4baa73ea allocation function is not exactly API (and cannot raise errors
like other API functions); better not use 'api_check' for cheking it.
2015-03-06 16:45:54 -03:00
Roberto Ierusalimschy
d7d44b038d detail (use 'lua_pushliteral' to push an empty string) 2015-03-06 16:09:08 -03:00
Roberto Ierusalimschy
297512b34c avoid using 'lua_pushliteral' in a non-zero-terminated string 2015-03-05 13:07:46 -03:00
Roberto Ierusalimschy
2ae2e6408e avoid testing for NULL when marking objects that cannot be NULL 2015-03-04 10:51:55 -03:00
Roberto Ierusalimschy
a80cada914 new cache for interning strings 2015-03-04 10:31:21 -03:00
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