aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lstring.h b/lstring.h
index 330d80e1..5bcf33aa 100644
--- a/lstring.h
+++ b/lstring.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.h,v 1.25 2000/11/24 17:39:56 roberto Exp roberto $ 2** $Id: lstring.h,v 1.26 2000/12/28 12:55:41 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*/
@@ -36,6 +36,8 @@ union L_UTString {
36 36
37#define sizeudata(l) ((luint32)sizeof(union L_UTString)+(l)) 37#define sizeudata(l) ((luint32)sizeof(union L_UTString)+(l))
38 38
39#define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s)))
40#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, (sizeof(s))-1))
39 41
40void luaS_init (lua_State *L); 42void luaS_init (lua_State *L);
41void luaS_resize (lua_State *L, stringtable *tb, int newsize); 43void luaS_resize (lua_State *L, stringtable *tb, int newsize);
@@ -43,8 +45,6 @@ TString *luaS_newudata (lua_State *L, size_t s, void *udata);
43TString *luaS_createudata (lua_State *L, void *udata, int tag); 45TString *luaS_createudata (lua_State *L, void *udata, int tag);
44void luaS_freeall (lua_State *L); 46void luaS_freeall (lua_State *L);
45TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 47TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
46TString *luaS_new (lua_State *L, const char *str);
47TString *luaS_newfixed (lua_State *L, const char *str);
48 48
49 49
50#endif 50#endif