diff options
| author | Victor Stinner <vstinner@python.org> | 2020-12-01 10:37:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-01 10:37:39 +0100 |
| commit | 32bd68c839adb7b42af12366ab0892303115d1d1 (patch) | |
| tree | 205358a43a500fedb97ad0e370fbc998b42b3ae7 /Objects/typeobject.c | |
| parent | 00d7abd7ef588fc4ff0571c8579ab4aba8ada1c0 (diff) | |
| download | cpython-git-32bd68c839adb7b42af12366ab0892303115d1d1.tar.gz | |
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/typeobject.c')
| -rw-r--r-- | Objects/typeobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index fbadd31f1a..83bc877eb7 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -1059,7 +1059,7 @@ PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems) obj = _PyObject_GC_Malloc(size); } else { - obj = (PyObject *)PyObject_MALLOC(size); + obj = (PyObject *)PyObject_Malloc(size); } if (obj == NULL) { @@ -2707,7 +2707,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds) goto error; /* Silently truncate the docstring if it contains null bytes. */ len = strlen(doc_str); - tp_doc = (char *)PyObject_MALLOC(len + 1); + tp_doc = (char *)PyObject_Malloc(len + 1); if (tp_doc == NULL) { PyErr_NoMemory(); goto error; @@ -3047,7 +3047,7 @@ PyType_FromModuleAndSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) continue; } size_t len = strlen(slot->pfunc)+1; - char *tp_doc = PyObject_MALLOC(len); + char *tp_doc = PyObject_Malloc(len); if (tp_doc == NULL) { type->tp_doc = NULL; PyErr_NoMemory(); |
