bpo-46670: Define all macros for stringlib (GH-31176)

bytesobject.c, bytearrayobject.c and unicodeobject.c now define all
macros used by stringlib, to avoid using undefined macros.
Fix "gcc -Wundef" warnings.
This commit is contained in:
Victor Stinner 2022-02-07 01:26:58 +01:00 committed by GitHub
parent 16f96a4cf9
commit 097f74a5a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 24 additions and 17 deletions

View file

@ -22,6 +22,7 @@
#define STRINGLIB_NEW PyUnicode_FromUnicode
#define STRINGLIB_CHECK PyUnicode_Check
#define STRINGLIB_CHECK_EXACT PyUnicode_CheckExact
#define STRINGLIB_MUTABLE 0
#define STRINGLIB_TOSTR PyObject_Str
#define STRINGLIB_TOASCII PyObject_ASCII