@@ -333,7 +333,7 @@ sub parse {
333
333
$pxs -> blurt(" Error: 'CASE:' after unconditional 'CASE:'" )
334
334
if $num > 1 && ! $case_had_cond ;
335
335
$case_had_cond = length $case -> {cond };
336
- $pxs -> blurt(" Error: No 'CASE:' at top of function" )
336
+ $pxs -> blurt(" Error: no 'CASE:' at top of function" )
337
337
if $seen_bare_xbody ;
338
338
}
339
339
else {
@@ -688,16 +688,16 @@ sub parse {
688
688
# is for C++ functions.
689
689
690
690
my $func_header = shift (@{ $pxs -> {line } });
691
- $pxs -> blurt(" Error: Cannot parse function definition from '$func_header '" ), return
691
+ $pxs -> blurt(" Error: cannot parse function definition from '$func_header '" ), return
692
692
unless $func_header =~ / ^(?:([\w :]*)::)?(\w +)\s *\(\s *(.*?)\s *\)\s *(const)?\s *(;\s *)?$ /s ;
693
693
694
694
my ($class , $name , $params_text ) = ($1 , $2 , $3 );
695
695
$class = " $4 $class " if $4 ;
696
696
697
697
if ($return_type -> {static } and !defined $class )
698
698
{
699
- $pxs -> Warn( " Ignoring 'static' type modifier:"
700
- . " only valid with an XSUB name which includes a class" );
699
+ $pxs -> Warn( " Warning: ignoring 'static' type modifier:"
700
+ . " only valid with an XSUB name which includes a class" );
701
701
$return_type -> {static } = 0;
702
702
}
703
703
@@ -824,7 +824,7 @@ sub parse {
824
824
825
825
# a function definition needs at least 2 lines
826
826
unless (@{$pxs -> {line }}) {
827
- $pxs -> blurt(" Error: Function definition too short '$line '" );
827
+ $pxs -> blurt(" Error: function definition too short '$line '" );
828
828
return ;
829
829
}
830
830
@@ -939,7 +939,7 @@ sub parse {
939
939
$self -> {var } = ' SV *' ;
940
940
return 1;
941
941
}
942
- $pxs -> blurt(" Unparseable XSUB parameter: '$_ '" );
942
+ $pxs -> blurt(" Error: unparseable XSUB parameter: '$_ '" );
943
943
return ;
944
944
}
945
945
@@ -984,7 +984,7 @@ sub parse {
984
984
$out_type = $out_type eq ' IN' ? ' ' : $out_type ;
985
985
}
986
986
else {
987
- $pxs -> blurt(" parameter IN/OUT modifier not allowed under -noinout" );
987
+ $pxs -> blurt(" Error: parameter IN/OUT modifier not allowed under -noinout" );
988
988
}
989
989
}
990
990
else {
@@ -994,7 +994,7 @@ sub parse {
994
994
# Process optional type
995
995
996
996
if (defined ($type ) && !$pxs -> {config_allow_argtypes }) {
997
- $pxs -> blurt(" parameter type not allowed under -noargtypes" );
997
+ $pxs -> blurt(" Error: parameter type not allowed under -noargtypes" );
998
998
undef $type ;
999
999
}
1000
1000
@@ -1008,12 +1008,12 @@ sub parse {
1008
1008
$len_name = $1 ;
1009
1009
$is_length = 1;
1010
1010
if (defined $default ) {
1011
- $pxs -> blurt(" Default value not allowed on length() parameter '$len_name '" );
1011
+ $pxs -> blurt(" Error: default value not allowed on length() parameter '$len_name '" );
1012
1012
undef $default ;
1013
1013
}
1014
1014
}
1015
1015
else {
1016
- $pxs -> blurt(" length() pseudo-parameter not allowed under -noargtypes" );
1016
+ $pxs -> blurt(" Error: length() pseudo-parameter not allowed under -noargtypes" );
1017
1017
}
1018
1018
}
1019
1019
@@ -1215,7 +1215,7 @@ sub lookup_input_typemap {
1215
1215
# e.g. 'SvPV_nolen($arg)'
1216
1216
my $inputmap = $typemaps -> get_inputmap(xstype => $xstype );
1217
1217
if (not defined $inputmap ) {
1218
- $pxs -> blurt(" Error: No INPUT definition for type '$type ', typekind '$xstype ' found" );
1218
+ $pxs -> blurt(" Error: no INPUT definition for type '$type ', typekind '$xstype ' found" );
1219
1219
return ;
1220
1220
}
1221
1221
@@ -1246,8 +1246,9 @@ sub lookup_input_typemap {
1246
1246
my $subinputmap =
1247
1247
$typemaps -> get_inputmap(xstype => $subtypemap -> xstype);
1248
1248
if (not $subinputmap ) {
1249
- $pxs -> blurt(" Error: No INPUT definition for type '$subtype ',
1250
- typekind '" . $subtypemap -> xstype . " ' found" );
1249
+ $pxs -> blurt(" Error: no INPUT definition for subtype "
1250
+ . " '$subtype ', typekind '"
1251
+ . $subtypemap -> xstype . " ' found" );
1251
1252
return ;
1252
1253
}
1253
1254
@@ -1337,7 +1338,7 @@ sub lookup_output_typemap {
1337
1338
# values
1338
1339
1339
1340
unless (defined $type ) {
1340
- $pxs -> blurt(" Can 't determine output type for '$var '" );
1341
+ $pxs -> blurt(" Error: can 't determine output type for '$var '" );
1341
1342
return ;
1342
1343
}
1343
1344
@@ -1393,7 +1394,7 @@ sub lookup_output_typemap {
1393
1394
if ($var ne ' RETVAL' ) {
1394
1395
# This special type is intended for use only as the return type of
1395
1396
# an XSUB
1396
- $pxs -> blurt( " Can 't use array(type,nitems) type for "
1397
+ $pxs -> blurt( " Error: can 't use array(type,nitems) type for "
1397
1398
. (defined $out_num ? " OUTLIST" : " OUT" )
1398
1399
. " parameter" );
1399
1400
return ;
@@ -1413,7 +1414,7 @@ sub lookup_output_typemap {
1413
1414
1414
1415
$outputmap = $typemaps -> get_outputmap(xstype => $typemap -> xstype);
1415
1416
if (not $outputmap ) {
1416
- $pxs -> blurt(" Error: No OUTPUT definition for type '$type ', typekind '"
1417
+ $pxs -> blurt(" Error: no OUTPUT definition for type '$type ', typekind '"
1417
1418
. $typemap -> xstype . " ' found" );
1418
1419
return ;
1419
1420
}
@@ -1462,7 +1463,7 @@ sub lookup_output_typemap {
1462
1463
# definitely would fail with OUT, which is supposed to be
1463
1464
# updating parameter SVs, not pushing anything on the stack.
1464
1465
# So forbid all except RETVAL.
1465
- $pxs -> blurt(" Can 't use typemap containing DO_ARRAY_ELEM for "
1466
+ $pxs -> blurt(" Error: can 't use typemap containing DO_ARRAY_ELEM for "
1466
1467
. (defined $out_num ? " OUTLIST" : " OUT" )
1467
1468
. " parameter" );
1468
1469
return ;
@@ -1477,7 +1478,7 @@ sub lookup_output_typemap {
1477
1478
my $suboutputmap =
1478
1479
$typemaps -> get_outputmap(xstype => $subtypemap -> xstype);
1479
1480
if (not $suboutputmap ) {
1480
- $pxs -> blurt(" Error: No OUTPUT definition for type '$subtype ', typekind '"
1481
+ $pxs -> blurt(" Error: no OUTPUT definition for subtype '$subtype ', typekind '"
1481
1482
. $subtypemap -> xstype . " ' found" );
1482
1483
return ;
1483
1484
}
@@ -1655,7 +1656,9 @@ sub as_input_code {
1655
1656
# been emitted, so remove it from the typemap before evalling it,
1656
1657
1657
1658
$init_code =~ s / ^\s *\Q $var\E (\s *=\s *)/ $1 /
1658
- or $pxs -> death(" panic: typemap doesn't start with '\$ var='\n " );
1659
+ # we just checked above that it starts with var=, so this
1660
+ # should never happen
1661
+ or $pxs -> death(" Internal error: typemap doesn't start with '\$ var='\n " );
1659
1662
1660
1663
printf " %s ;\n " , $init_code ;
1661
1664
}
@@ -2284,7 +2287,7 @@ sub parse {
2284
2287
2285
2288
# Process ellipsis (...)
2286
2289
2287
- $pxs -> blurt(" further XSUB parameter seen after ellipsis (...)" )
2290
+ $pxs -> blurt(" Error: further XSUB parameter seen after ellipsis (...)" )
2288
2291
if $self -> {seen_ellipsis };
2289
2292
2290
2293
if ($param_text eq ' ...' ) {
@@ -2915,7 +2918,7 @@ sub as_code {
2915
2918
and not ($retval && $retval -> {in_output })
2916
2919
and $xsub -> {decl }{return_type }{type } ne ' void' )
2917
2920
{
2918
- $pxs -> Warn(" Warning: Found a 'CODE' section which seems to be using 'RETVAL' but no 'OUTPUT' section." );
2921
+ $pxs -> Warn(" Warning: found a 'CODE' section which seems to be using 'RETVAL' but no 'OUTPUT' section." );
2919
2922
}
2920
2923
2921
2924
# Process any OUT vars: i.e. vars that are declared OUT in
@@ -3318,7 +3321,7 @@ sub parse {
3318
3321
3319
3322
$self -> SUPER::parse($pxs ); # set file/line_no, self->{enable}
3320
3323
3321
- $pxs -> blurt(" Error: Only one SCOPE declaration allowed per XSUB" )
3324
+ $pxs -> blurt(" Error: only one SCOPE declaration allowed per XSUB" )
3322
3325
if $xsub -> {seen_SCOPE };
3323
3326
$xsub -> {seen_SCOPE } = 1;
3324
3327
@@ -3629,7 +3632,7 @@ sub parse {
3629
3632
3630
3633
my $proto ;
3631
3634
3632
- $pxs -> death(" Error: Only 1 PROTOTYPE definition allowed per xsub" )
3635
+ $pxs -> death(" Error: only one PROTOTYPE definition allowed per xsub" )
3633
3636
if $xsub -> {seen_PROTOTYPE };
3634
3637
$xsub -> {seen_PROTOTYPE } = 1;
3635
3638
@@ -3645,7 +3648,7 @@ sub parse {
3645
3648
}
3646
3649
else {
3647
3650
s /\s +// g ; # remove any whitespace
3648
- $pxs -> death(" Error: Invalid prototype '$_ '" )
3651
+ $pxs -> death(" Error: invalid prototype '$_ '" )
3649
3652
unless ExtUtils::ParseXS::Utilities::valid_proto_string($_ );
3650
3653
$proto = ExtUtils::ParseXS::Utilities::C_string($_ );
3651
3654
}
@@ -3844,7 +3847,7 @@ sub parse {
3844
3847
$self -> SUPER::parse($pxs ); # set file/line_no/lines
3845
3848
$xsub -> {seen_PPCODE } = 1;
3846
3849
# The only thing left should be the special "!End!\n\n" token.
3847
- $pxs -> death(" PPCODE must be last thing" ) if @{$pxs -> {line }} > 1;
3850
+ $pxs -> death(" Error: PPCODE must be the last thing" ) if @{$pxs -> {line }} > 1;
3848
3851
1;
3849
3852
}
3850
3853
@@ -4075,7 +4078,7 @@ sub parse {
4075
4078
my ($alias , $is_symbolic , $value ) = ($1 , $2 , $3 );
4076
4079
my $orig_alias = $alias ;
4077
4080
4078
- $pxs -> blurt(" Error: In alias definition for '$alias ' the value may not"
4081
+ $pxs -> blurt(" Error: in alias definition for '$alias ' the value may not"
4079
4082
. " contain ':' unless it is symbolic." )
4080
4083
if !$is_symbolic and $value =~/ :/ ;
4081
4084
@@ -4090,17 +4093,17 @@ sub parse {
4090
4093
} elsif ($value eq $fname ) {
4091
4094
$value = 0;
4092
4095
} else {
4093
- $pxs -> blurt(" Error: Unknown alias '$value ' in symbolic definition for '$orig_alias '" );
4096
+ $pxs -> blurt(" Error: unknown alias '$value ' in symbolic definition for '$orig_alias '" );
4094
4097
}
4095
4098
}
4096
4099
4097
4100
# check for duplicate alias name & duplicate value
4098
4101
my $prev_value = $xsub -> {map_alias_name_to_value }{$alias };
4099
4102
if (defined $prev_value ) {
4100
4103
if ($prev_value eq $value ) {
4101
- $pxs -> Warn(" Warning: Ignoring duplicate alias '$orig_alias '" )
4104
+ $pxs -> Warn(" Warning: ignoring duplicate alias '$orig_alias '" )
4102
4105
} else {
4103
- $pxs -> Warn(" Warning: Conflicting duplicate alias '$orig_alias '"
4106
+ $pxs -> Warn(" Warning: conflicting duplicate alias '$orig_alias '"
4104
4107
. " changes definition from '$prev_value ' to '$value '" );
4105
4108
delete $xsub ->
4106
4109
{map_alias_value_to_name_seen_hash }->
@@ -4130,7 +4133,7 @@ sub parse {
4130
4133
$copy
4131
4134
} @keys ;
4132
4135
$pxs -> WarnHint(
4133
- " Warning: Aliases '$orig_alias ' and "
4136
+ " Warning: aliases '$orig_alias ' and "
4134
4137
. join (" , " , @keys )
4135
4138
. " have identical values of $value "
4136
4139
. ( $value eq " 0"
@@ -4149,7 +4152,7 @@ sub parse {
4149
4152
{$value }{$alias }++;
4150
4153
}
4151
4154
4152
- $pxs -> blurt(" Error: Cannot parse ALIAS definitions from '$orig '" )
4155
+ $pxs -> blurt(" Error: cannot parse ALIAS definitions from '$orig '" )
4153
4156
if $line ;
4154
4157
4155
4158
1;
0 commit comments