aboutsummaryrefslogtreecommitdiff
blob: a21bf6518aeb73fc02e16b38cccfedfa604959fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Complex object interface */

#ifndef Py_COMPLEXOBJECT_H
#define Py_COMPLEXOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif

typedef struct Py_complex_t {
    double real;
    double imag;
} Py_complex;

typedef struct {
    PyObject_HEAD
    Py_complex cval;
} PyComplexObject;

PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *obj);
PyAPI_FUNC(PyObject *) PyComplex_FromCComplex(Py_complex c);

#ifdef __cplusplus
}
#endif
#endif /* !Py_COMPLEXOBJECT_H */