Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-13 09:20:58

0001 #ifndef Py_INTERNAL_FLOATOBJECT_H
0002 #define Py_INTERNAL_FLOATOBJECT_H
0003 #ifdef __cplusplus
0004 extern "C" {
0005 #endif
0006 
0007 #ifndef Py_BUILD_CORE
0008 #  error "this header requires Py_BUILD_CORE define"
0009 #endif
0010 
0011 
0012 /* runtime lifecycle */
0013 
0014 extern void _PyFloat_InitState(PyInterpreterState *);
0015 extern PyStatus _PyFloat_InitTypes(PyInterpreterState *);
0016 extern void _PyFloat_Fini(PyInterpreterState *);
0017 extern void _PyFloat_FiniType(PyInterpreterState *);
0018 
0019 
0020 /* other API */
0021 
0022 enum _py_float_format_type {
0023     _py_float_format_unknown,
0024     _py_float_format_ieee_big_endian,
0025     _py_float_format_ieee_little_endian,
0026 };
0027 
0028 struct _Py_float_runtime_state {
0029     enum _py_float_format_type float_format;
0030     enum _py_float_format_type double_format;
0031 };
0032 
0033 
0034 #ifndef WITH_FREELISTS
0035 // without freelists
0036 #  define PyFloat_MAXFREELIST 0
0037 #endif
0038 
0039 #ifndef PyFloat_MAXFREELIST
0040 #  define PyFloat_MAXFREELIST   100
0041 #endif
0042 
0043 struct _Py_float_state {
0044 #if PyFloat_MAXFREELIST > 0
0045     /* Special free list
0046        free_list is a singly-linked list of available PyFloatObjects,
0047        linked via abuse of their ob_type members. */
0048     int numfree;
0049     PyFloatObject *free_list;
0050 #endif
0051 };
0052 
0053 void _PyFloat_ExactDealloc(PyObject *op);
0054 
0055 
0056 PyAPI_FUNC(void) _PyFloat_DebugMallocStats(FILE* out);
0057 
0058 
0059 /* Format the object based on the format_spec, as defined in PEP 3101
0060    (Advanced String Formatting). */
0061 PyAPI_FUNC(int) _PyFloat_FormatAdvancedWriter(
0062     _PyUnicodeWriter *writer,
0063     PyObject *obj,
0064     PyObject *format_spec,
0065     Py_ssize_t start,
0066     Py_ssize_t end);
0067 
0068 #ifdef __cplusplus
0069 }
0070 #endif
0071 #endif /* !Py_INTERNAL_FLOATOBJECT_H */