diff options
author | Enji Cooper <yaneurabeya@gmail.com> | 2020-03-27 17:24:53 -0700 |
---|---|---|
committer | Enji Cooper <yaneurabeya@gmail.com> | 2020-03-27 17:30:23 -0700 |
commit | 47a2bcf6e844292c7754cf9bd726a5416e5ad24a (patch) | |
tree | 1de050d18f40aad82cfd845ca552f2c2395ec116 /event_rpcgen.py | |
parent | 6a3ca347379d28f8d6f8f9a621867860b6097b15 (diff) | |
download | libevent-47a2bcf6e844292c7754cf9bd726a5416e5ad24a.tar.gz |
Don't accumulate arguments in `Entry.GetTranslation`
Initialize `extradict` safely to avoid accumulating arguments in dict
objects passed in across calls.
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Diffstat (limited to 'event_rpcgen.py')
-rwxr-xr-x | event_rpcgen.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/event_rpcgen.py b/event_rpcgen.py index 590b4eb4..8e9ed1fc 100755 --- a/event_rpcgen.py +++ b/event_rpcgen.py @@ -484,7 +484,9 @@ class Entry: "around line %d" % (self._name, self.LineCount()) ) - def GetTranslation(self, extradict={}): + def GetTranslation(self, extradict=None): + if extradict is None: + extradict = {} mapping = { "parent_name": self._struct.Name(), "name": self._name, |