Skip to content

Add PyMem_Raw{New,Resize} convenience macros #127415

@picnixz

Description

@picnixz

Feature or enhancement

Proposal:

We have convenience macros for PyMem_New and PyMem_Resize to allocate memory for n objects of the given type without checking if n * sizeof(T) would overflow but we don't have any for the raw allocators. I suggest adding those two macros.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions