mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-29 16:24:58 +00:00
31 lines
728 B
C
31 lines
728 B
C
/* Complex number structure */
|
|
|
|
#ifndef Ty_COMPLEXOBJECT_H
|
|
#define Ty_COMPLEXOBJECT_H
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Complex object interface */
|
|
|
|
PyAPI_DATA(TyTypeObject) TyComplex_Type;
|
|
|
|
#define TyComplex_Check(op) PyObject_TypeCheck((op), &TyComplex_Type)
|
|
#define TyComplex_CheckExact(op) Ty_IS_TYPE((op), &TyComplex_Type)
|
|
|
|
PyAPI_FUNC(TyObject *) TyComplex_FromDoubles(double real, double imag);
|
|
|
|
PyAPI_FUNC(double) TyComplex_RealAsDouble(TyObject *op);
|
|
PyAPI_FUNC(double) TyComplex_ImagAsDouble(TyObject *op);
|
|
|
|
#ifndef Ty_LIMITED_API
|
|
# define Ty_CPYTHON_COMPLEXOBJECT_H
|
|
# include "cpython/complexobject.h"
|
|
# undef Ty_CPYTHON_COMPLEXOBJECT_H
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* !Ty_COMPLEXOBJECT_H */
|