public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
To: elfutils-devel@lists.fedorahosted.org
Subject: Re: [PATCH 1/2] Add is_executable to Dwfl_Module.
Date: Thu, 18 Sep 2014 16:56:59 +0200	[thread overview]
Message-ID: <1411052219.27706.7.camel@bordewijk.wildebeest.org> (raw)
In-Reply-To: 20140911190049.GA1901@host2.jankratochvil.net

[-- Attachment #1: Type: text/plain, Size: 959 bytes --]

On Thu, 2014-09-11 at 21:00 +0200, Jan Kratochvil wrote:
> On Wed, 10 Sep 2014 22:15:42 +0200, Mark Wielaard wrote:
> > So I propose a cleanup like the attached first.
> 
> While I find that as an improvement in general IMO on top of your patch the
> changes could be done a bit differently.

Clever. You create another struct in the union for just those fields
that do overlap. That does indeed solve the issue of documenting what
can/cannot be directly accessed. But I am afraid that might be a little
too subtle. You are kind of back to the original issue that you have to
check why this is allowed. I like the direct approach better, where the
union accesses are only done when the type is explicitly known.

Also we shouldn't add such a partial type struct to the public gelf.h
header since that is kind of a shared standard type, so if other
libelf/gelf implementations don't support it we shouldn't export it
IMHO.

Cheers,

Mark

             reply	other threads:[~2014-09-18 14:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18 14:56 Mark Wielaard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-09-22 17:28 Roland McGrath
2014-09-18 14:59 Jan Kratochvil
2014-09-11 19:00 Jan Kratochvil
2014-09-10 20:15 Mark Wielaard
2014-09-10 18:56 Mark Wielaard
2014-09-10  7:21 Jan Kratochvil
2014-09-09 21:55 Roland McGrath
2014-09-09 21:51 Jan Kratochvil

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=1411052219.27706.7.camel@bordewijk.wildebeest.org \
    --to=mjw@redhat.com \
    --cc=elfutils-devel@lists.fedorahosted.org \
    /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).