mirror of
https://github.com/lua/lua
synced 2024-12-27 12:49:43 +03:00
luaS_newfixedstring renamed to luaS_newfixed
This commit is contained in:
parent
1b15206cf9
commit
12b45c2df2
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lbuiltin.c,v 1.83 1999/12/07 12:05:34 roberto Exp roberto $
|
** $Id: lbuiltin.c,v 1.84 1999/12/14 18:31:20 roberto Exp roberto $
|
||||||
** Built-in functions
|
** Built-in functions
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -653,8 +653,8 @@ static const struct luaL_reg builtin_funcs[] = {
|
|||||||
|
|
||||||
void luaB_predefine (lua_State *L) {
|
void luaB_predefine (lua_State *L) {
|
||||||
/* pre-register mem error messages, to avoid loop when error arises */
|
/* pre-register mem error messages, to avoid loop when error arises */
|
||||||
luaS_newfixedstring(L, tableEM);
|
luaS_newfixed(L, tableEM);
|
||||||
luaS_newfixedstring(L, memEM);
|
luaS_newfixed(L, memEM);
|
||||||
luaL_openl(L, builtin_funcs);
|
luaL_openl(L, builtin_funcs);
|
||||||
luaB_opentests(L); /* internal test functions (when DEBUG is on) */
|
luaB_opentests(L); /* internal test functions (when DEBUG is on) */
|
||||||
lua_pushstring(L, LUA_VERSION);
|
lua_pushstring(L, LUA_VERSION);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lparser.c,v 1.45 1999/12/01 19:50:08 roberto Exp roberto $
|
** $Id: lparser.c,v 1.46 1999/12/07 11:36:16 roberto Exp roberto $
|
||||||
** LL(1) Parser and code generator for Lua
|
** LL(1) Parser and code generator for Lua
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -464,7 +464,7 @@ static void code_args (LexState *ls, int nparams, int dots) {
|
|||||||
else {
|
else {
|
||||||
fs->f->code[1] = (Byte)(nparams+ZEROVARARG);
|
fs->f->code[1] = (Byte)(nparams+ZEROVARARG);
|
||||||
deltastack(ls, nparams+1);
|
deltastack(ls, nparams+1);
|
||||||
add_localvar(ls, luaS_newfixedstring(ls->L, "arg"));
|
add_localvar(ls, luaS_newfixed(ls->L, "arg"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -890,7 +890,7 @@ static void body (LexState *ls, int needself, int line) {
|
|||||||
newfs.f->lineDefined = line;
|
newfs.f->lineDefined = line;
|
||||||
check(ls, '(');
|
check(ls, '(');
|
||||||
if (needself)
|
if (needself)
|
||||||
add_localvar(ls, luaS_newfixedstring(ls->L, "self"));
|
add_localvar(ls, luaS_newfixed(ls->L, "self"));
|
||||||
parlist(ls);
|
parlist(ls);
|
||||||
check(ls, ')');
|
check(ls, ')');
|
||||||
chunk(ls);
|
chunk(ls);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lstring.c,v 1.29 1999/11/22 18:24:50 roberto Exp roberto $
|
** $Id: lstring.c,v 1.30 1999/11/26 18:59:20 roberto Exp roberto $
|
||||||
** String table (keeps all strings handled by Lua)
|
** String table (keeps all strings handled by Lua)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -154,7 +154,7 @@ TaggedString *luaS_new (lua_State *L, const char *str) {
|
|||||||
return luaS_newlstr(L, str, strlen(str));
|
return luaS_newlstr(L, str, strlen(str));
|
||||||
}
|
}
|
||||||
|
|
||||||
TaggedString *luaS_newfixedstring (lua_State *L, const char *str) {
|
TaggedString *luaS_newfixed (lua_State *L, const char *str) {
|
||||||
TaggedString *ts = luaS_new(L, str);
|
TaggedString *ts = luaS_new(L, str);
|
||||||
if (ts->marked == 0) ts->marked = FIXMARK; /* avoid GC */
|
if (ts->marked == 0) ts->marked = FIXMARK; /* avoid GC */
|
||||||
return ts;
|
return ts;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lstring.h,v 1.13 1999/11/22 13:12:07 roberto Exp roberto $
|
** $Id: lstring.h,v 1.14 1999/11/26 18:59:20 roberto Exp roberto $
|
||||||
** String table (keep all strings handled by Lua)
|
** String table (keep all strings handled by Lua)
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -32,7 +32,7 @@ void luaS_freeall (lua_State *L);
|
|||||||
void luaS_free (lua_State *L, TaggedString *ts);
|
void luaS_free (lua_State *L, TaggedString *ts);
|
||||||
TaggedString *luaS_newlstr (lua_State *L, const char *str, long l);
|
TaggedString *luaS_newlstr (lua_State *L, const char *str, long l);
|
||||||
TaggedString *luaS_new (lua_State *L, const char *str);
|
TaggedString *luaS_new (lua_State *L, const char *str);
|
||||||
TaggedString *luaS_newfixedstring (lua_State *L, const char *str);
|
TaggedString *luaS_newfixed (lua_State *L, const char *str);
|
||||||
GlobalVar *luaS_assertglobal (lua_State *L, TaggedString *ts);
|
GlobalVar *luaS_assertglobal (lua_State *L, TaggedString *ts);
|
||||||
GlobalVar *luaS_assertglobalbyname (lua_State *L, const char *name);
|
GlobalVar *luaS_assertglobalbyname (lua_State *L, const char *name);
|
||||||
int luaS_globaldefined (lua_State *L, const char *name);
|
int luaS_globaldefined (lua_State *L, const char *name);
|
||||||
|
Loading…
Reference in New Issue
Block a user