gh-93738: Documentation C syntax (:c:type:TYPE -> :c:expr:TYPE) (#97770)

:c:type:`TYPE` -> :c:expr:`TYPE`
This commit is contained in:
Adam Turner 2022-10-05 00:26:36 +01:00 committed by GitHub
parent a0f5599aac
commit 8b211b4cdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,14 +265,14 @@ The following type-oriented macros are provided for convenience. Note that
.. c:function:: TYPE* PyMem_New(TYPE, size_t n)
Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes of
memory. Returns a pointer cast to :c:type:`TYPE*`. The memory will not have
memory. Returns a pointer cast to :c:expr:`TYPE*`. The memory will not have
been initialized in any way.
.. c:function:: TYPE* PyMem_Resize(void *p, TYPE, size_t n)
Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n *
sizeof(TYPE))`` bytes. Returns a pointer cast to :c:type:`TYPE*`. On return,
sizeof(TYPE))`` bytes. Returns a pointer cast to :c:expr:`TYPE*`. On return,
*p* will be a pointer to the new memory area, or ``NULL`` in the event of
failure.