diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-10-07 09:47:51 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-07 11:40:17 -0700 |
commit | 20023040512048d46bbabebb86dde36076126af7 (patch) | |
tree | 1cf99308bc1d99c7c1e6295d448f745525986d77 | |
parent | c59e8fd6cb9af2505341139f9db1a5cc579b9c0f (diff) | |
download | perl-20023040512048d46bbabebb86dde36076126af7.tar.gz |
HEKf format
-rw-r--r-- | perl.h | 6 | ||||
-rw-r--r-- | sv.c | 13 |
2 files changed, 17 insertions, 2 deletions
@@ -3208,6 +3208,12 @@ typedef pthread_key_t perl_key; #define SVfARG(p) ((void*)(p)) +#ifndef HEKf +# define HEKf "2p" +#endif + +#define HEKfARG(p) ((void*)(p)) + #ifdef PERL_CORE /* not used; but needed for backward compatibility with XS code? - RMB */ # undef VDf @@ -10174,9 +10174,11 @@ Perl_sv_vcatpvfn(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, %p include pointer address (standard) %-p (SVf) include an SV (previously %_) %-<num>p include an SV with precision <num> - %<num>p reserved for future extensions + %2p include a HEK + %<num>p (where num != 2) reserved for future + extensions - Robin Barker 2005-07-14 + Robin Barker 2005-07-14 (but modified since) %1p (VDf) removed. RMB 2007-10-19 */ @@ -10198,6 +10200,13 @@ Perl_sv_vcatpvfn(pTHX_ SV *const sv, const char *const pat, const STRLEN patlen, is_utf8 = TRUE; goto string; } + else if (n==2) { /* HEKf */ + HEK * const hek = va_arg(*args, HEK *); + eptr = HEK_KEY(hek); + elen = HEK_LEN(hek); + if (HEK_UTF8(hek)) is_utf8 = TRUE; + goto string; /* no modifiers supported */ + } else if (n) { Perl_ck_warner_d(aTHX_ packWARN(WARN_INTERNAL), "internal %%<num>p might conflict with future printf extensions"); |