mirror of
https://github.com/lua/lua.git
synced 2025-02-04 06:13:04 +08:00
typos in comments
This commit is contained in:
parent
7444b5a1d5
commit
237f755dca
4
ldo.c
4
ldo.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ldo.c,v 2.85 2010/04/18 12:41:35 roberto Exp roberto $
|
** $Id: ldo.c,v 2.86 2010/04/18 13:22:48 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
|
||||||
*/
|
*/
|
||||||
@ -476,7 +476,7 @@ static int recover (lua_State *L, int status) {
|
|||||||
/*
|
/*
|
||||||
** signal an error in the call to 'resume', not in the execution of the
|
** signal an error in the call to 'resume', not in the execution of the
|
||||||
** coroutine itself. (Such errors should not be handled by any coroutine
|
** coroutine itself. (Such errors should not be handled by any coroutine
|
||||||
** error hanlder and should not kill the coroutine.)
|
** error handler and should not kill the coroutine.)
|
||||||
*/
|
*/
|
||||||
static void resume_error (lua_State *L, const char *msg, StkId firstArg) {
|
static void resume_error (lua_State *L, const char *msg, StkId firstArg) {
|
||||||
L->top = firstArg; /* remove args from the stack */
|
L->top = firstArg; /* remove args from the stack */
|
||||||
|
6
lmem.c
6
lmem.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lmem.c,v 1.77 2010/04/30 18:17:24 roberto Exp roberto $
|
** $Id: lmem.c,v 1.78 2010/05/04 18:10:02 roberto Exp roberto $
|
||||||
** Interface to Memory Manager
|
** Interface to Memory Manager
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -98,13 +98,13 @@ void *luaM_realloc_ (lua_State *L, void *block, size_t osize, size_t nsize) {
|
|||||||
if (!gcstopped(g))
|
if (!gcstopped(g))
|
||||||
g->GCdebt += nsize; /* give some credit to garbage collector */
|
g->GCdebt += nsize; /* give some credit to garbage collector */
|
||||||
#if defined(TRACEMEM)
|
#if defined(TRACEMEM)
|
||||||
{ /* auxiliar patch to monitor garbage collection.
|
{ /* auxiliary patch to monitor garbage collection.
|
||||||
** To plot, gnuplot with following command:
|
** To plot, gnuplot with following command:
|
||||||
** plot TRACEMEM using 1:2 with lines, TRACEMEM using 1:3 with lines
|
** plot TRACEMEM using 1:2 with lines, TRACEMEM using 1:3 with lines
|
||||||
*/
|
*/
|
||||||
static unsigned long total = 0; /* our "time" */
|
static unsigned long total = 0; /* our "time" */
|
||||||
static FILE *f = NULL; /* output file */
|
static FILE *f = NULL; /* output file */
|
||||||
total++; /* "time" always grow */
|
total++; /* "time" always grows */
|
||||||
if ((total % 200) == 0) {
|
if ((total % 200) == 0) {
|
||||||
if (f == NULL) f = fopen(TRACEMEM, "w");
|
if (f == NULL) f = fopen(TRACEMEM, "w");
|
||||||
fprintf(f, "%lu %u %d %d\n", total,
|
fprintf(f, "%lu %u %d %d\n", total,
|
||||||
|
4
lvm.c
4
lvm.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lvm.c,v 2.115 2010/04/19 17:58:46 roberto Exp roberto $
|
** $Id: lvm.c,v 2.116 2010/05/04 17:25:19 roberto Exp roberto $
|
||||||
** Lua virtual machine
|
** Lua virtual machine
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -751,7 +751,7 @@ void luaV_execute (lua_State *L) {
|
|||||||
h = hvalue(ra);
|
h = hvalue(ra);
|
||||||
last = ((c-1)*LFIELDS_PER_FLUSH) + n;
|
last = ((c-1)*LFIELDS_PER_FLUSH) + n;
|
||||||
if (last > h->sizearray) /* needs more space? */
|
if (last > h->sizearray) /* needs more space? */
|
||||||
luaH_resizearray(L, h, last); /* pre-alloc it at once */
|
luaH_resizearray(L, h, last); /* pre-allocate it at once */
|
||||||
for (; n > 0; n--) {
|
for (; n > 0; n--) {
|
||||||
TValue *val = ra+n;
|
TValue *val = ra+n;
|
||||||
setobj2t(L, luaH_setint(L, h, last--), val);
|
setobj2t(L, luaH_setint(L, h, last--), val);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user