From 0e1058cfdd07a3751fce1c79b75241cf770266cf Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 9 Jan 1998 12:44:55 -0200 Subject: small optimizations in switch order --- lapi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index 63e6dbfd..edce0266 100644 --- a/lapi.c +++ b/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 1.17 1998/01/02 17:46:32 roberto Exp roberto $ +** $Id: lapi.c,v 1.18 1998/01/07 16:26:48 roberto Exp roberto $ ** Lua API ** See Copyright Notice in lua.h */ @@ -39,12 +39,12 @@ static int normalized_type (TObject *o) { int t = ttype(o); switch (t) { - case LUA_T_CLMARK: - return LUA_T_CLOSURE; case LUA_T_PMARK: return LUA_T_PROTO; case LUA_T_CMARK: return LUA_T_CPROTO; + case LUA_T_CLMARK: + return LUA_T_CLOSURE; default: return t; } @@ -382,12 +382,12 @@ int lua_tag (lua_Object lo) return o->value.ts->u.d.tag; case LUA_T_ARRAY: return o->value.a->htag; - case LUA_T_CLOSURE: case LUA_T_CLMARK: - return o->value.cl->consts[0].ttype; case LUA_T_PMARK: return LUA_T_PROTO; case LUA_T_CMARK: return LUA_T_CPROTO; + case LUA_T_CLOSURE: case LUA_T_CLMARK: + return o->value.cl->consts[0].ttype; #ifdef DEBUG case LUA_T_LINE: lua_error("internal error"); -- cgit v1.2.3-55-g6feb