#45567: generate_packets.py: Support for opposite of handle-via-packet Open Date: 2022-09-04 07:25 Last Update: 2022-09-04 23:41 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/45567 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45567 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2022-09-04 23:41 Updated by: cazfi Comment: Do we ever have a good reason to use handle-via-fields, from the POW of the quality / performance of the code produced? (I think it's mostly to make writing the handler function more convenient) If yes: I do see some value in that it "suggests" switching to handle-via-packet mode when you add more fields. Doing that switch is unlikely to occur to the coder at that point. If not: We could make handle-via-packet always the default (i.e. redundant to define explicitly), and just provide a handle-via-fields option. But defining it explicitly either way is fine too. --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: alienvalkyrie Type: Patches Status: Open [Owner assigned] Priority: 5 - Medium MileStone: 3.2.0 Component: Bootstrap Severity: 5 - Medium Resolution: Accepted --------------------------------------------------------------------- Ticket details: If this feature already exist, it's not obvious from documentation in packets.def. Sometimes it's annoying in development when you add a parameter to a packet, temporarily, for debugging purposes, and suddenly the handle function prototype changes (as parameter count goes over 5). Then you have to adjust all the code for that, and your two-line debug test comes much bigger diff to handle. For these cases it would be handy if one could tell generate_packets.py to just add new parameter to the handle -function despite their count going over 5. -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/45567 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45567