aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-23 14:17:25 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-23 14:17:25 -0300
commit39b79783297bee79db9853b63d199e120a009a8f (patch)
treec738c621c4c28d8822c2f785400786301985273b /lstring.h
parentd164e2294f73d8e69f00d95a66014514b2dd0ec0 (diff)
downloadlua-39b79783297bee79db9853b63d199e120a009a8f.tar.gz
lua-39b79783297bee79db9853b63d199e120a009a8f.tar.bz2
lua-39b79783297bee79db9853b63d199e120a009a8f.zip
first (big) step to support wide chars
Diffstat (limited to 'lstring.h')
-rw-r--r--lstring.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/lstring.h b/lstring.h
index dec6c5b4..ad6cca52 100644
--- a/lstring.h
+++ b/lstring.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstring.h,v 1.29 2001/02/09 20:22:29 roberto Exp roberto $ 2** $Id: lstring.h,v 1.30 2001/02/20 18:15:33 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*/
@@ -22,20 +22,20 @@
22 22
23 23
24#define sizestring(l) ((lu_mem)sizeof(union L_UTString)+ \ 24#define sizestring(l) ((lu_mem)sizeof(union L_UTString)+ \
25 ((lu_mem)(l)+1)*sizeof(char)) 25 ((lu_mem)(l)+1)*sizeof(l_char))
26 26
27#define sizeudata(l) ((lu_mem)sizeof(union L_UTString)+(l)) 27#define sizeudata(l) ((lu_mem)sizeof(union L_UTString)+(l))
28 28
29#define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) 29#define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s)))
30#define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 30#define luaS_newliteral(L, s) (luaS_newlstr(L, l_s("") s, \
31 (sizeof(s)/sizeof(char))-1)) 31 (sizeof(s)/sizeof(l_char))-1))
32 32
33void luaS_init (lua_State *L); 33void luaS_init (lua_State *L);
34void luaS_resize (lua_State *L, stringtable *tb, int newsize); 34void luaS_resize (lua_State *L, stringtable *tb, int newsize);
35TString *luaS_newudata (lua_State *L, size_t s, void *udata); 35TString *luaS_newudata (lua_State *L, size_t s, void *udata);
36int luaS_createudata (lua_State *L, void *udata, TObject *o); 36int luaS_createudata (lua_State *L, void *udata, TObject *o);
37void luaS_freeall (lua_State *L); 37void luaS_freeall (lua_State *L);
38TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 38TString *luaS_newlstr (lua_State *L, const l_char *str, size_t l);
39 39
40 40
41#endif 41#endif