Skip to content

Commit

Permalink
Remove dead code in string.c
Browse files Browse the repository at this point in the history
The STR_DEC_LEN macro is not used.
  • Loading branch information
peterzhu2118 committed May 26, 2023
1 parent c6e4337 commit c37ebfe
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions string.c
Expand Up @@ -125,17 +125,6 @@ VALUE rb_cSymbol;
}\
} while (0)

#define STR_DEC_LEN(str) do {\
if (STR_EMBED_P(str)) {\
long n = RSTRING_LEN(str);\
n--;\
STR_SET_EMBED_LEN((str), n);\
}\
else {\
RSTRING(str)->as.heap.len--;\
}\
} while (0)

static inline bool
str_enc_fastpath(VALUE str)
{
Expand Down

0 comments on commit c37ebfe

Please sign in to comment.