spice-common/python_modules
Jonathon Jongsma 885b1a6bb9 Remove extra self parameter from member function
When testing out some experimental protocol changes, I managed to
trigger the following error:

  GEN      generated_client_demarshallers.c
Traceback (most recent call last):
  File "../../../spice-common/spice_codegen.py", line 267, in <module>
    demarshal.write_protocol_parser(writer, proto, True)
  File "/home/jjongsma/work/spice/spice-common/python_modules/demarshal.py", line 1270, in write_protocol_parser
    parsers[channel.value] = (channel.channel_type, write_channel_parser(writer, channel.channel_type, is_server))
  File "/home/jjongsma/work/spice/spice-common/python_modules/demarshal.py", line 1163, in write_channel_parser
    func = write_msg_parser(helpers, ids[i].message_type)
  File "/home/jjongsma/work/spice/spice-common/python_modules/demarshal.py", line 1061, in write_msg_parser
    num_pointers = message.get_num_pointers()
  File "/home/jjongsma/work/spice/spice-common/python_modules/ptypes.py", line 855, in get_num_pointers
    count = count + m.get_num_pointers()
  File "/home/jjongsma/work/spice/spice-common/python_modules/ptypes.py", line 662, in get_num_pointers
    return self.member_type.get_num_pointers()
  File "/home/jjongsma/work/spice/spice-common/python_modules/ptypes.py", line 507, in get_num_pointers
    if self.is_constant_length(self):
TypeError: is_constant_length() takes exactly 1 argument (2 given)

Calling a member function will implicitly pass 'self' as the first
argument, but we were also explicitly passing it as an argument
(self.is_constant_length(self)). This resulted in the above error.

Acked-by: Lukáš Hrázký <lhrazky@redhat.com>
2018-04-17 14:14:22 +01:00
..
__init__.py Revert "Remove files moved to spice-protocol" 2016-03-10 16:01:36 +01:00
codegen.py Revert "Remove files moved to spice-protocol" 2016-03-10 16:01:36 +01:00
demarshal.py Make the compiler work out better way to write unaligned memory 2017-09-25 16:12:45 +01:00
Makefile.am Revert "Remove files moved to spice-protocol" 2016-03-10 16:01:36 +01:00
marshal.py codegen: Fix compatibility with Python 2.6 2016-07-30 08:57:05 +01:00
ptypes.py Remove extra self parameter from member function 2018-04-17 14:14:22 +01:00
spice_parser.py protocol: learn to describe fd passing in messages 2016-03-10 16:01:42 +01:00