Lua 5.1.4: lstring.h


L0001    /*
L0002    ** $Id: lstring.h,v 1.43.1.1 2007/12/27 13:02:25 roberto Exp $
L0003    ** String table (keep all strings handled by Lua)
L0004    ** See Copyright Notice in lua.h
L0005    */
L0006    
L0007    #ifndef lstring_h
L0008    #define lstring_h
L0009    
L0010    
L0011    #include "lgc.h"
L0012    #include "lobject.h"
L0013    #include "lstate.h"
L0014    
L0015    
L0016    #define sizestring(s)	(sizeof(union TString)+((s)->len+1)*sizeof(char))
L0017    
L0018    #define sizeudata(u)	(sizeof(union Udata)+(u)->len)
L0019    
L0020    #define luaS_new(L, s)	(luaS_newlstr(L, s, strlen(s)))
L0021    #define luaS_newliteral(L, s)	(luaS_newlstr(L, "" s, \
L0022                                     (sizeof(s)/sizeof(char))-1))
L0023    
L0024    #define luaS_fix(s)	l_setbit((s)->tsv.marked, FIXEDBIT)
L0025    
L0026    LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
L0027    LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
L0028    LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
L0029    
L0030    
L0031    #endif

Generated by pretty.lua