lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 00050b8a6b11c3ac2032ca147d236743b90f5168
parent 19a1e19ae1014d8afbfe4d8f49eb37e2f7df8f35
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Sun,  6 Apr 1997 11:16:46 -0300

detail: local names

Diffstat:
Mstrlib.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/strlib.c b/strlib.c @@ -3,7 +3,7 @@ ** String library to LUA */ -char *rcs_strlib="$Id: strlib.c,v 1.39 1997/04/04 22:24:51 roberto Exp roberto $"; +char *rcs_strlib="$Id: strlib.c,v 1.40 1997/04/06 14:08:08 roberto Exp roberto $"; #include <string.h> #include <stdio.h> @@ -24,7 +24,7 @@ struct lbuff { static struct lbuff lbuffer = {NULL, 0, 0}; -static char *luaL_strbuffer (unsigned long size) +static char *strbuffer (unsigned long size) { if (size > lbuffer.max) { /* ANSI "realloc" doesn't need this test, but some machines (Sun!) @@ -39,14 +39,14 @@ static char *luaL_strbuffer (unsigned long size) static char *openspace (unsigned long size) { - char *buff = luaL_strbuffer(lbuffer.size+size); + char *buff = strbuffer(lbuffer.size+size); return buff+lbuffer.size; } char *luaI_addchar (int c) { if (lbuffer.size >= lbuffer.max) - luaL_strbuffer(lbuffer.max == 0 ? 100 : lbuffer.max*2); + strbuffer(lbuffer.max == 0 ? 100 : lbuffer.max*2); lbuffer.b[lbuffer.size++] = c; return lbuffer.b; } @@ -79,7 +79,7 @@ static void str_tok (void) lua_Object t = lua_createtable(); int i = 1; /* As strtok changes s1, and s1 is "constant", make a copy of it */ - s1 = strcpy(luaL_strbuffer(strlen(s1+1)), s1); + s1 = strcpy(strbuffer(strlen(s1+1)), s1); while ((s1 = strtok(s1, del)) != NULL) { lua_pushobject(t); lua_pushnumber(i++);