Path: blob/main/Include/internal/pycore_floatobject.h
12 views
#ifndef Py_INTERNAL_FLOATOBJECT_H1#define Py_INTERNAL_FLOATOBJECT_H2#ifdef __cplusplus3extern "C" {4#endif56#ifndef Py_BUILD_CORE7# error "this header requires Py_BUILD_CORE define"8#endif91011/* runtime lifecycle */1213extern void _PyFloat_InitState(PyInterpreterState *);14extern PyStatus _PyFloat_InitTypes(PyInterpreterState *);15extern void _PyFloat_Fini(PyInterpreterState *);16extern void _PyFloat_FiniType(PyInterpreterState *);171819/* other API */2021enum _py_float_format_type {22_py_float_format_unknown,23_py_float_format_ieee_big_endian,24_py_float_format_ieee_little_endian,25};2627struct _Py_float_runtime_state {28enum _py_float_format_type float_format;29enum _py_float_format_type double_format;30};313233#ifndef WITH_FREELISTS34// without freelists35# define PyFloat_MAXFREELIST 036#endif3738#ifndef PyFloat_MAXFREELIST39# define PyFloat_MAXFREELIST 10040#endif4142struct _Py_float_state {43#if PyFloat_MAXFREELIST > 044/* Special free list45free_list is a singly-linked list of available PyFloatObjects,46linked via abuse of their ob_type members. */47int numfree;48PyFloatObject *free_list;49#endif50};5152void _PyFloat_ExactDealloc(PyObject *op);535455PyAPI_FUNC(void) _PyFloat_DebugMallocStats(FILE* out);565758/* Format the object based on the format_spec, as defined in PEP 310159(Advanced String Formatting). */60PyAPI_FUNC(int) _PyFloat_FormatAdvancedWriter(61_PyUnicodeWriter *writer,62PyObject *obj,63PyObject *format_spec,64Py_ssize_t start,65Py_ssize_t end);6667#ifdef __cplusplus68}69#endif70#endif /* !Py_INTERNAL_FLOATOBJECT_H */717273