diff options
Diffstat (limited to 'lib/ExtUtils/Constant/Base.pm')
-rw-r--r-- | lib/ExtUtils/Constant/Base.pm | 26 |
1 files changed, 13 insertions, 13 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"; |