Defines | Functions

lua/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.

Defines

#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 eqstr(a, b)   ((a) == (b))

Functions

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)

Define Documentation

#define eqstr (   a,
  b 
)    ((a) == (b))
#define luaS_fix (   s  )     l_setbit((s)->tsv.marked, FIXEDBIT)

Definition at line 22 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))

Definition at line 19 of file lstring.h.

Referenced by f_luaopen(), and seterrorobj().

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

Definition at line 15 of file lstring.h.

Referenced by freeobj().

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

Definition at line 17 of file lstring.h.

Referenced by freeobj().


Function Documentation

LUAI_FUNC TString* luaS_new ( lua_State L,
const char *  str 
)

Definition at line 99 of file lstring.c.

References luaS_newlstr().

Referenced by breaklabel(), gotostat(), lua_getfield(), lua_getglobal(), lua_pushstring(), lua_setfield(), lua_setglobal(), luaT_init(), luaX_init(), luaX_setinput(), luaY_parser(), and resume_error().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC TString* luaS_newlstr ( lua_State L,
const char *  str,
size_t  l 
)

Definition at line 76 of file lstring.c.

References cast, changewhite, G, gch, getstr, h, TString::hash, isdead, TString::len, lmod, newlstr(), rawgco2ts, step(), and TString::tsv.

Referenced by LoadString(), lua_concat(), lua_pushlstring(), luaK_numberK(), luaO_pushvfstring(), luaS_new(), luaV_concat(), luaV_tostring(), luaX_newstring(), and pushstr().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC Udata* luaS_newudata ( lua_State L,
size_t  s,
Table e 
)

Definition at line 104 of file lstring.c.

References Udata::env, Udata::len, LUA_TUSERDATA, luaC_newobj(), luaM_toobig(), MAX_SIZET, Udata::metatable, GCObject::u, and Udata::uv.

Referenced by lua_newuserdata().

Here is the call graph for this function:

Here is the caller graph for this function:

LUAI_FUNC void luaS_resize ( lua_State L,
int  newsize 
)

Definition at line 22 of file lstring.c.

References bitmask, G, gch, gco2ts, GCSsweepstring, h, stringtable::hash, lmod, lua_assert, luaC_runtilstate(), luaM_reallocvector, next, resetoldbit, and stringtable::size.

Referenced by checkSizes(), f_luaopen(), and newlstr().

Here is the call graph for this function:

Here is the caller graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:07:50 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs