aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-11-17 17:50:05 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2003-11-17 17:50:05 -0200
commitab7d9bfd0c38f1dd8eda40ae3c1f1c686564a92d (patch)
treee7f5231cc02b89b2507ad846d5d547e35e9c4153 /lstring.h
parent921b1723e2fddde0382143b28b5be3b7128204b8 (diff)
downloadlua-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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lstring.h b/lstring.h
index 13a12a5a..1fae1a58 100644
--- a/lstring.h
+++ b/lstring.h
@@ -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
27void luaS_resize (lua_State *L, int newsize); 27void luaS_resize (lua_State *L, int newsize);
28Udata *luaS_newudata (lua_State *L, size_t s); 28Udata *luaS_newudata (lua_State *L, size_t s);