summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-06-01 06:56:35 (GMT)
committerGitHub <noreply@github.com>2023-06-01 06:56:35 (GMT)
commit8ed705c083e8e5ff37649d998a8b1524ec921519 (patch)
tree88bdd612236308b4585d851e168c94dc1ddf5bf0 /Modules/arraymodule.c
parentf332594dd47947612e1e5d2faf287930552a5110 (diff)
downloadcpython-8ed705c083e8e5ff37649d998a8b1524ec921519.zip
cpython-8ed705c083e8e5ff37649d998a8b1524ec921519.tar.gz
cpython-8ed705c083e8e5ff37649d998a8b1524ec921519.tar.bz2
gh-105156: Deprecate the old Py_UNICODE type in C API (#105157)
Deprecate the old Py_UNICODE and PY_UNICODE_TYPE types in the C API: use wchar_t instead. Replace Py_UNICODE with wchar_t in multiple C files. Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index f94bbec..999b848 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1830,10 +1830,10 @@ typecode_to_mformat_code(char typecode)
return UNSIGNED_INT8;
case 'u':
- if (sizeof(Py_UNICODE) == 2) {
+ if (sizeof(wchar_t) == 2) {
return UTF16_LE + is_big_endian;
}
- if (sizeof(Py_UNICODE) == 4) {
+ if (sizeof(wchar_t) == 4) {
return UTF32_LE + is_big_endian;
}
return UNKNOWN_FORMAT;