From 16a238fb526e3ab0e06c5a5e47f4465c6bb0d058 Mon Sep 17 00:00:00 2001 From: Christophe Oosterlynck Date: Thu, 23 Oct 2008 12:15:06 +0200 Subject: [PATCH] RadioGatun: fixed copy() method deepcopy can be used --- src/CryptoPlus/Hash/pyradiogatun.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/CryptoPlus/Hash/pyradiogatun.py b/src/CryptoPlus/Hash/pyradiogatun.py index d1edf8a..f733d23 100644 --- a/src/CryptoPlus/Hash/pyradiogatun.py +++ b/src/CryptoPlus/Hash/pyradiogatun.py @@ -278,14 +278,9 @@ class RadioGatunType: to efficiently compute the digests of strings that share a common initial substring. """ - if 0: # set this to 1 to make the flow space crash - return copy.deepcopy(self) - clone = self.__class__() - clone.length = self.length - clone.count = [] + self.count[:] - clone.input = "" + self.input - clone.S = self.S - return clone + + import copy + return copy.deepcopy(self) # ====================================================================== # TOP LEVEL INTERFACE -- 2.11.4.GIT