Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

lua/lstring.c File Reference

#include <string.h>
#include "lua.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"

Include dependency graph for lstring.c:

Go to the source code of this file.

Defines

#define lstring_c

Functions

void luaS_freeall (lua_State *L)
void luaS_resize (lua_State *L, int newsize)
static TStringnewlstr (lua_State *L, const char *str, size_t l, lu_hash h)
TStringluaS_newlstr (lua_State *L, const char *str, size_t l)
UdataluaS_newudata (lua_State *L, size_t s)


Define Documentation

#define lstring_c
 

Definition at line 10 of file lstring.c.


Function Documentation

void luaS_freeall lua_State L  ) 
 

Definition at line 21 of file lstring.c.

References G, lua_assert, and luaM_freearray.

Referenced by close_state().

TString* luaS_newlstr lua_State L,
const char *  str,
size_t  l
 

Definition at line 75 of file lstring.c.

References G, GCObject::gch, gcotots, getstr, lmod, newlstr(), GCheader::next, and TString::tsv.

Referenced by LoadString(), lua_concat(), lua_pushlstring(), luaO_pushvfstring(), luaV_concat(), luaX_lex(), read_long_string(), and read_string().

Udata* luaS_newudata lua_State L,
size_t  s
 

Definition at line 93 of file lstring.c.

References cast, defaultmeta, G, hvalue, luaM_malloc, sizeudata, Udata::uv, and valtogco.

Referenced by lua_newuserdata().

void luaS_resize lua_State L,
int  newsize
 

Definition at line 27 of file lstring.c.

References cast, G, GCObject::gch, gcotots, stringtable::hash, lmod, lua_assert, luaM_freearray, luaM_newvector, next, GCheader::next, and stringtable::size.

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

static TString* newlstr lua_State L,
const char *  str,
size_t  l,
lu_hash  h
[static]
 

Definition at line 52 of file lstring.c.

References cast, G, stringtable::hash, lmod, luaM_malloc, luaS_resize(), MAX_INT, stringtable::nuse, stringtable::size, sizestring, TString::tsv, and valtogco.

Referenced by luaS_newlstr().


Generated on Sun Aug 18 10:49:25 2013 for rpm by  doxygen 1.4.4