Skip to content

Commit

Permalink
Merge 38dce40 into ee4349e
Browse files Browse the repository at this point in the history
  • Loading branch information
plicease committed Apr 20, 2020
2 parents ee4349e + 38dce40 commit 0c0dea4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Clone.xs
Expand Up @@ -174,7 +174,7 @@ sv_clone (SV * ref, HV* hseen, int depth)
* Note: when using a Debug Perl with READONLY_COW
* we cannot do 'sv_buf_to_rw + sv_buf_to_ro' as these APIs calls are not exported
*/
#if PERL_VERSION >= 20 && !defined(PERL_DEBUG_READONLY_COW)
#if defined(SV_COW_REFCNT_MAX) && !defined(PERL_DEBUG_READONLY_COW)
/* only for simple PVs unblessed */
if ( SvIsCOW(ref) && !SvOOK(ref) && SvLEN(ref) > 0 ) {

Expand Down
5 changes: 3 additions & 2 deletions t/03scalar.t
Expand Up @@ -8,13 +8,14 @@
# (It may become useful if the test is moved to ./t subdirectory.)

use B q{svref_2object};
use B::COW;

my $has_data_dumper;

BEGIN {
$| = 1;
my $tests = 12;
$tests += 2 if $] > 5.0219;
$tests += 2 if B::COW::can_cow();
eval q[use Data::Dumper];
if (!$@) {
$has_data_dumper = 1;
Expand Down Expand Up @@ -100,7 +101,7 @@ ok( $a != $b, '$a != $b' );
ok( $c != $d, 'SV are differents SVs' );


if ( $] > 5.0219 ) {
if ( B::COW::can_cow() ) {
my $sv_c = svref_2object( $c );
my $sv_d = svref_2object( $d );

Expand Down

0 comments on commit 0c0dea4

Please sign in to comment.