Skip to content

Commit

Permalink
Avoid deepcopying utility code objects since they should not get muta…
Browse files Browse the repository at this point in the history
…ted anyway.
  • Loading branch information
scoder committed Jun 17, 2018
1 parent 77ca931 commit 259da7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cython/Compiler/Code.py
Expand Up @@ -439,6 +439,10 @@ def __str__(self):
def get_tree(self, **kwargs):
pass

def __deepcopy__(self, memodict=None):
# No need to deep-copy utility code since it's essentially immutable.
return self


class UtilityCode(UtilityCodeBase):
"""
Expand Down

0 comments on commit 259da7c

Please sign in to comment.