diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-04-04 22:22:53 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-04-05 06:00:51 -0700 |
commit | 894ea76b1f298c94bba681c05aacda756c876245 (patch) | |
tree | 830c2b3c912e37280688ecab6f78a48fd515857e /perl.h | |
parent | 66c058c5af700a1bacbab597e94809954af40beb (diff) | |
download | perl-894ea76b1f298c94bba681c05aacda756c876245.tar.gz |
Fix VMS build broken by d1718a7cf5
This comment in perl.c:
/* Note: 20,40,80 used for NATIVE_HINTS */
(added by a0ed51b3 [Here are the long-expected Unicode/UTF-8 mod-
ifications.]), has apparently always been wrong. The values in
vms/vmsish.h end with 7 zeroes in hex, and are only shifted down to
one zero when assigned to cop->op_private in op.c:newSTATEOP. In
PL_hints they never have the values indicated in perl.h. So those
are actually free bits. It’s the high versions in vmsish.h that
are not free.
20 (actually 0x20000000) hasn’t been used for anything since commit
744a34f9085 (Urk -- undo previous removal of vmsish 'exit' change),
which change I don’t really understand. In any case, the comment was
never updated.
This comment in op.h:
/* NOTE: OP_NEXTSTATE and OP_DBSTATE (i.e. COPs) carry lower
* bits of PL_hints in op_private */
was added by d41ff1b8ad98 (introduce $^U), which was later reverted.
op_private does not carry the lower bits of PL_hints, but, rather,
certain higher bits of PL_hints, shifted to fit (the NATIVE_HINTS
cited above).
Due to misleading comments, I ended up breaking the VMS build in com-
mit d1718a7cf5, by using its bits for something else.
This commit moves the bits around a bit to avoid the clash, and modi-
fies the comments to reflect reality.
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -4818,8 +4818,10 @@ typedef enum { #define HINT_LOCALE 0x00000004 /* locale pragma */ #define HINT_BYTES 0x00000008 /* bytes pragma */ #define HINT_LOCALE_NOT_CHARS 0x00000010 /* locale ':not_characters' pragma */ - /* Note: 20,40,80 used for NATIVE_HINTS */ - /* currently defined by vms/vmsish.h */ + +#define HINT_EXPLICIT_STRICT_REFS 0x00000020 /* strict.pm */ +#define HINT_EXPLICIT_STRICT_SUBS 0x00000040 /* strict.pm */ +#define HINT_EXPLICIT_STRICT_VARS 0x00000080 /* strict.pm */ #define HINT_BLOCK_SCOPE 0x00000100 #define HINT_STRICT_SUBS 0x00000200 /* strict pragma */ @@ -4848,10 +4850,11 @@ typedef enum { #define HINT_FEATURE_MASK 0x1c000000 /* 3 bits for feature bundles */ -#define HINT_EXPLICIT_STRICT_REFS 0x20000000 /* strict.pm */ -#define HINT_EXPLICIT_STRICT_SUBS 0x40000000 /* strict.pm */ -#define HINT_EXPLICIT_STRICT_VARS 0x80000000 /* strict.pm */ - + /* Note: Used for NATIVE_HINTS, currently + defined by vms/vmsish.h: + 0x40000000 + 0x80000000 + */ /* The following are stored in $^H{sort}, not in PL_hints */ #define HINT_SORT_SORT_BITS 0x000000FF /* allow 256 different ones */ |