Wireshark mailing list archives
Re: Why are ett[] arrays static?
From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Fri, 19 Oct 2018 13:42:22 -0400
On Fri, Oct 19, 2018 at 1:16 PM Guy Harris <guy () alum mit edu> wrote:
On Oct 19, 2018, at 7:51 AM, Jeff Morriss <jeff.morriss.ws () gmail com> wrote:Is it just me or is there no reason for ett[] arrays: /* Setup protocol subtree array */ static gint *ett[] = { &ett_PROTOABBREV to be static?Given that they represent persistent UI state - i.e., whether, when packet details are displayed, a particular type of subtree should be displayed as opened up or not - that would seem to indicate that they should be static (in the "in static storage" sense, not in the "with internal linkage" sense).
The ett_ variables themselves must be persistent. The arrays pointing [for registration purposes] to them? Not so much.
___________________________________________________________________________ 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:
- Why are ett[] arrays static? Jeff Morriss (Oct 19)
- Re: Why are ett[] arrays static? Peter Wu (Oct 19)
- Re: Why are ett[] arrays static? Dario Lombardo (Oct 19)
- Re: Why are ett[] arrays static? Jeff Morriss (Oct 19)
- Re: Why are ett[] arrays static? Guy Harris (Oct 19)
- Re: Why are ett[] arrays static? Jeff Morriss (Oct 19)
- Re: Why are ett[] arrays static? Jakub Zawadzki (Oct 19)
- Re: Why are ett[] arrays static? Jeff Morriss (Oct 19)