Skip to content

Conversation

@pamelafox
Copy link
Contributor

This PR updates unicode.rst so that it refers to PyMem_New instead of PyMem_Alloc, a seemingly non-existent function.

This PR also replaces the PyMem_NEW macro with a direct call to PyMem_New, since pymem.h claims PyMEM_NEW is a deprecated alias, and as far as I can tell, there is no reason not to use PyMem_New instead. The other parts of unicode.c use PyMem_New, not PyMem_NEW.

Here's the PyMem_NEW macro, for reference:
#define PyMem_NEW(type, n) PyMem_New(type, n)

I'm not an expert C programmer however so perhaps I'm missing something.

@zooba
Copy link
Member

zooba commented Jul 28, 2022

I think it meant to refer to PyMem_Malloc, but since it's using PyMem_New we may as well say so. The only difference is the calling convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants