From 0cb93b3a42a2d489a092d17005fb2b4dcbf74d95 Mon Sep 17 00:00:00 2001 From: Steffen Mueller Date: Sun, 28 Aug 2011 17:45:37 +0200 Subject: Revert back to making XS(name) expose XSUB symbols Instead, as Zefram recommended, ExtUtils::ParseXS will be patched to not export XSUB symbols by default that are generated through the module itself. As Zefram said, this has the advantage of allowing older perls to benefit from the non-exporting of symbols. --- XSUB.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'XSUB.h') diff --git a/XSUB.h b/XSUB.h index f4623e97d4..61d0ef2ba2 100644 --- a/XSUB.h +++ b/XSUB.h @@ -48,16 +48,15 @@ Used to access elements on the XSUB's stack. =for apidoc AmU||XS Macro to declare an XSUB and its C parameter list. This is handled by -C. +C. It is the same as using the more explicit XS_EXTERNAL macro. =for apidoc AmU||XS_INTERNAL Macro to declare an XSUB and its C parameter list without exporting the symbols. This is handled by C and generally preferable over exporting the XSUB -symbols unnecessarily. This is handled by C. +symbols unnecessarily. =for apidoc AmU||XS_EXTERNAL Macro to declare an XSUB and its C parameter list explicitly exporting the symbols. -This is handled by C. =for apidoc Ams||dAX Sets up the C variable. @@ -152,8 +151,9 @@ is a lexical $_ in scope. # endif #endif -/* We do not export xsub symbols any more by default */ -#define XS(name) XS_INTERNAL(name) +/* We do export xsub symbols by default for the public XS macro. + * Try explicitly using XS_INTERNAL/XS_EXTERNAL instead, please. */ +#define XS(name) XS_EXTERNAL(name) #define dAX const I32 ax = (I32)(MARK - PL_stack_base + 1) -- cgit v1.2.1