aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
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.h
parenta08fc34ee4f17f9a66bbb96b1cb2dcde00c7e179 (diff)
downloadlua-f80ff7a336bc604feb410be691350c19edb3f00e.tar.gz
lua-f80ff7a336bc604feb410be691350c19edb3f00e.tar.bz2
lua-f80ff7a336bc604feb410be691350c19edb3f00e.zip
'luaS_new' changed from macro to function
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/lstring.h b/lstring.h
index a78dc1fa..a134327f 100644
--- a/lstring.h
+++ b/lstring.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.h,v 1.43 2005/04/25 19:24:10 roberto Exp roberto $ 2** $Id: lstring.h,v 1.44 2010/03/13 15:55:01 roberto Exp roberto $
3** String table (keep all strings handled by Lua) 3** String table (keep all strings handled by Lua)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -7,8 +7,6 @@
7#ifndef lstring_h 7#ifndef lstring_h
8#define lstring_h 8#define lstring_h
9 9
10#include <string.h>
11
12#include "lgc.h" 10#include "lgc.h"
13#include "lobject.h" 11#include "lobject.h"
14#include "lstate.h" 12#include "lstate.h"
@@ -18,7 +16,6 @@
18 16
19#define sizeudata(u) (sizeof(union Udata)+(u)->len) 17#define sizeudata(u) (sizeof(union Udata)+(u)->len)
20 18
21#define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s)))
22#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 19#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \
23 (sizeof(s)/sizeof(char))-1)) 20 (sizeof(s)/sizeof(char))-1))
24 21
@@ -27,6 +24,7 @@
27LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 24LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
28LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); 25LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
29LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 26LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
27LUAI_FUNC TString *luaS_new (lua_State *L, const char *str);
30 28
31 29
32#endif 30#endif