mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
gh-92135: Rename _Py_reinterpret_cast() to _Py_CAST() (#92230)
Rename also _Py_static_cast() to _Py_STATIC_CAST().
This commit is contained in:
parent
f6f36cc269
commit
fbd5539a54
9 changed files with 24 additions and 24 deletions
|
@ -104,7 +104,7 @@ struct _object {
|
|||
};
|
||||
|
||||
/* Cast argument to PyObject* type. */
|
||||
#define _PyObject_CAST(op) _Py_reinterpret_cast(PyObject*, (op))
|
||||
#define _PyObject_CAST(op) _Py_CAST(PyObject*, (op))
|
||||
|
||||
typedef struct {
|
||||
PyObject ob_base;
|
||||
|
@ -112,7 +112,7 @@ typedef struct {
|
|||
} PyVarObject;
|
||||
|
||||
/* Cast argument to PyVarObject* type. */
|
||||
#define _PyVarObject_CAST(op) _Py_reinterpret_cast(PyVarObject*, (op))
|
||||
#define _PyVarObject_CAST(op) _Py_CAST(PyVarObject*, (op))
|
||||
|
||||
|
||||
// Test if the 'x' object is the 'y' object, the same as "x is y" in Python.
|
||||
|
@ -781,7 +781,7 @@ static inline int PyType_Check(PyObject *op) {
|
|||
#endif
|
||||
|
||||
#define _PyType_CAST(op) \
|
||||
(assert(PyType_Check(op)), _Py_reinterpret_cast(PyTypeObject*, (op)))
|
||||
(assert(PyType_Check(op)), _Py_CAST(PyTypeObject*, (op)))
|
||||
|
||||
static inline int PyType_CheckExact(PyObject *op) {
|
||||
return Py_IS_TYPE(op, &PyType_Type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue