'';
}
-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 {
'';
}
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
# 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) {
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) {
. $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";
"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->{''};
$body;
}
-sub C_constant_param {
+sub C_constant_other_params {
my ($self, $params) = @_;
my $body = '';
$body .= ", utf8" if $params->{''};
}
# Ditch the default "const"
-sub C_constant_name_param_definition {
+sub name_param_definition {
"char *" . $_[0]->name_param;
}
"pTHX_ ";
}
-sub C_constant_namelen_param_definition {
- 'I32 ' . $_[0] -> C_constant_namelen_param;
+sub namelen_param_definition {
+ 'I32 ' . $_[0] -> namelen_param;
}
package main;