Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #ifndef lstring_h
00008 #define lstring_h
00009
00010 #include "lgc.h"
00011 #include "lobject.h"
00012 #include "lstate.h"
00013
00014
00015 #define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char))
00016
00017 #define sizeudata(u) (sizeof(union Udata)+(u)->len)
00018
00019 #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \
00020 (sizeof(s)/sizeof(char))-1))
00021
00022 #define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT)
00023
00024
00025
00026
00027
00028
00029 #define eqstr(a,b) ((a) == (b))
00030
00031 LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
00032 LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e);
00033 LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);
00034 LUAI_FUNC TString *luaS_new (lua_State *L, const char *str);
00035
00036
00037 #endif