Debian Codegraph @

Include/internal/pycore_dtoa.h

raw
1 #ifndef Py_INTERNAL_DTOA_H
2 #define Py_INTERNAL_DTOA_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 #ifndef Py_BUILD_CORE
8 # error "this header requires Py_BUILD_CORE define"
9 #endif
10
11 #include "pycore_pymath.h" // _PY_SHORT_FLOAT_REPR
12
13
14 #if defined(Py_USING_MEMORY_DEBUGGER) || _PY_SHORT_FLOAT_REPR == 0
15
16 #define _dtoa_state_INIT(INTERP) \
17 {0}
18
19 #else
20
21 #define _dtoa_state_INIT(INTERP) \
22 { \
23 .preallocated_next = (INTERP)->dtoa.preallocated, \
24 }
25 #endif
26
27 extern double _Py_dg_strtod(const char *str, char **ptr);
28 extern char* _Py_dg_dtoa(double d, int mode, int ndigits,
29 int *decpt, int *sign, char **rve);
30 extern void _Py_dg_freedtoa(char *s);
31
32
33 extern PyStatus _PyDtoa_Init(PyInterpreterState *interp);
34 extern void _PyDtoa_Fini(PyInterpreterState *interp);
35
36
37 #ifdef __cplusplus
38 }
39 #endif
40 #endif /* !Py_INTERNAL_DTOA_H */