mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Add internal pycore_complexobject.h header file. Move _Py_c_xxx() functions and _PyComplex_FormatAdvancedWriter() function to this new header file.
23 lines
492 B
C
23 lines
492 B
C
#ifndef Py_CPYTHON_COMPLEXOBJECT_H
|
|
# error "this header file must not be included directly"
|
|
#endif
|
|
|
|
typedef struct {
|
|
double real;
|
|
double imag;
|
|
} Py_complex;
|
|
|
|
/* Complex object interface */
|
|
|
|
/*
|
|
PyComplexObject represents a complex number with double-precision
|
|
real and imaginary parts.
|
|
*/
|
|
typedef struct {
|
|
PyObject_HEAD
|
|
Py_complex cval;
|
|
} PyComplexObject;
|
|
|
|
PyAPI_FUNC(PyObject *) PyComplex_FromCComplex(Py_complex);
|
|
|
|
PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *op);
|