Skip to content

Commit

Permalink
remove _set_ptrcast() from auto::memalign
Browse files Browse the repository at this point in the history
  • Loading branch information
gerdr committed May 13, 2012
1 parent 76068a5 commit 902fed3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
12 changes: 0 additions & 12 deletions config/auto/memalign.pm
Expand Up @@ -41,8 +41,6 @@ sub runstep {

_set_malloc_header($conf);

_set_ptrcast($conf);

$conf->cc_gen('config/auto/memalign/test_c.in');
eval { $conf->cc_build(); };
unless ( $@ || $conf->cc_run_capture() !~ /ok/ ) {
Expand Down Expand Up @@ -74,16 +72,6 @@ sub _set_malloc_header {
}
}

sub _set_ptrcast {
my $conf = shift;
if ( $conf->data->get('ptrsize') == $conf->data->get('intsize') ) {
$conf->data->set( ptrcast => 'int' );
}
else {
$conf->data->set( ptrcast => 'long' );
}
}

sub _set_memalign {
my $self = shift;
my ($conf, $test, $test2) = @_;
Expand Down
26 changes: 0 additions & 26 deletions t/steps/auto/memalign-01.t
Expand Up @@ -75,32 +75,6 @@ $step = test_step_constructor_and_description($conf);
$conf->data->set('i_malloc' => undef); # reset for next test
}

########### _set_ptrcast() ###########

{
$conf->data->set('ptrsize' => 2);
$conf->data->set('intsize' => 2);
ok(auto::memalign::_set_ptrcast($conf),
"_set_ptrcast() returned true value");
is($conf->data->get( 'ptrcast' ), 'int',
"ptrcast has expected value");
# reset for next test
$conf->data->set('ptrsize' => undef);
$conf->data->set('intsize' => undef);
}

{
$conf->data->set('ptrsize' => 2);
$conf->data->set('intsize' => 4);
ok(auto::memalign::_set_ptrcast($conf),
"_set_ptrcast() returned true value");
is($conf->data->get( 'ptrcast' ), 'long',
"ptrcast has expected value");
# reset for next test
$conf->data->set('ptrsize' => undef);
$conf->data->set('intsize' => undef);
}

########### _set_memalign() ###########

{
Expand Down

0 comments on commit 902fed3

Please sign in to comment.