aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lapi.c b/lapi.c
index 274802ef..95be89d5 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.128 2010/05/12 14:09:20 roberto Exp roberto $ 2** $Id: lapi.c,v 2.129 2010/05/14 13:15:26 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -55,7 +55,7 @@ static TValue *index2addr (lua_State *L, int idx) {
55 return &G(L)->l_registry; 55 return &G(L)->l_registry;
56 else { /* upvalues */ 56 else { /* upvalues */
57 idx = LUA_REGISTRYINDEX - idx; 57 idx = LUA_REGISTRYINDEX - idx;
58 api_check(L, idx <= UCHAR_MAX + 1, "upvalue index too large"); 58 api_check(L, idx <= MAXUPVAL + 1, "upvalue index too large");
59 if (ttislcf(ci->func)) /* light C function? */ 59 if (ttislcf(ci->func)) /* light C function? */
60 return cast(TValue *, luaO_nilobject); /* it has no upvalues */ 60 return cast(TValue *, luaO_nilobject); /* it has no upvalues */
61 else { 61 else {
@@ -507,7 +507,7 @@ LUA_API void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n) {
507 else { 507 else {
508 Closure *cl; 508 Closure *cl;
509 api_checknelems(L, n); 509 api_checknelems(L, n);
510 api_check(L, n <= UCHAR_MAX, "upvalue index too large"); 510 api_check(L, n <= MAXUPVAL, "upvalue index too large");
511 luaC_checkGC(L); 511 luaC_checkGC(L);
512 cl = luaF_newCclosure(L, n); 512 cl = luaF_newCclosure(L, n);
513 cl->c.f = fn; 513 cl->c.f = fn;