The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Functions
lstring.h File Reference
#include "lgc.h"
#include "lobject.h"
#include "lstate.h"
Include dependency graph for lstring.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define sizestring(s)   (sizeof(union TString)+((s)->len+1)*sizeof(char))
 
#define sizeudata(u)   (sizeof(union Udata)+(u)->len)
 
#define luaS_newliteral(L, s)
 
#define luaS_fix(s)   l_setbit((s)->tsv.marked, FIXEDBIT)
 
#define isreserved(s)   ((s)->tsv.tt == LUA_TSHRSTR && (s)->tsv.extra > 0)
 
#define eqshrstr(a, b)   check_exp((a)->tsv.tt == LUA_TSHRSTR, (a) == (b))
 

Functions

LUAI_FUNC unsigned int luaS_hash (const char *str, size_t l, unsigned int seed)
 
LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b)
 
LUAI_FUNC int luaS_eqstr (TString *a, TString *b)
 
LUAI_FUNC void luaS_resize (lua_State *L, int newsize)
 
LUAI_FUNC UdataluaS_newudata (lua_State *L, size_t s, Table *e)
 
LUAI_FUNC TStringluaS_newlstr (lua_State *L, const char *str, size_t l)
 
LUAI_FUNC TStringluaS_new (lua_State *L, const char *str)
 

Macro Definition Documentation

#define eqshrstr (   a,
  b 
)    check_exp((a)->tsv.tt == LUA_TSHRSTR, (a) == (b))

Definition at line 33 of file lstring.h.

Referenced by luaH_getstr(), luaS_eqstr(), and luaV_equalobj_().

#define isreserved (   s)    ((s)->tsv.tt == LUA_TSHRSTR && (s)->tsv.extra > 0)

Definition at line 27 of file lstring.h.

Referenced by llex(), and undefgoto().

#define luaS_fix (   s)    l_setbit((s)->tsv.marked, FIXEDBIT)

Definition at line 21 of file lstring.h.

Referenced by f_luaopen(), luaT_init(), luaX_init(), and luaX_setinput().

#define luaS_newliteral (   L,
  s 
)
Value:
(luaS_newlstr(L, "" s, \
(sizeof(s)/sizeof(char))-1))
LUAI_FUNC TString * luaS_newlstr(lua_State *L, const char *str, size_t l)
Definition: lstring.cpp:155
GLdouble s
Definition: glew.h:1358

Definition at line 18 of file lstring.h.

Referenced by f_luaopen(), and seterrorobj().

#define sizestring (   s)    (sizeof(union TString)+((s)->len+1)*sizeof(char))

Definition at line 14 of file lstring.h.

Referenced by freeobj(), and reallymarkobject().

#define sizeudata (   u)    (sizeof(union Udata)+(u)->len)

Definition at line 16 of file lstring.h.

Referenced by freeobj(), and reallymarkobject().

Function Documentation

LUAI_FUNC int luaS_eqlngstr ( TString a,
TString b 
)

Definition at line 32 of file lstring.cpp.

References getstr, TString::len, lua_assert, LUA_TLNGSTR, and TString::tsv.

Referenced by luaS_eqstr(), and luaV_equalobj_().

LUAI_FUNC int luaS_eqstr ( TString a,
TString b 
)
LUAI_FUNC unsigned int luaS_hash ( const char *  str,
size_t  l,
unsigned int  seed 
)

Definition at line 50 of file lstring.cpp.

References cast, cast_byte, h, and LUAI_HASHLIMIT.

Referenced by internshrstr(), mainposition(), and makeseed().

LUAI_FUNC TString* luaS_new ( lua_State L,
const char *  str 
)
LUAI_FUNC TString* luaS_newlstr ( lua_State L,
const char *  str,
size_t  l 
)
LUAI_FUNC Udata* luaS_newudata ( lua_State L,
size_t  s,
Table e 
)
LUAI_FUNC void luaS_resize ( lua_State L,
int  newsize 
)