complexobject.h 464 B

1234567891011121314151617181920212223242526
  1. /* Complex object interface */
  2. #ifndef Py_COMPLEXOBJECT_H
  3. #define Py_COMPLEXOBJECT_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef struct Py_complex_t {
  8. double real;
  9. double imag;
  10. } Py_complex;
  11. typedef struct {
  12. PyObject_HEAD
  13. Py_complex cval;
  14. } PyComplexObject;
  15. PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *obj);
  16. PyAPI_FUNC(PyObject *) PyComplex_FromCComplex(Py_complex c);
  17. #ifdef __cplusplus
  18. }
  19. #endif
  20. #endif /* !Py_COMPLEXOBJECT_H */