PEP 445: fix hook_malloc() in example 3

Add missing declaration "void *ptr;"
This commit is contained in:
Victor Stinner 2013-06-23 02:28:37 +02:00
parent 5e6a01452e
commit 5e32d4908d
1 changed files with 1 additions and 0 deletions

View File

@ -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);
/* ... */