summaryrefslogtreecommitdiffstats
path: root/Include/stringobject.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-11 01:41:59 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-11 01:41:59 (GMT)
commit5a49ade70e19a76aa252cd596accf79930765f31 (patch)
treeab54e1ff25892e49fbb483ba4e461f30763e1fc6 /Include/stringobject.h
parent8ff70a9606aa2f51f8329fbf09dfbbbae6ab6c11 (diff)
downloadcpython-5a49ade70e19a76aa252cd596accf79930765f31.zip
cpython-5a49ade70e19a76aa252cd596accf79930765f31.tar.gz
cpython-5a49ade70e19a76aa252cd596accf79930765f31.tar.bz2
More on SF bug [#460020] bug or feature: unicode() and subclasses.
Repaired str(i) to return a genuine string when i is an instance of a str subclass. New PyString_CheckExact() macro.
Diffstat (limited to 'Include/stringobject.h')
-rw-r--r--Include/stringobject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/stringobject.h b/Include/stringobject.h
index a67e33e..052eacf 100644
--- a/Include/stringobject.h
+++ b/Include/stringobject.h
@@ -52,6 +52,7 @@ typedef struct {
extern DL_IMPORT(PyTypeObject) PyString_Type;
#define PyString_Check(op) PyObject_TypeCheck(op, &PyString_Type)
+#define PyString_CheckExact(op) ((op)->ob_type == &PyString_Type)
extern DL_IMPORT(PyObject *) PyString_FromStringAndSize(const char *, int);
extern DL_IMPORT(PyObject *) PyString_FromString(const char *);