summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-06-18 13:40:18 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-06-18 13:40:50 -0700
commit670610ebb17508101065cc5f5ecfe616aace5335 (patch)
tree8d2716cea7dd7fd9eb9d25e71fd6a472fce53a55 /perl.h
parent798dc914c398c7c040331cbc085457859797cc6f (diff)
downloadperl-670610ebb17508101065cc5f5ecfe616aace5335.tar.gz
UTF8f
This new format string allows char*s to be interpolated with the utf8ness and length specified as well: Perl_croak(aTHX_ "Couldn't twiggle the twoggle in \"%"UTF8f"\"", is_utf8, len, s); This commit changes one function call in gv.c to use UTF8f (it should go faster now) as an example of its use. This was brought up in ticket #113824. This commit does not fix #113824, but provides groundwork that makes it easier to fix.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 613fd3ca72..df244868b8 100644
--- a/perl.h
+++ b/perl.h
@@ -3038,6 +3038,11 @@ typedef pthread_key_t perl_key;
#define HEKfARG(p) ((void*)(p))
+/* Takes three arguments: is_utf8, length, str */
+#ifndef UTF8f
+# define UTF8f "u%"UVuf"%4p"
+#endif
+
#ifdef PERL_CORE
/* not used; but needed for backward compatibility with XS code? - RMB */
# undef VDf