mirror of
https://github.com/lua/lua
synced 2024-11-22 12:51:30 +03:00
FALLTHROUGH comment must be last "statement"
(so it does not work when inside a block)
This commit is contained in:
parent
7b0b6b3b39
commit
0c7738240e
5
lcode.c
5
lcode.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lcode.c,v 2.158 2018/02/26 14:16:05 roberto Exp roberto $
|
||||
** $Id: lcode.c,v 2.159 2018/03/07 15:55:38 roberto Exp roberto $
|
||||
** Code generator for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -1696,8 +1696,7 @@ void luaK_finish (FuncState *fs) {
|
||||
break; /* no extra work */
|
||||
/* else use OP_RETURN to do the extra work */
|
||||
SET_OPCODE(*pc, OP_RETURN);
|
||||
/* FALLTHROUGH */
|
||||
}
|
||||
} /* FALLTHROUGH */
|
||||
case OP_RETURN: case OP_TAILCALL: {
|
||||
if (p->sizep > 0 || p->is_vararg) {
|
||||
SETARG_C(*pc, p->is_vararg ? p->numparams + 1 : 0);
|
||||
|
6
lgc.c
6
lgc.c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lgc.c,v 2.251 2018/02/23 13:21:27 roberto Exp roberto $
|
||||
** $Id: lgc.c,v 2.252 2018/02/26 13:35:03 roberto Exp roberto $
|
||||
** Garbage Collector
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -301,8 +301,8 @@ static void reallymarkobject (global_State *g, GCObject *o) {
|
||||
gray2black(o); /* nothing else to mark */
|
||||
break;
|
||||
}
|
||||
/* else *//* FALLTHROUGH */
|
||||
}
|
||||
/* else... */
|
||||
} /* FALLTHROUGH */
|
||||
case LUA_TLCL: case LUA_TCCL: case LUA_TTABLE:
|
||||
case LUA_TTHREAD: case LUA_TPROTO: {
|
||||
linkobjgclist(o, g->gray);
|
||||
|
Loading…
Reference in New Issue
Block a user