From 1d0d673f78c5c03a0f3c97ceeb7686e9388e0611 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Sat, 7 Aug 2021 14:48:32 +0100 Subject: Add SvIsBOOL() macro to test for SVs being boolean-intent These are identified as being static shared COW strings whose string buffer points directly at PL_Yes / PL_No Define sv_setbool() and sv_setbool_mg() macros Use sv_setbool() where appropriate Have sv_dump() annotate when an SV's PV buffer is one of the PL_(Yes|No) special booleans --- ext/B/B.pm | 2 +- ext/B/B.xs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/B') diff --git a/ext/B/B.pm b/ext/B/B.pm index ef23af6baa..9e6f2897c8 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -20,7 +20,7 @@ sub import { # walkoptree comes from B.xs BEGIN { - $B::VERSION = '1.82'; + $B::VERSION = '1.83'; @B::EXPORT_OK = (); # Our BOOT code needs $VERSION set, and will append to @EXPORT_OK. diff --git a/ext/B/B.xs b/ext/B/B.xs index e6e3fb8309..7cdd0f9c6a 100644 --- a/ext/B/B.xs +++ b/ext/B/B.xs @@ -638,7 +638,7 @@ BOOT: cv = newXS("B::diehook", intrpvar_sv_common, file); ASSIGN_COMMON_ALIAS(I, diehook); sv = get_sv("B::OP::does_parent", GV_ADDMULTI); - sv_setsv(sv, &PL_sv_yes); + sv_setbool(sv, TRUE); } void -- cgit v1.2.1