mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
bpo-42519: Replace PyMem_MALLOC() with PyMem_Malloc() (GH-23586)
No longer use deprecated aliases to functions: * Replace PyMem_MALLOC() with PyMem_Malloc() * Replace PyMem_REALLOC() with PyMem_Realloc() * Replace PyMem_FREE() with PyMem_Free() * Replace PyMem_Del() with PyMem_Free() * Replace PyMem_DEL() with PyMem_Free() Modify also the PyMem_DEL() macro to use directly PyMem_Free().
This commit is contained in:
parent
b2d0c66e88
commit
00d7abd7ef
33 changed files with 175 additions and 188 deletions
|
|
@ -102,7 +102,7 @@ PyAPI_FUNC(void *) PyObject_Realloc(void *ptr, size_t new_size);
|
|||
PyAPI_FUNC(void) PyObject_Free(void *ptr);
|
||||
|
||||
|
||||
/* Macros */
|
||||
// Deprecated aliases only kept for backward compatibility.
|
||||
#define PyObject_MALLOC PyObject_Malloc
|
||||
#define PyObject_REALLOC PyObject_Realloc
|
||||
#define PyObject_FREE PyObject_Free
|
||||
|
|
@ -138,8 +138,8 @@ PyAPI_FUNC(PyVarObject *) _PyObject_NewVar(PyTypeObject *, Py_ssize_t);
|
|||
#define PyObject_NewVar(type, typeobj, n) \
|
||||
( (type *) _PyObject_NewVar((typeobj), (n)) )
|
||||
|
||||
// Alias to PyObject_New(). In Python 3.8, PyObject_NEW() called directly
|
||||
// PyObject_MALLOC() with _PyObject_VAR_SIZE().
|
||||
// Alias to PyObject_NewVar(). In Python 3.8, PyObject_NEW_VAR() called
|
||||
// directly PyObject_MALLOC() with _PyObject_VAR_SIZE().
|
||||
#define PyObject_NEW_VAR(type, typeobj, n) PyObject_NewVar(type, typeobj, n)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue