mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
bpo-39573: Add Py_IS_TYPE() function (GH-18488)
Co-Author: Neil Schemenauer <nas-github@arctrix.com>
This commit is contained in:
parent
968dcd9e7a
commit
d905df766c
32 changed files with 61 additions and 46 deletions
|
@ -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 *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue