diff options
-rw-r--r-- | ltable.c | 4 | ||||
-rw-r--r-- | ltm.c | 5 | ||||
-rw-r--r-- | lua.c | 15 |
3 files changed, 12 insertions, 12 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 2.105 2015/02/20 14:27:53 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.106 2015/03/03 19:53:13 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -546,7 +546,7 @@ const TValue *luaH_get (Table *t, const TValue *key) { | |||
546 | lua_Integer k; | 546 | lua_Integer k; |
547 | if (luaV_tointeger(key, &k, 0)) /* index is int? */ | 547 | if (luaV_tointeger(key, &k, 0)) /* index is int? */ |
548 | return luaH_getint(t, k); /* use specialized version */ | 548 | return luaH_getint(t, k); /* use specialized version */ |
549 | /* else go through */ | 549 | /* else *//* FALLTHROUGH */ |
550 | } | 550 | } |
551 | default: { | 551 | default: { |
552 | Node *n = mainposition(t, key); | 552 | Node *n = mainposition(t, key); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 2.32 2014/11/10 17:24:43 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 2.33 2014/11/21 12:15:57 roberto Exp roberto $ |
3 | ** Tag methods | 3 | ** Tag methods |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -117,6 +117,7 @@ void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, | |||
117 | switch (event) { | 117 | switch (event) { |
118 | case TM_CONCAT: | 118 | case TM_CONCAT: |
119 | luaG_concaterror(L, p1, p2); | 119 | luaG_concaterror(L, p1, p2); |
120 | /* call never returns, but to avoid warnings: *//* FALLTHROUGH */ | ||
120 | case TM_BAND: case TM_BOR: case TM_BXOR: | 121 | case TM_BAND: case TM_BOR: case TM_BXOR: |
121 | case TM_SHL: case TM_SHR: case TM_BNOT: { | 122 | case TM_SHL: case TM_SHR: case TM_BNOT: { |
122 | lua_Number dummy; | 123 | lua_Number dummy; |
@@ -124,8 +125,8 @@ void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, | |||
124 | luaG_tointerror(L, p1, p2); | 125 | luaG_tointerror(L, p1, p2); |
125 | else | 126 | else |
126 | luaG_opinterror(L, p1, p2, "perform bitwise operation on"); | 127 | luaG_opinterror(L, p1, p2, "perform bitwise operation on"); |
127 | /* else go through */ | ||
128 | } | 128 | } |
129 | /* calls never return, but to avoid warnings: *//* FALLTHROUGH */ | ||
129 | default: | 130 | default: |
130 | luaG_opinterror(L, p1, p2, "perform arithmetic on"); | 131 | luaG_opinterror(L, p1, p2, "perform arithmetic on"); |
131 | } | 132 | } |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.c,v 1.223 2015/03/09 21:57:05 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.224 2015/03/10 14:15:06 roberto Exp roberto $ |
3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -485,14 +485,14 @@ static int collectargs (char **argv, int *first) { | |||
485 | args |= has_E; | 485 | args |= has_E; |
486 | break; | 486 | break; |
487 | case 'i': | 487 | case 'i': |
488 | args |= has_i; /* goes through (-i implies -v) */ | 488 | args |= has_i; /* (-i implies -v) *//* FALLTHROUGH */ |
489 | case 'v': | 489 | case 'v': |
490 | if (argv[i][2] != '\0') /* extra characters after 1st? */ | 490 | if (argv[i][2] != '\0') /* extra characters after 1st? */ |
491 | return has_error; /* invalid option */ | 491 | return has_error; /* invalid option */ |
492 | args |= has_v; | 492 | args |= has_v; |
493 | break; | 493 | break; |
494 | case 'e': | 494 | case 'e': |
495 | args |= has_e; /* go through */ | 495 | args |= has_e; /* FALLTHROUGH */ |
496 | case 'l': /* both options need an argument */ | 496 | case 'l': /* both options need an argument */ |
497 | if (argv[i][2] == '\0') { /* no concatenated argument? */ | 497 | if (argv[i][2] == '\0') { /* no concatenated argument? */ |
498 | i++; /* try next 'argv' */ | 498 | i++; /* try next 'argv' */ |
@@ -516,17 +516,16 @@ static int collectargs (char **argv, int *first) { | |||
516 | static int runargs (lua_State *L, char **argv, int n) { | 516 | static int runargs (lua_State *L, char **argv, int n) { |
517 | int i; | 517 | int i; |
518 | for (i = 1; i < n; i++) { | 518 | for (i = 1; i < n; i++) { |
519 | int status; | ||
520 | int option = argv[i][1]; | 519 | int option = argv[i][1]; |
521 | lua_assert(argv[i][0] == '-'); /* already checked */ | 520 | lua_assert(argv[i][0] == '-'); /* already checked */ |
522 | if (option == 'e' || option == 'l') { | 521 | if (option == 'e' || option == 'l') { |
522 | int status; | ||
523 | const char *extra = argv[i] + 2; /* both options need an argument */ | 523 | const char *extra = argv[i] + 2; /* both options need an argument */ |
524 | if (*extra == '\0') extra = argv[++i]; | 524 | if (*extra == '\0') extra = argv[++i]; |
525 | lua_assert(extra != NULL); | 525 | lua_assert(extra != NULL); |
526 | if (option == 'e') | 526 | status = (option == 'e') |
527 | status = dostring(L, extra, "=(command line)"); | 527 | ? dostring(L, extra, "=(command line)") |
528 | else | 528 | : dolibrary(L, extra); |
529 | status = dolibrary(L, extra); | ||
530 | if (status != LUA_OK) return 0; | 529 | if (status != LUA_OK) return 0; |
531 | } | 530 | } |
532 | } | 531 | } |