Dag Sverre Seljebotn wrote: > def generate_assignment_code(self, rhs, code): > if not rhs.can_raise_exception: > # No temp needed > if self.type.is_pyobject: > code.put_decref(self.cname, self.type) > rhs.preparation_code(code) > rhs.store_result_code(self.cname, code)
This isn't safe. A new reference to the rhs must be obtained first in case it's the same as the old value of the lhs, otherwise you risk losing the object. -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
