develooper Front page | perl.perl5.porters | Postings from July 2019

#define PERL_EXT to get feature test macros

Thread Next
Paul "LeoNerd" Evans
July 22, 2019 19:34
#define PERL_EXT to get feature test macros
Message ID:
There's some handy macros in feature.h that define useful tests like

        Perl_croak(aTHX_ "Experimental subroutine signatures not enabled");

If I do something like this then I can use them in an XS module:

  #define PERL_EXT
  #include "feature.h"

Is that a good idea? If not, could it become one somehow? It'd be
useful to have a nice way for XS modules (especially those implementing
syntax features) to easily query such state. Without this I'd have to
do quite a bit of copy-pasting from internals to get the same effect.

Paul "LeoNerd" Evans      |  |

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