From 7e30900def8b01df28464477b943aab65f5637c6 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 30 May 2000 16:00:31 -0300
Subject: better field name

---
 ldebug.c  | 4 ++--
 ldo.c     | 6 +++---
 lfunc.c   | 6 +++---
 lgc.c     | 6 +++---
 lobject.h | 6 +++---
 lparser.c | 4 ++--
 lvm.c     | 6 +++---
 7 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/ldebug.c b/ldebug.c
index 47a83587..f2f8097a 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
 /*
-** $Id: ldebug.c,v 1.19 2000/05/12 19:49:18 roberto Exp roberto $
+** $Id: ldebug.c,v 1.20 2000/05/15 19:30:41 roberto Exp roberto $
 ** Debug Interface
 ** See Copyright Notice in lua.h
 */
@@ -89,7 +89,7 @@ static int lua_nups (StkId f) {
   switch (ttype(f)) {
     case TAG_LCLOSURE:  case TAG_CCLOSURE:
     case TAG_LMARK:   case TAG_CMARK:
-      return f->value.cl->nelems;
+      return f->value.cl->nupvalues;
     default:
       return 0;
   }
diff --git a/ldo.c b/ldo.c
index 60f0dc65..6c4c0ece 100644
--- a/ldo.c
+++ b/ldo.c
@@ -1,5 +1,5 @@
 /*
-** $Id: ldo.c,v 1.75 2000/05/09 14:50:16 roberto Exp roberto $
+** $Id: ldo.c,v 1.76 2000/05/24 13:54:49 roberto Exp roberto $
 ** Stack and Call structure of Lua
 ** See Copyright Notice in lua.h
 */
@@ -139,7 +139,7 @@ static void luaD_callHook (lua_State *L, StkId func, lua_Hook callhook,
 
 
 static StkId callCclosure (lua_State *L, const struct Closure *cl, StkId base) {
-  int nup = cl->nelems;  /* number of upvalues */
+  int nup = cl->nupvalues;  /* number of upvalues */
   int numarg = L->top-base;
   struct C_Lua_Stack oldCLS = L->Cstack;
   StkId firstResult;
@@ -151,7 +151,7 @@ static StkId callCclosure (lua_State *L, const struct Closure *cl, StkId base) {
     L->top += nup;
     numarg += nup;
     /* copy upvalues into stack */
-    while (nup--) *(base+nup) = cl->consts[nup];
+    while (nup--) *(base+nup) = cl->upvalue[nup];
   }
   L->Cstack.num = numarg;
   L->Cstack.lua2C = base;
diff --git a/lfunc.c b/lfunc.c
index 27143635..8893fa5b 100644
--- a/lfunc.c
+++ b/lfunc.c
@@ -1,5 +1,5 @@
 /*
-** $Id: lfunc.c,v 1.21 2000/03/29 20:19:20 roberto Exp roberto $
+** $Id: lfunc.c,v 1.22 2000/05/24 13:54:49 roberto Exp roberto $
 ** Auxiliary functions to manipulate prototypes and closures
 ** See Copyright Notice in lua.h
 */
@@ -14,7 +14,7 @@
 #include "lstate.h"
 
 #define gcsizeproto(L, p)	numblocks(L, 0, sizeof(Proto))
-#define gcsizeclosure(L, c)	numblocks(L, c->nelems, sizeof(Closure))
+#define gcsizeclosure(L, c)	numblocks(L, c->nupvalues, sizeof(Closure))
 
 
 
@@ -24,7 +24,7 @@ Closure *luaF_newclosure (lua_State *L, int nelems) {
   c->next = L->rootcl;
   L->rootcl = c;
   c->marked = 0;
-  c->nelems = nelems;
+  c->nupvalues = nelems;
   L->nblocks += gcsizeclosure(L, c);
   return c;
 }
diff --git a/lgc.c b/lgc.c
index a9dfc412..9ec9c2b6 100644
--- a/lgc.c
+++ b/lgc.c
@@ -1,5 +1,5 @@
 /*
-** $Id: lgc.c,v 1.51 2000/05/24 13:54:49 roberto Exp roberto $
+** $Id: lgc.c,v 1.52 2000/05/30 18:54:49 roberto Exp roberto $
 ** Garbage Collector
 ** See Copyright Notice in lua.h
 */
@@ -44,10 +44,10 @@ static void protomark (lua_State *L, Proto *f) {
 
 static void closuremark (lua_State *L, Closure *f) {
   if (!f->marked) {
-    int i = f->nelems;
+    int i = f->nupvalues;
     f->marked = 1;
     while (i--)
-      markobject(L, &f->consts[i]);
+      markobject(L, &f->upvalue[i]);
   }
 }
 
diff --git a/lobject.h b/lobject.h
index f667a103..0a6d1093 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
 /*
-** $Id: lobject.h,v 1.64 2000/05/10 16:33:20 roberto Exp roberto $
+** $Id: lobject.h,v 1.65 2000/05/24 13:54:49 roberto Exp roberto $
 ** Type definitions for Lua objects
 ** See Copyright Notice in lua.h
 */
@@ -144,8 +144,8 @@ typedef struct Closure {
     lua_CFunction c;  /* C functions */
     struct Proto *l;  /* Lua functions */
   } f;
-  int nelems;
-  TObject consts[1];
+  int nupvalues;
+  TObject upvalue[1];
 } Closure;
 
 
diff --git a/lparser.c b/lparser.c
index 5fd467b1..38bfb97e 100644
--- a/lparser.c
+++ b/lparser.c
@@ -1,5 +1,5 @@
 /*
-** $Id: lparser.c,v 1.91 2000/05/25 18:26:42 roberto Exp roberto $
+** $Id: lparser.c,v 1.92 2000/05/25 18:59:59 roberto Exp roberto $
 ** LL(1) Parser and code generator for Lua
 ** See Copyright Notice in lua.h
 */
@@ -170,7 +170,7 @@ static int checkname (LexState *ls) {
 
 
 static TString *str_checkname (LexState *ls) {
-  int i = checkname(ls);  /* this call may realloc `f->consts' */
+  int i = checkname(ls);  /* this call may realloc `f->kstr' */
   return ls->fs->f->kstr[i];
 }
 
diff --git a/lvm.c b/lvm.c
index da851516..bc12870c 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
 /*
-** $Id: lvm.c,v 1.108 2000/05/24 13:54:49 roberto Exp roberto $
+** $Id: lvm.c,v 1.109 2000/05/25 19:02:21 roberto Exp roberto $
 ** Lua virtual machine
 ** See Copyright Notice in lua.h
 */
@@ -77,7 +77,7 @@ static Closure *luaV_closure (lua_State *L, lua_Type t, int nelems) {
   Closure *c = luaF_newclosure(L, nelems);
   L->top -= nelems;
   while (nelems--)
-    c->consts[nelems] = *(L->top+nelems);
+    c->upvalue[nelems] = *(L->top+nelems);
   ttype(L->top) = t;
   clvalue(L->top) = c;
   incr_top;
@@ -409,7 +409,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, StkId base) {
         break;
 
       case OP_PUSHUPVALUE:
-        *top++ = cl->consts[GETARG_U(i)];
+        *top++ = cl->upvalue[GETARG_U(i)];
         break;
 
       case OP_GETLOCAL:
-- 
cgit v1.2.3-55-g6feb