]> git.vpit.fr Git - perl/modules/Lexical-Types.git/commitdiff
Increment the refcount after cloning
authorVincent Pit <vince@profvince.com>
Sat, 4 Jul 2009 12:52:25 +0000 (14:52 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 4 Jul 2009 12:52:25 +0000 (14:52 +0200)
Types.xs

index 6a159bcdc2775cc517d8c11275237a197a934a0f..b5cd70f7c332d552055bec332042811771237edd 100644 (file)
--- a/Types.xs
+++ b/Types.xs
@@ -153,7 +153,7 @@ STATIC SV *lt_clone(pTHX_ SV *sv, tTHX owner) {
   SvREFCNT_dec(stashes);
  }
 
- return dupsv;
+ return SvREFCNT_inc(dupsv);
 }
 
 STATIC void lt_ptable_hints_clone(pTHX_ ptable_ent *ent, void *ud_) {