Browse Source

preparations for stack reallocation

Roberto Ierusalimschy 23 years ago
parent
commit
dea98702c9
2 changed files with 2 additions and 2 deletions
  1. 1 1
      lapi.c
  2. 1 1
      lvm.h

+ 1 - 1
lapi.c

@@ -654,7 +654,7 @@ LUA_API void lua_concat (lua_State *L, int n) {
   lua_lock(L);
   lua_lock(L);
   api_checknelems(L, n);
   api_checknelems(L, n);
   if (n >= 2) {
   if (n >= 2) {
-    luaV_strconc(L, n, L->top);
+    luaV_strconc(L, n, L->top - L->ci->base - 1);
     L->top -= (n-1);
     L->top -= (n-1);
     luaC_checkGC(L);
     luaC_checkGC(L);
   }
   }

+ 1 - 1
lvm.h

@@ -22,6 +22,6 @@ void luaV_gettable (lua_State *L, StkId t, TObject *key, StkId res);
 void luaV_settable (lua_State *L, StkId t, TObject *key, StkId val);
 void luaV_settable (lua_State *L, StkId t, TObject *key, StkId val);
 StkId luaV_execute (lua_State *L);
 StkId luaV_execute (lua_State *L);
 int luaV_lessthan (lua_State *L, const TObject *l, const TObject *r);
 int luaV_lessthan (lua_State *L, const TObject *l, const TObject *r);
-void luaV_strconc (lua_State *L, int total, StkId top);
+void luaV_strconc (lua_State *L, int total, int last);
 
 
 #endif
 #endif