diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2026-03-15 09:04:46 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2026-03-15 14:42:26 +0900 |
| commit | ca23c7c404871abec5acfedf35843387148350d8 (patch) | |
| tree | 3846b161ef06648da903dc8ae036b041e3f37ff7 /ext/strscan | |
| parent | 697eb6d828359451a19ab39e479f8f1ef397707d (diff) | |
[ruby/strscan] Do not use C99 style comment [ci skip]
The minimum required ruby version of this library is still 2.4.
C99 has been adopted since ruby 2.7.
https://github.com/ruby/strscan/commit/c50abc95ad
Diffstat (limited to 'ext/strscan')
| -rw-r--r-- | ext/strscan/strscan.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index 935fce19df..d00c66699a 100644 --- a/ext/strscan/strscan.c +++ b/ext/strscan/strscan.c @@ -1261,16 +1261,17 @@ strscan_parse_integer(struct strscanner *p, int base, long len) } static inline bool -strscan_ascii_compat_fastpath(VALUE str) { +strscan_ascii_compat_fastpath(VALUE str) +{ int encindex = ENCODING_GET_INLINED(str); - // The overwhelming majority of strings are in one of these 3 encodings. + /* The overwhelming majority of strings are in one of these 3 encodings. */ return encindex == utf8_encindex || encindex == binary_encindex || encindex == usascii_encindex; } static inline void strscan_must_ascii_compat(VALUE str) { - // The overwhelming majority of strings are in one of these 3 encodings. + /* The overwhelming majority of strings are in one of these 3 encodings. */ if (RB_LIKELY(strscan_ascii_compat_fastpath(str))) { return; } |
