From da4811238ab48446545621389cb07051982a8279 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 21 Mar 2014 10:52:33 -0300 Subject: details (typos in comments) --- lcode.c | 4 ++-- ldo.c | 4 ++-- lgc.c | 4 ++-- lobject.c | 4 ++-- lstrlib.c | 16 ++++++++-------- ltablib.c | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lcode.c b/lcode.c index e6b2d98b..e2ffda4e 100644 --- a/lcode.c +++ b/lcode.c @@ -1,5 +1,5 @@ /* -** $Id: lcode.c,v 2.83 2014/03/07 16:19:00 roberto Exp roberto $ +** $Id: lcode.c,v 2.84 2014/03/09 19:21:34 roberto Exp roberto $ ** Code generator for Lua ** See Copyright Notice in lua.h */ @@ -308,7 +308,7 @@ static void freeexp (FuncState *fs, expdesc *e) { /* -** Use scanner's table to cache position of constants in contant list +** Use scanner's table to cache position of constants in constant list ** and try to reuse constants */ static int addk (FuncState *fs, TValue *key, TValue *v) { diff --git a/ldo.c b/ldo.c index 22d1f0b3..267c8237 100644 --- a/ldo.c +++ b/ldo.c @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 2.113 2014/02/15 13:12:01 roberto Exp roberto $ +** $Id: ldo.c,v 2.114 2014/02/26 15:27:56 roberto Exp roberto $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -58,7 +58,7 @@ #elif defined(LUA_USE_POSIX) /* }{ */ -/* in Posix, try _longjmp/_setjmp (more efficient) */ +/* in POSIX, try _longjmp/_setjmp (more efficient) */ #define LUAI_THROW(L,c) _longjmp((c)->b, 1) #define LUAI_TRY(L,c,a) if (_setjmp((c)->b) == 0) { a } #define luai_jmpbuf jmp_buf diff --git a/lgc.c b/lgc.c index 93e22f0f..537c38fe 100644 --- a/lgc.c +++ b/lgc.c @@ -1,5 +1,5 @@ /* -** $Id: lgc.c,v 2.177 2014/02/18 13:46:26 roberto Exp roberto $ +** $Id: lgc.c,v 2.178 2014/02/19 13:51:09 roberto Exp roberto $ ** Garbage Collector ** See Copyright Notice in lua.h */ @@ -169,7 +169,7 @@ void luaC_barrierback_ (lua_State *L, GCObject *o) { /* ** barrier for assignments to closed upvalues. Because upvalues are ** shared among closures, it is impossible to know the color of all -** closured pointing to it. So, we assume that the object being assigned +** closures pointing to it. So, we assume that the object being assigned ** must be marked. */ LUAI_FUNC void luaC_upvalbarrier_ (lua_State *L, UpVal *uv) { diff --git a/lobject.c b/lobject.c index e80c8db7..02320e36 100644 --- a/lobject.c +++ b/lobject.c @@ -1,5 +1,5 @@ /* -** $Id: lobject.c,v 2.74 2014/02/26 15:27:56 roberto Exp roberto $ +** $Id: lobject.c,v 2.75 2014/03/06 16:15:18 roberto Exp roberto $ ** Some generic functions over Lua objects ** See Copyright Notice in lua.h */ @@ -140,7 +140,7 @@ void luaO_arith (lua_State *L, int op, const TValue *p1, const TValue *p2, else break; /* go to the end */ } } - /* could not perform raw operation; try metmethod */ + /* could not perform raw operation; try metamethod */ lua_assert(L != NULL); /* should not fail when folding (compile time) */ luaT_trybinTM(L, p1, p2, res, cast(TMS, op - LUA_OPADD + TM_ADD)); } diff --git a/lstrlib.c b/lstrlib.c index 46b06568..98cd20f7 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.186 2014/02/25 14:30:21 roberto Exp roberto $ +** $Id: lstrlib.c,v 1.187 2014/03/12 18:09:06 roberto Exp roberto $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -1005,7 +1005,7 @@ static int packint (char *buff, lua_Integer n, int littleendian, int size) { } buff[i] = (n & MC); /* last byte */ /* test for overflow: OK if there are only zeros left in higher bytes, - or if there are only oneÅ› left and packed number is negative (signal + or if there are only ones left and packed number is negative (signal bit, the higher bit in last byte, is one) */ return ((n & ~MC) == 0 || (n | SM) == ~(lua_Integer)0); } @@ -1027,7 +1027,7 @@ static int packint_l (lua_State *L) { /* mask to check higher-order byte in a Lua integer */ #define HIGHERBYTE (MC << (NB * (SZINT - 1))) -/* mask to check higher-order byte + signal bit of next byte */ +/* mask to check higher-order byte + signal bit of next (lower) byte */ #define HIGHERBYTE1 (HIGHERBYTE | (HIGHERBYTE >> 1)) static int unpackint (const char *buff, lua_Integer *res, @@ -1037,12 +1037,12 @@ static int unpackint (const char *buff, lua_Integer *res, for (i = 0; i < size; i++) { if (i >= SZINT) { /* will throw away a byte? */ /* check for overflow: it is OK to throw away leading zeros for a - positive number; leading ones for a negative number; and one - last leading zero to allow unsigned integers with a 1 in + positive number, leading ones for a negative number, and a + leading zero byte to allow unsigned integers with a 1 in its "signal bit" */ - if (!((n & HIGHERBYTE1) == 0 || /* zeros for pos. number */ - (n & HIGHERBYTE1) == HIGHERBYTE1 || /* ones for neg. number */ - ((n & HIGHERBYTE) == 0 && i == size - 1))) /* last zero */ + if (!((n & HIGHERBYTE1) == 0 || /* zeros for positive number */ + (n & HIGHERBYTE1) == HIGHERBYTE1 || /* ones for negative number */ + ((n & HIGHERBYTE) == 0 && i == size - 1))) /* leading zero */ return 0; /* overflow */ } n <<= NB; diff --git a/ltablib.c b/ltablib.c index 50c506e3..09fe8491 100644 --- a/ltablib.c +++ b/ltablib.c @@ -1,5 +1,5 @@ /* -** $Id: ltablib.c,v 1.64 2013/02/06 18:29:03 roberto Exp roberto $ +** $Id: ltablib.c,v 1.65 2013/03/07 18:17:24 roberto Exp roberto $ ** Library for Table Manipulation ** See Copyright Notice in lua.h */ @@ -140,7 +140,7 @@ static int unpack (lua_State *L) { e = luaL_opt(L, luaL_checkint, 3, luaL_len(L, 1)); if (i > e) return 0; /* empty range */ n = e - i + 1; /* number of elements */ - if (n <= 0 || !lua_checkstack(L, n)) /* n <= 0 means arith. overflow */ + if (n <= 0 || !lua_checkstack(L, n)) /* n <= 0 means arithmetic overflow */ return luaL_error(L, "too many results to unpack"); lua_rawgeti(L, 1, i); /* push arg[i] (avoiding overflow problems) */ while (i++ < e) /* push arg[i + 1...e] */ -- cgit v1.2.3-55-g6feb