Mercurial > cpython-lru_cache-weakref
diff Include/stringobject.h @ 19846:662e22f99639 legacy-trunk
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.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Tue, 11 Sep 2001 01:41:59 +0000 |
| parents | 844553473fa4 |
| children | 3d299b156511 |
line wrap: on
line diff
--- a/Include/stringobject.h Mon Sep 10 23:53:53 2001 +0000 +++ b/Include/stringobject.h Tue Sep 11 01:41:59 2001 +0000 @@ -52,6 +52,7 @@ 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 *);
