| 1 |
#ifndef Py_INTERNAL_COMPLEXOBJECT_H |
| 2 |
#define Py_INTERNAL_COMPLEXOBJECT_H |
| 3 |
#ifdef __cplusplus |
| 4 |
extern "C" { |
| 5 |
#endif |
| 6 |
|
| 7 |
#ifndef Py_BUILD_CORE |
| 8 |
# error "this header requires Py_BUILD_CORE define" |
| 9 |
#endif |
| 10 |
|
| 11 |
#include "pycore_unicodeobject.h" // _PyUnicodeWriter |
| 12 |
|
| 13 |
/* Format the object based on the format_spec, as defined in PEP 3101 |
| 14 |
(Advanced String Formatting). */ |
| 15 |
extern int _PyComplex_FormatAdvancedWriter( |
| 16 |
_PyUnicodeWriter *writer, |
| 17 |
PyObject *obj, |
| 18 |
PyObject *format_spec, |
| 19 |
Py_ssize_t start, |
| 20 |
Py_ssize_t end); |
| 21 |
|
| 22 |
// Operations on complex numbers. |
| 23 |
PyAPI_FUNC(Py_complex) _Py_cr_sum(Py_complex, double); |
| 24 |
PyAPI_FUNC(Py_complex) _Py_cr_diff(Py_complex, double); |
| 25 |
PyAPI_FUNC(Py_complex) _Py_rc_diff(double, Py_complex); |
| 26 |
PyAPI_FUNC(Py_complex) _Py_cr_prod(Py_complex, double); |
| 27 |
PyAPI_FUNC(Py_complex) _Py_cr_quot(Py_complex, double); |
| 28 |
PyAPI_FUNC(Py_complex) _Py_rc_quot(double, Py_complex); |
| 29 |
|
| 30 |
|
| 31 |
#ifdef __cplusplus |
| 32 |
} |
| 33 |
#endif |
| 34 |
#endif // !Py_INTERNAL_COMPLEXOBJECT_H |