Add a comment.
gfx [Mon, 17 Aug 2009 04:36:24 +0000 (13:36 +0900)]
xs/Package.xs

index 1086e21..06e93ed 100644 (file)
@@ -346,6 +346,10 @@ CODE:
                 && isGV(CvGV(subr))
                 && strEQ(GvNAME(CvGV(subr)), "__ANON__")){
 
+                /* NOTE:
+                    A gv "has-a" cv, but a cv refers to a gv as a (pseudo) weak ref.
+                    so we can replace CvGV with no SvREFCNT_inc/dec.
+                */
                 CvGV(subr) = gv;
                 CvANON_off(subr);
             }