diff options
| author | Victor Stinner <vstinner@python.org> | 2022-06-03 00:59:57 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-03 00:59:57 +0200 |
| commit | 941d7054c1f73aa097bdc4e55ede819c8f123819 (patch) | |
| tree | 2ce64d3584520c268d2e71d947efba71cd4d8fdd /Include/pyerrors.h | |
| parent | 069c96f84ccd302436be180c8628289cc0efa977 (diff) | |
| download | cpython-git-941d7054c1f73aa097bdc4e55ede819c8f123819.tar.gz | |
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/pyerrors.h')
| -rw-r--r-- | Include/pyerrors.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h index 34e3de3328..4944feecd8 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -62,7 +62,7 @@ PyAPI_FUNC(void) PyException_SetContext(PyObject *, PyObject *); PyAPI_FUNC(const char *) PyExceptionClass_Name(PyObject *); -#define PyExceptionInstance_Class(x) ((PyObject*)Py_TYPE(x)) +#define PyExceptionInstance_Class(x) _PyObject_CAST(Py_TYPE(x)) #define _PyBaseExceptionGroup_Check(x) \ PyObject_TypeCheck(x, (PyTypeObject *)PyExc_BaseExceptionGroup) |
