From: Nicholas Clark <nick@ccl4.org>
Date: Wed, 12 Apr 2006 14:14:50 +0000 (+0000)
Subject: Remove Perl_refcounted_he_copy and Perl_refcounted_he_dup.
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2a75250ad0daba19f395626b2b1174bd43ecddc0;p=p5sagit%2Fp5-mst-13.2.git

Remove Perl_refcounted_he_copy and Perl_refcounted_he_dup.

p4raw-id: //depot/perl@27775
---

diff --git a/embed.fnc b/embed.fnc
index 926fa2e..4d038e4 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -303,13 +303,6 @@ ApMdR	|HE*	|hv_iternext_flags|NN HV* tb|I32 flags
 ApdR	|SV*	|hv_iterval	|NN HV* tb|NN HE* entry
 Ap	|void	|hv_ksplit	|NN HV* hv|IV newmax
 Apdbm	|void	|hv_magic	|NN HV* hv|NULLOK GV* gv|int how
-#ifdef USE_ITHREADS
-dpoM|struct refcounted_he *|refcounted_he_copy \
-				|NULLOK const struct refcounted_he *he
-dpoM|struct refcounted_he *|refcounted_he_dup \
-				|NULLOK const struct refcounted_he *const he \
-				|NN CLONE_PARAMS* param
-#endif
 dpoM	|HV *	|refcounted_he_chain_2hv|NULLOK const struct refcounted_he *c
 dpoM	|void	|refcounted_he_free|NULLOK struct refcounted_he *he
 dpoM	|struct refcounted_he *|refcounted_he_new \
diff --git a/embed.h b/embed.h
index a77f16e..cfb43fe 100644
--- a/embed.h
+++ b/embed.h
@@ -287,8 +287,6 @@
 #define hv_iternext_flags	Perl_hv_iternext_flags
 #define hv_iterval		Perl_hv_iterval
 #define hv_ksplit		Perl_hv_ksplit
-#ifdef USE_ITHREADS
-#endif
 #define hv_store		Perl_hv_store
 #define hv_store_ent		Perl_hv_store_ent
 #define hv_store_flags		Perl_hv_store_flags
@@ -2454,10 +2452,6 @@
 #define hv_iternext_flags(a,b)	Perl_hv_iternext_flags(aTHX_ a,b)
 #define hv_iterval(a,b)		Perl_hv_iterval(aTHX_ a,b)
 #define hv_ksplit(a,b)		Perl_hv_ksplit(aTHX_ a,b)
-#ifdef USE_ITHREADS
-#ifdef PERL_CORE
-#endif
-#endif
 #ifdef PERL_CORE
 #endif
 #define hv_store(a,b,c,d,e)	Perl_hv_store(aTHX_ a,b,c,d,e)
diff --git a/hv.c b/hv.c
index af8fe67..e043a7d 100644
--- a/hv.c
+++ b/hv.c
@@ -2722,74 +2722,6 @@ Perl_refcounted_he_free(pTHX_ struct refcounted_he *he) {
     }
 }
 
-
-/*
-=for apidoc refcounted_he_dup
-
-Duplicates the C<struct refcounted_he *> for a new thread.
-
-=cut
-*/
-
-#if 0
-struct refcounted_he *
-Perl_refcounted_he_dup(pTHX_ const struct refcounted_he *const he,
-			CLONE_PARAMS* param)
-{
-    struct refcounted_he *copy;
-
-    if (!he)
-	return NULL;
-
-    /* look for it in the table first */
-    copy = (struct refcounted_he *)ptr_table_fetch(PL_ptr_table, he);
-    if (copy)
-	return copy;
-
-    /* create anew and remember what it is */
-    Newx(copy, 1, struct refcounted_he);
-    ptr_table_store(PL_ptr_table, he, copy);
-
-    copy->refcounted_he_next
-	= Perl_refcounted_he_dup(aTHX_ he->refcounted_he_next, param);
-    copy->refcounted_he_val
-	= SvREFCNT_inc(sv_dup(he->refcounted_he_val, param));
-    copy->refcounted_he_hek = hek_dup(he->refcounted_he_hek, param);
-    copy->refcounted_he_refcnt = he->refcounted_he_refcnt;
-    return copy;
-}
-
-/*
-=for apidoc refcounted_he_copy
-
-Copies a chain of C<struct refcounted_he *>. Used by C<pp_entereval>.
-
-=cut
-*/
-
-struct refcounted_he *
-Perl_refcounted_he_copy(pTHX_ const struct refcounted_he * he)
-{
-    struct refcounted_he *copy;
-    HEK *hek;
-    /* This is much easier to express recursively than iteratively.  */
-    if (!he)
-	return NULL;
-
-    Newx(copy, 1, struct refcounted_he);
-    copy->refcounted_he_next
-	= Perl_refcounted_he_copy(aTHX_ he->refcounted_he_next);
-    copy->refcounted_he_val = newSVsv(he->refcounted_he_val);
-    hek = he->refcounted_he_hek;
-    copy->refcounted_he_hek
-	= share_hek(HEK_KEY(hek),
-		    HEK_UTF8(hek) ? -(I32)HEK_LEN(hek) : HEK_LEN(hek),
-		    HEK_HASH(hek));
-    copy->refcounted_he_refcnt = 1;
-    return copy;
-}
-#endif
-
 /*
 =for apidoc hv_assert
 
diff --git a/proto.h b/proto.h
index 851d881..6b73242 100644
--- a/proto.h
+++ b/proto.h
@@ -723,12 +723,6 @@ PERL_CALLCONV void	Perl_hv_ksplit(pTHX_ HV* hv, IV newmax)
 /* PERL_CALLCONV void	Perl_hv_magic(pTHX_ HV* hv, GV* gv, int how)
 			__attribute__nonnull__(pTHX_1); */
 
-#ifdef USE_ITHREADS
-PERL_CALLCONV struct refcounted_he *	Perl_refcounted_he_copy(pTHX_ const struct refcounted_he *he);
-PERL_CALLCONV struct refcounted_he *	Perl_refcounted_he_dup(pTHX_ const struct refcounted_he *const he, CLONE_PARAMS* param)
-			__attribute__nonnull__(pTHX_2);
-
-#endif
 PERL_CALLCONV HV *	Perl_refcounted_he_chain_2hv(pTHX_ const struct refcounted_he *c);
 PERL_CALLCONV void	Perl_refcounted_he_free(pTHX_ struct refcounted_he *he);
 PERL_CALLCONV struct refcounted_he *	Perl_refcounted_he_new(pTHX_ struct refcounted_he *const parent, SV *const key, SV *const value);