`strconc' -> `concat'

This commit is contained in:
Roberto Ierusalimschy 2002-06-03 11:08:43 -03:00
parent 46c471d7e9
commit 5094c37988
3 changed files with 7 additions and 8 deletions

View File

@ -1,12 +1,11 @@
/*
** $Id: lobject.c,v 1.80 2002/05/15 18:57:44 roberto Exp roberto $
** $Id: lobject.c,v 1.81 2002/05/16 18:39:46 roberto Exp roberto $
** Some generic functions over Lua objects
** See Copyright Notice in lua.h
*/
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -135,7 +134,7 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) {
fmt = e+2;
}
pushstr(L, fmt);
luaV_strconc(L, n+1, L->top - L->ci->base - 1);
luaV_concat(L, n+1, L->top - L->ci->base - 1);
L->top -= n;
return svalue(L->top - 1);
}

6
lvm.c
View File

@ -1,5 +1,5 @@
/*
** $Id: lvm.c,v 1.232 2002/05/15 18:57:44 roberto Exp roberto $
** $Id: lvm.c,v 1.233 2002/05/27 20:35:40 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@ -239,7 +239,7 @@ int luaV_cmp (lua_State *L, const TObject *l, const TObject *r, int cond) {
}
void luaV_strconc (lua_State *L, int total, int last) {
void luaV_concat (lua_State *L, int total, int last) {
do {
StkId top = L->ci->base + last + 1;
int n = 2; /* number of elements handled in this pass (at least 2) */
@ -443,7 +443,7 @@ StkId luaV_execute (lua_State *L) {
case OP_CONCAT: {
int b = GETARG_B(i);
int c = GETARG_C(i);
luaV_strconc(L, c-b+1, c); /* may change `base' (and `ra') */
luaV_concat(L, c-b+1, c); /* may change `base' (and `ra') */
setobj(base+GETARG_A(i), base+b);
luaV_checkGC(L, base+c+1);
break;

4
lvm.h
View File

@ -1,5 +1,5 @@
/*
** $Id: lvm.h,v 1.38 2002/03/19 12:45:25 roberto Exp roberto $
** $Id: lvm.h,v 1.39 2002/05/06 15:51:41 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@ -25,6 +25,6 @@ int luaV_tostring (lua_State *L, TObject *obj);
void luaV_gettable (lua_State *L, const TObject *t, TObject *key, StkId res);
void luaV_settable (lua_State *L, const TObject *t, TObject *key, StkId val);
StkId luaV_execute (lua_State *L);
void luaV_strconc (lua_State *L, int total, int last);
void luaV_concat (lua_State *L, int total, int last);
#endif