summaryrefslogtreecommitdiff
path: root/dist/Data-Dumper
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-05-25 12:28:47 -0600
committerNicholas Clark <nick@ccl4.org>2021-06-30 08:32:27 +0000
commit98ac89521d7fb5d210d344653c664d93e0d7c0c4 (patch)
tree97d05d310bd489b562613cf69d0c6ea41e649828 /dist/Data-Dumper
parent1615185ee59e90a57a3b865c537ba4895a8bd2fd (diff)
downloadperl-98ac89521d7fb5d210d344653c664d93e0d7c0c4.tar.gz
Dumper.xs: Add comment
Diffstat (limited to 'dist/Data-Dumper')
-rw-r--r--dist/Data-Dumper/Dumper.xs5
1 files changed, 4 insertions, 1 deletions
diff --git a/dist/Data-Dumper/Dumper.xs b/dist/Data-Dumper/Dumper.xs
index 0c1b98773e..6d73beca30 100644
--- a/dist/Data-Dumper/Dumper.xs
+++ b/dist/Data-Dumper/Dumper.xs
@@ -605,7 +605,10 @@ dump_regexp(pTHX_ SV *retval, SV *val)
}
else {
/* If there was a \, we have copied it already, so all that is
- * left to do here is the \x{...} escaping. */
+ * left to do here is the \x{...} escaping.
+ *
+ * Since this is a pattern, presumably created by perl, we can
+ * assume it is well-formed */
k = utf8_to_uvchr_buf(p, rend, NULL);
sv_catpvf(retval, "\\x{%" UVxf "}", k);
p += UTF8SKIP(p);