This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Compress-Raw-Bzip2 to CPAN version 2.063
[perl5.git] / hv.h
diff --git a/hv.h b/hv.h
index 47432e3..d5632be 100644 (file)
--- a/hv.h
+++ b/hv.h
@@ -81,6 +81,7 @@ struct mro_meta {
     U32     pkg_gen;         /* Bumps when local methods/@ISA change */
     const struct mro_alg *mro_which; /* which mro alg is in use? */
     HV      *isa;            /* Everything this class @ISA */
+    HV      *super;          /* SUPER method cache */
     U32     destroy_gen;     /* Generation number of DESTROY cache */
 };
 
@@ -112,7 +113,6 @@ struct xpvhv_aux {
  */
     I32                xhv_name_count;
     struct mro_meta *xhv_mro_meta;
-    HV *       xhv_super;      /* SUPER method cache */
 #ifdef PERL_HASH_RANDOMIZE_KEYS
     U32         xhv_rand;       /* random value for hash traversal */
     U32         xhv_last_rand;  /* last random value for hash traversal,
@@ -367,7 +367,9 @@ C<SV*>.
                                 ((HeKLEN(he) == HEf_SVKEY) ?           \
                                  HeKEY_sv(he) :                        \
                                  newSVpvn_flags(HeKEY(he),             \
-                                                HeKLEN(he), SVs_TEMP)) : \
+                                                 HeKLEN(he),            \
+                                                 SVs_TEMP |             \
+                                      ( HeKUTF8(he) ? SVf_UTF8 : 0 ))) : \
                                 &PL_sv_undef)
 #define HeSVKEY_set(he,sv)     ((HeKLEN(he) = HEf_SVKEY), (HeKEY_sv(he) = sv))
 
@@ -468,6 +470,12 @@ C<SV*>.
     (MUTABLE_SV(hv_common_key_len((hv), (key), (klen),                 \
                                  (flags) | HV_DELETE, NULL, 0)))
 
+#ifdef PERL_CORE
+# define hv_deletehek(hv, hek, flags) \
+    hv_common(hv, NULL, HEK_KEY(hek), HEK_LEN(hek), HEK_UTF8(hek), \
+             (flags)|HV_DELETE, NULL, HEK_HASH(hek))
+#endif
+
 /* This refcounted he structure is used for storing the hints used for lexical
    pragmas. Without threads, it's basically struct he + refcount.
    With threads, life gets more complex as the structure needs to be shared