]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-91320: Fix more old-style cast warnings in C++ (#92247)
authorVictor Stinner <vstinner@python.org>
Tue, 3 May 2022 18:47:29 +0000 (20:47 +0200)
committerGitHub <noreply@github.com>
Tue, 3 May 2022 18:47:29 +0000 (20:47 +0200)
commitff3e9cdf334737aeedbbec2e5a219084d27db9cd
tree2ad9f899f486c03929282a520cb0a6f538447132
parentb270b82f1137ff25ee263eafd31503d760f3403d
gh-91320: Fix more old-style cast warnings in C++ (#92247)

Use _Py_CAST(), _Py_STATIC_CAST() and _PyASCIIObject_CAST() in
static inline functions to fix C++ compiler warnings:
"use of old-style cast" (clang -Wold-style-cast).

test_cppext now builds the C++ test extension with -Wold-style-cast.
Include/cpython/unicodeobject.h
Include/cpython/weakrefobject.h
Lib/test/test_cppext.py