summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--doc/manual.html46
-rw-r--r--etc/lua.pc6
-rw-r--r--src/lapi.c4
-rw-r--r--src/lbaselib.c4
-rw-r--r--src/lua.c4
-rw-r--r--src/lua.h5
-rw-r--r--src/luac.c4
8 files changed, 47 insertions, 37 deletions
diff --git a/Makefile b/Makefile
index 6a586e5b..b3678b10 100644
--- a/Makefile
+++ b/Makefile
@@ -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>&acute; exp `<b>]</b>&acute;
</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">&sect;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>&acute; 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>&acute; 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">&sect;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>
diff --git a/etc/lua.pc b/etc/lua.pc
index 5fd2b1ed..21a16bad 100644
--- a/etc/lua.pc
+++ b/etc/lua.pc
@@ -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)
diff --git a/src/lapi.c b/src/lapi.c
index ce7bcf6f..68e86f2e 100644
--- a/src/lapi.c
+++ b/src/lapi.c
@@ -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);
diff --git a/src/lua.c b/src/lua.c
index 991a74b8..5cee7fa9 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -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);
}
diff --git a/src/lua.h b/src/lua.h
index b2162d5e..064ff6fb 100644
--- a/src/lua.h
+++ b/src/lua.h
@@ -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"
diff --git a/src/luac.c b/src/luac.c
index 03f3bc75..d0701739 100644
--- a/src/luac.c
+++ b/src/luac.c
@@ -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;