Change 27775 by [EMAIL PROTECTED] on 2006/04/12 14:14:50

        Remove Perl_refcounted_he_copy and Perl_refcounted_he_dup.

Affected files ...

... //depot/perl/embed.fnc#349 edit
... //depot/perl/embed.h#581 edit
... //depot/perl/hv.c#304 edit
... //depot/perl/proto.h#696 edit

Differences ...

==== //depot/perl/embed.fnc#349 (text) ====
Index: perl/embed.fnc
--- perl/embed.fnc#348~27762~   2006-04-10 12:55:49.000000000 -0700
+++ perl/embed.fnc      2006-04-12 07:14:50.000000000 -0700
@@ -303,13 +303,6 @@
 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 \

==== //depot/perl/embed.h#581 (text+w) ====
Index: perl/embed.h
--- perl/embed.h#580~27716~     2006-04-04 18:50:33.000000000 -0700
+++ perl/embed.h        2006-04-12 07:14:50.000000000 -0700
@@ -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)

==== //depot/perl/hv.c#304 (text) ====
Index: perl/hv.c
--- perl/hv.c#303~27768~        2006-04-11 12:26:48.000000000 -0700
+++ perl/hv.c   2006-04-12 07:14:50.000000000 -0700
@@ -2722,74 +2722,6 @@
     }
 }
 
-
-/*
-=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
 

==== //depot/perl/proto.h#696 (text+w) ====
Index: perl/proto.h
--- perl/proto.h#695~27762~     2006-04-10 12:55:49.000000000 -0700
+++ perl/proto.h        2006-04-12 07:14:50.000000000 -0700
@@ -723,12 +723,6 @@
 /* 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);
End of Patch.

Reply via email to