details (typos in comments)

This commit is contained in:
Roberto Ierusalimschy 2015-11-19 17:16:22 -02:00
parent 2e8f8a18e4
commit d103312661
10 changed files with 22 additions and 22 deletions

View File

@ -1,5 +1,5 @@
/* /*
** $Id: lauxlib.c,v 1.282 2015/10/02 15:46:49 roberto Exp roberto $ ** $Id: lauxlib.c,v 1.283 2015/10/06 16:10:22 roberto Exp roberto $
** Auxiliary functions for building Lua libraries ** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -471,7 +471,7 @@ static void *newbox (lua_State *L, size_t newsize) {
box->bsize = 0; box->bsize = 0;
if (luaL_newmetatable(L, "LUABOX")) { /* creating metatable? */ if (luaL_newmetatable(L, "LUABOX")) { /* creating metatable? */
lua_pushcfunction(L, boxgc); lua_pushcfunction(L, boxgc);
lua_setfield(L, -2, "__gc"); /* metatalbe.__gc = boxgc */ lua_setfield(L, -2, "__gc"); /* metatable.__gc = boxgc */
} }
lua_setmetatable(L, -2); lua_setmetatable(L, -2);
return resizebox(L, -1, newsize); return resizebox(L, -1, newsize);
@ -653,7 +653,7 @@ static int errfile (lua_State *L, const char *what, int fnameindex) {
static int skipBOM (LoadF *lf) { static int skipBOM (LoadF *lf) {
const char *p = "\xEF\xBB\xBF"; /* Utf8 BOM mark */ const char *p = "\xEF\xBB\xBF"; /* UTF-8 BOM mark */
int c; int c;
lf->n = 0; lf->n = 0;
do { do {

View File

@ -1,5 +1,5 @@
/* /*
** $Id: lcode.c,v 2.101 2015/04/29 18:24:11 roberto Exp roberto $ ** $Id: lcode.c,v 2.102 2015/10/26 14:27:47 roberto Exp roberto $
** Code generator for Lua ** Code generator for Lua
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -816,7 +816,7 @@ static void codeexpval (FuncState *fs, OpCode op,
freeexp(fs, e1); freeexp(fs, e1);
} }
e1->u.info = luaK_codeABC(fs, op, 0, o1, o2); /* generate opcode */ e1->u.info = luaK_codeABC(fs, op, 0, o1, o2); /* generate opcode */
e1->k = VRELOCABLE; /* all those operations are relocable */ e1->k = VRELOCABLE; /* all those operations are relocatable */
luaK_fixline(fs, line); luaK_fixline(fs, line);
} }
} }

View File

@ -1,5 +1,5 @@
/* /*
** $Id: ldblib.c,v 1.148 2015/01/02 12:52:22 roberto Exp roberto $ ** $Id: ldblib.c,v 1.149 2015/02/19 17:06:21 roberto Exp roberto $
** Interface from Lua to its debug API ** Interface from Lua to its debug API
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -29,7 +29,7 @@ static const int HOOKKEY = 0;
/* /*
** If L1 != L, L1 can be in any state, and therefore there is no ** If L1 != L, L1 can be in any state, and therefore there is no
** garanties about its stack space; any push in L1 must be ** garantees about its stack space; any push in L1 must be
** checked. ** checked.
*/ */
static void checkstack (lua_State *L, lua_State *L1, int n) { static void checkstack (lua_State *L, lua_State *L1, int n) {

6
ldo.c
View File

@ -1,5 +1,5 @@
/* /*
** $Id: ldo.c,v 2.148 2015/11/02 18:48:49 roberto Exp roberto $ ** $Id: ldo.c,v 2.149 2015/11/13 13:24:26 roberto Exp roberto $
** Stack and Call structure of Lua ** Stack and Call structure of Lua
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -409,7 +409,7 @@ static int moveresults (lua_State *L, const TValue *firstResult, StkId res,
case 0: break; /* nothing to move */ case 0: break; /* nothing to move */
case 1: { /* one result needed */ case 1: { /* one result needed */
if (nres == 0) /* no results? */ if (nres == 0) /* no results? */
firstResult = luaO_nilobject; /* ajdust with nil */ firstResult = luaO_nilobject; /* adjust with nil */
setobjs2s(L, res, firstResult); /* move it to proper place */ setobjs2s(L, res, firstResult); /* move it to proper place */
break; break;
} }
@ -442,7 +442,7 @@ static int moveresults (lua_State *L, const TValue *firstResult, StkId res,
/* /*
** Finishes a function call: calls hook if necessary, removes CallInfo, ** Finishes a function call: calls hook if necessary, removes CallInfo,
** moves corrent number of results to proper place; returns 0 iff call ** moves current number of results to proper place; returns 0 iff call
** wanted multiple (variable number of) results. ** wanted multiple (variable number of) results.
*/ */
int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres) { int luaD_poscall (lua_State *L, CallInfo *ci, StkId firstResult, int nres) {

4
ldo.h
View File

@ -1,5 +1,5 @@
/* /*
** $Id: ldo.h,v 2.25 2015/11/02 18:48:07 roberto Exp roberto $ ** $Id: ldo.h,v 2.26 2015/11/13 13:24:26 roberto Exp roberto $
** Stack and Call structure of Lua ** Stack and Call structure of Lua
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -16,7 +16,7 @@
/* /*
** Macro to check stack size and grow stack if needed. Parameters ** Macro to check stack size and grow stack if needed. Parameters
** 'pre'/'pos' allow the macro to preserve a pointer into the ** 'pre'/'pos' allow the macro to preserve a pointer into the
** stack across realalocations, doing the work only when needed. ** stack across realocations, doing the work only when needed.
** 'condmovestack' is used in heavy tests to force a stack reallocation ** 'condmovestack' is used in heavy tests to force a stack reallocation
** at every check. ** at every check.
*/ */

4
llex.c
View File

@ -1,5 +1,5 @@
/* /*
** $Id: llex.c,v 2.93 2015/05/22 17:45:56 roberto Exp roberto $ ** $Id: llex.c,v 2.94 2015/10/28 18:51:47 roberto Exp roberto $
** Lexical Analyzer ** Lexical Analyzer
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -275,7 +275,7 @@ static int read_numeral (LexState *ls, SemInfo *seminfo) {
/* /*
** skip a sequence '[=*[' or ']=*]'; if sequence is wellformed, return ** skip a sequence '[=*[' or ']=*]'; if sequence is well formed, return
** its number of '='s; otherwise, return a negative number (-1 iff there ** its number of '='s; otherwise, return a negative number (-1 iff there
** are no '='s after initial bracket) ** are no '='s after initial bracket)
*/ */

View File

@ -1,5 +1,5 @@
/* /*
** $Id: llimits.h,v 1.139 2015/10/06 14:29:49 roberto Exp roberto $ ** $Id: llimits.h,v 1.140 2015/10/21 18:40:47 roberto Exp roberto $
** Limits, basic types, and some other 'installation-dependent' definitions ** Limits, basic types, and some other 'installation-dependent' definitions
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -207,7 +207,7 @@ typedef unsigned long Instruction;
/* /*
** macros that are executed whenether program enters the Lua core ** macros that are executed whenever program enters the Lua core
** ('lua_lock') and leaves the core ('lua_unlock') ** ('lua_lock') and leaves the core ('lua_unlock')
*/ */
#if !defined(lua_lock) #if !defined(lua_lock)

View File

@ -1,5 +1,5 @@
/* /*
** $Id: loslib.c,v 1.58 2015/07/04 16:35:14 roberto Exp roberto $ ** $Id: loslib.c,v 1.59 2015/07/06 15:16:51 roberto Exp roberto $
** Standard Operating System library ** Standard Operating System library
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -215,7 +215,7 @@ static int getfield (lua_State *L, const char *key, int d, int delta) {
if (!isnum) { /* field is not a number? */ if (!isnum) { /* field is not a number? */
if (t != LUA_TNIL) /* some other value? */ if (t != LUA_TNIL) /* some other value? */
return luaL_error(L, "field '%s' not an integer", key); return luaL_error(L, "field '%s' not an integer", key);
else if (d < 0) /* abssent field; no default? */ else if (d < 0) /* absent field; no default? */
return luaL_error(L, "field '%s' missing in date table", key); return luaL_error(L, "field '%s' missing in date table", key);
res = d; res = d;
} }

View File

@ -1,5 +1,5 @@
/* /*
** $Id: ltable.c,v 2.115 2015/11/03 18:10:44 roberto Exp roberto $ ** $Id: ltable.c,v 2.116 2015/11/03 18:35:21 roberto Exp roberto $
** Lua tables (hash) ** Lua tables (hash)
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -85,7 +85,7 @@ static const Node dummynode_ = {
/* /*
** Hash for floating-point numbers. ** Hash for floating-point numbers.
** The main computation should be just ** The main computation should be just
** n = frepx(n, &i); return (n * INT_MAX) + i ** n = frexp(n, &i); return (n * INT_MAX) + i
** but there are some numerical subtleties. ** but there are some numerical subtleties.
** In a two-complement representation, INT_MAX does not has an exact ** In a two-complement representation, INT_MAX does not has an exact
** representation as a float, but INT_MIN does; because the absolute ** representation as a float, but INT_MIN does; because the absolute

4
lvm.c
View File

@ -1,5 +1,5 @@
/* /*
** $Id: lvm.c,v 2.262 2015/11/13 13:24:26 roberto Exp roberto $ ** $Id: lvm.c,v 2.263 2015/11/17 16:00:28 roberto Exp roberto $
** Lua virtual machine ** Lua virtual machine
** See Copyright Notice in lua.h ** See Copyright Notice in lua.h
*/ */
@ -1051,7 +1051,7 @@ void luaV_execute (lua_State *L) {
StkId rb; StkId rb;
L->top = base + c + 1; /* mark the end of concat operands */ L->top = base + c + 1; /* mark the end of concat operands */
Protect(luaV_concat(L, c - b + 1)); Protect(luaV_concat(L, c - b + 1));
ra = RA(i); /* 'luav_concat' may invoke TMs and move the stack */ ra = RA(i); /* 'luaV_concat' may invoke TMs and move the stack */
rb = base + b; rb = base + b;
setobjs2s(L, ra, rb); setobjs2s(L, ra, rb);
checkGC(L, (ra >= rb ? ra + 1 : rb)); checkGC(L, (ra >= rb ? ra + 1 : rb));