Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7dac74a

Browse files
committed
fix docs for c-api memory functions
2 parents 1ee0267 + 7dbee38 commit 7dac74a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/c-api/memory.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ memory from the Python heap:
9898
9999
Allocates *n* bytes and returns a pointer of type :c:type:`void\*` to the
100100
allocated memory, or *NULL* if the request fails. Requesting zero bytes returns
101-
a distinct non-*NULL* pointer if possible, as if :c:func:`PyMem_Malloc(1)` had
101+
a distinct non-*NULL* pointer if possible, as if ``PyMem_Malloc(1)`` had
102102
been called instead. The memory will not have been initialized in any way.
103103
104104
105105
.. c:function:: void* PyMem_Realloc(void *p, size_t n)
106106
107107
Resizes the memory block pointed to by *p* to *n* bytes. The contents will be
108108
unchanged to the minimum of the old and the new sizes. If *p* is *NULL*, the
109-
call is equivalent to :c:func:`PyMem_Malloc(n)`; else if *n* is equal to zero,
109+
call is equivalent to ``PyMem_Malloc(n)``; else if *n* is equal to zero,
110110
the memory block is resized but is not freed, and the returned pointer is
111111
non-*NULL*. Unless *p* is *NULL*, it must have been returned by a previous call
112112
to :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`. If the request fails,
@@ -118,7 +118,7 @@ memory from the Python heap:
118118
119119
Frees the memory block pointed to by *p*, which must have been returned by a
120120
previous call to :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc`. Otherwise, or
121-
if :c:func:`PyMem_Free(p)` has been called before, undefined behavior occurs. If
121+
if ``PyMem_Free(p)`` has been called before, undefined behavior occurs. If
122122
*p* is *NULL*, no operation is performed.
123123
124124
The following type-oriented macros are provided for convenience. Note that

0 commit comments

Comments
 (0)