We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2bcb9f commit 1f7ef05Copy full SHA for 1f7ef05
pandas/_libs/src/headers/portable.h
@@ -7,8 +7,9 @@
7
8
// GH-23516 - works around locale perf issues
9
// from MUSL libc, MIT Licensed - see LICENSES
10
-#define isdigit_ascii(c) ((unsigned)c - '0' < 10)
11
-#define isspace_ascii(c) (c == ' ' || (unsigned)c-'\t' < 5)
12
-#define toupper_ascii(c) (((unsigned)c-'a' < 26) ? (c & 0x5f) : c)
+#define isdigit_ascii(c) (((unsigned)(c) - '0') < 10u)
+#define isspace_ascii(c) (((c) == ' ') || (((unsigned)(c) - '\t') < 5))
+#define toupper_ascii(c) ((((unsigned)(c) - 'a') < 26) ? ((c) & 0x5f) : (c))
13
+#define tolower_ascii(c) ((((unsigned)(c) - 'A') < 26) ? ((c) | 0x20) : (c))
14
15
#endif
0 commit comments