diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2021-08-22 22:11:17 +0100 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2021-08-25 19:57:49 +0100 |
commit | 8f6f90a58f91a8783575638479740cd2867ec124 (patch) | |
tree | c9c7eae684619f6770bfdf04d5498bff55d8cedc /dist | |
parent | 790188cd1c4d6c1a940b76e042ed45aac5e99517 (diff) | |
download | perl-8f6f90a58f91a8783575638479740cd2867ec124.tar.gz |
Use newRV_inc() in threads::shared instead of direct juggling with SvRV_set()
Diffstat (limited to 'dist')
-rw-r--r-- | dist/threads-shared/lib/threads/shared.pm | 4 | ||||
-rw-r--r-- | dist/threads-shared/shared.xs | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/dist/threads-shared/lib/threads/shared.pm b/dist/threads-shared/lib/threads/shared.pm index 7296a72ba4..1fd289984e 100644 --- a/dist/threads-shared/lib/threads/shared.pm +++ b/dist/threads-shared/lib/threads/shared.pm @@ -8,7 +8,7 @@ use Config; use Scalar::Util qw(reftype refaddr blessed); -our $VERSION = '1.63'; # Please update the pod, too. +our $VERSION = '1.64'; # Please update the pod, too. my $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -196,7 +196,7 @@ threads::shared - Perl extension for sharing data structures between threads =head1 VERSION -This document describes threads::shared version 1.63 +This document describes threads::shared version 1.64 =head1 SYNOPSIS diff --git a/dist/threads-shared/shared.xs b/dist/threads-shared/shared.xs index c0d41d6eca..6a7f03c289 100644 --- a/dist/threads-shared/shared.xs +++ b/dist/threads-shared/shared.xs @@ -824,10 +824,7 @@ sharedsv_scalar_store(pTHX_ SV *sv, SV *ssv) * that any previous contents of ssv are correctly freed * by sv_setsv(). Not sure if there is a better, API-legal way * to achieve this */ - tmpref = newSV_type(SVt_RV); - SvRV_set(tmpref, sobj); - SvROK_on(tmpref); - SvREFCNT_inc_simple_NN(sobj); + tmpref = newRV_inc(sobj); sv_setsv_nomg(ssv, tmpref); SvREFCNT_dec_NN(tmpref); |