Commit Graph

281 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
2f128c5130 'luaL_setfuncs' does not need to accept a NULL list. (If there is
no list, there is no reason to call this function.)
2011-04-19 15:29:41 -03:00
Roberto Ierusalimschy
19fbdf6cae 'luaL_findtable' -> 'luaL_getsubtable' 2011-04-08 16:17:36 -03:00
Roberto Ierusalimschy
d806710ab5 returns for file-related functions and process-related functions
unified in 'auxlib'
2011-03-03 13:34:46 -03:00
Roberto Ierusalimschy
a10d495b18 'luaL_findtable' returns boolean about whether it created a new
table (to easy initializing table)
2011-01-10 13:51:42 -02:00
Roberto Ierusalimschy
c97aa9485c new function 'luaL_setmetatable' 2010-11-10 16:05:36 -02:00
Roberto Ierusalimschy
e885b91326 'luaL_typeerror' deprecated 2010-11-10 15:38:10 -02:00
Roberto Ierusalimschy
2a966116b1 detail (message) 2010-11-09 09:04:15 -02:00
Roberto Ierusalimschy
9be89a1864 'luaL_checkversion' also checks convertions (number to integer types) 2010-10-29 10:52:21 -02:00
Roberto Ierusalimschy
c6b64ffe65 new type lua_Unsigned and corresponding projection/injection functions 2010-10-25 18:31:11 -02:00
Roberto Ierusalimschy
4590a89b32 corrected warnings from different compilers (mostly casts and small
details)
2010-10-25 17:01:37 -02:00
Roberto Ierusalimschy
c3eb89544f 'luaL_loadlib' accepts Utf8 BOM in the beginning of files 2010-10-01 15:53:00 -03:00
Roberto Ierusalimschy
cd6c276e41 use index 0 for header of list of free references 2010-08-03 17:21:16 -03:00
Roberto Ierusalimschy
d447945685 'module'/'luaL_register' and associates are deprecated 2010-07-28 12:51:59 -03:00
Roberto Ierusalimschy
a9dc7c8828 functions lua_tonumber/lua_tointeger replaced by lua_tonumberx/lua_tointegerx
that have an extra out parameter with conversion status
2010-07-02 14:35:06 -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
a139e2e003 old (and complex) luaL_findtable now used only in compatibility code
inside lauxlib.c
2010-06-30 14:40:27 -03:00
Roberto Ierusalimschy
79f11fb2bb back with #-comments for binary files 2010-06-09 14:53:59 -03:00
Roberto Ierusalimschy
2c1a5d678d factoring out common code in 'module' and 'luaL_openlib' 2010-05-31 13:34:19 -03:00
Roberto Ierusalimschy
e8a2c36909 more comments 2010-05-18 14:32:19 -03:00
Roberto Ierusalimschy
3c39a0e8cb bug: loadfile of binary files read first character twice 2010-05-18 14:21:24 -03:00
Roberto Ierusalimschy
3811e23b32 detail (comment) 2010-05-17 15:30:27 -03:00
Roberto Ierusalimschy
e924a7f9ea new API function 'lua_absindex' 2010-05-12 11:09:20 -03:00
Roberto Ierusalimschy
dcc070683c avoid reserving LUA_RIDX_LAST slots in any table used by reference
system. Store free list in a field indexed by a unique name,
instead of using a numerical index.
2010-05-10 12:25:02 -03:00
Roberto Ierusalimschy
afdb19ac82 no more 'ccall' nor 'cpcall' functions. (With light C functions they
are obsolete.)
2010-04-14 12:14:21 -03:00
Roberto Ierusalimschy
9100f7479a new implementation for Generic Buffer manipulation (using userdata as
temporary buffer space)
2010-04-09 13:14:46 -03:00
Roberto Ierusalimschy
82a1f5d354 comments 2010-03-29 14:44:31 -03:00
Roberto Ierusalimschy
28b2566c97 'lua_assert' not visible from libraries 2010-03-22 14:28:31 -03:00
Roberto Ierusalimschy
caf74dd731 'cpcall' renamed to 'ccall' as it does not do a protected call 2010-03-19 18:04:17 -03:00
Roberto Ierusalimschy
1514e49d43 avoid using function environments in C libraries (as it probably will
be deprecated)
2010-03-17 18:37:37 -03:00
Roberto Ierusalimschy
f292760f12 small optimization in luaL_addlstring (avoid adding chars one by one)
(suggested by Chuck Coffing)
2010-03-12 15:59:32 -03:00
Roberto Ierusalimschy
d08d237a49 detail: in loadfile read function, no need to return NULL on EOF;
size ==0 is enough to signal EOF.
2010-02-18 17:37:57 -02:00
Roberto Ierusalimschy
64a7ec987c avoid using 'ungetc' in loadfile 2010-02-18 17:32:41 -02:00
Roberto Ierusalimschy
4274738e81 new macro 'luai_writestringerror' 2010-02-18 17:18:41 -02:00
Roberto Ierusalimschy
d27108ccd5 removed support for '#fist-line comment' on binary files (as binary
files do not have lines...)
2010-02-11 13:52:50 -02:00
Roberto Ierusalimschy
4f5f2fe367 new function 'luaL_cpcall' 2010-01-21 14:49:21 -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
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
a5382b763c new function lua_copy 2009-10-05 13:44:33 -03:00
Roberto Ierusalimschy
cee94df6e0 function list in luaL_register may be NULL for an empty list 2009-09-28 09:36:40 -03:00
Roberto Ierusalimschy
99182c6872 references must start after predefined values in the registry 2009-09-18 15:58:45 -03:00
Roberto Ierusalimschy
28419c4383 'luaL_tolstring' uses 'lua_tolstring' instead of 'lua_tostring' and
'lua_objlen'
2009-07-15 14:47:34 -03:00
Roberto Ierusalimschy
f76f4cb79d new way to control stack overflow, controling only total size of the stack 2009-07-15 14:26:14 -03:00
Roberto Ierusalimschy
47c562435b better error messages for luaL_checkversion 2009-06-19 11:21:57 -03:00
Roberto Ierusalimschy
4a818f068a 'checkversion' implemented in the auxiliary library 2009-06-18 15:59:58 -03:00
Roberto Ierusalimschy
ae9ad6c694 added comment explaining why the 'feof' test when loading a file 2009-04-02 16:54:06 -03:00
Roberto Ierusalimschy
83d2dbb15d Lua will abort anyway, so 'panic' does not need to. 2009-03-31 14:25:08 -03:00
Roberto Ierusalimschy
b403317325 error functions search global space for a name for a function when
no other name is available
2009-02-27 15:18:19 -03:00
Roberto Ierusalimschy
9bf05e7364 code section 'Traceback' moved to the beginning of the file 2009-02-27 15:17:13 -03:00
Roberto Ierusalimschy
d2ebdc045b new macro 'lua_checkversion' to check whether core and application are
compatible
2009-02-18 14:20:56 -03:00
Roberto Ierusalimschy
189378142a buffer creation ensures buffer space plus MINSTACK in the stack 2009-02-17 11:31:16 -03:00
Roberto Ierusalimschy
547e47649f 'luaL_typeerror' spelled right 2009-02-13 17:39:34 -02:00
Roberto Ierusalimschy
f858a155c2 identation error (pointed by lint) 2008-07-03 11:21:41 -03:00
Roberto Ierusalimschy
480a1da34a when error is 'bad self' original message probably makes no sense, so
it is better not to show it.
2008-06-13 15:45:35 -03:00
Roberto Ierusalimschy
eb8ac6e2a0 'luaL_testudata' does not leave garbage on the stack in case of failure 2008-06-12 11:37:27 -03:00
Roberto Ierusalimschy
56c17ba4c7 detail 2008-01-17 14:24:30 -02:00
Roberto Ierusalimschy
daddc57abd luaL_tostring -> luaL_tolstring (more generic) 2008-01-03 15:07:59 -02:00
Roberto Ierusalimschy
9cb0607f6f avoid warnings about exit; return 2007-09-14 10:26:28 -03:00
Roberto Ierusalimschy
c676f13e1a stand-alone error-message details 2007-09-05 14:17:39 -03:00
Roberto Ierusalimschy
47e666c090 no need for ctype.h 2007-08-10 09:56:02 -03:00
Roberto Ierusalimschy
ffc5f78229 detail 2007-06-22 12:39:34 -03:00
Roberto Ierusalimschy
3f78748ef3 traceback function moved to auxlib 2007-06-22 12:33:54 -03:00
Roberto Ierusalimschy
d26bfb5ae4 "spacial" reorganization to keep related functions in groups 2007-06-21 11:09:59 -03:00
Roberto Ierusalimschy
8d3dd04137 clearing some old compatibility code 2007-06-21 10:52:27 -03:00
Roberto Ierusalimschy
01fa1bc114 luaL_testudata (a luaL_checkudata that does not raise errors) is
very needed.
2007-05-15 15:46:12 -03:00
Roberto Ierusalimschy
38063345ae several details 2007-04-19 17:21:53 -03:00
Roberto Ierusalimschy
cf86576a83 new function luaL_tostring 2007-02-07 15:51:21 -02:00
Roberto Ierusalimschy
dead3858b8 detail 2006-10-16 11:38:38 -03:00
Roberto Ierusalimschy
285f926140 avoid using index 0 for free list of references (because it is not
as efficient as index 1...)
2006-09-25 12:35:00 -03:00
Roberto Ierusalimschy
3c8865cf66 detail 2006-09-22 17:24:38 -03:00
Roberto Ierusalimschy
d22526ec30 'lua_strlen' is for compatibility only 2006-09-18 11:03:18 -03:00
Roberto Ierusalimschy
ee41bc03ab details 2006-06-22 13:12:59 -03:00
Roberto Ierusalimschy
0238a0b01e BUG: luaL_checkudata may show wrong error message 2006-03-21 16:31:09 -03:00
Roberto Ierusalimschy
73ebc5d8f6 compat code should keep compatibility 2006-01-16 10:42:21 -02:00
Roberto Ierusalimschy
bfdcbbcd76 small optimizations (lua_newtable -> lua_createtable) 2005-12-29 14:23:32 -02:00
Roberto Ierusalimschy
053e873145 new macro luaL_opt to avoid evaluating defaults when no needed 2005-10-21 11:47:42 -02:00
Roberto Ierusalimschy
515d556832 access to metamethods and metafields should be raw 2005-10-20 09:35:25 -02:00
Roberto Ierusalimschy
ed7039024d avoid some warnings 2005-10-19 11:05:11 -02:00
Roberto Ierusalimschy
e41fb9a604 registry._LOADED created "on demand" 2005-10-03 11:36:45 -03:00
Roberto Ierusalimschy
5fa6604f00 detail 2005-09-06 14:20:11 -03:00
Roberto Ierusalimschy
3390f9a35a detail 2005-08-26 14:36:32 -03:00
Roberto Ierusalimschy
9273fbd131 no more 'luaL_get/setfield' (replaced by more direct luaL_findtable) 2005-08-26 14:32:05 -03:00
Roberto Ierusalimschy
39cdbce23e no more '-w' option + new way to check module existence 2005-08-25 12:39:16 -03:00
Roberto Ierusalimschy
027e9e99ca simpler implementation for userdata types 2005-08-18 17:36:26 -03:00
Roberto Ierusalimschy
3b828d9e48 luaL_setfield does a non-raw set 2005-08-18 13:04:05 -03:00
Roberto Ierusalimschy
68548a02d3 fancier code ;) 2005-08-17 17:09:31 -03:00
Roberto Ierusalimschy
2f2b4a42a9 luaL_checkudata raises an error if value is not correct
(like other luaL_check functions)
2005-08-17 16:05:04 -03:00
Roberto Ierusalimschy
16ddf86168 luaL_openlib -> luaL_register and new function luaL_loadstring 2005-08-15 11:12:32 -03:00
Roberto Ierusalimschy
39c0f391c6 detail 2005-08-10 15:47:09 -03:00
Roberto Ierusalimschy
f01a95d4a0 detail 2005-08-09 09:30:19 -03:00
Roberto Ierusalimschy
d6ff5d9f46 searchpath is "private affair" of loadlib 2005-07-13 16:02:42 -03:00
Roberto Ierusalimschy
20131e54d3 no more "getc" when testing if file exists 2005-07-12 11:32:48 -03:00
Roberto Ierusalimschy
3d08aa591d details 2005-07-11 13:41:51 -03:00
Roberto Ierusalimschy
e86dab2dae details 2005-07-11 11:01:28 -03:00
Roberto Ierusalimschy
d628795940 lua_objsize -> lua_objlen (more compatible with use of `len´ in other
places [opcode name, metamethod index, etc.])
2005-05-31 11:34:02 -03:00
Roberto Ierusalimschy
05348d834b better error message 2005-05-31 11:31:50 -03:00
Roberto Ierusalimschy
90de38bf1f warnings in VS .Net 2005-05-31 11:25:18 -03:00
Roberto Ierusalimschy
e8a7ecb982 luaL_findstring -> luaL_checkoption 2005-05-25 10:21:26 -03:00
Roberto Ierusalimschy
67578ec51f several small details 2005-05-17 16:49:15 -03:00
Roberto Ierusalimschy
c2bb9abcec better quotes for strings in error messages 2005-05-16 18:19:00 -03:00