summaryrefslogtreecommitdiffstats
path: root/Include/stringobject.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-08-30 03:08:07 (GMT)
committerGuido van Rossum <guido@python.org>2001-08-30 03:08:07 (GMT)
commit5eef77a21be8a7895419cc84e8bf5554ca908b54 (patch)
tree303844a803afac99ee04d07dac4d19e7f148a1be /Include/stringobject.h
parentdeb77e839498e0e72a1e6ac4273a826d25c34be4 (diff)
downloadcpython-5eef77a21be8a7895419cc84e8bf5554ca908b54.zip
cpython-5eef77a21be8a7895419cc84e8bf5554ca908b54.tar.gz
cpython-5eef77a21be8a7895419cc84e8bf5554ca908b54.tar.bz2
Make the Py<type>_Check() macro use PyObject_TypeCheck().
Diffstat (limited to 'Include/stringobject.h')
-rw-r--r--Include/stringobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/stringobject.h b/Include/stringobject.h
index 2d9ed2d..a67e33e 100644
--- a/Include/stringobject.h
+++ b/Include/stringobject.h
@@ -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 *);