summaryrefslogtreecommitdiff
path: root/lib/ExtUtils/Constant
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-01-28 21:01:04 +0000
committerNicholas Clark <nick@ccl4.org>2005-01-28 21:01:04 +0000
commitf8901870eae83390cf40d51cb7fd1437ed1fa230 (patch)
treede06ccdd47021a7139a78ff9c26b30660c9179d5 /lib/ExtUtils/Constant
parentb37cb8219ff2bec6842038e1ec5cb9efeb4c223a (diff)
downloadperl-f8901870eae83390cf40d51cb7fd1437ed1fa230.tar.gz
More consistent names for all the parameter name/declaration methods
p4raw-id: //depot/perl@23897
Diffstat (limited to 'lib/ExtUtils/Constant')
-rw-r--r--lib/ExtUtils/Constant/Base.pm26
-rw-r--r--lib/ExtUtils/Constant/XS.pm8
2 files changed, 17 insertions, 17 deletions
diff --git a/lib/ExtUtils/Constant/Base.pm b/lib/ExtUtils/Constant/Base.pm
index 1221b7d05d..8a6fc6fab0 100644
--- a/lib/ExtUtils/Constant/Base.pm
+++ b/lib/ExtUtils/Constant/Base.pm
@@ -592,23 +592,23 @@ sub C_constant_prefix_param_defintion {
'';
}
-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 @@ the C<*param*> calls. (Yes, having to read the source to make sense of this is
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 @@ sub C_constant {
# 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 @@ sub C_constant {
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 @@ sub C_constant {
. $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";
diff --git a/lib/ExtUtils/Constant/XS.pm b/lib/ExtUtils/Constant/XS.pm
index 1c5516b537..51244f6b2b 100644
--- a/lib/ExtUtils/Constant/XS.pm
+++ b/lib/ExtUtils/Constant/XS.pm
@@ -171,11 +171,11 @@ sub C_constant_prefix_param_defintion {
"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 @@ sub C_constant_param_defintion {
$body;
}
-sub C_constant_param {
+sub C_constant_other_params {
my ($self, $params) = @_;
my $body = '';
$body .= ", utf8" if $params->{''};