From 5e32d4908d4ea0bc4fb22b396d12bfc17c7fede6 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 23 Jun 2013 02:28:37 +0200 Subject: [PATCH] PEP 445: fix hook_malloc() in example 3 Add missing declaration "void *ptr;" --- pep-0445.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/pep-0445.txt b/pep-0445.txt index 6bcc0192e..ce01d0049 100644 --- a/pep-0445.txt +++ b/pep-0445.txt @@ -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); /* ... */