mirror of
https://github.com/lua/lua
synced 2025-04-12 16:02:52 +03:00
detail (typo in comments)
This commit is contained in:
parent
73abfde2ef
commit
599f1742c6
4
lapi.c
4
lapi.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lapi.c,v 2.273 2017/11/02 11:28:56 roberto Exp $
|
** $Id: lapi.c,v 2.276 2017/11/07 13:25:26 roberto Exp roberto $
|
||||||
** Lua API
|
** Lua API
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -205,7 +205,7 @@ LUA_API void lua_settop (lua_State *L, int idx) {
|
|||||||
** Reverse the stack segment from 'from' to 'to'
|
** Reverse the stack segment from 'from' to 'to'
|
||||||
** (auxiliary to 'lua_rotate')
|
** (auxiliary to 'lua_rotate')
|
||||||
** Note that we move(copy) only the value inside the stack.
|
** Note that we move(copy) only the value inside the stack.
|
||||||
** (We do not move addicional fields that may exist.)
|
** (We do not move additional fields that may exist.)
|
||||||
*/
|
*/
|
||||||
static void reverse (lua_State *L, StkId from, StkId to) {
|
static void reverse (lua_State *L, StkId from, StkId to) {
|
||||||
for (; from < to; from++, to--) {
|
for (; from < to; from++, to--) {
|
||||||
|
4
lcode.c
4
lcode.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lcode.c,v 2.134 2017/11/22 18:41:20 roberto Exp roberto $
|
** $Id: lcode.c,v 2.135 2017/11/22 19:15:44 roberto Exp roberto $
|
||||||
** Code generator for Lua
|
** Code generator for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -1331,7 +1331,7 @@ static void codeeq (FuncState *fs, BinOpr opr, expdesc *e1, expdesc *e2) {
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Aplly prefix operation 'op' to expression 'e'.
|
** Apply prefix operation 'op' to expression 'e'.
|
||||||
*/
|
*/
|
||||||
void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e, int line) {
|
void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e, int line) {
|
||||||
static const expdesc ef = {VKINT, {0}, NO_JUMP, NO_JUMP};
|
static const expdesc ef = {VKINT, {0}, NO_JUMP, NO_JUMP};
|
||||||
|
4
ldebug.c
4
ldebug.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ldebug.c,v 2.144 2017/11/13 15:36:52 roberto Exp roberto $
|
** $Id: ldebug.c,v 2.145 2017/11/23 16:35:54 roberto Exp roberto $
|
||||||
** Debug Interface
|
** Debug Interface
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -51,7 +51,7 @@ static int currentpc (CallInfo *ci) {
|
|||||||
/*
|
/*
|
||||||
** Get a "base line" to find the line corresponding to an instruction.
|
** Get a "base line" to find the line corresponding to an instruction.
|
||||||
** For that, search the array of absolute line info for the largest saved
|
** For that, search the array of absolute line info for the largest saved
|
||||||
** instruction smaller or equal to the wanted instrution. A special
|
** instruction smaller or equal to the wanted instruction. A special
|
||||||
** case is when there is no absolute info or the instruction is before
|
** case is when there is no absolute info or the instruction is before
|
||||||
** the first absolute one.
|
** the first absolute one.
|
||||||
*/
|
*/
|
||||||
|
6
lgc.c
6
lgc.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lgc.c,v 2.236 2017/10/31 15:29:28 roberto Exp $
|
** $Id: lgc.c,v 2.238 2017/11/07 13:25:26 roberto Exp roberto $
|
||||||
** Garbage Collector
|
** Garbage Collector
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -507,7 +507,7 @@ static lu_mem traversetable (global_State *g, Table *h) {
|
|||||||
** mode, check the generational invariant. If the cache is old,
|
** mode, check the generational invariant. If the cache is old,
|
||||||
** everything is ok. If the prototype is 'old0', everything
|
** everything is ok. If the prototype is 'old0', everything
|
||||||
** is ok too. (It will naturally be visited again.) If the
|
** is ok too. (It will naturally be visited again.) If the
|
||||||
** prototype is older than 'old0', then its cache (whith is new)
|
** prototype is older than 'old0', then its cache (which is new)
|
||||||
** must be visited again in the next collection, so the prototype
|
** must be visited again in the next collection, so the prototype
|
||||||
** goes to the 'protogray' list. (If the prototype has a cache,
|
** goes to the 'protogray' list. (If the prototype has a cache,
|
||||||
** it is already immutable and does not need other barriers;
|
** it is already immutable and does not need other barriers;
|
||||||
@ -1195,7 +1195,7 @@ static void entergen (lua_State *L, global_State *g) {
|
|||||||
luaC_runtilstate(L, bitmask(GCSpause)); /* prepare to start a new cycle */
|
luaC_runtilstate(L, bitmask(GCSpause)); /* prepare to start a new cycle */
|
||||||
luaC_runtilstate(L, bitmask(GCSpropagate)); /* start new cycle */
|
luaC_runtilstate(L, bitmask(GCSpropagate)); /* start new cycle */
|
||||||
atomic(L);
|
atomic(L);
|
||||||
/* sweep all ellements making them old */
|
/* sweep all elements making them old */
|
||||||
sweep2old(L, &g->allgc);
|
sweep2old(L, &g->allgc);
|
||||||
/* everything alive now is old */
|
/* everything alive now is old */
|
||||||
g->reallyold = g->old = g->survival = g->allgc;
|
g->reallyold = g->old = g->survival = g->allgc;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lobject.c,v 2.119 2017/11/08 14:50:23 roberto Exp roberto $
|
** $Id: lobject.c,v 2.120 2017/11/16 13:19:06 roberto Exp roberto $
|
||||||
** Some generic functions over Lua objects
|
** Some generic functions over Lua objects
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -272,7 +272,7 @@ static const char *l_str2dloc (const char *s, lua_Number *result, int mode) {
|
|||||||
** - 'n'/'N' means 'inf' or 'nan' (which should be rejected)
|
** - 'n'/'N' means 'inf' or 'nan' (which should be rejected)
|
||||||
** - '.' just optimizes the search for the common case (nothing special)
|
** - '.' just optimizes the search for the common case (nothing special)
|
||||||
** This function accepts both the current locale or a dot as the radix
|
** This function accepts both the current locale or a dot as the radix
|
||||||
** mark. If the convertion fails, it may mean number has a dot but
|
** mark. If the conversion fails, it may mean number has a dot but
|
||||||
** locale accepts something else. In that case, the code copies 's'
|
** locale accepts something else. In that case, the code copies 's'
|
||||||
** to a buffer (because 's' is read-only), changes the dot to the
|
** to a buffer (because 's' is read-only), changes the dot to the
|
||||||
** current locale radix mark, and tries to convert again.
|
** current locale radix mark, and tries to convert again.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lobject.h,v 2.125 2017/06/29 15:06:44 roberto Exp $
|
** $Id: lobject.h,v 2.130 2017/11/07 13:25:26 roberto Exp roberto $
|
||||||
** Type definitions for Lua objects
|
** Type definitions for Lua objects
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -529,7 +529,7 @@ typedef union Closure {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
** Nodes for Hash tables. A pack of two TValue's (key-value pairs)
|
** Nodes for Hash tables. A pack of two TValue's (key-value pairs)
|
||||||
** plus a 'next' field to link colliding entries. The distribuition
|
** plus a 'next' field to link colliding entries. The distribution
|
||||||
** of the key's fields ('key_tt' and 'key_val') not forming a proper
|
** of the key's fields ('key_tt' and 'key_val') not forming a proper
|
||||||
** 'TValue' allows for a smaller size for 'Node' both in 4-byte
|
** 'TValue' allows for a smaller size for 'Node' both in 4-byte
|
||||||
** and 8-byte alignments.
|
** and 8-byte alignments.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lstring.h,v 1.61 2015/11/03 15:36:01 roberto Exp roberto $
|
** $Id: lstring.h,v 1.62 2017/07/27 13:50:16 roberto Exp roberto $
|
||||||
** String table (keep all strings handled by Lua)
|
** String table (keep all strings handled by Lua)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
** Memory-allocation error message must be preallocated (it cannot
|
** Memory-allocation error message must be preallocated (it cannot
|
||||||
** be created after memory is exausted)
|
** be created after memory is exhausted)
|
||||||
*/
|
*/
|
||||||
#define MEMERRMSG "not enough memory"
|
#define MEMERRMSG "not enough memory"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lstrlib.c,v 1.258 2017/11/08 14:50:23 roberto Exp roberto $
|
** $Id: lstrlib.c,v 1.259 2017/11/16 13:19:06 roberto Exp roberto $
|
||||||
** Standard library for string operations and pattern-matching
|
** Standard library for string operations and pattern-matching
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -1117,7 +1117,7 @@ static void addliteral (lua_State *L, luaL_Buffer *b, int arg) {
|
|||||||
else { /* integers */
|
else { /* integers */
|
||||||
lua_Integer n = lua_tointeger(L, arg);
|
lua_Integer n = lua_tointeger(L, arg);
|
||||||
const char *format = (n == LUA_MININTEGER) /* corner case? */
|
const char *format = (n == LUA_MININTEGER) /* corner case? */
|
||||||
? "0x%" LUA_INTEGER_FRMLEN "x" /* use hexa */
|
? "0x%" LUA_INTEGER_FRMLEN "x" /* use hex */
|
||||||
: LUA_INTEGER_FMT; /* else use default format */
|
: LUA_INTEGER_FMT; /* else use default format */
|
||||||
nb = l_sprintf(buff, MAX_ITEM, format, (LUAI_UACINT)n);
|
nb = l_sprintf(buff, MAX_ITEM, format, (LUAI_UACINT)n);
|
||||||
}
|
}
|
||||||
|
4
ltable.c
4
ltable.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltable.c,v 2.125 2017/06/29 15:06:44 roberto Exp roberto $
|
** $Id: ltable.c,v 2.126 2017/11/08 14:50:23 roberto Exp roberto $
|
||||||
** Lua tables (hash)
|
** Lua tables (hash)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -685,7 +685,7 @@ static lua_Unsigned hash_search (Table *t, lua_Unsigned j) {
|
|||||||
** First, try the array part: if there is an array part and its last
|
** First, try the array part: if there is an array part and its last
|
||||||
** element is nil, there must be a boundary there; a binary search
|
** element is nil, there must be a boundary there; a binary search
|
||||||
** finds that boundary. Otherwise, if the hash part is empty or does not
|
** finds that boundary. Otherwise, if the hash part is empty or does not
|
||||||
** contain 'j + 1', 'j' is a boundary. Othersize, call 'hash_search'
|
** contain 'j + 1', 'j' is a boundary. Otherwize, call 'hash_search'
|
||||||
** to find a boundary in the hash part.
|
** to find a boundary in the hash part.
|
||||||
*/
|
*/
|
||||||
lua_Unsigned luaH_getn (Table *t) {
|
lua_Unsigned luaH_getn (Table *t) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user