summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/xsubpp
diff options
context:
space:
mode:
authorPaul Marquess <pmarquess@bfsec.bt.co.uk>1996-02-06 14:42:09 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-02-06 14:42:09 +0000
commit7d41bd0a020d860cd068d0e3043c99f83eae73d4 (patch)
tree9776c7610e25f6935638fe784ab655acb3197ff4 /lib/ExtUtils/xsubpp
parente05e23b19fadce89226416facb6c018853620278 (diff)
downloadperl-7d41bd0a020d860cd068d0e3043c99f83eae73d4.tar.gz
xsubpp 1.933 patch
Diffstat (limited to 'lib/ExtUtils/xsubpp')
-rwxr-xr-xlib/ExtUtils/xsubpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp
index 0d9c816abc..8d8e6dc8df 100755
--- a/lib/ExtUtils/xsubpp
+++ b/lib/ExtUtils/xsubpp
@@ -76,7 +76,7 @@ perl(1), perlxs(1), perlxstut(1), perlapi(1)
=cut
# Global Constants
-$XSUBPP_version = "1.932";
+$XSUBPP_version = "1.933";
require 5.002;
sub Q ;
@@ -404,11 +404,14 @@ sub VERSIONCHECK_handler ()
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
@@ -425,6 +428,9 @@ sub PROTOTYPE_handler ()
}
}
+ # If no prototype specified, then assume empty prototype ""
+ $ProtoThisXSUB = 2 unless $specified ;
+
$ProtoUsed = 1 ;
}
@@ -934,7 +940,12 @@ EOF
# 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 {