diff options
author | Victor Stinner <vstinner@python.org> | 2022-06-02 22:59:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-02 22:59:57 (GMT) |
commit | 941d7054c1f73aa097bdc4e55ede819c8f123819 (patch) | |
tree | 2ce64d3584520c268d2e71d947efba71cd4d8fdd /Include/boolobject.h | |
parent | 069c96f84ccd302436be180c8628289cc0efa977 (diff) | |
download | cpython-941d7054c1f73aa097bdc4e55ede819c8f123819.zip cpython-941d7054c1f73aa097bdc4e55ede819c8f123819.tar.gz cpython-941d7054c1f73aa097bdc4e55ede819c8f123819.tar.bz2 |
gh-91320: Fix more old-style cast warnings in C++ (#93285)
Use _PyObject_CAST() in the public C API to fix C++ compiler
warnings: "use of old-style cast" (clang -Wold-style-cast).
Diffstat (limited to 'Include/boolobject.h')
-rw-r--r-- | Include/boolobject.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/boolobject.h b/Include/boolobject.h index 28068d1..0a661ff 100644 --- a/Include/boolobject.h +++ b/Include/boolobject.h @@ -19,8 +19,8 @@ PyAPI_DATA(PyLongObject) _Py_FalseStruct; PyAPI_DATA(PyLongObject) _Py_TrueStruct; /* Use these macros */ -#define Py_False ((PyObject *) &_Py_FalseStruct) -#define Py_True ((PyObject *) &_Py_TrueStruct) +#define Py_False _PyObject_CAST(&_Py_FalseStruct) +#define Py_True _PyObject_CAST(&_Py_TrueStruct) // Test if an object is the True singleton, the same as "x is True" in Python. PyAPI_FUNC(int) Py_IsTrue(PyObject *x); |