aboutsummaryrefslogtreecommitdiff
path: root/lstring.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-07-15 14:40:27 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-07-15 14:40:27 -0300
commit60b6599e8322dd93e3b33c9496ff035a1c45552f (patch)
treeeb0d9ffd85b1062aea36fa5b82e714931e718082 /lstring.h
parentc612685d4b9ecdf0525b4d4410efa9f70d4b4518 (diff)
downloadlua-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 'lstring.h')
-rw-r--r--lstring.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lstring.h b/lstring.h
index 1751e043..2eac222b 100644
--- a/lstring.h
+++ b/lstring.h
@@ -56,7 +56,7 @@
56 56
57LUAI_FUNC unsigned luaS_hash (const char *str, size_t l, unsigned seed); 57LUAI_FUNC unsigned luaS_hash (const char *str, size_t l, unsigned seed);
58LUAI_FUNC unsigned luaS_hashlongstr (TString *ts); 58LUAI_FUNC unsigned luaS_hashlongstr (TString *ts);
59LUAI_FUNC int luaS_eqlngstr (TString *a, TString *b); 59LUAI_FUNC int luaS_eqstr (TString *a, TString *b);
60LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 60LUAI_FUNC void luaS_resize (lua_State *L, int newsize);
61LUAI_FUNC void luaS_clearcache (global_State *g); 61LUAI_FUNC void luaS_clearcache (global_State *g);
62LUAI_FUNC void luaS_init (lua_State *L); 62LUAI_FUNC void luaS_init (lua_State *L);
@@ -69,5 +69,6 @@ LUAI_FUNC TString *luaS_createlngstrobj (lua_State *L, size_t l);
69LUAI_FUNC TString *luaS_newextlstr (lua_State *L, 69LUAI_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);
71LUAI_FUNC size_t luaS_sizelngstr (size_t len, int kind); 71LUAI_FUNC size_t luaS_sizelngstr (size_t len, int kind);
72LUAI_FUNC TString *luaS_normstr (lua_State *L, TString *ts);
72 73
73#endif 74#endif