Skip to content

Commit

Permalink
Revert back to making XS(name) expose XSUB symbols
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tsee committed Aug 28, 2011
1 parent 7bc95ae commit 0cb93b3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions XSUB.h
Expand Up @@ -48,16 +48,15 @@ Used to access elements on the XSUB's stack.
=for apidoc AmU||XS =for apidoc AmU||XS
Macro to declare an XSUB and its C parameter list. This is handled by Macro to declare an XSUB and its C parameter list. This is handled by
C<xsubpp>. C<xsubpp>. It is the same as using the more explicit XS_EXTERNAL macro.
=for apidoc AmU||XS_INTERNAL =for apidoc AmU||XS_INTERNAL
Macro to declare an XSUB and its C parameter list without exporting the symbols. Macro to declare an XSUB and its C parameter list without exporting the symbols.
This is handled by C<xsubpp> and generally preferable over exporting the XSUB This is handled by C<xsubpp> and generally preferable over exporting the XSUB
symbols unnecessarily. This is handled by C<xsubpp>. symbols unnecessarily.
=for apidoc AmU||XS_EXTERNAL =for apidoc AmU||XS_EXTERNAL
Macro to declare an XSUB and its C parameter list explicitly exporting the symbols. Macro to declare an XSUB and its C parameter list explicitly exporting the symbols.
This is handled by C<xsubpp>.
=for apidoc Ams||dAX =for apidoc Ams||dAX
Sets up the C<ax> variable. Sets up the C<ax> variable.
Expand Down Expand Up @@ -152,8 +151,9 @@ is a lexical $_ in scope.
# endif # endif
#endif #endif


/* We do not export xsub symbols any more by default */ /* We do export xsub symbols by default for the public XS macro.
#define XS(name) XS_INTERNAL(name) * 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) #define dAX const I32 ax = (I32)(MARK - PL_stack_base + 1)


Expand Down

0 comments on commit 0cb93b3

Please sign in to comment.