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 | MEMERRMSG "not enough memory" |
#define | LUAI_HASHLIMIT 5 |
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) |
void | luaS_resize (lua_State *L, int newsize) |
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 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) |
#define lstring_c |
Definition at line 7 of file lua-5.3.6/src/lstring.c.
#define LUA_CORE |
Definition at line 8 of file lua-5.3.6/src/lstring.c.
#define LUAI_HASHLIMIT 5 |
Definition at line 33 of file lua-5.3.6/src/lstring.c.
Referenced by luaS_hash().
#define MEMERRMSG "not enough memory" |
Definition at line 25 of file lua-5.3.6/src/lstring.c.
Referenced by luaS_init().
Definition at line 133 of file lua-5.3.6/src/lstring.c.
References TString::extra, gco2ts, getstr, TString::hash, luaC_newobj(), and sizelstring.
Referenced by internshrstr(), and luaS_createlngstrobj().
Definition at line 167 of file lua-5.3.6/src/lstring.c.
References cast_byte, changewhite, createstrobj(), G, getstr, stringtable::hash, TString::hnext, isdead, lmod, lua_assert, LUA_TSHRSTR, luaS_hash(), luaS_resize(), MAX_INT, 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 103 of file lua-5.3.6/src/lstring.c.
References iswhite, global_State::memerrmsg, global_State::strcache, STRCACHE_M, and STRCACHE_N.
Definition at line 147 of file lua-5.3.6/src/lstring.c.
References createstrobj(), G, TString::lnglen, LUA_TLNGSTR, and TString::u.
Referenced by LoadString(), loadStringN(), luaS_newlstr(), and luaV_concat().
Definition at line 40 of file lua-5.3.6/src/lstring.c.
References getstr, TString::lnglen, lua_assert, LUA_TLNGSTR, and TString::u.
unsigned int luaS_hash | ( | const char * | str, |
size_t | l, | ||
unsigned int | seed ) |
Definition at line 49 of file lua-5.3.6/src/lstring.c.
References cast, cast_byte, and LUAI_HASHLIMIT.
Referenced by internshrstr(), and luaS_hashlongstr().
unsigned int luaS_hashlongstr | ( | TString * | ts | ) |
Definition at line 58 of file lua-5.3.6/src/lstring.c.
References TString::extra, getstr, TString::hash, TString::lnglen, lua_assert, LUA_TLNGSTR, luaS_hash(), and TString::u.
Referenced by mainposition(), and mainposition().
void luaS_init | ( | lua_State * | L | ) |
Definition at line 116 of file lua-5.3.6/src/lstring.c.
References G, luaC_fix(), luaS_newliteral, luaS_resize(), global_State::memerrmsg, MEMERRMSG, MINSTRTABSIZE, obj2gco, global_State::strcache, STRCACHE_M, and STRCACHE_N.
Referenced by f_luaopen(), and f_luaopen().
Definition at line 219 of file lua-5.3.6/src/lstring.c.
References G, getstr, luaS_newlstr(), point2uint, STRCACHE_M, and STRCACHE_N.
Definition at line 199 of file lua-5.3.6/src/lstring.c.
References getstr, internshrstr(), LUAI_MAXSHORTLEN, luaM_toobig(), luaS_createlngstrobj(), and MAX_SIZE.
Referenced by luaS_new().
Definition at line 236 of file lua-5.3.6/src/lstring.c.
References gco2u, Udata::len, LUA_TUSERDATA, luaC_newobj(), luaM_toobig(), luaO_nilobject, MAX_SIZE, Udata::metatable, NULL, s, setuservalue, and sizeludata.
Definition at line 154 of file lua-5.3.6/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 | newsize ) |
Definition at line 71 of file lua-5.3.6/src/lstring.c.
References G, TString::hash, stringtable::hash, TString::hnext, lmod, lua_assert, luaM_reallocvector, NULL, stringtable::size, and TString::u.
Referenced by internshrstr(), and luaS_init().