summaryrefslogtreecommitdiffstats
path: root/Include/complexobject.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-12 19:12:49 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-12 19:12:49 (GMT)
commit2400fa4ad115e8ebe75c61c3bb96bd7cf2364dd4 (patch)
treeb7b324cfd94a932ccfb9d533ce1df33c57413e3d /Include/complexobject.h
parent1140cb2b9e74ce302c35e84ac04adc0b11e2db00 (diff)
downloadcpython-2400fa4ad115e8ebe75c61c3bb96bd7cf2364dd4.zip
cpython-2400fa4ad115e8ebe75c61c3bb96bd7cf2364dd4.tar.gz
cpython-2400fa4ad115e8ebe75c61c3bb96bd7cf2364dd4.tar.bz2
Again perhaps the end of [#460020] bug or feature: unicode() and subclasses.
Inhibited complex unary plus optimization when applied to a complex subtype. Added PyComplex_CheckExact macro. Some comments and minor code fiddling.
Diffstat (limited to 'Include/complexobject.h')
-rw-r--r--Include/complexobject.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/complexobject.h b/Include/complexobject.h
index edd2069..b82eb90 100644
--- a/Include/complexobject.h
+++ b/Include/complexobject.h
@@ -43,6 +43,7 @@ typedef struct {
extern DL_IMPORT(PyTypeObject) PyComplex_Type;
#define PyComplex_Check(op) PyObject_TypeCheck(op, &PyComplex_Type)
+#define PyComplex_CheckExact(op) ((op)->ob_type == &PyComplex_Type)
extern DL_IMPORT(PyObject *) PyComplex_FromCComplex(Py_complex);
extern DL_IMPORT(PyObject *) PyComplex_FromDoubles(double real, double imag);