'If result is a pyobject, make sure we own a reference to it.
If the result is in a temp, it is already a new reference.'

def make_owned_reference(self, code):

    if (self.type.is_pyobject and (not self.result_in_temp())):
        code.put_incref(self.result(), self.ctype())
