PEP 445: fix hook_malloc() in example 3
Add missing declaration "void *ptr;"
This commit is contained in:
parent
5e6a01452e
commit
5e32d4908d
|
@ -308,6 +308,7 @@ Example to setup hooks on all memory allocators::
|
|||
static void* hook_malloc(void *ctx, size_t size)
|
||||
{
|
||||
PyMemAllocator *alloc = (PyMemAllocator *)ctx;
|
||||
void *ptr;
|
||||
/* ... */
|
||||
ptr = alloc->malloc(alloc->ctx, size);
|
||||
/* ... */
|
||||
|
|
Loading…
Reference in New Issue