From 835b9f165025589fc2267a258f35f414f8a753a1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 8 Jan 2007 08:10:14 +0000 Subject: use SvTRUE() instead of SvIV() for boolean values (this gets rid of: Argument "" isn't numeric in subroutine entry at blib/lib/URPM/Build.pm line 68.) --- URPM.xs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/URPM.xs b/URPM.xs index 3704b40..65e4ad0 100644 --- a/URPM.xs +++ b/URPM.xs @@ -2156,9 +2156,9 @@ Pkg_update_header(pkg, filename, ...) char *s = SvPV(ST(i), len); if (len == 7 && !memcmp(s, "packing", 7)) { - packing = SvIV(ST(i + 1)); + packing = SvTRUE(ST(i + 1)); } else if (len == 13 && !memcmp(s, "keep_all_tags", 13)) { - keep_all_tags = SvIV(ST(i+1)); + keep_all_tags = SvTRUE(ST(i+1)); } } } @@ -3113,7 +3113,7 @@ Urpm_parse_hdlist__XS(urpm, filename, ...) /* compability mode with older interface of parse_hdlist */ if (items == 3) { - packing = SvIV(ST(2)); + packing = SvTRUE(ST(2)); } else if (items > 3) { int i; for (i = 2; i < items-1; i+=2) { @@ -3121,7 +3121,7 @@ Urpm_parse_hdlist__XS(urpm, filename, ...) char *s = SvPV(ST(i), len); if (len == 7 && !memcmp(s, "packing", 7)) { - packing = SvIV(ST(i+1)); + packing = SvTRUE(ST(i+1)); } else if (len == 8 && !memcmp(s, "callback", 8)) { if (SvROK(ST(i+1))) callback = ST(i+1); } @@ -3210,7 +3210,7 @@ Urpm_parse_rpm(urpm, filename, ...) /* compability mode with older interface of parse_hdlist */ if (items == 3) { - packing = SvIV(ST(2)); + packing = SvTRUE(ST(2)); } else if (items > 3) { int i; for (i = 2; i < items-1; i+=2) { @@ -3218,9 +3218,9 @@ Urpm_parse_rpm(urpm, filename, ...) char *s = SvPV(ST(i), len); if (len == 7 && !memcmp(s, "packing", 7)) { - packing = SvIV(ST(i + 1)); + packing = SvTRUE(ST(i + 1)); } else if (len == 13 && !memcmp(s, "keep_all_tags", 13)) { - keep_all_tags = SvIV(ST(i+1)); + keep_all_tags = SvTRUE(ST(i+1)); } else if (len == 8 && !memcmp(s, "callback", 8)) { if (SvROK(ST(i+1))) callback = ST(i+1); } else if (len == 5) { -- cgit v1.2.1