Roberto Ierusalimschy
61fa462535
added cast to avoid warning
2014-08-01 14:22:57 -03:00
Roberto Ierusalimschy
f9037ae8c1
'ipairs' respects metamethods
2014-07-24 16:33:29 -03:00
Roberto Ierusalimschy
1aa4f69b51
new type 'lua_Ctx' for continuation-function contexts (to allow type
...
to be configurable)
2014-07-17 10:53:37 -03:00
Roberto Ierusalimschy
16b4110521
function 'type' keeps type names as upvalues to avoid creating strings
...
everytime it is called
2014-07-16 10:56:59 -03:00
Roberto Ierusalimschy
b9dcf9974d
detail (typos in comments)
2014-06-30 16:48:08 -03:00
Roberto Ierusalimschy
6f6fd96e3b
new type lua_KFunction + no more 'lua_getctx'
2014-06-10 14:41:38 -03:00
Roberto Ierusalimschy
9e68c047ae
'assert' does not assume that the error object is a string
2014-06-02 00:06:26 -03:00
Roberto Ierusalimschy
e2be310a85
better(?) implementation for 'pcall'/'xpcall' (regarding the insertion
...
of the boolean first result)
2014-05-16 15:54:01 -03:00
Roberto Ierusalimschy
c549d4fe64
'lua_strtonum' (and 'luaO_str2num') now return string size, instead of
...
receiving it
2014-05-01 15:18:06 -03:00
Roberto Ierusalimschy
a3addae036
lua_gettable and similars return type of gotten value
2014-03-12 17:57:40 -03:00
Roberto Ierusalimschy
6a24bd17a8
no more second result from 'collectgarbage"count"' (as Lua seldom
...
will need lua_Number to be an integer)
2014-02-14 14:45:38 -02:00
Roberto Ierusalimschy
733c58595b
no more local collection
2014-02-13 10:11:34 -02:00
Roberto Ierusalimschy
686e57cf9c
GC local pause configurable
2013-09-13 13:21:52 -03:00
Roberto Ierusalimschy
677d90165f
no more generational collection !!!
2013-08-05 13:58:28 -03:00
Roberto Ierusalimschy
2f8c51a552
use unsigneds for unary minus, too
2013-07-10 14:15:12 -03:00
Roberto Ierusalimschy
2b4bd21585
'tonumber': base must be a number
2013-07-05 11:39:15 -03:00
Roberto Ierusalimschy
beff5b078a
'tonumber': does not accept numbers when given a base + convertion from
...
strings to numbers with a base moved to a separated function (more
modular)
2013-07-05 11:35:49 -03:00
Roberto Ierusalimschy
5ca5086c19
'tonumber' now works with integers too
2013-05-16 15:35:57 -03:00
Roberto Ierusalimschy
a83ed55f1e
added 'return' (when possible) to calls to error functions
2013-02-21 10:44:53 -03:00
Roberto Ierusalimschy
65e31fb179
Bug: load/loadfile returns wrong result when given an environment
...
for a binary chunk with no upvalues
2012-12-03 18:18:02 -02:00
Roberto Ierusalimschy
fc24a3a6c4
small bug: a reader function should not modify the Lua stack
2012-04-27 11:13:19 -03:00
Roberto Ierusalimschy
c5da4f4cd0
unused variable removed
2011-11-30 11:03:24 -02:00
Roberto Ierusalimschy
e21b26a964
avoid 'return' "to avoid warnings"
2011-11-30 10:42:49 -02:00
Roberto Ierusalimschy
3617e04e97
'lua_load' has an extra argument 'mode'
2011-11-29 13:55:08 -02:00
Roberto Ierusalimschy
fded7bef19
options for 'collectgarbage' renamed: "inc" -> "incremental";
...
"gen" -> "generational"
2011-11-23 15:29:04 -02:00
Roberto Ierusalimschy
6cce5c0601
new function 'luaL_loadfilex'
2011-11-14 15:10:24 -02:00
Roberto Ierusalimschy
7133e20c94
make treatment of 'pcall' and 'xpcall' more similar
2011-11-09 17:38:00 -02:00
Roberto Ierusalimschy
888d39ea75
refactoring of common parts of 'pcall' and 'xpcall' + avoids
...
stack errors on these functions (return error code instead)
2011-11-09 17:28:27 -02:00
Roberto Ierusalimschy
162ce8256e
lint (unused struct field)
2011-09-30 09:43:54 -03:00
Roberto Ierusalimschy
43c873895f
tonumber: base 10 is not special, no base is
2011-07-27 09:14:06 -03:00
Roberto Ierusalimschy
79cbc3468c
removed and deprecated functions really removed from the code base
2011-07-05 09:49:35 -03:00
Roberto Ierusalimschy
2f125ebc33
'deprecated' x 'removed' (they are not the same thing)
2011-07-02 12:56:43 -03:00
Roberto Ierusalimschy
22e1c5ebad
avoid conversion from 'const char*' to 'void *' (warning about 'const')
2011-06-16 11:12:24 -03:00
Roberto Ierusalimschy
ee7d0c2649
new macro 'luai_writeline' to print newlines (and flush 'stdout')
2011-05-26 13:09:40 -03:00
Roberto Ierusalimschy
98816d0ce5
small problems with 'luaone.c'
2011-02-28 14:32:10 -03:00
Roberto Ierusalimschy
c4ea0c3b29
detail (cleaning trailing spaces)
2011-01-26 14:30:02 -02:00
Roberto Ierusalimschy
511679313f
new function 'rawlen'
2011-01-07 10:41:48 -02:00
Roberto Ierusalimschy
aa6faa6331
own implementation of 'tunumber', so that it works correctly with
...
numbers outside the 'int' range
2010-12-27 16:00:38 -02:00
Roberto Ierusalimschy
d51743b0c7
removed 'newproxy'
2010-12-17 13:14:58 -02:00
Roberto Ierusalimschy
b83b6ba015
'loadin' -> 'load'
2010-12-13 14:38:00 -02:00
Roberto Ierusalimschy
81646af13b
'loadstring' deprecated; use 'load' instead
2010-12-08 10:58:04 -02:00
Roberto Ierusalimschy
233b71c092
comment
2010-12-07 09:40:42 -02:00
Roberto Ierusalimschy
c79b4a97aa
using 'strspn' to skip spaces in 'tonumber'
2010-12-06 14:25:48 -02:00
Roberto Ierusalimschy
e642cc4206
correct handling of negative numbers in non-10 bases by 'tonumber'
...
(e.g., tonumber(-34, 8))
2010-10-28 13:36:30 -02:00
Roberto Ierusalimschy
a289a62717
'loadin' should not check whether upvalue is called '_ENV',
...
because its name may be unknown when there is no debug information.
2010-09-07 16:38:36 -03:00
Roberto Ierusalimschy
0df2238063
name "_ENV" configurable through 'luaconf.h'
2010-09-07 16:21:39 -03:00
Roberto Ierusalimschy
6828f6d427
new parameter 'majorinc' to control frequency of major collections
...
in generational mode
2010-09-03 11:14:01 -03:00
Roberto Ierusalimschy
daa5fe3e31
'loadin' should accept any value for the environment (not only tables) +
...
it should check whether chunk has upvalue named '_ENV'
2010-08-23 15:03:11 -03:00
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.
2010-07-02 08:38:13 -03:00
Roberto Ierusalimschy
b98de30b8f
'ipair' is back
2010-06-13 16:41:34 -03:00
Roberto Ierusalimschy
bd262d591f
'coroutine' library separated from 'baselib'
2010-06-10 18:30:26 -03:00
Roberto Ierusalimschy
cca71912e6
'gcinfo' was deprecated in version 5.0.
2010-04-19 14:02:02 -03:00
Roberto Ierusalimschy
26d4a73962
with light C functions, 'pairs' does not need to keep 'next' as an
...
upvalue.
2010-04-19 13:36:06 -03:00
Roberto Ierusalimschy
11126422d9
option to return GC to normal (incremental, non generational) mode
2010-04-02 12:19:19 -03:00
Roberto Ierusalimschy
064e406f67
no more fenvs!
2010-03-26 17:58:11 -03:00
Roberto Ierusalimschy
74123e9686
draft version of a generational mode for garbage collection. (Not well
...
tested; no major collections; ...)
2010-03-22 15:28:03 -03:00
Roberto Ierusalimschy
62840c5fad
'ipairs' is deprecated
2010-03-19 12:52:48 -03:00
Roberto Ierusalimschy
489253d753
better definitions for lua_[gs]etglobal + less uses of ENVIRONINDEX
2010-03-13 00:57:46 -03:00
Roberto Ierusalimschy
25c557ec63
first version of _ENV; no more global variables
2010-03-12 16:14:06 -03:00
Roberto Ierusalimschy
0dc09cb42e
'unpack' moved to table library (and therefore "renamed" to
...
'table.unpack'.
2009-12-28 14:30:31 -02:00
Roberto Ierusalimschy
f84b575cfa
no more pseudoindex LUA_GLOBALSINDEX; global table now accessible
...
through registry
2009-12-22 13:32:50 -02:00
Roberto Ierusalimschy
c3a6f3fa1c
'lua_objlen' replaced by 'lua_rawlen', 'lua_len', and 'luaL_len'
2009-12-17 14:20:01 -02:00
Roberto Ierusalimschy
a25b8ff69c
detail ('lua_tolstring' instead of lua_objlen)
2009-12-15 09:25:16 -02:00
Roberto Ierusalimschy
2e51792596
avoid using deprecated macros lua_[gs]etglobal
2009-12-11 11:40:44 -02:00
Roberto Ierusalimschy
64d5df7772
detail (lua_resume should empty coroutine stack even if they do not
...
fit into caller stack)
2009-12-10 16:17:37 -02:00
Roberto Ierusalimschy
a654e82f5c
coroutines may have C bodies
2009-11-27 13:38:51 -02:00
Roberto Ierusalimschy
3c4d970a7b
comment typos
2009-11-26 09:39:20 -02:00
Roberto Ierusalimschy
b0f2b288a6
new scheme for debug info about tail calls: no more 'fake' stack entries,
...
but stack entry knows whether it was tail called
2009-11-25 13:27:51 -02:00
Roberto Ierusalimschy
a6f465f558
new mark LUAMOD_API for all luaopen_* functions
2009-11-24 10:05:44 -02:00
Roberto Ierusalimschy
45dec34597
comments
2009-11-19 14:26:29 -02:00
Roberto Ierusalimschy
c5050b1c41
functions 'getfenv' and 'setfenv' are deprecated
2009-11-16 13:51:03 -02:00
Roberto Ierusalimschy
b9063a08f5
new function 'loadin'
2009-11-13 15:01:40 -02:00
Roberto Ierusalimschy
1ce819333d
new option 'isrunning' for 'lua_gc' (and 'collectgarbage')
2009-11-09 16:55:17 -02:00
Roberto Ierusalimschy
5bc91c6405
no more one environment per thread: all threads share a single global
...
environment
2009-10-23 17:12:19 -02:00
Roberto Ierusalimschy
f5073de0a7
'ipairs' goes until length of array instead of stopping at the first nil
2009-10-23 10:50:25 -02:00
Roberto Ierusalimschy
a5382b763c
new function lua_copy
2009-10-05 13:44:33 -03:00
Roberto Ierusalimschy
323f33d014
'collectgarbage"count"' returns a second argument with the count%1024.
2009-08-04 15:20:18 -03:00
Roberto Ierusalimschy
5bff2aaf47
calls with LUA_MULTRET may leave no free slots in the stack
2009-07-15 14:35:20 -03:00
Roberto Ierusalimschy
aabe3ddbf4
errors in 'resume' should be all protected
2009-07-08 13:06:07 -03:00
Roberto Ierusalimschy
70a63fa5ad
first implementation of yieldable 'pcall'
2009-04-08 15:04:33 -03:00
Roberto Ierusalimschy
6d0ae11c57
'context' added to suspendable calls
2009-03-23 11:26:12 -03:00
Roberto Ierusalimschy
9e613b8583
missing argument to 'assert' raises "assertion failed" error
2009-03-16 13:30:50 -03:00
Roberto Ierusalimschy
9428ec42d0
new optional argument to 'load', to control allowed modes (binary or
...
textual chunks)
2009-03-13 12:50:03 -03:00
Roberto Ierusalimschy
ba484b9eb1
yielding across lua_call (first version)
2009-03-10 14:14:37 -03:00
Roberto Ierusalimschy
5d3cc5def8
'writestring' changed into a configurable macro
2009-02-07 10:23:15 -02:00
Roberto Ierusalimschy
53db607963
avoid using 'fputs' in 'print' to avoid problems with embedded zeros
2009-02-06 16:38:47 -02:00
Roberto Ierusalimschy
f9dec5fc84
do not use compatibility macros in Lua
2008-07-11 14:51:01 -03:00
Roberto Ierusalimschy
202de59254
useless #include removed (pointed by lint)
2008-07-03 11:23:35 -03:00
Roberto Ierusalimschy
7316d61a66
'coroutine.running' should work for the main thread too
2008-02-25 11:33:57 -03:00
Roberto Ierusalimschy
fa19baab7f
proxies must be created with a __gc field in their metatables to work
...
properly with new semantics for finalizers
2008-02-19 15:54:09 -03:00
Roberto Ierusalimschy
5ac3386888
bug: unpack with maximum indices may crash due to arithmetic overflow
2008-02-14 14:03:09 -02:00
Roberto Ierusalimschy
015e973899
bug: auxresume should reserve stack space for boolean result
2008-02-11 17:14:52 -02:00
Roberto Ierusalimschy
daddc57abd
luaL_tostring -> luaL_tolstring (more generic)
2008-01-03 15:07:59 -02:00
Roberto Ierusalimschy
b4164a9aa7
details
2007-11-28 16:25:17 -02:00
Roberto Ierusalimschy
2fa476655f
detail
2007-10-25 17:31:05 -02:00
Roberto Ierusalimschy
ab09732986
new metamethods for '__pairs' and '__ipairs'
2007-10-17 15:26:39 -02:00
Roberto Ierusalimschy
8d3dd04137
clearing some old compatibility code
2007-06-21 10:52:27 -03:00
Roberto Ierusalimschy
d3c304e92e
BUG: setfenv accepts invalid argument
2007-02-09 10:40:21 -02:00
Roberto Ierusalimschy
cf86576a83
new function luaL_tostring
2007-02-07 15:51:21 -02:00
Roberto Ierusalimschy
be822a5f1c
xpcall now may get arguments to function to be called
2006-10-24 16:46:12 -03:00