On 17 March 2013 16:15, Pauli Virtanen <p...@iki.fi> wrote: > Hi, > > Here's a snippet demonstrating a refcount error with fused types inside > classes: > > ---------8<--------- > cimport cython > > ctypedef fused some_t: > int > double > > class Foo(object): > def bar(self, some_t x): > pass > > cdef extern from "Python.h": > int Py_REFCNT(object) > > def main(): > x = Foo() > print "before:", Py_REFCNT(x) > x.bar(1.0) # spuriously increments refcount of `x` > print "after: ", Py_REFCNT(x) > ---------8<--------- > > > -- > Pauli Virtanen > > _______________________________________________ > cython-devel mailing list > cython-devel@python.org > http://mail.python.org/mailman/listinfo/cython-devel
Thanks, I pushed a fix here: https://github.com/markflorisson88/cython (fd4853d202b13a92). _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel