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

Re: [PATCH Storable 2.06] const declaration fixup

Thread Previous | Thread Next
February 2, 2003 14:54
Re: [PATCH Storable 2.06] const declaration fixup
Message ID:
On Sun, 26 Jan 2003 10:51:55 +0000, wrote:
>Craig A. Berry <> writes:
>>With recent versions of Compaq C under OpenVMS, the latest Storable 
>>version fails to compile like so:
>>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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About