Reinstate prototype default and warning about invalid prototypes
authorSteffen Mueller <smueller@cpan.org>
Fri, 11 Feb 2011 21:52:30 +0000 (22:52 +0100)
committerSteffen Mueller <smueller@cpan.org>
Tue, 12 Jul 2011 18:54:48 +0000 (20:54 +0200)
dist/ExtUtils-ParseXS/lib/ExtUtils/Typemaps.pm

index ee4524d..6e1d36d 100644 (file)
@@ -810,11 +810,10 @@ sub _parse {
       my($type, $kind, $proto) = /^(.*?\S)\s+(\S+)\s*($ExtUtils::ParseXS::Constants::PrototypeRegexp*)$/o
         or warn("Warning: File '$filename' Line $lineno '$line' TYPEMAP entry needs 2 or 3 columns\n"),
            next;
-      #$proto = '' if not $proto;
       # prototype defaults to '$'
-      #$proto = '$' unless $proto;
-      #warn("Warning: File '$filename' Line $lineno '$line' Invalid prototype '$proto'\n")
-      #  unless _valid_proto_string($proto);
+      $proto = '$' unless $proto;
+      warn("Warning: File '$filename' Line $lineno '$line' Invalid prototype '$proto'\n")
+        unless _valid_proto_string($proto);
       $self->add_typemap(
         ExtUtils::Typemaps::Type->new(
           xstype => $kind, proto => $proto, ctype => $type