'Return a list of (cname,type,manage_ref) tuples of temp names and their type
that are currently in use.'

def temps_in_use(self):

    used = []
    for (name, type, manage_ref, static) in self.temps_allocated:
        freelist = self.temps_free.get((type, manage_ref))
        if ((freelist is None) or (name not in freelist[1])):
            used.append((name, type, (manage_ref and type.is_pyobject)))
    return used
