This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Correct comment in hv.c:S_share_hek_flags
authorFather Chrysostomos <sprout@cpan.org>
Wed, 30 Nov 2011 06:43:15 +0000 (22:43 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 30 Nov 2011 06:43:15 +0000 (22:43 -0800)
It says that allocate one block of memory with the HEK immediately
following the HE, so we can find the HEK from the HE.  Of course we
can find the HEK from the HE, as the HE points to it.  The two terms
were apparently transposed.

hv.c

diff --git a/hv.c b/hv.c
index 4920af3..1019b31 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -2735,7 +2735,7 @@ S_share_hek_flags(pTHX_ const char *str, I32 len, register U32 hash, int flags)
        /* We don't actually store a HE from the arena and a regular HEK.
           Instead we allocate one chunk of memory big enough for both,
           and put the HEK straight after the HE. This way we can find the
        /* We don't actually store a HE from the arena and a regular HEK.
           Instead we allocate one chunk of memory big enough for both,
           and put the HEK straight after the HE. This way we can find the
-          HEK directly from the HE.
+          HE directly from the HEK.
        */
 
        Newx(k, STRUCT_OFFSET(struct shared_he,
        */
 
        Newx(k, STRUCT_OFFSET(struct shared_he,