From 21f9c29f3149422ac0d3c860748a06ab79c2a42f Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Wed, 25 Jan 2017 22:33:39 +0100 Subject: [PATCH] style + move pyhttp_dealloc() into !KORE_NO_HTTP. --- src/python.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/python.c b/src/python.c index bba0149..b48eaf6 100644 --- a/src/python.c +++ b/src/python.c @@ -224,17 +224,19 @@ python_module_getsym(struct kore_module *module, const char *symbol) return (python_callable(module->handle, symbol)); } -static void pyhttp_dealloc(struct pyhttp_request *pyreq) -{ - PyObject_Del((PyObject *)pyreq); -} - -static void pyconnection_dealloc(struct pyconnection *pyc) +static void +pyconnection_dealloc(struct pyconnection *pyc) { PyObject_Del((PyObject *)pyc); } #if !defined(KORE_NO_HTTP) +static void +pyhttp_dealloc(struct pyhttp_request *pyreq) +{ + PyObject_Del((PyObject *)pyreq); +} + static int python_runtime_http_request(void *addr, struct http_request *req) {