提交 4431bc09 authored 作者: Frederic Bastien's avatar Frederic Bastien

don't clone the Constant data.

上级 6efb14d5
...@@ -364,6 +364,12 @@ class Constant(Value): ...@@ -364,6 +364,12 @@ class Constant(Value):
if self.name is not None: if self.name is not None:
return self.name return self.name
return str(self.data) #+ "::" + str(self.type) return str(self.data) #+ "::" + str(self.type)
def clone(self):
"""
We clone this object, but we don't clone the data to lower memory requirement
We suppose that the data will never change.
"""
return self.__class__(self.type, self.data, self.name)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论