summaryrefslogtreecommitdiffstats
path: root/Objects/dictobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-12-01 09:37:39 (GMT)
committerGitHub <noreply@github.com>2020-12-01 09:37:39 (GMT)
commit32bd68c839adb7b42af12366ab0892303115d1d1 (patch)
tree205358a43a500fedb97ad0e370fbc998b42b3ae7 /Objects/dictobject.c
parent00d7abd7ef588fc4ff0571c8579ab4aba8ada1c0 (diff)
downloadcpython-32bd68c839adb7b42af12366ab0892303115d1d1.zip
cpython-32bd68c839adb7b42af12366ab0892303115d1d1.tar.gz
cpython-32bd68c839adb7b42af12366ab0892303115d1d1.tar.bz2
bpo-42519: Replace PyObject_MALLOC() with PyObject_Malloc() (GH-23587)
No longer use deprecated aliases to functions: * Replace PyObject_MALLOC() with PyObject_Malloc() * Replace PyObject_REALLOC() with PyObject_Realloc() * Replace PyObject_FREE() with PyObject_Free() * Replace PyObject_Del() with PyObject_Free() * Replace PyObject_DEL() with PyObject_Free()
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r--Objects/dictobject.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index ee1a9d1..7a37313 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -269,7 +269,7 @@ _PyDict_ClearFreeList(PyThreadState *tstate)
PyObject_GC_Del(op);
}
while (state->keys_numfree) {
- PyObject_FREE(state->keys_free_list[--state->keys_numfree]);
+ PyObject_Free(state->keys_free_list[--state->keys_numfree]);
}
}
@@ -597,7 +597,7 @@ new_keys_object(Py_ssize_t size)
}
else
{
- dk = PyObject_MALLOC(sizeof(PyDictKeysObject)
+ dk = PyObject_Malloc(sizeof(PyDictKeysObject)
+ es * size
+ sizeof(PyDictKeyEntry) * usable);
if (dk == NULL) {
@@ -636,7 +636,7 @@ free_keys_object(PyDictKeysObject *keys)
state->keys_free_list[state->keys_numfree++] = keys;
return;
}
- PyObject_FREE(keys);
+ PyObject_Free(keys);
}
#define new_values(size) PyMem_NEW(PyObject *, size)
@@ -1303,7 +1303,7 @@ dictresize(PyDictObject *mp, Py_ssize_t newsize)
state->keys_free_list[state->keys_numfree++] = oldkeys;
}
else {
- PyObject_FREE(oldkeys);
+ PyObject_Free(oldkeys);
}
}