develooper Front page | perl.perl5.porters | Postings from January 2013

Re: perl smokes with -DPERL_GLOBAL_STRUCT (or -DPERL_GLOBAL_STRUCT_PRIVATE)?

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
January 12, 2013 22:25
Subject:
Re: perl smokes with -DPERL_GLOBAL_STRUCT (or -DPERL_GLOBAL_STRUCT_PRIVATE)?
Message ID:
50F1E2D5.10800@iki.fi
>>> Thanks!  (And to Tony Cook, too.)
>>
>> PGSP builds fine under clang but fails building under g++ because
>> Perl_get_vtbl() returns 'MGVTBL*' instead of 'const MGVTBL*'.  That's
>> marked as public API so I'll not change it.
>
> Wouldn't it be better to change the API for C++ builds only?  It seems
> to me to be better to have a changed API than to not build at all.

Agreed.

Furthermore:

(1) though the consting rules between C and C++ are slightly different, 
IIRC, it would be useful to look at how come there is difference in 
here?  Maybe C++ is onto something?

(2) how much would actually break if the Perl_get_vtbl() would become 
const?  Is one really supposed to be able to modify the vtbl?


>


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