mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
ANSI-fication and Py_PROTO extermination.
This commit is contained in:
parent
5eb6d4e3bf
commit
ea9cb5aebf
14 changed files with 340 additions and 338 deletions
|
@ -1,14 +1,14 @@
|
|||
/* Complex number structure */
|
||||
|
||||
#ifndef COMPLEXOBJECT_H
|
||||
#define COMPLEXOBJECT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Complex number structure */
|
||||
|
||||
typedef struct {
|
||||
double real;
|
||||
double imag;
|
||||
double real;
|
||||
double imag;
|
||||
} Py_complex;
|
||||
|
||||
/* Operations on complex numbers from complexmodule.c */
|
||||
|
@ -20,12 +20,12 @@ typedef struct {
|
|||
#define c_quot _Py_c_quot
|
||||
#define c_pow _Py_c_pow
|
||||
|
||||
extern DL_IMPORT(Py_complex) c_sum Py_PROTO((Py_complex, Py_complex));
|
||||
extern DL_IMPORT(Py_complex) c_diff Py_PROTO((Py_complex, Py_complex));
|
||||
extern DL_IMPORT(Py_complex) c_neg Py_PROTO((Py_complex));
|
||||
extern DL_IMPORT(Py_complex) c_prod Py_PROTO((Py_complex, Py_complex));
|
||||
extern DL_IMPORT(Py_complex) c_quot Py_PROTO((Py_complex, Py_complex));
|
||||
extern DL_IMPORT(Py_complex) c_pow Py_PROTO((Py_complex, Py_complex));
|
||||
extern DL_IMPORT(Py_complex) c_sum(Py_complex, Py_complex);
|
||||
extern DL_IMPORT(Py_complex) c_diff(Py_complex, Py_complex);
|
||||
extern DL_IMPORT(Py_complex) c_neg(Py_complex);
|
||||
extern DL_IMPORT(Py_complex) c_prod(Py_complex, Py_complex);
|
||||
extern DL_IMPORT(Py_complex) c_quot(Py_complex, Py_complex);
|
||||
extern DL_IMPORT(Py_complex) c_pow(Py_complex, Py_complex);
|
||||
|
||||
|
||||
/* Complex object interface */
|
||||
|
@ -36,20 +36,20 @@ real and imaginary parts.
|
|||
*/
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
Py_complex cval;
|
||||
PyObject_HEAD
|
||||
Py_complex cval;
|
||||
} PyComplexObject;
|
||||
|
||||
extern DL_IMPORT(PyTypeObject) PyComplex_Type;
|
||||
|
||||
#define PyComplex_Check(op) ((op)->ob_type == &PyComplex_Type)
|
||||
|
||||
extern DL_IMPORT(PyObject *) PyComplex_FromCComplex Py_PROTO((Py_complex));
|
||||
extern DL_IMPORT(PyObject *) PyComplex_FromDoubles Py_PROTO((double real, double imag));
|
||||
extern DL_IMPORT(PyObject *) PyComplex_FromCComplex(Py_complex);
|
||||
extern DL_IMPORT(PyObject *) PyComplex_FromDoubles(double real, double imag);
|
||||
|
||||
extern DL_IMPORT(double) PyComplex_RealAsDouble Py_PROTO((PyObject *op));
|
||||
extern DL_IMPORT(double) PyComplex_ImagAsDouble Py_PROTO((PyObject *op));
|
||||
extern DL_IMPORT(Py_complex) PyComplex_AsCComplex Py_PROTO((PyObject *op));
|
||||
extern DL_IMPORT(double) PyComplex_RealAsDouble(PyObject *op);
|
||||
extern DL_IMPORT(double) PyComplex_ImagAsDouble(PyObject *op);
|
||||
extern DL_IMPORT(Py_complex) PyComplex_AsCComplex(PyObject *op);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue