mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
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:
parent
1140cb2b9e
commit
2400fa4ad1
4 changed files with 45 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue