@@ -3007,6 +3007,11 @@ sub parse {
3007
3007
package ExtUtils::ParseXS::Node::EXPORT_XSUB_SYMBOLS ;
3008
3008
3009
3009
# Handle EXPORT_XSUB_SYMBOLS keyword
3010
+ #
3011
+ # Note that this keyword can appear both inside of and outside of an
3012
+ # XSUB; for the latter, it it is currently created as a temporary
3013
+ # object where as_code() is called immediately after parse() and then
3014
+ # the object is discarded.
3010
3015
3011
3016
BEGIN { $build_subclass -> (' enable' , # parent
3012
3017
)};
@@ -3029,6 +3034,10 @@ sub as_code {
3029
3034
3030
3035
my $xs_impl = $self -> {enable } ? ' XS_EXTERNAL' : ' XS_INTERNAL' ;
3031
3036
3037
+ # Change the definition of XS_EUPXS, so that any subsequent
3038
+ # XS_EUPXS(fXS_Foo_foo) XSUB declarations will expand to
3039
+ # XS_EXTERNAL/XS_INTERNAL as appropriate
3040
+
3032
3041
print ExtUtils::ParseXS::Q(<<"EOF" );
3033
3042
|#undef XS_EUPXS
3034
3043
|#if defined(PERL_EUPXS_ALWAYS_EXPORT)
@@ -3047,6 +3056,8 @@ EOF
3047
3056
package ExtUtils::ParseXS::Node::PROTOTYPES ;
3048
3057
3049
3058
# Handle PROTOTYPES keyword
3059
+ #
3060
+ # Note that this keyword can appear both inside of and outside of an XSUB.
3050
3061
3051
3062
BEGIN { $build_subclass -> (' enable' , # parent
3052
3063
)};
@@ -3068,6 +3079,8 @@ sub parse {
3068
3079
package ExtUtils::ParseXS::Node::SCOPE ;
3069
3080
3070
3081
# Handle SCOPE keyword
3082
+ #
3083
+ # Note that this keyword can appear both inside of and outside of an XSUB.
3071
3084
3072
3085
BEGIN { $build_subclass -> (' enable' , # parent
3073
3086
)};
@@ -3087,7 +3100,7 @@ sub parse {
3087
3100
3088
3101
# Note that currently this parse method can be called either while
3089
3102
# parsing an XSUB, or while processing file-scoped keywords
3090
- # just before an XSUB declaration. Sop potentially set both types of
3103
+ # just before an XSUB declaration. So potentially set both types of
3091
3104
# state.
3092
3105
$xsub -> {SCOPE_enabled } = $self -> {enable } if $xsub ;
3093
3106
$pxs -> {file_SCOPE_enabled } = $self -> {enable };
@@ -3100,6 +3113,8 @@ sub parse {
3100
3113
package ExtUtils::ParseXS::Node::VERSIONCHECK ;
3101
3114
3102
3115
# Handle VERSIONCHECK keyword
3116
+ #
3117
+ # Note that this keyword can appear both inside of and outside of an XSUB.
3103
3118
3104
3119
BEGIN { $build_subclass -> (' enable' , # parent
3105
3120
)};
0 commit comments