This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/2] don't allocate serial_ops
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 10 Dec 2013 13:29:20 -0700
- Subject: Re: [PATCH 2/2] don't allocate serial_ops
- Authentication-results: sourceware.org; auth=none
- References: <1386356956-9855-1-git-send-email-tromey at redhat dot com> <1386356956-9855-3-git-send-email-tromey at redhat dot com> <52A55F72 dot 1050609 at codesourcery dot com>
Tom> Now that struct serial_ops is const everywhere, we can easily turn the
Tom> instances into globals. This patch implements this idea.
Yao> Is it better to turn them into static locals of _initialize_ser_XXX
Yao> functions?
I tend to avoid static locals. I don't know that I have a particularly
good reason for it, though.
Yao> The patched code is still quite readable to me.
Thanks.
Tom