1/* Complex number structure */
2
3#ifndef Py_COMPLEXOBJECT_H
4#define Py_COMPLEXOBJECT_H
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9/* Complex object interface */
10
11PyAPI_DATA(PyTypeObject) PyComplex_Type;
12
13#define PyComplex_Check(op) PyObject_TypeCheck((op), &PyComplex_Type)
14#define PyComplex_CheckExact(op) Py_IS_TYPE((op), &PyComplex_Type)
15
16PyAPI_FUNC(PyObject *) PyComplex_FromDoubles(double real, double imag);
17
18PyAPI_FUNC(double) PyComplex_RealAsDouble(PyObject *op);
19PyAPI_FUNC(double) PyComplex_ImagAsDouble(PyObject *op);
20
21#ifndef Py_LIMITED_API
22# define Py_CPYTHON_COMPLEXOBJECT_H
23# include "cpython/complexobject.h"
24# undef Py_CPYTHON_COMPLEXOBJECT_H
25#endif
26
27#ifdef __cplusplus
28}
29#endif
30#endif /* !Py_COMPLEXOBJECT_H */
31

source code of include/python3.12/complexobject.h