summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorDonghee Na <donghee.na@python.org>2024-02-16 01:01:36 (GMT)
committerGitHub <noreply@github.com>2024-02-16 01:01:36 (GMT)
commit321d13fd2b858d76cd4cbd03e6d8c4cba307449e (patch)
treefa0dca34a9aad53cb6b156c88cae5872c77987e8 /Objects/floatobject.c
parent454d7963e31cded1de3a90642da7259848efd232 (diff)
downloadcpython-321d13fd2b858d76cd4cbd03e6d8c4cba307449e.zip
cpython-321d13fd2b858d76cd4cbd03e6d8c4cba307449e.tar.gz
cpython-321d13fd2b858d76cd4cbd03e6d8c4cba307449e.tar.bz2
gh-111968: Split _Py_dictkeys_freelist out of _Py_dict_freelist (gh-115505)
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 7dac829..37d2d31 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -130,9 +130,9 @@ PyFloat_FromDouble(double fval)
PyFloatObject *op;
#ifdef WITH_FREELISTS
struct _Py_float_freelist *float_freelist = get_float_freelist();
- op = float_freelist->free_list;
+ op = float_freelist->items;
if (op != NULL) {
- float_freelist->free_list = (PyFloatObject *) Py_TYPE(op);
+ float_freelist->items = (PyFloatObject *) Py_TYPE(op);
float_freelist->numfree--;
OBJECT_STAT_INC(from_freelist);
}
@@ -251,8 +251,8 @@ _PyFloat_ExactDealloc(PyObject *obj)
return;
}
float_freelist->numfree++;
- Py_SET_TYPE(op, (PyTypeObject *)float_freelist->free_list);
- float_freelist->free_list = op;
+ Py_SET_TYPE(op, (PyTypeObject *)float_freelist->items);
+ float_freelist->items = op;
OBJECT_STAT_INC(to_freelist);
#else
PyObject_Free(op);
@@ -1994,13 +1994,13 @@ _PyFloat_ClearFreeList(struct _Py_object_freelists *freelists, int is_finalizati
{
#ifdef WITH_FREELISTS
struct _Py_float_freelist *state = &freelists->floats;
- PyFloatObject *f = state->free_list;
+ PyFloatObject *f = state->items;
while (f != NULL) {
PyFloatObject *next = (PyFloatObject*) Py_TYPE(f);
PyObject_Free(f);
f = next;
}
- state->free_list = NULL;
+ state->items = NULL;
if (is_finalization) {
state->numfree = -1;
}