our (
$FH, $Package, $func_name, $Full_func_name, $Packid, $pname, $ALIAS,
);
-# The scalars in the line below remain (for the time being) 'our' variables
-# because I suspect they will pose the same problems as those in the statement
-# above.
-our ($newXS, );
our $self = {};
#
EOF
- $newXS = "newXS";
+ $self->{newXS} = "newXS";
$self->{proto} = "";
# Build the prototype string for the xsub
if ($self->{ProtoThisXSUB}) {
- $newXS = "newXSproto_portable";
+ $self->{newXS} = "newXSproto_portable";
if ($self->{ProtoThisXSUB} eq 2) {
# User has specified empty prototype
unless defined $self->{XsubAliases}->{$pname};
while ( my ($xname, $value) = each %{ $self->{XsubAliases} }) {
push(@{ $self->{InitFileCode} }, Q(<<"EOF"));
-# cv = ${newXS}(\"$xname\", XS_$Full_func_name, file$self->{proto});
+# cv = $self->{newXS}(\"$xname\", XS_$Full_func_name, file$self->{proto});
# XSANY.any_i32 = $value;
EOF
}
}
elsif (@{ $self->{Attributes} }) {
push(@{ $self->{InitFileCode} }, Q(<<"EOF"));
-# cv = ${newXS}(\"$pname\", XS_$Full_func_name, file$self->{proto});
+# cv = $self->{newXS}(\"$pname\", XS_$Full_func_name, file$self->{proto});
# apply_attrs_string("$Package", cv, "@{ $self->{Attributes} }", 0);
EOF
}
while ( my ($yname, $value) = each %{ $self->{Interfaces} }) {
$yname = "$Package\::$yname" unless $yname =~ /::/;
push(@{ $self->{InitFileCode} }, Q(<<"EOF"));
-# cv = ${newXS}(\"$yname\", XS_$Full_func_name, file$self->{proto});
+# cv = $self->{newXS}(\"$yname\", XS_$Full_func_name, file$self->{proto});
# $self->{interface_macro_set}(cv,$value);
EOF
}
}
- elsif($newXS eq 'newXS'){ # work around P5NCI's empty newXS macro
+ elsif($self->{newXS} eq 'newXS'){ # work around P5NCI's empty newXS macro
push(@{ $self->{InitFileCode} },
- " ${newXS}(\"$pname\", XS_$Full_func_name, file$self->{proto});\n");
+ " $self->{newXS}(\"$pname\", XS_$Full_func_name, file$self->{proto});\n");
}
else {
push(@{ $self->{InitFileCode} },
- " (void)${newXS}(\"$pname\", XS_$Full_func_name, file$self->{proto});\n");
+ " (void)$self->{newXS}(\"$pname\", XS_$Full_func_name, file$self->{proto});\n");
}
} # END 'PARAGRAPH' 'while' loop
/* Making a sub named "${Package}::()" allows the package */
/* to be findable via fetchmethod(), and causes */
/* overload::Overloaded("${Package}") to return true. */
- (void)${newXS}("${Package}::()", XS_${Packid}_nil, file$self->{proto});
+ (void)$self->{newXS}("${Package}::()", XS_${Packid}_nil, file$self->{proto});
MAKE_FETCHMETHOD_WORK
}
$self->{Overload} = 1 unless $self->{Overload};
my $overload = "$Package\::(".$1;
push(@{ $self->{InitFileCode} },
- " (void)${newXS}(\"$overload\", XS_$Full_func_name, file$self->{proto});\n");
+ " (void)$self->{newXS}(\"$overload\", XS_$Full_func_name, file$self->{proto});\n");
}
}
}