From f80ff7a336bc604feb410be691350c19edb3f00e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sat, 3 Apr 2010 17:24:18 -0300 Subject: 'luaS_new' changed from macro to function --- lstring.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lstring.c') diff --git a/lstring.c b/lstring.c index 0a6bf342..dcc40fdd 100644 --- a/lstring.c +++ b/lstring.c @@ -1,5 +1,5 @@ /* -** $Id: lstring.c,v 2.15 2009/12/11 21:31:14 roberto Exp roberto $ +** $Id: lstring.c,v 2.16 2009/12/16 16:42:58 roberto Exp roberto $ ** String table (keeps all strings handled by Lua) ** See Copyright Notice in lua.h */ @@ -94,6 +94,11 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) { } +TString *luaS_new (lua_State *L, const char *str) { + return luaS_newlstr(L, str, strlen(str)); +} + + Udata *luaS_newudata (lua_State *L, size_t s, Table *e) { Udata *u; if (s > MAX_SIZET - sizeof(Udata)) -- cgit v1.2.3-55-g6feb