diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-11-17 17:50:05 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-11-17 17:50:05 -0200 |
commit | ab7d9bfd0c38f1dd8eda40ae3c1f1c686564a92d (patch) | |
tree | e7f5231cc02b89b2507ad846d5d547e35e9c4153 /lstring.h | |
parent | 921b1723e2fddde0382143b28b5be3b7128204b8 (diff) | |
download | lua-ab7d9bfd0c38f1dd8eda40ae3c1f1c686564a92d.tar.gz lua-ab7d9bfd0c38f1dd8eda40ae3c1f1c686564a92d.tar.bz2 lua-ab7d9bfd0c38f1dd8eda40ae3c1f1c686564a92d.zip |
cleaner code for manipulation of `marked' field
Diffstat (limited to 'lstring.h')
-rw-r--r-- | lstring.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstring.h,v 1.36 2002/04/30 13:01:48 roberto Exp roberto $ | 2 | ** $Id: lstring.h,v 1.37 2002/08/16 14:45:55 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 | */ |
@@ -8,11 +8,11 @@ | |||
8 | #define lstring_h | 8 | #define lstring_h |
9 | 9 | ||
10 | 10 | ||
11 | #include "lgc.h" | ||
11 | #include "lobject.h" | 12 | #include "lobject.h" |
12 | #include "lstate.h" | 13 | #include "lstate.h" |
13 | 14 | ||
14 | 15 | ||
15 | |||
16 | #define sizestring(l) (cast(lu_mem, sizeof(union TString))+ \ | 16 | #define sizestring(l) (cast(lu_mem, sizeof(union TString))+ \ |
17 | (cast(lu_mem, l)+1)*sizeof(char)) | 17 | (cast(lu_mem, l)+1)*sizeof(char)) |
18 | 18 | ||
@@ -22,7 +22,7 @@ | |||
22 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ | 22 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ |
23 | (sizeof(s)/sizeof(char))-1)) | 23 | (sizeof(s)/sizeof(char))-1)) |
24 | 24 | ||
25 | #define luaS_fix(s) ((s)->tsv.marked |= (1<<4)) | 25 | #define luaS_fix(s) setbit((s)->tsv.marked, FIXEDBIT) |
26 | 26 | ||
27 | void luaS_resize (lua_State *L, int newsize); | 27 | void luaS_resize (lua_State *L, int newsize); |
28 | Udata *luaS_newudata (lua_State *L, size_t s); | 28 | Udata *luaS_newudata (lua_State *L, size_t s); |