From d905df766c367c350f20c46ccd99d4da19ed57d8 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Fri, 14 Feb 2020 02:37:17 +0900 Subject: bpo-39573: Add Py_IS_TYPE() function (GH-18488) Co-Author: Neil Schemenauer --- Include/bytesobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Include/bytesobject.h') diff --git a/Include/bytesobject.h b/Include/bytesobject.h index 27c31ee342..5062d8d123 100644 --- a/Include/bytesobject.h +++ b/Include/bytesobject.h @@ -32,7 +32,7 @@ PyAPI_DATA(PyTypeObject) PyBytesIter_Type; #define PyBytes_Check(op) \ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_BYTES_SUBCLASS) -#define PyBytes_CheckExact(op) (Py_TYPE(op) == &PyBytes_Type) +#define PyBytes_CheckExact(op) Py_IS_TYPE(op, &PyBytes_Type) PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t); PyAPI_FUNC(PyObject *) PyBytes_FromString(const char *); -- cgit v1.2.1