diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-07-15 14:40:27 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-07-15 14:40:27 -0300 |
| commit | 60b6599e8322dd93e3b33c9496ff035a1c45552f (patch) | |
| tree | eb0d9ffd85b1062aea36fa5b82e714931e718082 /lstring.h | |
| parent | c612685d4b9ecdf0525b4d4410efa9f70d4b4518 (diff) | |
| download | lua-60b6599e8322dd93e3b33c9496ff035a1c45552f.tar.gz lua-60b6599e8322dd93e3b33c9496ff035a1c45552f.tar.bz2 lua-60b6599e8322dd93e3b33c9496ff035a1c45552f.zip | |
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.)
Diffstat (limited to '')
| -rw-r--r-- | lstring.h | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -56,7 +56,7 @@ | |||
| 56 | 56 | ||
| 57 | LUAI_FUNC unsigned luaS_hash (const char *str, size_t l, unsigned seed); | 57 | LUAI_FUNC unsigned luaS_hash (const char *str, size_t l, unsigned seed); |
| 58 | LUAI_FUNC unsigned luaS_hashlongstr (TString *ts); | 58 | LUAI_FUNC unsigned luaS_hashlongstr (TString *ts); |
| 59 | LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b); | 59 | LUAI_FUNC int luaS_eqstr (TString *a, TString *b); |
| 60 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); | 60 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); |
| 61 | LUAI_FUNC void luaS_clearcache (global_State *g); | 61 | LUAI_FUNC void luaS_clearcache (global_State *g); |
| 62 | LUAI_FUNC void luaS_init (lua_State *L); | 62 | LUAI_FUNC void luaS_init (lua_State *L); |
| @@ -69,5 +69,6 @@ LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l); | |||
| 69 | LUAI_FUNC TString *luaS_newextlstr (lua_State *L, | 69 | LUAI_FUNC TString *luaS_newextlstr (lua_State *L, |
| 70 | const char *s, size_t len, lua_Alloc falloc, void *ud); | 70 | const char *s, size_t len, lua_Alloc falloc, void *ud); |
| 71 | LUAI_FUNC size_t luaS_sizelngstr (size_t len, int kind); | 71 | LUAI_FUNC size_t luaS_sizelngstr (size_t len, int kind); |
| 72 | LUAI_FUNC TString *luaS_normstr (lua_State *L, TString *ts); | ||
| 72 | 73 | ||
| 73 | #endif | 74 | #endif |
