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.
This commit is contained in:
Tim Peters 2001-09-12 19:12:49 +00:00
parent 1140cb2b9e
commit 2400fa4ad1
4 changed files with 45 additions and 12 deletions

View file

@ -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);