From: Tony Cook Date: Fri, 14 Oct 2011 12:33:48 +0000 (+1100) Subject: [rt #69158] *_has_chars() now returns PL_sv_yes/PL_sv_no X-Git-Tag: v0.85_02~15 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/6e938c747e55aaf7a1513bcc7a17ec1e83a6e2fc [rt #69158] *_has_chars() now returns PL_sv_yes/PL_sv_no which should be faster than making lots of IV SVs. --- diff --git a/Changes b/Changes index 57576c29..1e128369 100644 --- 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 ============== diff --git a/FT2/Changes b/FT2/Changes index 3fb1d737..89d3a5e5 100644 --- a/FT2/Changes +++ b/FT2/Changes @@ -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 ==================== diff --git a/FT2/FT2.xs b/FT2/FT2.xs index 97c037da..ac8396ef 100644 --- a/FT2/FT2.xs +++ b/FT2/FT2.xs @@ -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 { diff --git a/Imager.xs b/Imager.xs index 56241155..b0474ac3 100644 --- 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 { diff --git a/T1/Changes b/T1/Changes index 91802392..5e6e5d91 100644 --- a/T1/Changes +++ b/T1/Changes @@ -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 ====================== diff --git a/T1/T1.xs b/T1/T1.xs index 659b01dc..f587fb09 100644 --- 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 {