kore

An easy to use, scalable and secure web application framework for writing web APIs in C.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit eaef4b654a78fa5368a3b4a0d3ee4e690d6ee73d
parent d2617fdf322cf26a3b9e1f91aebe5b8df37bd0a1
Author: Joris Vink <joris@coders.se>
Date:   Thu, 13 Aug 2020 09:10:19 +0200

Only call PyMem_SetupDebugHooks() if DEBUG is 1.

We do not need the memory debug hooks in production environments.

Diffstat:
src/python.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/python.c b/src/python.c @@ -319,7 +319,10 @@ kore_python_init(void) PyMem_SetAllocator(PYMEM_DOMAIN_OBJ, &allocator); PyMem_SetAllocator(PYMEM_DOMAIN_MEM, &allocator); PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &allocator); + +#if defined(KORE_DEBUG) PyMem_SetupDebugHooks(); +#endif kore_msg_register(KORE_PYTHON_SEND_OBJ, python_kore_recvobj);