develooper Front page | perl.perl5.porters | Postings from August 2011

Re: [perl.git] branch smoke-me/static_xsub, created. v5.15.1-263-g7a43e8a

Thread Previous
From:
Steffen Mueller
Date:
August 12, 2011 09:56
Subject:
Re: [perl.git] branch smoke-me/static_xsub, created. v5.15.1-263-g7a43e8a
Message ID:
4E455B39.9040801@cpan.org
On 08/12/2011 05:52 PM, Jan Dubois wrote:
> On Fri, 12 Aug 2011, Steffen Mueller wrote:
>>
>>      Make XSUBs static by default
>>
>>      At the same time, do not include "STATIC" in XSPROTO and
>>      get rid of the XSPROTO_INTERNAL and XSPROTO_EXTERNAL macros
>>      because of that. This allows Devel::PPPort to continue doing
>>      its evil typedef'ing magic using XSPROTO.
>
> It is not "evil" typedef'in magic.  XSPROTO() explicitly has been
> introduced because XS() cannot be used in typedefs:
>
> commit 081304cacec6bce6f35c552d790a2bd93a6cda31
> Author: Abhijit Menon-Sen<ams@wiw.org>
> Date:   Fri Aug 10 05:42:26 2007 +0000
>
>      SWIG uses XS() like this (in the perlrun.swg template):
>
>      typedef XS(SwigPerlWrapper);
>      typedef SwigPerlWrapper *SwigPerlWrapperPtr;
>
>      This breaks if XS() includes the 'extern "C"' decoration under C++.
>      The appended patch provides an XSPROTO() macro that could be used
>      by SWIG instead.
>
>      (Patch from Jan Dubois to fix breakage caused by #28734.)
>
>      p4raw-id: //depot/perl@31697
>
> So obviously XSPROTO should *not* include "static" either.

And with the newer patches, it doesn't.

It appears evil because XSPROTO isn't documented as being for public 
consumption. Abhijit's/your change makes perfect sense given the commit 
message, though.

Best regards,
Steffen

Thread Previous


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