From 2368cfecf3baddc747ac94ded4ce9fe5a32194bf Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Sat, 19 Feb 2011 00:14:38 +1100 Subject: [PATCH] [RT #65863] mostly eliminate i_has_format --- Changes | 10 ++++++++++ Imager.pm | 1 - Imager.xs | 4 ---- feat.c | 1 + t/t35ttfont.t | 2 +- t/t36oofont.t | 2 +- t/t80texttools.t | 2 +- 7 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Changes b/Changes index d156721c..a5b137c6 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,15 @@ Imager release history. Older releases can be found in Changes.old +Imager 0.82 - unreleased +=========== + +Bug fixes: + + - eliminate calls to i_has_format() from the test suite, since it's + no longer a useful way to check for file format support. Eliminate + i_has_format() from the functions exposed via XS. + https://rt.cpan.org/Ticket/Display.html?id=65863 + Imager 0.81 - 14 Feb 2011 =========== diff --git a/Imager.pm b/Imager.pm index 42d320cc..e1039a0c 100644 --- a/Imager.pm +++ b/Imager.pm @@ -19,7 +19,6 @@ use Imager::Font; unload_plugin i_list_formats - i_has_format i_color_new i_color_set diff --git a/Imager.xs b/Imager.xs index b0c674ea..e9a79524 100644 --- a/Imager.xs +++ b/Imager.xs @@ -1293,10 +1293,6 @@ i_list_formats() PUSHs(sv_2mortal(newSVpv(item,0))); } -undef_int -i_has_format(frmt) - char* frmt - Imager::ImgRaw i_img_new() diff --git a/feat.c b/feat.c index ea848394..25545572 100644 --- a/feat.c +++ b/feat.c @@ -1,5 +1,6 @@ #include "feat.h" +/* only for use as a placeholder in the old dynamic module code */ undef_int i_has_format(char *frmt) { int rc,i; diff --git a/t/t35ttfont.t b/t/t35ttfont.t index 256b6bd9..42234fab 100644 --- a/t/t35ttfont.t +++ b/t/t35ttfont.t @@ -14,7 +14,7 @@ init_log("testout/t35ttfont.log",2); SKIP: { skip("freetype 1.x unavailable or disabled", 91) - unless i_has_format("tt"); + unless $Imager::formats{"tt"}; print "# has tt\n"; my $deffont = './fontfiles/dodge.ttf'; diff --git a/t/t36oofont.t b/t/t36oofont.t index 5781e230..2e0ced25 100644 --- a/t/t36oofont.t +++ b/t/t36oofont.t @@ -27,7 +27,7 @@ die $Imager::ERRSTR unless $red; SKIP: { - i_has_format("tt") && -f $fontname_tt + $Imager::formats{"tt"} && -f $fontname_tt or skip("FT1.x missing or disabled", 10); my $img=Imager->new(xsize=>300, ysize=>100) or die "$Imager::ERRSTR\n"; diff --git a/t/t80texttools.t b/t/t80texttools.t index 1dff6ee6..b685c7c3 100644 --- a/t/t80texttools.t +++ b/t/t80texttools.t @@ -38,7 +38,7 @@ my $font = Imager::Font->new(file=>$fontfile); SKIP: { - Imager::i_has_format('tt') || Imager::i_has_format('ft2') + $Imager::formats{'tt'} || $Imager::formats{'ft2'} or skip("Need Freetype 1.x or 2.x to test", 11); ok($font, "loading font") -- 2.39.2