string.c: str_capacity don't check for immediates

`STR_EMBED_P` uses `FL_TEST_RAW` meaning we already assume `str`
isn't an immediate, so we can use `FL_TEST_RAW` here too.
This commit is contained in:
Jean Boussier 2024-08-08 12:42:04 +02:00
parent af44af238b
commit 2bd5dc47ac
Notes: git 2024-08-09 13:21:15 +00:00

View File

@ -880,7 +880,7 @@ str_capacity(VALUE str, const int termlen)
if (STR_EMBED_P(str)) {
return str_embed_capa(str) - termlen;
}
else if (FL_TEST(str, STR_SHARED|STR_NOFREE)) {
else if (FL_ANY_RAW(str, STR_SHARED|STR_NOFREE)) {
return RSTRING(str)->len;
}
else {