X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib-python/blobdiff_plain/d8d81d1b049836f7d4fae7b0077a8ce9e2fc43ac..4091abf10ce3940b80c3e8b2a5e59b02e6cadb9f:/codec.pyx.in diff --git a/codec.pyx.in b/codec.pyx.in index e683233..971c899 100644 --- a/codec.pyx.in +++ b/codec.pyx.in @@ -39,7 +39,7 @@ cdef extern from 'mLib/%PREFIX%.h': cdef class %CLASS%Encode: cdef %PREFIX%_ctx ctx - def __new__(me, *hunoz, **hukairz): + def __cinit__(me, *hunoz, **hukairz): _%PREFIX%_init(&me.ctx) me.ctx.indent = NULL def __init__(me, indent = '\n', maxline = 72): @@ -90,7 +90,7 @@ def %PREFIX%_encode(text, *arg, **kw): cdef class %CLASS%Decode: cdef %PREFIX%_ctx ctx - def __new__(me, *hunoz, **hukairz): + def __cinit__(me, *hunoz, **hukairz): _%PREFIX%_init(&me.ctx) me.ctx.indent = NULL def decode(me, text):