From 7330da0892708d1a1b771ad88d097ddbeff21eea Mon Sep 17 00:00:00 2001 From: Alina Lenk Date: Sun, 15 May 2022 15:26:07 +0200 Subject: [PATCH 3/8] generate_packets.py: remove get_dict() methods See osdn#44761 Signed-off-by: Alina Lenk --- common/generate_packets.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/common/generate_packets.py b/common/generate_packets.py index 598265c913..c94357e99e 100755 --- a/common/generate_packets.py +++ b/common/generate_packets.py @@ -413,13 +413,6 @@ class Field: self.add_cap = flaginfo["add_cap"] self.remove_cap = flaginfo["remove_cap"] - # Helper function for the dictionary variant of the % operator - # ("%(name)s"%dict) or str.format ("{name}".format(**dict)). - def get_dict(self, vars_): - result=self.__dict__.copy() - result.update(vars_) - return result - def get_handle_type(self): if self.dataio_type=="string" or self.dataio_type=="estring": return "const char *" @@ -1118,12 +1111,6 @@ class Variant: self.send_handler = "phandlers->send[{self.type}].packet = (int(*)(struct connection *, const void *)) send_{self.name};".format(self = self) self.receive_handler = "phandlers->receive[{self.type}] = (void *(*)(struct connection *)) receive_{self.name};".format(self = self) - # See Field.get_dict - def get_dict(self,vars_): - result=self.__dict__.copy() - result.update(vars_) - return result - # Returns a code fragment which contains the declarations of the # statistical counters of this packet. def get_stats(self): @@ -1773,12 +1760,6 @@ class Packet: result=result+self.dlsend_prototype+";\n" return result+"\n" - # See Field.get_dict - def get_dict(self, vars_): - result=self.__dict__.copy() - result.update(vars_) - return result - # See Variant.get_stats def get_stats(self): return "".join(v.get_stats() for v in self.variants) -- 2.34.1