summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-10-30 14:33:06 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-11-06 01:13:48 -0700
commit7d7892821ccfd0b84576fc06764ec467e8ca7678 (patch)
tree8a14db3fc316b83374c8d171175537ad6e6c306e /op.h
parent17e00314cad49c11dda5b621497c7010537844ea (diff)
downloadperl-7d7892821ccfd0b84576fc06764ec467e8ca7678.tar.gz
Add evalbytes function
This function evaluates its argument as a byte string, regardless of the internal encoding. It croaks if the string contains characters outside the byte range. Hence evalbytes(" use utf8; '\xc4\x80' ") will return "\x{100}", even if the original string had the UTF8 flag on, and evalbytes(" '\xc4\x80' ") will return "\xc4\x80". This has the side effect of fixing the deparsing of CORE::break under ‘use feature’ when there is an override.
Diffstat (limited to 'op.h')
-rw-r--r--op.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/op.h b/op.h
index a9ecedb8e4..f82758e46e 100644
--- a/op.h
+++ b/op.h
@@ -296,6 +296,8 @@ Deprecated. Use C<GIMME_V> instead.
/* Private for OP_ENTEREVAL */
#define OPpEVAL_HAS_HH 2 /* Does it have a copy of %^H */
#define OPpEVAL_UNICODE 4
+#define OPpEVAL_BYTES 8
+#define OPpEVAL_COPHH 16 /* Construct %^H from cop hints */
/* Private for OP_CALLER and OP_WANTARRAY */
#define OPpOFFBYONE 128 /* Treat caller(1) as caller(2) */