[rt #69158] *_has_chars() now returns PL_sv_yes/PL_sv_no
authorTony Cook <tony@develop-help.com>
Fri, 14 Oct 2011 12:33:48 +0000 (23:33 +1100)
committerTony Cook <tony@develop-help.com>
Fri, 14 Oct 2011 12:33:48 +0000 (23:33 +1100)
which should be faster than making lots of IV SVs.

Changes
FT2/Changes
FT2/FT2.xs
Imager.xs
T1/Changes
T1/T1.xs

diff --git a/Changes b/Changes
index 57576c2989bc57c3e416fee13e55490fbd534b6c..1e1283696d8b08b381753a8eb631a49ca4812b3a 100644 (file)
--- a/Changes
+++ b/Changes
@@ -41,6 +41,11 @@ Bug fixes:
  - Imager::Font->new now produces better error messages for the T1
    engine.
 
+ - the font has_chars() method now returns perl's true and false
+   values in list context rather than integers, which should be more
+   efficient.
+   https://rt.cpan.org/Ticket/Display.html?id=69158
+
 Imager 0.85_01 - 10 Oct 2011
 ==============
 
index 3fb1d737583802bf0f9f287726827139ccba0fd0..89d3a5e58f7823ec9ebca4e8bc6b2c62208b0a81 100644 (file)
@@ -1,3 +1,10 @@
+Imager-Font-FT2 0.83
+====================
+
+ - has_chars() now returns perl's true and false values in list
+   context rather than integers, which should be more efficient.
+   https://rt.cpan.org/Ticket/Display.html?id=69158
+
 Imager-Font-FT2 0.82
 ====================
 
index 97c037da9202bd9cd17fa74d0e71d1b16cc10836..ac8396efbd7779de4fd19e0cd90323435efc184b 100644 (file)
@@ -228,7 +228,7 @@ i_ft2_has_chars(handle, text_sv, utf8)
         if (GIMME_V == G_ARRAY) {
           EXTEND(SP, count);
           for (i = 0; i < count; ++i) {
-            PUSHs(sv_2mortal(newSViv(work[i])));
+            PUSHs(boolSV(work[i]));
           }
         }
         else {
index 56241155a6abe8c048580ded49146ea1aef8b6fb..b0474ac3fd055004f54a72fd3d8859ca20b7f61a 100644 (file)
--- a/Imager.xs
+++ b/Imager.xs
@@ -2209,7 +2209,7 @@ i_tt_has_chars(handle, text_sv, utf8)
         if (GIMME_V == G_ARRAY) {
           EXTEND(SP, count);
           for (i = 0; i < count; ++i) {
-            PUSHs(sv_2mortal(newSViv(work[i])));
+            PUSHs(boolSV(work[i]));
           }
         }
         else {
index 918023929a2fd77dfb351d0d0d26c6e405582cfd..5e6e5d91fc4baeee410ad07d3ef4eac4088a5544 100644 (file)
@@ -10,6 +10,10 @@ Imager::Font::T1 1.015
  - Imager::Font->new now produces better error messages for the T1
    engine.
 
+ - has_chars() now returns perl's true and false values in list
+   context rather than integers, which should be more efficient.
+   https://rt.cpan.org/Ticket/Display.html?id=69158
+
 Imager::Font::T1 1.014
 ======================
 
index 659b01dca7bbbb432584a6f3e58dc78ccc0b49cc..f587fb094212f8b60e107f97e2bb9cbda1b54e16 100644 (file)
--- a/T1/T1.xs
+++ b/T1/T1.xs
@@ -134,7 +134,7 @@ i_t1_has_chars(handle, text_sv, utf8 = 0)
         if (GIMME_V == G_ARRAY) {
           EXTEND(SP, count);
           for (i = 0; i < count; ++i) {
-            PUSHs(sv_2mortal(newSViv(work[i])));
+            PUSHs(boolSV(work[i]));
           }
         }
         else {