Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-11-19 09:50:46

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 #include "pycore_freelist.h"      // _PyFreeListState
0012 #include "pycore_unicodeobject.h" // _PyUnicodeWriter
0013 
0014 /* runtime lifecycle */
0015 
0016 extern void _PyFloat_InitState(PyInterpreterState *);
0017 extern PyStatus _PyFloat_InitTypes(PyInterpreterState *);
0018 extern void _PyFloat_FiniType(PyInterpreterState *);
0019 
0020 
0021 /* other API */
0022 
0023 enum _py_float_format_type {
0024     _py_float_format_unknown,
0025     _py_float_format_ieee_big_endian,
0026     _py_float_format_ieee_little_endian,
0027 };
0028 
0029 struct _Py_float_runtime_state {
0030     enum _py_float_format_type float_format;
0031     enum _py_float_format_type double_format;
0032 };
0033 
0034 
0035 
0036 
0037 PyAPI_FUNC(void) _PyFloat_ExactDealloc(PyObject *op);
0038 
0039 
0040 extern void _PyFloat_DebugMallocStats(FILE* out);
0041 
0042 
0043 /* Format the object based on the format_spec, as defined in PEP 3101
0044    (Advanced String Formatting). */
0045 extern int _PyFloat_FormatAdvancedWriter(
0046     _PyUnicodeWriter *writer,
0047     PyObject *obj,
0048     PyObject *format_spec,
0049     Py_ssize_t start,
0050     Py_ssize_t end);
0051 
0052 extern PyObject* _Py_string_to_number_with_underscores(
0053     const char *str, Py_ssize_t len, const char *what, PyObject *obj, void *arg,
0054     PyObject *(*innerfunc)(const char *, Py_ssize_t, void *));
0055 
0056 extern double _Py_parse_inf_or_nan(const char *p, char **endptr);
0057 
0058 
0059 #ifdef __cplusplus
0060 }
0061 #endif
0062 #endif /* !Py_INTERNAL_FLOATOBJECT_H */