develooper Front page | perl.perl5.porters | Postings from February 2003

Re: [PATCH Storable 2.06] const declaration fixup

Thread Previous | Thread Next
From:
sthoenna
Date:
February 2, 2003 14:54
Subject:
Re: [PATCH Storable 2.06] const declaration fixup
Message ID:
wqZP+gzkgGUG092yn@efn.org
On Sun, 26 Jan 2003 10:51:55 +0000, nick@ing-simmons.net wrote:
>Craig A. Berry <craigberry@mac.com> writes:
>>With recent versions of Compaq C under OpenVMS, the latest Storable 
>>version fails to compile like so:
>>
>>CC/DECC 
>>/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=.obj/NoList/NOANSI_ALIAS/Define=("VERSION=""2.06""","XS_VERSION=""2.06""")/
>>Include=(perl_root:[lib.VMS_AXP.5_6_1.CORE])/Optimize  STORABLE.c
>>
>>     WRITE(header, length);
>>....^
>>%CC-W-NOTCONSTQUAL, In this statement, the referenced type of the 
>>pointer value "header" is const, but the referenced type of the target 
>>of this assignment is not.
>>at line number 3369 in file D0:[CRAIG.STORABLE-2_06]STORABLE.XS;1
>
>What would it take to make WRITE(const char *,...) ?

WRITE is a macro.  header ends up as the second parameter of either
memcpy or PerlIO_write (where it may become the first parameter of
fwrite or second parameter of sfwrite).  All the above *should* be
const *.  Are they?

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About