[RT #65863] mostly eliminate i_has_format
authorTony Cook <tony@develop-help.com>
Fri, 18 Feb 2011 13:14:38 +0000 (00:14 +1100)
committerTony Cook <tony@develop-help.com>
Fri, 18 Feb 2011 13:14:38 +0000 (00:14 +1100)
Changes
Imager.pm
Imager.xs
feat.c
t/t35ttfont.t
t/t36oofont.t
t/t80texttools.t

diff --git a/Changes b/Changes
index d156721c28ac190481d84a66af2f79ac5024356d..a5b137c6252f083fe7f568d757cb6dea1a1a90e1 100644 (file)
--- 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
 ===========
 
index 42d320cca93d327b5bbd239849c5e26e6099e40d..e1039a0cc058cc8039bd6648a61527547eae869f 100644 (file)
--- 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
index b0c674eac04e3b6c6ecf906d2b52810df03ab6bf..e9a7952475c6c553ed64e76b6c58cad9c80d0c0d 100644 (file)
--- 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 ea8483943688f84fda7fcb6561d6e833015ecac8..255455724113047dcfc0df9991cf016556455069 100644 (file)
--- 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;
index 256b6bd9010c234f9724a1d4d53556e3ed02ac00..42234fab30fdee607c41273b92497d35c133ea15 100644 (file)
@@ -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';
index 5781e230cdb7e70209ffaa05f42d064f64601dbc..2e0ced255fa68f2c77d7522e30a1f8ca9d33ee86 100644 (file)
@@ -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";
index 1dff6ee6d26526e4de6aad145012c3a525ac8095..b685c7c3d5e419d0fb51521632e1988e681cedc0 100644 (file)
@@ -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")