diff options
author | Lua Team <team@lua.org> | 2006-06-02 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2006-06-02 12:00:00 +0000 |
commit | 2ccf5a6aa54605d1b4f6a4a6e3b83625780e2cb3 (patch) | |
tree | c9a428ef8d253d5c5095cc7b7712c138d2cdd4ae | |
parent | 60e37e0252c2758c935c8f382ace44b5100f6f21 (diff) | |
download | lua-github-2ccf5a6aa54605d1b4f6a4a6e3b83625780e2cb3.tar.gz |
Lua 5.1.1-rc25.1.1-rc2
-rw-r--r-- | Makefile | 11 | ||||
-rw-r--r-- | doc/manual.html | 46 | ||||
-rw-r--r-- | etc/lua.pc | 6 | ||||
-rw-r--r-- | src/lapi.c | 4 | ||||
-rw-r--r-- | src/lbaselib.c | 4 | ||||
-rw-r--r-- | src/lua.c | 4 | ||||
-rw-r--r-- | src/lua.h | 5 | ||||
-rw-r--r-- | src/luac.c | 4 |
8 files changed, 47 insertions, 37 deletions
@@ -45,8 +45,9 @@ TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp TO_LIB= liblua.a TO_MAN= lua.1 luac.1 -# Lua version. +# Lua version and release. V= 5.1 +R= 5.1.1 all: $(PLAT) @@ -80,11 +81,11 @@ dummy: # echo config parameters echo: @echo "" - @echo "These are the parameters currently set in src/Makefile to build Lua $V:" + @echo "These are the parameters currently set in src/Makefile to build Lua $R:" @echo "" @cd src && $(MAKE) -s echo @echo "" - @echo "These are the parameters currently set in Makefile to install Lua $V:" + @echo "These are the parameters currently set in Makefile to install Lua $R:" @echo "" @echo "PLAT = $(PLAT)" @echo "INSTALL_TOP = $(INSTALL_TOP)" @@ -103,6 +104,7 @@ echo: # echo private config parameters pecho: @echo "V = $(V)" + @echo "R = $(R)" @echo "TO_BIN = $(TO_BIN)" @echo "TO_INC = $(TO_INC)" @echo "TO_LIB = $(TO_LIB)" @@ -111,8 +113,9 @@ pecho: # echo config parameters as Lua code # uncomment the last sed expression if you want nil instead of empty strings lecho: - @echo "-- installation parameters for Lua $V" + @echo "-- installation parameters for Lua $R" @echo "VERSION = '$V'" + @echo "RELEASE = '$R'" @$(MAKE) echo | grep = | sed -e 's/= /= "/' -e 's/$$/"/' #-e 's/""/nil/' @echo "-- EOF" diff --git a/doc/manual.html b/doc/manual.html index b220222f..f2de7131 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -407,22 +407,6 @@ Square brackets are used to index a table: <pre> var ::= prefixexp `<b>[</b>´ exp `<b>]</b>´ </pre><p> -The first expression (<em>prefixexp</em>) should result in a table value; -the second expression (<em>exp</em>) -identifies a specific entry in this table. -The expression denoting the table to be indexed has a restricted syntax; -see <a href="#2.5">§2.5</a> for details. - - -<p> -The syntax <code>var.Name</code> is just syntactic sugar for -<code>var["Name"]</code> and is used to denote table fields: - -<pre> - var ::= prefixexp `<b>.</b>´ Name -</pre> - -<p> The meaning of accesses to global variables and table fields can be changed via metatables. An access to an indexed variable <code>t[i]</code> is equivalent to @@ -434,6 +418,14 @@ We use it here only for explanatory purposes.) <p> +The syntax <code>var.Name</code> is just syntactic sugar for +<code>var["Name"]</code>: + +<pre> + var ::= prefixexp `<b>.</b>´ Name +</pre> + +<p> All global variables live as fields in ordinary Lua tables, called <em>environment tables</em> or simply <em>environments</em> (see <a href="#2.9">§2.9</a>). @@ -1625,7 +1617,7 @@ then Lua tries the second operand. return metatable(op1)[event] or metatable(op2)[event] end </pre><p> -By ysing this function, +By using this function, the behavior of the <code>op1 + op2</code> is <pre> @@ -2299,8 +2291,8 @@ to grow the stack size. <p> -Whenever Lua calls C, <a name="pdf-LUA_MINSTACK"><code>LUA_MINSTACK</code></a> -it ensures that at least <code>LUA_MINSTACK</code> stack positions are available. +Whenever Lua calls C, +it ensures that at least <a name="pdf-LUA_MINSTACK"><code>LUA_MINSTACK</code></a> stack positions are available. <code>LUA_MINSTACK</code> is defined as 20, so that usually you do not have to worry about stack space unless your code has loops pushing elements onto the stack. @@ -5777,6 +5769,10 @@ without invoking any metamethod. and <code>value</code> any Lua value. +<p> +This function returns <code>table</code>. + + <p> @@ -7909,12 +7905,17 @@ then <code>getinfo</code> returns <b>nil</b>. <p> -The returned table contains all the fields returned by <a href="#lua_getinfo"><code>lua_getinfo</code></a>, +The returned table my contain all the fields returned by <a href="#lua_getinfo"><code>lua_getinfo</code></a>, with the string <code>what</code> describing which fields to fill in. -The default for <code>what</code> is to get all information available. +The default for <code>what</code> is to get all information available, +except the table of valid lines. If present, the option '<code>f</code>' adds a field named <code>func</code> with the function itself. +If present, +the option '<code>L</code>' +adds a field named <code>activelines</code> with the table of +valid lines. <p> @@ -7988,6 +7989,7 @@ The function returns <b>nil</b> if there is no upvalue with the given index. <p> Sets the environment of the given <code>object</code> to the given <code>table</code>. +Returns <code>object</code>. @@ -8446,7 +8448,7 @@ can only appear as the <em>last</em> statement of a block. <HR> <SMALL> Last update: -Wed May 31 21:31:40 BRT 2006 +Fri Jun 2 14:33:44 BRT 2006 </SMALL> </body></html> @@ -4,6 +4,8 @@ # grep '^V=' ../Makefile V= 5.1 +# grep '^R=' ../Makefile +R= 5.1.1 # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' prefix= /usr/local @@ -14,14 +16,16 @@ INSTALL_MAN= ${prefix}/man/man1 INSTALL_LMOD= ${prefix}/share/lua/${V} INSTALL_CMOD= ${prefix}/lib/lua/${V} +# canonical vars exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: Lua Description: An Extensible Extension Language -Version: ${V} +Version: ${R} Requires: Libs: -L${libdir} -llua -lm Cflags: -I${includedir} +# (end of lua.pc) @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.53 2006/01/10 12:50:00 roberto Exp $ +** $Id: lapi.c,v 2.54 2006/06/02 15:34:00 roberto Exp $ ** Lua API ** See Copyright Notice in lua.h */ @@ -32,7 +32,7 @@ const char lua_ident[] = - "$Lua: " LUA_VERSION " " LUA_COPYRIGHT " $\n" + "$Lua: " LUA_RELEASE " " LUA_COPYRIGHT " $\n" "$Authors: " LUA_AUTHORS " $\n" "$URL: www.lua.org $\n"; diff --git a/src/lbaselib.c b/src/lbaselib.c index 778e393a..2df437b0 100644 --- a/src/lbaselib.c +++ b/src/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.190 2006/05/31 16:50:40 roberto Exp $ +** $Id: lbaselib.c,v 1.191 2006/06/02 15:34:00 roberto Exp $ ** Basic library ** See Copyright Notice in lua.h */ @@ -619,7 +619,7 @@ static void base_open (lua_State *L) { lua_setglobal(L, "_G"); /* open lib into global table */ luaL_register(L, "_G", base_funcs); - lua_pushlstring(L, LUA_VERSION, 7); + lua_pushliteral(L, LUA_VERSION); lua_setglobal(L, "_VERSION"); /* set global _VERSION */ /* `ipairs' and `pairs' need auxliliary functions as upvalues */ auxopen(L, "ipairs", luaB_ipairs, ipairsaux); @@ -1,5 +1,5 @@ /* -** $Id: lua.c,v 1.159 2006/05/24 14:16:39 roberto Exp $ +** $Id: lua.c,v 1.160 2006/06/02 15:34:00 roberto Exp $ ** Lua stand-alone interpreter ** See Copyright Notice in lua.h */ @@ -107,7 +107,7 @@ static int docall (lua_State *L, int narg, int clear) { static void print_version (void) { - l_message(NULL, LUA_VERSION " " LUA_COPYRIGHT); + l_message(NULL, LUA_RELEASE " " LUA_COPYRIGHT); } @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.217 2006/05/31 16:50:40 roberto Exp $ +** $Id: lua.h,v 1.218 2006/06/02 15:34:00 roberto Exp $ ** Lua - An Extensible Extension Language ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) ** See Copyright Notice at the end of this file @@ -16,7 +16,8 @@ #include "luaconf.h" -#define LUA_VERSION "Lua 5.1.1" +#define LUA_VERSION "Lua 5.1" +#define LUA_RELEASE "Lua 5.1.1" #define LUA_VERSION_NUM 501 #define LUA_COPYRIGHT "Copyright (C) 1994-2006 Lua.org, PUC-Rio" #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" @@ -1,5 +1,5 @@ /* -** $Id: luac.c,v 1.53 2006/05/31 13:30:05 lhf Exp $ +** $Id: luac.c,v 1.54 2006/06/02 17:37:11 lhf Exp $ ** Lua compiler (saves bytecodes to files; also list bytecodes) ** See Copyright Notice in lua.h */ @@ -108,7 +108,7 @@ static int doargs(int argc, char* argv[]) } if (version) { - printf("%s %s\n",LUA_VERSION,LUA_COPYRIGHT); + printf("%s %s\n",LUA_RELEASE,LUA_COPYRIGHT); if (version==argc-1) exit(EXIT_SUCCESS); } return i; |