Skip Menu |

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 122955
Status: patched
Priority: 0/
Queue: Scalar-List-Utils

People
Owner: Nobody in particular
Requestors: ilmari+cpan [...] ilmari.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Use sv_rvunweaken when available
Hi, Blead now has the guts of Scalar::Util::unweaken() as the API function sv_rvnunweaken() (https://perl5.git.perl.org/perl.git/commitdiff/ae2cf9f6). The attached patch makes the former use the latter when available. Cheers, Ilmari
Subject: 0001-Use-sv_rvunweaken-in-Scalar-Util-unweaken.patch
From d80e3bf8f345a19e49b8174bb0f93485de4054f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org> Date: Wed, 30 Aug 2017 22:34:54 +0100 Subject: [PATCH] Use sv_rvunweaken() in Scalar::Util::unweaken() --- cpan/Scalar-List-Utils/ListUtil.xs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cpan/Scalar-List-Utils/ListUtil.xs b/cpan/Scalar-List-Utils/ListUtil.xs index 2369919f85..33bd7f78bd 100644 --- a/cpan/Scalar-List-Utils/ListUtil.xs +++ b/cpan/Scalar-List-Utils/ListUtil.xs @@ -1287,7 +1287,10 @@ PROTOTYPE: $ INIT: SV *tsv; CODE: -#ifdef SvWEAKREF +#if defined(sv_rvunweaken) + PERL_UNUSED_VAR(tsv); + sv_rvunweaken(sv); +#elif defined(SvWEAKREF) /* This code stolen from core's sv_rvweaken() and modified */ if (!SvOK(sv)) return; -- 2.14.1
On Mon Sep 04 05:31:43 2017, ilmari wrote: Show quoted text
> Blead now has the guts of Scalar::Util::unweaken() as the API function > sv_rvnunweaken() > (https://perl5.git.perl.org/perl.git/commitdiff/ae2cf9f6). > The attached patch makes the former use the latter when available.
Looks good. -- Paul Evans