00001 
00002 
00003 
00004 
00005 
00006 
00007 #ifndef lstring_h
00008 #define lstring_h
00009 
00010 
00011 #include "lobject.h"
00012 #include "lstate.h"
00013 
00014 
00015 
00016 #define sizestring(l)   (cast(lu_mem, sizeof(union TString))+ \
00017                          (cast(lu_mem, l)+1)*sizeof(char))
00018 
00019 #define sizeudata(l)    (cast(lu_mem, sizeof(union Udata))+(l))
00020 
00021 #define luaS_new(L, s)  (luaS_newlstr(L, s, strlen(s)))
00022 #define luaS_newliteral(L, s)   (luaS_newlstr(L, "" s, \
00023                                  (sizeof(s)/sizeof(char))-1))
00024 
00025 #define luaS_fix(s)     ((s)->tsv.marked |= (1<<4))
00026 
00027 void luaS_resize (lua_State *L, int newsize)
00028         ;
00029 
00030 Udata *luaS_newudata (lua_State *L, size_t s)
00031         ;
00032 void luaS_freeall (lua_State *L)
00033         ;
00034 
00035 TString *luaS_newlstr (lua_State *L,  const char *str, size_t l)
00036         ;
00037 
00038 
00039 #endif