From f9d8a4272810eef131b0be8923b93d682bf95937 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Thu, 27 Jul 2017 10:50:39 +0100 Subject: [PATCH 1/1] codec.pyx.in: Cast arguments to `xfree'. Organization: Straylight/Edgeware From: Mark Wooding I malloced them, so I have to free them; but the underlying type is `const char *'. Add the necessary casts. This is actually a legitimate use, rather than covering a Pyrex deficiency. These are the last compiler warnings. --- codec.pyx.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codec.pyx.in b/codec.pyx.in index 37e0293..2d54d0c 100644 --- a/codec.pyx.in +++ b/codec.pyx.in @@ -40,18 +40,18 @@ cdef class %CLASS%Encode: me.ctx.indent = NULL def __init__(me, indent = '\n', maxline = 72): if me.ctx.indent: - xfree(me.ctx.indent) + xfree(me.ctx.indent) me.ctx.indent = xstrdup(indent) me.ctx.maxline = maxline def __dealloc__(me): if me.ctx.indent: - xfree(me.ctx.indent) + xfree(me.ctx.indent) property indent: def __get__(me): return me.ctx.indent def __set__(me, indent): if me.ctx.indent: - xfree(me.ctx.indent) + xfree(me.ctx.indent) me.ctx.indent = xstrdup(indent) property maxline: def __get__(me): -- [mdw]