| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a6acb16 commit 9a3aea9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -294,17 +294,39 @@ The following type-oriented macros are provided for convenience. Note that | |||
| 294 | 294 | ||
| 295 | 295 | Same as :c:func:`PyMem_Free`. | |
| 296 | 296 | ||
| 297 | - In addition, the following macro sets are provided for calling the Python memory | ||
| 298 | - allocator directly, without involving the C API functions listed above. However, | ||
| 299 | - note that their use does not preserve binary compatibility across Python | ||
| 300 | - versions and is therefore deprecated in extension modules. | ||
| 301 | - | ||
| 302 | - * ``PyMem_MALLOC(size)`` | ||
| 303 | - * ``PyMem_NEW(type, size)`` | ||
| 304 | - * ``PyMem_REALLOC(ptr, size)`` | ||
| 305 | - * ``PyMem_RESIZE(ptr, type, size)`` | ||
| 306 | - * ``PyMem_FREE(ptr)`` | ||
| 307 | - * ``PyMem_DEL(ptr)`` | ||
| 297 | + | ||
| 298 | + Deprecated aliases | ||
| 299 | + ------------------ | ||
| 300 | + | ||
| 301 | + These are :term:`soft deprecated` aliases to existing functions and macros. | ||
| 302 | + They exist solely for backwards compatibility. | ||
| 303 | + | ||
| 304 | + .. list-table:: | ||
| 305 | + :widths: auto | ||
| 306 | + :header-rows: 1 | ||
| 307 | + | ||
| 308 | + * * Deprecated alias | ||
| 309 | + * Corresponding function or macro | ||
| 310 | + * * .. c:macro:: PyMem_MALLOC(size) | ||
| 311 | + * :c:func:`PyMem_Malloc` | ||
| 312 | + * * .. c:macro:: PyMem_NEW(type, size) | ||
| 313 | + * :c:macro:`PyMem_New` | ||
| 314 | + * * .. c:macro:: PyMem_REALLOC(ptr, size) | ||
| 315 | + * :c:func:`PyMem_Realloc` | ||
| 316 | + * * .. c:macro:: PyMem_RESIZE(ptr, type, size) | ||
| 317 | + * :c:macro:`PyMem_Resize` | ||
| 318 | + * * .. c:macro:: PyMem_FREE(ptr) | ||
| 319 | + * :c:func:`PyMem_Free` | ||
| 320 | + * * .. c:macro:: PyMem_DEL(ptr) | ||
| 321 | + * :c:func:`PyMem_Free` | ||
| 322 | + | ||
| 323 | + .. versionchanged:: 3.4 | ||
| 324 | + | ||
| 325 | + The macros are now aliases of the corresponding functions and macros. | ||
| 326 | + Previously, their behavior was the same, but their use did not necessarily | ||
| 327 | + preserve binary compatibility across Python versions. | ||
| 328 | + | ||
| 329 | + .. deprecated:: 2.0 | ||
| 308 | 330 | ||
| 309 | 331 | ||
| 310 | 332 | .. _objectinterface: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments