Commit 5ae635eb authored by Stefan Behnel's avatar Stefan Behnel

minor convenience change in temp code

parent ac7755f6
...@@ -14,9 +14,12 @@ class TempHandle(object): ...@@ -14,9 +14,12 @@ class TempHandle(object):
# THIS IS DEPRECATED, USE LetRefNode instead # THIS IS DEPRECATED, USE LetRefNode instead
temp = None temp = None
needs_xdecref = False needs_xdecref = False
def __init__(self, type): def __init__(self, type, needs_cleanup=None):
self.type = type self.type = type
self.needs_cleanup = type.is_pyobject if needs_cleanup is None:
self.needs_cleanup = type.is_pyobject
else:
self.needs_cleanup = needs_cleanup
def ref(self, pos): def ref(self, pos):
return TempRefNode(pos, handle=self, type=self.type) return TempRefNode(pos, handle=self, type=self.type)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment