Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.h"
#include <string.h>
#include "lua.h"
#include "ldebug.h"
#include "ldo.h"
#include "lmem.h"
#include "lobject.h"
#include "lstate.h"
#include "lstring.h"
Go to the source code of this file.
Macros | |
#define | lstring_c |
#define | LUA_CORE |
#define | MAXSTRTB cast_int(luaM_limitN(MAX_INT, TString*)) |
Functions | |
int | luaS_eqlngstr (TString *a, TString *b) |
unsigned int | luaS_hash (const char *str, size_t l, unsigned int seed) |
unsigned int | luaS_hashlongstr (TString *ts) |
static void | tablerehash (TString **vect, int osize, int nsize) |
void | luaS_resize (lua_State *L, int nsize) |
void | luaS_clearcache (global_State *g) |
void | luaS_init (lua_State *L) |
static TString * | createstrobj (lua_State *L, size_t l, int tag, unsigned int h) |
TString * | luaS_createlngstrobj (lua_State *L, size_t l) |
void | luaS_remove (lua_State *L, TString *ts) |
static void | growstrtab (lua_State *L, stringtable *tb) |
static TString * | internshrstr (lua_State *L, const char *str, size_t l) |
TString * | luaS_newlstr (lua_State *L, const char *str, size_t l) |
TString * | luaS_new (lua_State *L, const char *str) |
Udata * | luaS_newudata (lua_State *L, size_t s, int nuvalue) |
#define lstring_c |
Definition at line 7 of file lua-5.4.3/src/lstring.c.
#define LUA_CORE |
Definition at line 8 of file lua-5.4.3/src/lstring.c.
#define MAXSTRTB cast_int(luaM_limitN(MAX_INT, TString*)) |
Definition at line 28 of file lua-5.4.3/src/lstring.c.
Referenced by growstrtab().
Definition at line 143 of file lua-5.4.3/src/lstring.c.
References TString::extra, gco2ts, getstr, TString::hash, luaC_newobj(), and sizelstring.
Referenced by internshrstr(), and luaS_createlngstrobj().
|
static |
Definition at line 174 of file lua-5.4.3/src/lstring.c.
References luaC_fullgc(), luaM_error, luaS_resize(), MAX_INT, MAXSTRTB, stringtable::nuse, and stringtable::size.
Referenced by internshrstr().
Definition at line 188 of file lua-5.4.3/src/lstring.c.
References cast_byte, changewhite, createstrobj(), G, getstr, growstrtab(), stringtable::hash, TString::hnext, isdead, lmod, lua_assert, LUA_VSHRSTR, luaS_hash(), NULL, stringtable::nuse, global_State::seed, TString::shrlen, stringtable::size, global_State::strt, and TString::u.
Referenced by luaS_newlstr().
void luaS_clearcache | ( | global_State * | g | ) |
Definition at line 110 of file lua-5.4.3/src/lstring.c.
References iswhite, global_State::memerrmsg, global_State::strcache, STRCACHE_M, and STRCACHE_N.
Definition at line 157 of file lua-5.4.3/src/lstring.c.
References createstrobj(), G, TString::lnglen, LUA_VLNGSTR, and TString::u.
Referenced by luaS_newlstr().
Definition at line 34 of file lua-5.4.3/src/lstring.c.
References getstr, TString::lnglen, lua_assert, LUA_VLNGSTR, and TString::u.
unsigned int luaS_hash | ( | const char * | str, |
size_t | l, | ||
unsigned int | seed ) |
Definition at line 43 of file lua-5.4.3/src/lstring.c.
References cast_byte, and cast_uint.
Referenced by internshrstr(), and luaS_hashlongstr().
unsigned int luaS_hashlongstr | ( | TString * | ts | ) |
Definition at line 51 of file lua-5.4.3/src/lstring.c.
References TString::extra, getstr, TString::hash, TString::lnglen, lua_assert, LUA_VLNGSTR, luaS_hash(), and TString::u.
void luaS_init | ( | lua_State * | L | ) |
Definition at line 123 of file lua-5.4.3/src/lstring.c.
References G, stringtable::hash, luaC_fix(), luaM_newvector, luaS_newliteral, MEMERRMSG, global_State::memerrmsg, MINSTRTABSIZE, obj2gco, stringtable::size, global_State::strcache, STRCACHE_M, STRCACHE_N, and tablerehash().
Definition at line 241 of file lua-5.4.3/src/lstring.c.
References G, getstr, luaS_newlstr(), point2uint, STRCACHE_M, and STRCACHE_N.
Definition at line 221 of file lua-5.4.3/src/lstring.c.
References getstr, internshrstr(), LUAI_MAXSHORTLEN, luaM_toobig(), luaS_createlngstrobj(), and MAX_SIZE.
Referenced by luaS_new().
Definition at line 258 of file lua-5.4.3/src/lstring.c.
References gco2u, Udata::len, LUA_VUSERDATA, luaC_newobj(), luaM_toobig(), MAX_SIZE, Udata::metatable, NULL, Udata::nuvalue, s, setnilvalue, sizeudata, udatamemoffset, and Udata::uv.
Definition at line 164 of file lua-5.4.3/src/lstring.c.
References G, TString::hash, stringtable::hash, TString::hnext, lmod, stringtable::nuse, stringtable::size, and TString::u.
void luaS_resize | ( | lua_State * | L, |
int | nsize ) |
Definition at line 85 of file lua-5.4.3/src/lstring.c.
References G, stringtable::hash, luaM_reallocvector, NULL, stringtable::size, and tablerehash().
Referenced by growstrtab().
|
static |
Definition at line 62 of file lua-5.4.3/src/lstring.c.
References TString::hash, TString::hnext, lmod, NULL, and TString::u.
Referenced by luaS_init(), and luaS_resize().