xref: /third_party/python/Include/complexobject.h (revision 7db96d56)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/python/Include/
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

Indexes created Thu Nov 07 10:32:03 CST 2024