Kaydet (Commit) 5eef77a2 authored tarafından Guido van Rossum's avatar Guido van Rossum

Make the Py<type>_Check() macro use PyObject_TypeCheck().

üst deb77e83
......@@ -51,7 +51,7 @@ typedef struct {
extern DL_IMPORT(PyTypeObject) PyString_Type;
#define PyString_Check(op) ((op)->ob_type == &PyString_Type)
#define PyString_Check(op) PyObject_TypeCheck(op, &PyString_Type)
extern DL_IMPORT(PyObject *) PyString_FromStringAndSize(const char *, int);
extern DL_IMPORT(PyObject *) PyString_FromString(const char *);
......
......@@ -26,7 +26,7 @@ typedef struct {
extern DL_IMPORT(PyTypeObject) PyTuple_Type;
#define PyTuple_Check(op) ((op)->ob_type == &PyTuple_Type)
#define PyTuple_Check(op) PyObject_TypeCheck(op, &PyTuple_Type)
extern DL_IMPORT(PyObject *) PyTuple_New(int size);
extern DL_IMPORT(int) PyTuple_Size(PyObject *);
......
......@@ -372,7 +372,7 @@ typedef struct {
extern DL_IMPORT(PyTypeObject) PyUnicode_Type;
#define PyUnicode_Check(op) (((op)->ob_type == &PyUnicode_Type))
#define PyUnicode_Check(op) PyObject_TypeCheck(op, &PyUnicode_Type)
/* Fast access macros */
#define PyUnicode_GET_SIZE(op) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment