=cut
# Global Constants
-$XSUBPP_version = "1.932";
+$XSUBPP_version = "1.933";
require 5.002;
sub Q ;
sub PROTOTYPE_handler ()
{
+ my $specified ;
+
death("Error: Only 1 PROTOTYPE definition allowed per xsub")
if $proto_in_this_xsub ++ ;
for (; !/^$BLOCK_re/o; $_ = shift(@line)) {
next unless /\S/;
+ $specified = 1 ;
TrimWhitespace($_) ;
if ($_ eq 'DISABLE') {
$ProtoThisXSUB = 0
}
}
+ # If no prototype specified, then assume empty prototype ""
+ $ProtoThisXSUB = 2 unless $specified ;
+
$ProtoUsed = 1 ;
}
# Build the prototype string for the xsub
if ($ProtoThisXSUB) {
- if ($ProtoThisXSUB != 1) {
+ if ($ProtoThisXSUB == 2) {
+ # User has specified empty prototype
+ $ProtoXSUB{$pname} = '""'
+ }
+ elsif ($ProtoThisXSUB != 1) {
+ # User has specified a prototype
$ProtoXSUB{$pname} = '"' . $ProtoThisXSUB . '"'
}
else {