mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
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()
This commit is contained in:
parent
00d7abd7ef
commit
32bd68c839
48 changed files with 102 additions and 98 deletions
|
@ -38,7 +38,7 @@ Functions and macros for modules that implement new object types.
|
|||
object with room for n items. In addition to the refcount and type pointer
|
||||
fields, this also fills in the ob_size field.
|
||||
|
||||
- PyObject_Del(op) releases the memory allocated for an object. It does not
|
||||
- PyObject_Free(op) releases the memory allocated for an object. It does not
|
||||
run a destructor -- it only frees the memory. PyObject_Free is identical.
|
||||
|
||||
- PyObject_Init(op, typeobj) and PyObject_InitVar(op, typeobj, n) don't
|
||||
|
@ -103,6 +103,8 @@ PyAPI_FUNC(void) PyObject_Free(void *ptr);
|
|||
|
||||
|
||||
// Deprecated aliases only kept for backward compatibility.
|
||||
// PyObject_Del and PyObject_DEL are defined with no parameter to be able to
|
||||
// use them as function pointers (ex: tp_free = PyObject_Del).
|
||||
#define PyObject_MALLOC PyObject_Malloc
|
||||
#define PyObject_REALLOC PyObject_Realloc
|
||||
#define PyObject_FREE PyObject_Free
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue