diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-09-10 23:37:46 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-09-10 23:37:46 +0000 |
commit | 51b017a4c4de92c6030a3384753225278680386e (patch) | |
tree | 28377874d2525890e5d6cc1402cfec9267c366cb /Include/tupleobject.h | |
parent | 8d54f5175d3045a7cfb6a5282b9135e2762c7c73 (diff) | |
download | cpython-51b017a4c4de92c6030a3384753225278680386e.tar.gz |
More on SF bug [#460020] bug or feature: unicode() and subclasses.
tuple(i) repaired to return a true tuple when i is an instance of a
tuple subclass.
Added PyTuple_CheckExact macro.
PySequence_Tuple(): if a tuple-like object isn't exactly a tuple, it's
not safe to return the object as-is -- make a new tuple of it instead.
Diffstat (limited to 'Include/tupleobject.h')
-rw-r--r-- | Include/tupleobject.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/tupleobject.h b/Include/tupleobject.h index 3da3fe0a49..c5ec1c2cec 100644 --- a/Include/tupleobject.h +++ b/Include/tupleobject.h @@ -27,6 +27,7 @@ typedef struct { extern DL_IMPORT(PyTypeObject) PyTuple_Type; #define PyTuple_Check(op) PyObject_TypeCheck(op, &PyTuple_Type) +#define PyTuple_CheckExact(op) ((op)->ob_type == &PyTuple_Type) extern DL_IMPORT(PyObject *) PyTuple_New(int size); extern DL_IMPORT(int) PyTuple_Size(PyObject *); |