small changes in casts

This commit is contained in:
Roberto Ierusalimschy
2005-12-22 14:19:56 -02:00
parent 428325baec
commit c505f341d6
16 changed files with 77 additions and 75 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lfunc.c,v 2.10 2005/04/29 13:54:05 roberto Exp roberto $
** $Id: lfunc.c,v 2.11 2005/05/05 20:47:02 roberto Exp roberto $
** Auxiliary functions to manipulate prototypes and closures
** See Copyright Notice in lua.h
*/
@@ -25,7 +25,7 @@ Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e) {
luaC_link(L, obj2gco(c), LUA_TFUNCTION);
c->c.isC = 1;
c->c.env = e;
c->c.nupvalues = cast(lu_byte, nelems);
c->c.nupvalues = cast_byte(nelems);
return c;
}
@@ -35,7 +35,7 @@ Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e) {
luaC_link(L, obj2gco(c), LUA_TFUNCTION);
c->l.isC = 0;
c->l.env = e;
c->l.nupvalues = cast(lu_byte, nelems);
c->l.nupvalues = cast_byte(nelems);
while (nelems--) c->l.upvals[nelems] = NULL;
return c;
}