diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-04-12 14:14:50 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-04-12 14:14:50 +0000 |
commit | 2a75250ad0daba19f395626b2b1174bd43ecddc0 (patch) | |
tree | ca2c5d01694987f2be2ddd6b92c3686aa17c18cc /hv.c | |
parent | 3341f5772454aa6fd2d3ee32728b288f60620abf (diff) | |
download | perl-2a75250ad0daba19f395626b2b1174bd43ecddc0.tar.gz |
Remove Perl_refcounted_he_copy and Perl_refcounted_he_dup.
p4raw-id: //depot/perl@27775
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 68 |
1 files changed, 0 insertions, 68 deletions
@@ -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 |