This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
doop.c: Fix typo in comment; add comment
authorKarl Williamson <khw@cpan.org>
Wed, 1 Apr 2020 11:46:43 +0000 (05:46 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 2 Apr 2020 15:17:38 +0000 (09:17 -0600)
doop.c

diff --git a/doop.c b/doop.c
index c7656bc..267b640 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -467,8 +467,9 @@ S_do_trans_invmap(pTHX_ SV * const sv, AV * const invmap)
     else {
         /* Here, we can't edit in place.  We have no idea how much, if any,
          * this particular input string will grow.  However, the compilation
-         * calculated the maximum expansion possible.  Use that to allocale
-         * based on the worst case scenario. */
+         * calculated the maximum expansion possible.  Use that to allocate
+         * based on the worst case scenario.  (First +1 is to round up; 2nd is
+         * for \0) */
        Newx(d, (STRLEN) (len * max_expansion + 1 + 1), U8);
        d0 = d;
     }