/home/mdboom/Work/builds/cpython/Include/internal/pycore_floatobject.h
Line | Count | Source |
1 | #ifndef Py_INTERNAL_FLOATOBJECT_H |
2 | #define Py_INTERNAL_FLOATOBJECT_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 | |
12 | /* runtime lifecycle */ |
13 | |
14 | extern void _PyFloat_InitState(PyInterpreterState *); |
15 | extern PyStatus _PyFloat_InitTypes(PyInterpreterState *); |
16 | extern void _PyFloat_Fini(PyInterpreterState *); |
17 | extern void _PyFloat_FiniType(PyInterpreterState *); |
18 | |
19 | |
20 | /* other API */ |
21 | |
22 | #ifndef WITH_FREELISTS |
23 | // without freelists |
24 | # define PyFloat_MAXFREELIST 0 |
25 | #endif |
26 | |
27 | #ifndef PyFloat_MAXFREELIST |
28 | # define PyFloat_MAXFREELIST 100 |
29 | #endif |
30 | |
31 | struct _Py_float_state { |
32 | #if PyFloat_MAXFREELIST > 0 |
33 | /* Special free list |
34 | free_list is a singly-linked list of available PyFloatObjects, |
35 | linked via abuse of their ob_type members. */ |
36 | int numfree; |
37 | PyFloatObject *free_list; |
38 | #endif |
39 | }; |
40 | |
41 | void _PyFloat_ExactDealloc(PyObject *op); |
42 | |
43 | |
44 | PyAPI_FUNC(void) _PyFloat_DebugMallocStats(FILE* out); |
45 | |
46 | |
47 | /* Format the object based on the format_spec, as defined in PEP 3101 |
48 | (Advanced String Formatting). */ |
49 | PyAPI_FUNC(int) _PyFloat_FormatAdvancedWriter( |
50 | _PyUnicodeWriter *writer, |
51 | PyObject *obj, |
52 | PyObject *format_spec, |
53 | Py_ssize_t start, |
54 | Py_ssize_t end); |
55 | |
56 | #ifdef __cplusplus |
57 | } |
58 | #endif |
59 | #endif /* !Py_INTERNAL_FLOATOBJECT_H */ |