public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@efficios.com>
To: Simon Marchi <simon.marchi@polymtl.ca>,
	Tom Tromey <tom@tromey.com>,
	Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/5] gdb: pass/return setting setter/getter scalar values by value
Date: Thu, 4 Nov 2021 15:51:21 -0400	[thread overview]
Message-ID: <4eb56708-4f59-61d3-07d8-6918614eab3c@efficios.com> (raw)
In-Reply-To: <4eaa272c-0dde-e59b-a1fb-3719b26e50aa@polymtl.ca>



On 2021-11-04 14:59, Simon Marchi wrote:
> On 2021-11-04 14:27, Tom Tromey wrote:
>>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>>
>> Simon> The getter and setter in struct setting always receive and return values
>> Simon> by const reference.  This is not necessary for scalar values (like bool
>> Simon> and int), but more importantly it makes it a bit annoying to write a
>> Simon> getter, you have to use a scratch static variable or something similar
>> Simon> that you can refer to:
>>
>> Seems reasonable to me.
>>
>> Simon> -		      setting_setter_ftype<const char *> set_func,
>> Simon> -		      setting_getter_ftype<const char *> get_func,
>> Simon> +		      typename the_types<const char *>::set set_func,
>> Simon> +		      typename the_types<const char *>::get get_func,
>>
>> Is "typename" really needed in spots like this?
> 
> Hmm no, actually.  Everywhere where the type doesn't depend on a
> template type, I could remove it.  Fixed locally.
> 
> Also, that made me realize that I didn't change the names "the_types"
> and "the_types2", which were work-in-progress names.  I changed them
> locally to setting_func_types and setting_func_types_1, respectively.
> 
> Simon
> 

Pushed with these fixes.

Simon

  reply	other threads:[~2021-11-04 19:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01 15:50 [PATCH 0/5] Change some index-cache commands Simon Marchi
2021-11-01 15:50 ` [PATCH 1/5] gdb: pass/return setting setter/getter scalar values by value Simon Marchi
2021-11-04 18:27   ` Tom Tromey
2021-11-04 18:59     ` Simon Marchi
2021-11-04 19:51       ` Simon Marchi [this message]
2021-11-01 15:50 ` [PATCH 2/5] gdb: remove unnecessary cmd_list_element::aliases nullptr checks Simon Marchi
2021-11-04 18:29   ` Tom Tromey
2021-11-04 19:45     ` Simon Marchi
2021-11-01 15:50 ` [PATCH 3/5] gdb: remove command_class enum class_deprecated Simon Marchi
2021-11-04 18:30   ` Tom Tromey
2021-11-04 19:45     ` Simon Marchi
2021-11-01 15:50 ` [PATCH 4/5] gdb: add "info index-cache stats", deprecate "show index-cache stats" Simon Marchi
2021-11-04 18:33   ` Tom Tromey
2021-11-04 19:19     ` Simon Marchi
2021-11-01 15:50 ` [PATCH 5/5] gdb: introduce "set index-cache enabled", deprecate "set index-cache on/off" Simon Marchi
2021-11-04 18:36   ` Tom Tromey
2021-11-04 19:51     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4eb56708-4f59-61d3-07d8-6918614eab3c@efficios.com \
    --to=simon.marchi@efficios.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).