summaryrefslogtreecommitdiff
path: root/Include/complexobject.h
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-12 19:12:49 +0000
committerTim Peters <tim.peters@gmail.com>2001-09-12 19:12:49 +0000
commit62981fda639ed86b1b422294b51a82c4003ade3d (patch)
treed7edbd788090ccb114e747dd66f61362255e5d9a /Include/complexobject.h
parent6ed1871fa3944dbd38a0800d53d0a089394fac45 (diff)
downloadcpython-62981fda639ed86b1b422294b51a82c4003ade3d.tar.gz
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 edd20698f2..b82eb90dcf 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);