mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
Short strings can be external, too
That complicates a little object equality (and therefore table access for long strings), but the old behavior was somewhat weird. (Short strings, a concept otherwise absent from the manual, could not be external.)
This commit is contained in:
parent
c612685d4b
commit
60b6599e83
9 changed files with 168 additions and 120 deletions
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
LUAI_FUNC unsigned luaS_hash (const char *str, size_t l, unsigned seed);
|
||||
LUAI_FUNC unsigned luaS_hashlongstr (TString *ts);
|
||||
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 void luaS_clearcache (global_State *g);
|
||||
LUAI_FUNC void luaS_init (lua_State *L);
|
||||
|
|
@ -69,5 +69,6 @@ LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l);
|
|||
LUAI_FUNC TString *luaS_newextlstr (lua_State *L,
|
||||
const char *s, size_t len, lua_Alloc falloc, void *ud);
|
||||
LUAI_FUNC size_t luaS_sizelngstr (size_t len, int kind);
|
||||
LUAI_FUNC TString *luaS_normstr (lua_State *L, TString *ts);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue