Wireshark mailing list archives

Re: Regenerating packet-parlay.c


From: Luke Mewburn <luke () mewburn net>
Date: Fri, 1 May 2020 20:02:23 +1000

On 20-05-01 07:34, Jaap Keuter wrote:
  | 
  | > On 1 May 2020, at 04:13, Luke Mewburn <luke () mewburn net> wrote:
  | > However, looking at the code some more, it appears that generally
  | > wireshark_gen.py generates code in the order the operations are defined;
  | > the exception (hah!) is the user exceptions.
  | > 
  | > If I instead add at the top
  | >   import collections
  | > and change get_exceptionList() from
  | >   ex_hash = {}  # holds a hash of unique exceptions.
  | > to
  | >   ex_hash = collections.OrderedDict()  # holds a hash of unique exceptions.
  | > 
  | > This results in consistent generated code with both python 2.7 (CentOS 7)
  | > and python 3.7 (Fedora 31).
  | > 
  | > I've also fixed a whitespace issue in the generated code by indenting
  | > the break in template_helper_switch_msgtype_default_end, so that it
  | > matches the epan/dissectors code and other default statements.
  | > 
  | > 
  | > Here's a patch with my suggested fixes.
  | > Or would you prefer a commit/pull request (etc)?
  | > 
  | > 
  | > regards,
  | > Luke.
  | > 
  | 
  | Hi Luke,
  | 
  | That’s great, I didn’t have the opportunity yet to dig into this.
  | Nice that you compared Python 2.7 and 3.7 already.
  | I’ll pick this up and put it in with the other fixes I've lined up,
  | so you won’t have to push a change. I’ll credit you in the commit :)
  | 
  | Thanks,
  | Jaap

No problem; happy to help!

cheers,
Luke.

Attachment: _bin
Description:

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: