complexobject.h 728 B

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