1 #ifndef COMPLEXOBJECT_H
2 #define COMPLEXOBJECT_H
7 /* Complex number structure */
14 /* Operations on complex numbers from complexmodule.c */
16 #define c_sum _Py_c_sum
17 #define c_diff _Py_c_diff
18 #define c_neg _Py_c_neg
19 #define c_prod _Py_c_prod
20 #define c_quot _Py_c_quot
21 #define c_pow _Py_c_pow
23 extern complex c_sum();
24 extern complex c_diff();
25 extern complex c_neg();
26 extern complex c_prod();
27 extern complex c_quot();
28 extern complex c_pow();
31 /* Complex object interface */
34 PyComplexObject represents a complex number with double-precision
35 real and imaginary parts.
43 extern DL_IMPORT(PyTypeObject
) PyComplex_Type
;
45 #define PyComplex_Check(op) ((op)->ob_type == &PyComplex_Type)
47 extern PyObject
*PyComplex_FromCComplex
Py_PROTO((complex));
48 extern PyObject
*PyComplex_FromDoubles
Py_PROTO((double real
, double imag
));
50 extern double PyComplex_RealAsDouble
Py_PROTO((PyObject
*op
));
51 extern double PyComplex_ImagAsDouble
Py_PROTO((PyObject
*op
));
52 extern complex PyComplex_AsCComplex
Py_PROTO((PyObject
*op
));
57 #endif /* !COMPLEXOBJECT_H */