Re: Cast abuse
- From: Pawel Salek <pawsa theochem kth se>
- To: Brian Stafford <brian stafford uklinux net>
- Cc: balsa-list gnome org
- Subject: Re: Cast abuse
- Date: Tue, 20 Nov 2001 11:38:25 +0100
On 2001.11.20 11:17 Brian Stafford wrote:
>> where inbuf is often passed from a const char * variable. There are a
>> couple of files in libmutt that do this, and gcc gripes each time it
>> sees them. I imagine that's why the casts that Brian complained about
>> in the ldap code were there.
>
> I just checked glibc 2's iconv.h and the one distributed with GNU
> libiconv. Both declare inbuf to be const. SUSv2 declares it const
> too. So I'd say the linux man page is incorrect.
glibc-devel-2.2.4-19:/usr/include/iconv.h contains:
extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
size_t *__restrict __inbytesleft,
char **__restrict __outbuf,
size_t *__restrict __outbytesleft);
I do not know what '__restrict' means (anybody knows?) but it does not
appear to be equivalent to 'const'.
/Pawel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]