@@ -64,7 +64,7 @@ use Symbol;
6464
6565our $VERSION ;
6666BEGIN {
67- $VERSION = ' 3.57 ' ;
67+ $VERSION = ' 3.58 ' ;
6868 require ExtUtils::ParseXS::Constants; ExtUtils::ParseXS::Constants-> VERSION($VERSION );
6969 require ExtUtils::ParseXS::CountLines; ExtUtils::ParseXS::CountLines-> VERSION($VERSION );
7070 require ExtUtils::ParseXS::Node; ExtUtils::ParseXS::Node-> VERSION($VERSION );
898898 | dXSI32;
899899EOF
900900
901- print Q(<<"EOF" ) if $self -> {xsub_seen_INTERFACE };
902- | dXSFUNCTION($self ->{xsub_return_type});
903- EOF
904-
905901
906902 {
907903 # the code to emit to determine whether the correct number of argument
@@ -1038,7 +1034,7 @@ EOF
10381034 # the pattern. At this stage it's looking for (possibly multiple)
10391035 # INPUT and/or PREINIT blocks, plus any generic XSUB keywords.
10401036 $self -> process_keywords(
1041- " C_ARGS|INPUT|INTERFACE_MACRO|PREINIT|SCOPE|$generic_xsub_keys " );
1037+ " C_ARGS|INPUT|INTERFACE_MACRO|PREINIT|SCOPE|INTERFACE| $generic_xsub_keys " );
10421038
10431039 print Q(<<"EOF" ) if $self -> {xsub_SCOPE_enabled };
10441040 | ENTER;
@@ -1120,7 +1116,7 @@ EOF
11201116 # the pattern. At this stage it's looking for (possibly multiple)
11211117 # INIT blocks, plus any generic XSUB keywords.
11221118 $self -> process_keywords(
1123- " C_ARGS|INIT|INTERFACE|INTERFACE_MACRO| $generic_xsub_keys " );
1119+ " C_ARGS|INIT|$generic_xsub_keys " );
11241120
11251121 # ----------------------------------------------------------------
11261122 # Time to emit the main body of the XSUB. Either the real code
@@ -2244,13 +2240,16 @@ sub INTERFACE_handler {
22442240
22452241 trim_whitespace($in );
22462242
2243+ my $example_interface_function ;
22472244 foreach (split /[\s ,]+/, $in ) {
22482245 my $iface_name = $_ ;
22492246 $iface_name =~ s / ^$self->{PREFIX_pattern}// ;
22502247 $self -> {xsub_map_interface_name_short_to_original }-> {$iface_name } = $_ ;
2248+ $example_interface_function = $_ ;
22512249 }
2250+
22522251 print Q(<<"EOF" );
2253- | XSFUNCTION = $self ->{xsub_interface_macro}($self ->{xsub_return_type},cv,XSANY.any_dptr);
2252+ | dXSFUNCTION( $self ->{xsub_return_type}, $example_interface_function ) = $self ->{xsub_interface_macro}($self ->{xsub_return_type},cv,XSANY.any_dptr, $example_interface_function )
22542253EOF
22552254 $self -> {xsub_seen_INTERFACE_or_MACRO } = 1; # local
22562255 $self -> {seen_INTERFACE_or_MACRO } = 1; # global
0 commit comments