Commit Graph

296 Commits

Author SHA1 Message Date
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
Roberto Ierusalimschy
fc875334fd detail 2006-10-20 16:30:53 -03:00
Roberto Ierusalimschy
afa0d0ac0d new constant LUA_OK 2006-10-10 14:40:17 -03:00
Roberto Ierusalimschy
cedd2092eb 'coroutine.running' should return nil (instead of nothing) for main thread 2006-09-11 11:07:24 -03:00
Roberto Ierusalimschy
475b0ecbf1 new macro LUA_RELEASE 2006-06-02 12:34:00 -03:00
Roberto Ierusalimschy
414359b2f1 new version number 2006-05-31 13:50:40 -03:00
Roberto Ierusalimschy
baffc37f5c detail 2006-01-18 09:49:12 -02:00
Roberto Ierusalimschy
bfdcbbcd76 small optimizations (lua_newtable -> lua_createtable) 2005-12-29 14:23:32 -02:00
Roberto Ierusalimschy
6a516878e9 collectgarbage"count" returns kilobytes (where K = 1024) 2005-12-27 15:10:11 -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
9f4211310f more precision for gc count 2005-10-20 09:35:50 -02:00
Roberto Ierusalimschy
5fc92cce12 registry._LOADED created "on demand" and baselib created as module _G 2005-10-03 11:36:45 -03:00
Roberto Ierusalimschy
c8c2e06899 'select' accepts negative indices 2005-09-16 15:22:48 -03:00
Roberto Ierusalimschy
3390f9a35a detail 2005-08-26 14:36:32 -03:00
Roberto Ierusalimschy
5e8a9e324c luaL_openlib -> luaL_register, luaL_putchar -> luaL_addchar 2005-08-15 11:12:32 -03:00
Roberto Ierusalimschy
a569099b70 no more path for loadfile + function lists sorted 2005-07-12 15:15:11 -03:00
Roberto Ierusalimschy
bbf2cea9a1 more "polite" way to change a thread's environment 2005-07-07 12:48:29 -03:00
Roberto Ierusalimschy
e8a7ecb982 luaL_findstring -> luaL_checkoption 2005-05-25 10:21:26 -03:00
Roberto Ierusalimschy
f21e9c172f details 2005-05-20 12:53:42 -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
Roberto Ierusalimschy
da32450c3d new API function `lua_tolstring' 2005-05-16 16:21:11 -03:00
Roberto Ierusalimschy
ade585bdf9 no more LUA_FIRSTINDEX 2005-03-28 14:17:53 -03:00
Roberto Ierusalimschy
390256edf7 better name for GC pause 2005-03-22 13:04:29 -03:00
Roberto Ierusalimschy
9ffae705ee new "primitive" getn 2005-03-16 13:58:41 -03:00
Roberto Ierusalimschy
6bfef60e77 bug: rawset/rawget do not ignore extra arguments 2005-03-11 12:51:08 -03:00
Roberto Ierusalimschy
dcabf721f8 "coroutine.current" -> "running" (compatible with "running" status) 2005-02-28 14:24:41 -03:00
Roberto Ierusalimschy
d55bb795fa details 2005-02-23 14:30:22 -03:00
Roberto Ierusalimschy
7d45a5f48f C functions and userdata also have environments 2005-02-18 10:40:02 -02:00
Roberto Ierusalimschy
a9af455b32 detail 2005-02-14 11:19:44 -02:00
Roberto Ierusalimschy
5be517602e no more generational collector (and no more `noinc' mode) 2005-01-14 12:19:42 -02:00
Roberto Ierusalimschy
071b2ae0e1 details 2005-01-07 17:53:32 -02:00
Roberto Ierusalimschy
c6254dceff a different option for the GC 2004-12-13 10:15:11 -02:00
Roberto Ierusalimschy
2ec4fc4295 simpler code for `print' 2004-12-07 16:31:34 -02:00
Roberto Ierusalimschy
39a8082f50 more options for controling the GC 2004-12-06 15:53:42 -02:00
Roberto Ierusalimschy
9be5844713 first full implementation of new package system 2004-11-18 17:53:49 -02:00
Roberto Ierusalimschy
36541dec9b towards new package system 2004-09-29 18:03:14 -03:00
Roberto Ierusalimschy
2419f2bf02 cleaner API for coroutines 2004-09-15 17:39:42 -03:00
Roberto Ierusalimschy
79fc7dea43 simpler implementation for generic reader 2004-09-03 10:16:48 -03:00
Roberto Ierusalimschy
7d309480dd new way to handle _PATH (old LUA_PATH) 2004-08-30 15:35:14 -03:00
Roberto Ierusalimschy
bcb2cb59ac select' returns all values after given n' 2004-08-30 12:28:32 -03:00
Roberto Ierusalimschy
7a796a0682 new macro `luaL_typename' 2004-07-09 15:23:17 -03:00
Roberto Ierusalimschy
76d8b8db06 lua_pushfstring' now supports %p' option too 2004-07-09 13:01:38 -03:00
Roberto Ierusalimschy
3d5187f6e5 require' uses its private reference to _LOADED' table 2004-07-02 15:09:11 -03:00
Roberto Ierusalimschy
80ec81926c `lua.c' also needs the default path, so auxlib should provide it 2004-07-01 11:26:28 -03:00
Roberto Ierusalimschy
0f5a497ed9 new interface for search-path function + small changes in require 2004-06-29 13:58:17 -03:00
Roberto Ierusalimschy
0c49857c1a new scheme to search paths 2004-06-21 17:05:29 -03:00
Roberto Ierusalimschy
6b41e84da5 `assert' returns all its parameters (not only the first) 2004-06-21 13:45:09 -03:00
Roberto Ierusalimschy
6311e3109f `setfenv' returns "self" 2004-06-15 10:31:30 -03:00
Roberto Ierusalimschy
345379b5ff option for garbage-collector `step' 2004-06-04 12:30:53 -03:00
Roberto Ierusalimschy
50f9cd201e no more `__fenv' 2004-06-02 11:20:08 -03:00
Roberto Ierusalimschy
0f49b3e62d new function `select' 2004-05-31 15:50:30 -03:00
Roberto Ierusalimschy
7e41612eb2 code parameterized by LUA_FIRSTINDEX (first index of an array) 2004-05-10 14:50:51 -03:00
Roberto Ierusalimschy
b4cd38ba6c new scheme for configuration through `luaconf.h' 2004-04-30 17:13:38 -03:00
Roberto Ierusalimschy
d7cb622866 `unpack' has two optional arguments (to give a range) 2004-03-26 10:25:17 -03:00
Roberto Ierusalimschy
b876ec61c0 new (temporary?) API for garbage collector 2004-03-09 14:34:35 -03:00
Roberto Ierusalimschy
4d5fe1f54b detail 2003-12-10 09:04:54 -02:00
Roberto Ierusalimschy
921b1723e2 comments 2003-11-11 14:34:17 -02:00
Roberto Ierusalimschy
fa198197a0 lua_(set)getglobal are ok to use 2003-11-05 09:59:14 -02:00
Roberto Ierusalimschy
275c150b17 error()' (and error(nil)') generates errors with no error messages 2003-10-23 16:06:22 -02:00
Roberto Ierusalimschy
533737f26e new functions lua_getfield' and lua_setfield' 2003-10-10 09:57:55 -03:00
Roberto Ierusalimschy
f04fe526cd new functions `lua_tointeger' and lua_pushinteger' 2003-10-07 17:13:41 -03:00
Roberto Ierusalimschy
beb896b082 new function (generic) `load' 2003-08-27 18:02:08 -03:00
Roberto Ierusalimschy
64066359dd bug: IBM AS400 (OS400) has sizeof(void *)==16, and a `%p' may generate
up to 60 characters in a `printf'. That causes a buffer overflow in
`tostring'..
2003-08-25 16:49:47 -03:00
Roberto Ierusalimschy
60aa01d8f7 fully-weak tables are more efficient 2003-05-16 15:59:08 -03:00
Roberto Ierusalimschy
0d88545b82 warnings from several compilers (mainly typecasts when lua_Number is float) 2003-04-03 10:35:34 -03:00
Roberto Ierusalimschy
5a144e891a __globals' -> __fenv' 2003-03-19 18:14:34 -03:00
Roberto Ierusalimschy
fa4b4c1100 loadstring/loadfile use global environment + setfenv(0) changes
global environment
2003-03-11 15:17:43 -03:00
Roberto Ierusalimschy
034de1fe73 new names for functions that open C libraries 2003-03-11 09:24:34 -03:00
Roberto Ierusalimschy
430d6db928 LUA_PATH components may have multiple interrogation marks 2003-03-11 09:08:13 -03:00
Roberto Ierusalimschy
3684f67771 details (text of an error message) 2003-03-06 16:36:16 -03:00
Roberto Ierusalimschy
92f6e0c1bf no-nonsense debug information about tail calls 2003-02-27 08:52:30 -03:00
Roberto Ierusalimschy
5cd99b82b7 set/getenvtable' -> set/getfenv' 2003-02-24 13:54:20 -03:00
Roberto Ierusalimschy
07e210e655 `require' returns value returned by package 2003-02-24 13:50:41 -03:00
Roberto Ierusalimschy
9866fb0ef1 set/getglobals' -> set/getenvtable' 2003-02-18 13:13:15 -03:00
Roberto Ierusalimschy
07948c3181 restore _REQUIREDNAME after requiring a file 2003-02-18 13:02:13 -03:00
Roberto Ierusalimschy
2866fb2dd0 reset _REQUIREDNAME after loading module 2003-02-13 14:07:37 -02:00
Roberto Ierusalimschy
4b6f436d67 unpack' uses getn' to get table size 2003-02-12 07:11:01 -02:00
Roberto Ierusalimschy
7964f7cbbd more complete information for coroutine errors 2003-02-10 08:21:31 -02:00
Roberto Ierusalimschy
75f73172c4 bug: `resume' was checking the wrong value for stack overflow 2002-12-20 07:55:56 -02:00
Roberto Ierusalimschy
acf62ddfbe "load*" creates chunk with same global table than caller 2002-12-06 15:05:15 -02:00
Roberto Ierusalimschy
27c6b4d422 each .c file defines its own name 2002-12-04 15:38:31 -02:00
Roberto Ierusalimschy
76de732745 avoid non-raw accesses to globals when variable may not exist 2002-12-04 13:38:25 -02:00
Roberto Ierusalimschy
1f55dbc699 details 2002-11-26 10:53:29 -02:00
Roberto Ierusalimschy
8954bdc706 new `coroutine.status' function 2002-11-26 06:45:36 -02:00
Roberto Ierusalimschy
9b1c586b2f renaming stringdump' -> string.dump' 2002-11-25 15:33:33 -02:00
Roberto Ierusalimschy
dbc5451bea comments 2002-11-22 16:01:46 -02:00
Roberto Ierusalimschy
18765d900e messages 2002-11-18 09:20:01 -02:00
Roberto Ierusalimschy
097edd3884 better names for auxiliar functions 2002-11-14 13:41:38 -02:00
Roberto Ierusalimschy
5c5d9b2703 back to `__mode' metafield to specify weakness 2002-11-14 10:01:35 -02:00
Roberto Ierusalimschy
63633c5b5f better name for `lua_movethread' 2002-11-07 13:39:23 -02:00
Roberto Ierusalimschy
118347d8c3 new API for coroutines 2002-11-06 17:08:00 -02:00
Roberto Ierusalimschy
7e0f880bc5 C++ demands cast from void to specific types 2002-10-25 18:36:54 -03:00
Roberto Ierusalimschy
118e9cd843 new facility for dumping chunks 2002-10-25 18:31:28 -03:00
Roberto Ierusalimschy
96e15b8501 threads now are real Lua objects, subject to garbage collection 2002-10-25 17:05:28 -03:00
Roberto Ierusalimschy
92a2ef9dca field `__globals' protect global tables 2002-10-22 16:41:08 -03:00
Roberto Ierusalimschy
32a5d96dfc `setmetatable' cannot change protected objects 2002-09-16 16:49:45 -03:00
Roberto Ierusalimschy
1bdde38bd2 no more newlines at the end of error messages 2002-09-05 16:45:42 -03:00
Roberto Ierusalimschy
9998082839 external messages add their own extra information 2002-08-08 17:08:41 -03:00
Roberto Ierusalimschy
4664f2e927 any Lua closure has a table of globals (not only active functions) 2002-08-06 15:54:18 -03:00
Roberto Ierusalimschy
2e38c6ae5a luadebug.h' content now is included in lua.h' 2002-08-06 15:01:50 -03:00
Roberto Ierusalimschy
634344d61f new API for weak mode 2002-08-06 14:06:56 -03:00
Roberto Ierusalimschy
a2fa48a570 new (old?) error handling scheme 2002-08-06 12:32:22 -03:00
Roberto Ierusalimschy
2dcc31574f new function xpcall 2002-08-05 11:46:02 -03:00
Roberto Ierusalimschy
79c8edb6c4 new names for light userdata operations 2002-07-17 13:25:13 -03:00
Roberto Ierusalimschy
1ede98157d strings are always `strong' in weaktables 2002-07-04 14:58:02 -03:00
Roberto Ierusalimschy
aa3da1605c `newproxy' uses its own weaktable 2002-07-01 16:23:58 -03:00
Roberto Ierusalimschy
5fabed21a1 getglobals(0) is the C global table 2002-06-26 17:36:17 -03:00
Roberto Ierusalimschy
f67ccfbdeb no more `lua_getn' function 2002-06-26 16:28:44 -03:00
Roberto Ierusalimschy
88607acc2c details 2002-06-26 13:37:23 -03:00
Roberto Ierusalimschy
25dc9b7faf new functions dofile' and pairs'; correct way to check proxies 2002-06-25 16:19:33 -03:00
Roberto Ierusalimschy
1a4c428d6d new function `newproxy' 2002-06-24 14:23:16 -03:00
Roberto Ierusalimschy
3941af53ad first implementation of independent global table per function 2002-06-20 17:41:46 -03:00
Roberto Ierusalimschy
1dbe708aa8 new protocol for error handling 2002-06-18 12:19:27 -03:00
Roberto Ierusalimschy
eb3de8768a rawcall' -> upcall' (unprotected call) 2002-06-13 10:44:50 -03:00
Roberto Ierusalimschy
864c96f36c new fallback for equality `__eq' 2002-06-13 10:39:55 -03:00
Roberto Ierusalimschy
f1c43bbe19 new function `xpcall' (at least for now...) 2002-06-06 09:39:48 -03:00
Roberto Ierusalimschy
5b8ee9fa8d new names for standard libraries 2002-06-05 14:24:04 -03:00
Roberto Ierusalimschy
6dd0b6c62b details 2002-06-05 13:59:21 -03:00
Roberto Ierusalimschy
ad7103ea3a lua_load* defined in auxlib (and so renamed to luaL_load*) 2002-06-03 17:11:41 -03:00
Roberto Ierusalimschy
f53fd8d5f5 _ALERT is a private afair of lua.c 2002-05-16 16:09:19 -03:00
Roberto Ierusalimschy
955def0348 new names for string formating functions 2002-05-16 15:39:46 -03:00
Roberto Ierusalimschy
8da6fe62d8 `nexti' returns correct indices 2002-05-13 10:10:58 -03:00
Roberto Ierusalimschy
71144e3ff0 errors `return' int, to avoid warnings
+ home-made `sprintf' (first version)
2002-05-06 16:05:10 -03:00
Roberto Ierusalimschy
85dcb411a8 all textual errors go through `luaL_verror' 2002-05-02 14:12:27 -03:00
Roberto Ierusalimschy
751cd867d3 new way to handle errors 2002-05-01 17:48:12 -03:00
Roberto Ierusalimschy
f388ee4a82 new way to handle errors 2002-04-22 11:40:23 -03:00
Roberto Ierusalimschy
391c5459cb new implementation for `require' (with templates) 2002-04-15 17:54:41 -03:00
Roberto Ierusalimschy
ae5283dc36 co' library goes with basic library (and not with tab') 2002-04-12 16:57:29 -03:00
Roberto Ierusalimschy
8e1e618606 baselib' splited in baselib' and `tablib' 2002-04-09 17:19:06 -03:00
Roberto Ierusalimschy
d2e05589d7 bug: `resume' was returning its arguments, too 2002-04-09 16:46:56 -03:00
Roberto Ierusalimschy
237969724f support for light' userdata + simpler support for boxed' udata 2002-04-05 15:54:31 -03:00
Roberto Ierusalimschy
2cbbf7e95a tostring' uses __tostring' when available 2002-04-02 17:42:20 -03:00
Roberto Ierusalimschy
d1f220217b when possible, library functions accept nil as none 2002-03-27 12:30:41 -03:00
Roberto Ierusalimschy
405e3a4597 metatable always return some value 2002-03-27 09:49:53 -03:00
Roberto Ierusalimschy
88c9bf99de standard libraries in packages 2002-03-20 09:54:08 -03:00
Roberto Ierusalimschy
b0a5e156b8 no more maximum stack size 2002-02-14 19:47:29 -02:00
Roberto Ierusalimschy
87b0e3d477 no more `lua_istrue' function 2002-02-08 20:39:36 -02:00
Roberto Ierusalimschy
86a4de256e no more lua_[gs]etstr 2002-02-07 15:25:36 -02:00
Roberto Ierusalimschy
d070506a25 new function luaL_errstr 2002-02-05 20:36:52 -02:00
Roberto Ierusalimschy
d6fd33e76f eventtable' renamed to metatable' 2002-01-30 15:26:44 -02:00
Roberto Ierusalimschy
a048cc9676 nil is a `valid' eventtable 2002-01-25 19:55:41 -02:00
Roberto Ierusalimschy
6272c843de yield' passes its arguments to resume' 2002-01-11 18:27:41 -02:00
Roberto Ierusalimschy
f083812c02 first implementation of coroutines 2002-01-09 20:02:47 -02:00
Roberto Ierusalimschy
9d2e454d6f BUG: seg. fault when rawget/rawset get extra arguments 2001-12-21 15:30:31 -02:00
Roberto Ierusalimschy
09e15692f3 rename of lua_isnull to lua_isnone 2001-12-20 19:27:12 -02:00
Roberto Ierusalimschy
9aff171f3b new type `boolean' 2001-12-11 20:48:44 -02:00
Roberto Ierusalimschy
9cd36059ad new API functions lua_getstr/lua_setstr 2001-12-10 20:09:51 -02:00
Roberto Ierusalimschy
592a309177 tag system replaced by event tables 2001-12-05 18:15:18 -02:00