diff options
Diffstat (limited to '')
| -rw-r--r-- | lparser.c | 4 | ||||
| -rw-r--r-- | manual/manual.of | 12 |
2 files changed, 8 insertions, 8 deletions
| @@ -505,8 +505,8 @@ static void buildglobal (LexState *ls, TString *varname, expdesc *var) { | |||
| 505 | init_exp(var, VGLOBAL, -1); /* global by default */ | 505 | init_exp(var, VGLOBAL, -1); /* global by default */ |
| 506 | singlevaraux(fs, ls->envn, var, 1); /* get environment variable */ | 506 | singlevaraux(fs, ls->envn, var, 1); /* get environment variable */ |
| 507 | if (var->k == VGLOBAL) | 507 | if (var->k == VGLOBAL) |
| 508 | luaK_semerror(ls, "_ENV is global when accessing variable '%s'", | 508 | luaK_semerror(ls, "%s is global when accessing variable '%s'", |
| 509 | getstr(varname)); | 509 | LUA_ENV, getstr(varname)); |
| 510 | luaK_exp2anyregup(fs, var); /* _ENV could be a constant */ | 510 | luaK_exp2anyregup(fs, var); /* _ENV could be a constant */ |
| 511 | codestring(&key, varname); /* key is variable name */ | 511 | codestring(&key, varname); /* key is variable name */ |
| 512 | luaK_indexed(fs, var, &key); /* 'var' represents _ENV[varname] */ | 512 | luaK_indexed(fs, var, &key); /* 'var' represents _ENV[varname] */ |
diff --git a/manual/manual.of b/manual/manual.of index 54f67b3e..317adcaa 100644 --- a/manual/manual.of +++ b/manual/manual.of | |||
| @@ -107,7 +107,7 @@ for small machines and embedded systems. | |||
| 107 | 107 | ||
| 108 | Unless stated otherwise, | 108 | Unless stated otherwise, |
| 109 | any overflow when manipulating integer values @def{wrap around}, | 109 | any overflow when manipulating integer values @def{wrap around}, |
| 110 | according to the usual rules of two-complement arithmetic. | 110 | according to the usual rules of two's complement arithmetic. |
| 111 | (In other words, | 111 | (In other words, |
| 112 | the actual result is the unique representable integer | 112 | the actual result is the unique representable integer |
| 113 | that is equal modulo @M{2@sp{n}} to the mathematical result, | 113 | that is equal modulo @M{2@sp{n}} to the mathematical result, |
| @@ -2458,7 +2458,7 @@ for instance @T{{e1, e2, e3}} @see{tableconstructor}.} | |||
| 2458 | for instance @T{foo(e1, e2, e3)} @see{functioncall}.} | 2458 | for instance @T{foo(e1, e2, e3)} @see{functioncall}.} |
| 2459 | 2459 | ||
| 2460 | @item{A multiple assignment, | 2460 | @item{A multiple assignment, |
| 2461 | for instance @T{a , b, c = e1, e2, e3} @see{assignment}.} | 2461 | for instance @T{a, b, c = e1, e2, e3} @see{assignment}.} |
| 2462 | 2462 | ||
| 2463 | @item{A local or global declaration, | 2463 | @item{A local or global declaration, |
| 2464 | which is similar to a multiple assignment.} | 2464 | which is similar to a multiple assignment.} |
| @@ -3640,9 +3640,9 @@ because a pseudo-index is not an actual stack position. | |||
| 3640 | The type of integers in Lua. | 3640 | The type of integers in Lua. |
| 3641 | 3641 | ||
| 3642 | By default this type is @id{long long}, | 3642 | By default this type is @id{long long}, |
| 3643 | (usually a 64-bit two-complement integer), | 3643 | (usually a 64-bit two's complement integer), |
| 3644 | but that can be changed to @id{long} or @id{int} | 3644 | but that can be changed to @id{long} or @id{int} |
| 3645 | (usually a 32-bit two-complement integer). | 3645 | (usually a 32-bit two's complement integer). |
| 3646 | (See @id{LUA_INT_TYPE} in @id{luaconf.h}.) | 3646 | (See @id{LUA_INT_TYPE} in @id{luaconf.h}.) |
| 3647 | 3647 | ||
| 3648 | Lua also defines the constants | 3648 | Lua also defines the constants |
| @@ -5439,7 +5439,7 @@ the auxiliary library provides higher-level functions for some | |||
| 5439 | common tasks. | 5439 | common tasks. |
| 5440 | 5440 | ||
| 5441 | All functions and types from the auxiliary library | 5441 | All functions and types from the auxiliary library |
| 5442 | are defined in header file @id{lauxlib.h} and | 5442 | are defined in the header file @id{lauxlib.h} and |
| 5443 | have a prefix @id{luaL_}. | 5443 | have a prefix @id{luaL_}. |
| 5444 | 5444 | ||
| 5445 | All functions in the auxiliary library are built on | 5445 | All functions in the auxiliary library are built on |
| @@ -6492,7 +6492,7 @@ the host program can call the function @Lid{luaL_openlibs}. | |||
| 6492 | Alternatively, | 6492 | Alternatively, |
| 6493 | the host can select which libraries to open, | 6493 | the host can select which libraries to open, |
| 6494 | by using @Lid{luaL_openselectedlibs}. | 6494 | by using @Lid{luaL_openselectedlibs}. |
| 6495 | Both functions are defined in the header file @id{lualib.h}. | 6495 | Both functions are declared in the header file @id{lualib.h}. |
| 6496 | @index{lualib.h} | 6496 | @index{lualib.h} |
| 6497 | 6497 | ||
| 6498 | The stand-alone interpreter @id{lua} @see{lua-sa} | 6498 | The stand-alone interpreter @id{lua} @see{lua-sa} |
