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
Jan Dubois
August 12, 2011 08:52
RE: [perl.git] branch smoke-me/static_xsub, created. v5.15.1-263-g7a43e8a
Message ID:
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 <>
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.


Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About