diff options
| author | Dong-hee Na <donghee.na92@gmail.com> | 2020-02-14 02:37:17 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-13 18:37:17 +0100 |
| commit | d905df766c367c350f20c46ccd99d4da19ed57d8 (patch) | |
| tree | 9e08a6c88d6b0dd4e73810c3f3a152b61bd773aa /Include/bytesobject.h | |
| parent | 968dcd9e7a4d3aa9aaa1dfca693adf60d6b71ce7 (diff) | |
| download | cpython-git-d905df766c367c350f20c46ccd99d4da19ed57d8.tar.gz | |
bpo-39573: Add Py_IS_TYPE() function (GH-18488)
Co-Author: Neil Schemenauer <nas-github@arctrix.com>
Diffstat (limited to 'Include/bytesobject.h')
| -rw-r--r-- | Include/bytesobject.h | 2 |
1 files changed, 1 insertions, 1 deletions
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 *); |
