This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: pmachata/reader_hooks review
- From: Roland McGrath <roland at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Mon, 27 Apr 2009 10:21:17 -0700
- Subject: Re: pmachata/reader_hooks review
> > Use const pointers everywhere.
>
> That was the original plan, but you can't assign char** to char const**
> under C typing. I decided it's better to just keep them char** to avoid
> having to either type cast the pointers in function arguments, or having
> to rewrite surrounding typing.
Oh, char ** for result params of *_inc is OK. But there are others IIRC.
> The one in dwarf_getpubnames is there because other return statements do
> that, too, in the same function. The function returns ptrdiff_t -- that
> does have a size of long, doesn't it?
Ah, yes, it does. Ok.
(It really doesn't hurt to use -1 there either, though.)
Thanks,
Rooland