aboutsummaryrefslogtreecommitdiff
path: root/lstring.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-04-03 17:24:18 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-04-03 17:24:18 -0300
commitf80ff7a336bc604feb410be691350c19edb3f00e (patch)
treeaee44ce2e558637264bcfa71d4e13b657b19a995 /lstring.c
parenta08fc34ee4f17f9a66bbb96b1cb2dcde00c7e179 (diff)
downloadlua-f80ff7a336bc604feb410be691350c19edb3f00e.tar.gz
lua-f80ff7a336bc604feb410be691350c19edb3f00e.tar.bz2
lua-f80ff7a336bc604feb410be691350c19edb3f00e.zip
'luaS_new' changed from macro to function
Diffstat (limited to 'lstring.c')
-rw-r--r--lstring.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lstring.c b/lstring.c
index 0a6bf342..dcc40fdd 100644
--- a/lstring.c
+++ b/lstring.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.c,v 2.15 2009/12/11 21:31:14 roberto Exp roberto $ 2** $Id: lstring.c,v 2.16 2009/12/16 16:42:58 roberto Exp roberto $
3** String table (keeps all strings handled by Lua) 3** String table (keeps all strings handled by Lua)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -94,6 +94,11 @@ TString *luaS_newlstr (lua_State *L, const char *str, size_t l) {
94} 94}
95 95
96 96
97TString *luaS_new (lua_State *L, const char *str) {
98 return luaS_newlstr(L, str, strlen(str));
99}
100
101
97Udata *luaS_newudata (lua_State *L, size_t s, Table *e) { 102Udata *luaS_newudata (lua_State *L, size_t s, Table *e) {
98 Udata *u; 103 Udata *u;
99 if (s > MAX_SIZET - sizeof(Udata)) 104 if (s > MAX_SIZET - sizeof(Udata))