Details · lua/lua@e15f1f2 · GitHub
Skip to content

Commit e15f1f2

Browse files
committed
Details
Typos in comments and details in the manual.
1 parent b5c6570 commit e15f1f2

7 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎ldebug.c‎

Lines changed: 2 additions & 2 deletions

‎llex.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ l_noret luaX_syntaxerror (LexState *ls, const char *msg) {
128128
** ensuring there is only one copy of each unique string. The table
129129
** here is used as a set: the string enters as the key, while its value
130130
** is irrelevant. We use the string itself as the value only because it
131-
** is a TValue readly available. Later, the code generation can change
131+
** is a TValue readily available. Later, the code generation can change
132132
** this value.
133133
*/
134134
TString *luaX_newstring (LexState *ls, const char *str, size_t l) {

‎llimits.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ typedef signed char ls_byte;
8282
#if defined(UINTPTR_MAX) /* even in C99 this type is optional */
8383
#define L_P2I uintptr_t
8484
#else /* no 'intptr'? */
85-
#define L_P2I uintmax_t /* use the largerst available integer */
85+
#define L_P2I uintmax_t /* use the largest available integer */
8686
#endif
8787
#else /* C89 option */
8888
#define L_P2I size_t

‎lparser.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,12 +521,12 @@ static l_noret jumpscopeerror (LexState *ls, Labeldesc *gt) {
521521

522522
/*
523523
** Solves the goto at index 'g' to given 'label' and removes it
524-
** from the list of pending goto's.
524+
** from the list of pending gotos.
525525
** If it jumps into the scope of some variable, raises an error.
526526
*/
527527
static void solvegoto (LexState *ls, int g, Labeldesc *label) {
528528
int i;
529-
Labellist *gl = &ls->dyd->gt; /* list of goto's */
529+
Labellist *gl = &ls->dyd->gt; /* list of gotos */
530530
Labeldesc *gt = &gl->arr[g]; /* goto to be resolved */
531531
lua_assert(eqstr(gt->name, label->name));
532532
if (l_unlikely(gt->nactvar < label->nactvar)) /* enter some scope? */
@@ -580,7 +580,7 @@ static int newgotoentry (LexState *ls, TString *name, int line, int pc) {
580580
/*
581581
** Solves forward jumps. Check whether new label 'lb' matches any
582582
** pending gotos in current block and solves them. Return true
583-
** if any of the goto's need to close upvalues.
583+
** if any of the gotos need to close upvalues.
584584
*/
585585
static int solvegotos (LexState *ls, Labeldesc *lb) {
586586
Labellist *gl = &ls->dyd->gt;
@@ -601,7 +601,7 @@ static int solvegotos (LexState *ls, Labeldesc *lb) {
601601
/*
602602
** Create a new label with the given 'name' at the given 'line'.
603603
** 'last' tells whether label is the last non-op statement in its
604-
** block. Solves all pending goto's to this new label and adds
604+
** block. Solves all pending gotos to this new label and adds
605605
** a close instruction if necessary.
606606
** Returns true iff it added a close instruction.
607607
*/

‎lstrlib.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ static const char *match_capture (MatchState *ms, const char *s, int l) {
570570
static const char *match (MatchState *ms, const char *s, const char *p) {
571571
if (l_unlikely(ms->matchdepth-- == 0))
572572
luaL_error(ms->L, "pattern too complex");
573-
init: /* using goto's to optimize tail recursion */
573+
init: /* using goto to optimize tail recursion */
574574
if (p != ms->p_end) { /* end of pattern? */
575575
switch (*p) {
576576
case '(': { /* start capture */

‎lua.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ int main (int argc, char **argv) {
666666
l_message(argv[0], "cannot create state: not enough memory");
667667
return EXIT_FAILURE;
668668
}
669-
lua_gc(L, LUA_GCSTOP); /* stop GC while buidling state */
669+
lua_gc(L, LUA_GCSTOP); /* stop GC while building state */
670670
lua_pushcfunction(L, &pmain); /* to call 'pmain' in protected mode */
671671
lua_pushinteger(L, argc); /* 1st argument */
672672
lua_pushlightuserdata(L, argv); /* 2nd argument */

‎manual/manual.of‎

Lines changed: 4 additions & 4 deletions

0 commit comments

Comments
 (0)