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 Next
From:
Jan Dubois
Date:
August 12, 2011 08:52
Subject:
RE: [perl.git] branch smoke-me/static_xsub, created. v5.15.1-263-g7a43e8a
Message ID:
012b01cc5907$cb1bc660$61535320$@activestate.com
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.

Cheers,
-Jan



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