diff options
author | Steffen Mueller <smueller@cpan.org> | 2011-09-04 18:55:06 +0200 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2011-09-04 18:55:06 +0200 |
commit | ca0e6506c663785374bf53fcafa07e5029c4a222 (patch) | |
tree | 9f9bc3bc8db0f380ac8ae1a5c7073a471a710440 /dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm | |
parent | 40c2103f9e420138a6aafe8d67a3f96ec99ef46d (diff) | |
download | perl-ca0e6506c663785374bf53fcafa07e5029c4a222.tar.gz |
ExtUtils::ParseXS: Allow users to enforce linkage of XSUBs
... using defines.
For easy backwards-compatibility of XS modules, we allow XS authors
to use
#define PERL_EUPXS_ALWAYS_EXPORT
or
#define PERL_EUPXS_NEVER_EXPORT
to choose one or the other behaviour. Since "always export" has been
the default behaviour of ExtUtils::ParseXS for virtually ever, defining
PERL_EUPXS_ALWAYS_EXPORT means that you get that behaviour in a very
backwards compatible way (barring a few broken EU::PXS releases).
Diffstat (limited to 'dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm')
-rw-r--r-- | dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm index 831bb7b77c..408045867c 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Utilities.pm @@ -6,7 +6,7 @@ use File::Spec; use lib qw( lib ); use ExtUtils::ParseXS::Constants (); -our $VERSION = '3.04_01'; +our $VERSION = '3.04_03'; our (@ISA, @EXPORT_OK); @ISA = qw(Exporter); @@ -533,9 +533,13 @@ sub standard_XS_defs { * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to! */ -/* default to internal */ #undef XS_EUPXS -#define XS_EUPXS(name) XS_INTERNAL(name) +#if defined(PERL_EUPXS_ALWAYS_EXPORT) +# define XS_EUPXS(name) XS_EXTERNAL(name) +#else + /* default to internal */ +# define XS_EUPXS(name) XS_INTERNAL(name) +#endif EOF |