bpo-46670: Define all macros for stringlib#31176
bpo-46670: Define all macros for stringlib#31176vstinner merged 1 commit intopython:mainfrom vstinner:undef_stringlib
Conversation
bytesobject.c, bytearrayobject.c and unicodeobject.c now define all macros used by stringlib, to avoid using undefined macros. Fix "gcc -Wundef" warnings.
|
cc @serhiy-storchaka: I already merged my PR, but you may want to have a look ;-) |
|
Was it needed to define STRINGLIB_MUTABLE? |
I prefer to always define the macro to reduce the risk of bugs related to typos: stringlib uses many macros, the risk of forgetting to define a macro and the risk of a typo is high. I adopted a smilar strategy in my #31171 change which replaces |
bytesobject.c, bytearrayobject.c and unicodeobject.c now define all
macros used by stringlib, to avoid using undefined macros.
Fix "gcc -Wundef" warnings.
https://bugs.python.org/issue46670