diff options
author | Enji Cooper <yaneurabeya@gmail.com> | 2020-06-25 08:08:10 -0700 |
---|---|---|
committer | Enji Cooper <yaneurabeya@gmail.com> | 2020-06-25 08:11:00 -0700 |
commit | 46c9ead0ebbbb23c8f719c11c473dfec37c84fda (patch) | |
tree | 68de00cbc944894ccf8e02ec323ec2b2f2329152 /event_rpcgen.py | |
parent | c424594b04439e2c29af41c66848b6b208f35310 (diff) | |
download | libevent-46c9ead0ebbbb23c8f719c11c473dfec37c84fda.tar.gz |
Make all classes Entry, Struct, etc) new-style classes
This allows the object methods to be properly inherited and called via
`super(..)`, addressing breakage with python 2.x, introduced in
cfcc093606e747a5d250787012bac0b149c60d6d.
Fixes #1042.
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Diffstat (limited to 'event_rpcgen.py')
-rwxr-xr-x | event_rpcgen.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/event_rpcgen.py b/event_rpcgen.py index d8af185d..0bae3b0f 100755 --- a/event_rpcgen.py +++ b/event_rpcgen.py @@ -62,7 +62,7 @@ class RpcGenError(Exception): # Holds everything that makes a struct -class Struct: +class Struct(object): def __init__(self, name): self._name = name self._entries = [] @@ -422,7 +422,7 @@ evtag_marshal_%(name)s(struct evbuffer *evbuf, ev_uint32_t tag, ) -class Entry: +class Entry(object): def __init__(self, ent_type, name, tag): self._type = ent_type self._name = name @@ -1697,7 +1697,7 @@ def Parse(factory, filep): return entities -class CCodeGenerator: +class CCodeGenerator(object): def __init__(self): pass @@ -1826,7 +1826,7 @@ class CCodeGenerator: return EntryArray(entry) -class CommandLine: +class CommandLine(object): def __init__(self, argv=None): """Initialize a command-line to launch event_rpcgen, as if from a command-line with CommandLine(sys.argv). If you're |