This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Obliterate CopSTASH_free
authorFather Chrysostomos <sprout@cpan.org>
Mon, 4 Jun 2012 23:44:54 +0000 (16:44 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 5 Jun 2012 01:14:53 +0000 (18:14 -0700)
It is unused outside the core, defined as a no-op, and undocumented.

cop.h
op.c
perl.c

diff --git a/cop.h b/cop.h
index f5afb61..9f3762e 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -459,7 +459,6 @@ struct cop {
    /* cop_stash is not refcounted */
 #define CopSTASHPV_set(c,pv)   CopSTASH_set((c), gv_stashpv(pv,GV_ADD))
 #define CopSTASH_eq(c,hv)      (CopSTASH(c) == (hv))
-#define CopSTASH_free(c)       
 
 #define CopHINTHASH_get(c)     ((COPHH*)((c)->cop_hints_hash))
 #define CopHINTHASH_set(c,h)   ((c)->cop_hints_hash = (h))
diff --git a/op.c b/op.c
index 2d1bebc..bc6df04 100644 (file)
--- a/op.c
+++ b/op.c
@@ -769,7 +769,6 @@ S_cop_free(pTHX_ COP* cop)
     PERL_ARGS_ASSERT_COP_FREE;
 
     CopFILE_free(cop);
-    CopSTASH_free(cop);
     if (! specialWARN(cop->cop_warnings))
        PerlMemShared_free(cop->cop_warnings);
     cophh_free(CopHINTHASH_get(cop));
diff --git a/perl.c b/perl.c
index fea53c0..79d15e2 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -829,7 +829,6 @@ perl_destruct(pTHXx)
 #endif
 
        CopFILE_free(&PL_compiling);
-       CopSTASH_free(&PL_compiling);
 
        /* The exit() function will do everything that needs doing. */
         return STATUS_EXIT;
@@ -1026,7 +1025,6 @@ perl_destruct(pTHXx)
     cophh_free(CopHINTHASH_get(&PL_compiling));
     CopHINTHASH_set(&PL_compiling, cophh_new_empty());
     CopFILE_free(&PL_compiling);
-    CopSTASH_free(&PL_compiling);
 
     /* Prepare to destruct main symbol table.  */