From: Mark Wooding Date: Thu, 27 Jul 2017 09:50:39 +0000 (+0100) Subject: codec.pyx.in: Cast arguments to `xfree'. X-Git-Tag: 1.1.0~8 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib-python/commitdiff_plain/f9d8a4272810eef131b0be8923b93d682bf95937?hp=741f7410ed5c67e4a2641925bd22eb71c85a39cf codec.pyx.in: Cast arguments to `xfree'. 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. --- 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):