Change 23897 by [EMAIL PROTECTED] on 2005/01/28 21:01:04
More consistent names for all the parameter name/declaration methods
Affected files ...
... //depot/perl/lib/ExtUtils/Constant/Base.pm#4 edit
... //depot/perl/lib/ExtUtils/Constant/XS.pm#3 edit
... //depot/perl/perl_keyword.pl#2 edit
Differences ...
==== //depot/perl/lib/ExtUtils/Constant/Base.pm#4 (text) ====
Index: perl/lib/ExtUtils/Constant/Base.pm
--- perl/lib/ExtUtils/Constant/Base.pm#3~23879~ Mon Jan 24 15:16:04 2005
+++ perl/lib/ExtUtils/Constant/Base.pm Fri Jan 28 13:01:04 2005
@@ -592,23 +592,23 @@
'';
}
-sub C_constant_name_param_definition {
+sub name_param_definition {
"const char *" . $_[0]->name_param;
}
-sub C_constant_namelen_param {
+sub namelen_param {
'len';
}
-sub C_constant_namelen_param_definition {
- 'size_t ' . $_[0] -> C_constant_namelen_param;
+sub namelen_param_definition {
+ 'size_t ' . $_[0]->namelen_param;
}
-sub C_constant_param {
+sub C_constant_other_params {
'';
}
-sub C_constant_param_defintion {
+sub C_constant_other_params_defintion {
'';
}
@@ -620,8 +620,8 @@
considered a known bug). I<WHAT> is be a hashref of types the constant
function will return. In ExtUtils::Constant::XS this method is used to
returns a hashref keyed IV NV PV SV to show which combination of pointers will
-be needed in the C argument list generated by C_constant_param_definition
-and C_constant_param
+be needed in the C argument list generated by
+C_constant_other_params_definition and C_constant_other_params
=cut
@@ -877,11 +877,11 @@
# Eg "pTHX_ "
. $self->C_constant_prefix_param_defintion($params)
# Probably "const char *name"
- . $self->C_constant_name_param_definition($params);
+ . $self->name_param_definition($params);
# Something like ", STRLEN len"
- $body .= ", " . $self->C_constant_namelen_param_definition($params)
+ $body .= ", " . $self->namelen_param_definition($params)
unless defined $namelen;
- $body .= $self->C_constant_param_defintion($params);
+ $body .= $self->C_constant_other_params_defintion($params);
$body .= ") {\n";
if (defined $namelen) {
@@ -898,7 +898,7 @@
default_type => $default_type, what => $what,
indent => $indent, breakout => $breakout},
@items);
- $body .= ' switch ('.$self->C_constant_namelen_param().") {\n";
+ $body .= ' switch ('.$self->namelen_param().") {\n";
# Need to group names of the same length
my @by_length;
foreach (@items) {
@@ -943,7 +943,7 @@
. $self->C_constant_prefix_param($params)
# Probably "name"
. $self->name_param($params);
- $body .= $self->C_constant_param($params);
+ $body .= $self->C_constant_other_params($params);
$body .= ");\n";
}
$body .= " break;\n";
==== //depot/perl/lib/ExtUtils/Constant/XS.pm#3 (text) ====
Index: perl/lib/ExtUtils/Constant/XS.pm
--- perl/lib/ExtUtils/Constant/XS.pm#2~23876~ Mon Jan 24 14:05:29 2005
+++ perl/lib/ExtUtils/Constant/XS.pm Fri Jan 28 13:01:04 2005
@@ -171,11 +171,11 @@
"pTHX_ ";
}
-sub C_constant_namelen_param_definition {
- 'STRLEN ' . $_[0] -> C_constant_namelen_param;
+sub namelen_param_definition {
+ 'STRLEN ' . $_[0] -> namelen_param;
}
-sub C_constant_param_defintion {
+sub C_constant_other_params_defintion {
my ($self, $params) = @_;
my $body = '';
$body .= ", int utf8" if $params->{''};
@@ -186,7 +186,7 @@
$body;
}
-sub C_constant_param {
+sub C_constant_other_params {
my ($self, $params) = @_;
my $body = '';
$body .= ", utf8" if $params->{''};
==== //depot/perl/perl_keyword.pl#2 (text) ====
Index: perl/perl_keyword.pl
--- perl/perl_keyword.pl#1~23877~ Mon Jan 24 14:06:05 2005
+++ perl/perl_keyword.pl Fri Jan 28 13:01:04 2005
@@ -31,7 +31,7 @@
}
# Ditch the default "const"
-sub C_constant_name_param_definition {
+sub name_param_definition {
"char *" . $_[0]->name_param;
}
@@ -48,8 +48,8 @@
"pTHX_ ";
}
-sub C_constant_namelen_param_definition {
- 'I32 ' . $_[0] -> C_constant_namelen_param;
+sub namelen_param_definition {
+ 'I32 ' . $_[0] -> namelen_param;
}
package main;
End of Patch.