diff options
| author | ydah <t.yudai92@gmail.com> | 2024-10-03 21:05:21 +0900 |
|---|---|---|
| committer | Yudai Takada <t.yudai92@gmail.com> | 2025-01-09 02:33:48 +0900 |
| commit | 36b6625ba9ccaa0ab88dd56b3f41c70e161f3df0 (patch) | |
| tree | 154a2be2880315f86a3fa616999365ba838b3d06 | |
| parent | 500a87756f9873a320aa3a11ab2d1ac4e1b4afee (diff) | |
Refactor `parse_isalnum` and `parse_isxdigit` to use macro
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11780
| -rw-r--r-- | parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -274,7 +274,7 @@ parse_isdigit(int c) static inline int parse_isalnum(int c) { - return parse_isalpha(c) || parse_isdigit(c); + return ISALPHA(c) || ISDIGIT(c); } #undef ISALNUM @@ -283,7 +283,7 @@ parse_isalnum(int c) static inline int parse_isxdigit(int c) { - return parse_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f'); + return ISDIGIT(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f'); } #undef ISXDIGIT |
