mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
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).
This commit is contained in:
parent
069c96f84c
commit
941d7054c1
3 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue