https://github.com/python/cpython/commit/f3c11aa2548d3af91cbe4c46f5380a914255e374 commit: f3c11aa2548d3af91cbe4c46f5380a914255e374 branch: main author: Victor Stinner <[email protected]> committer: vstinner <[email protected]> date: 2026-11-18T21:49:48Z summary:
gh-162214: Define STRINGLIB_IS_UNICODE macro in bytes_methods.c (#162222) Example of fixed compiler warnings when Python is built with -Wundef: In file included from Objects/bytes_methods.c:386: Objects/stringlib/count.h:10:6: warning: 'STRINGLIB_IS_UNICODE' is not defined, evaluates to '0' [-Wundef] 10 | #if !STRINGLIB_IS_UNICODE || STRINGLIB_MAX_CHAR > 0x7Fu files: M Objects/bytes_methods.c diff --git a/Objects/bytes_methods.c b/Objects/bytes_methods.c index 414afeb7bb003c..4021a0e8223694 100644 --- a/Objects/bytes_methods.c +++ b/Objects/bytes_methods.c @@ -377,6 +377,7 @@ _Py_bytes_maketrans(Py_buffer *frm, Py_buffer *to) } #define FASTSEARCH fastsearch +#define STRINGLIB_IS_UNICODE 0 #define STRINGLIB(F) stringlib_##F #define STRINGLIB_CHAR char #define STRINGLIB_SIZEOF_CHAR 1 _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
