diff options
author | Father Chrysostomos <sprout@cpan.org> | 2016-08-02 23:58:52 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2016-08-03 00:40:44 -0700 |
commit | 7ef70b3d59ec815fef24083df58e1ce363c63287 (patch) | |
tree | 9b7ce4723a32968a53204870adad42a9207af06f /perl.h | |
parent | 53225858d8a26c52154c06943d0ee5227573617c (diff) | |
download | perl-7ef70b3d59ec815fef24083df58e1ce363c63287.tar.gz |
Empty sublex_info into the parser struct
sublex_info is never validly copied or set* all at once and no pointer
is ever taken to it. It seems to be left over from the time when
PL_sublex_info was a global variable. (Indeed, the struct is still
defined in perl.h, an odd place for something used only by parser.h.)
It will be easier to eliminate alignment holes in the parser struct if
we just empty it out.
* The one instance of sublex_info being copied, in
sv.c:Perl_parser_dup, ended up potentially sharing an SV between
threads, which is a no-no. I say potentially, because I can’t see how
it could be non-null during thread cloning, which would have to happen
between sublex_start and sublex_push.
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -3919,14 +3919,6 @@ typedef struct crypt_data { /* straight from /usr/include/crypt.h */ #undef _XPVMG_HEAD #undef _XPVCV_COMMON -typedef struct _sublex_info SUBLEXINFO; -struct _sublex_info { - U8 super_state; /* lexer state to save */ - U16 sub_inwhat; /* "lex_inwhat" to use */ - OP *sub_op; /* "lex_op" to use */ - SV *repl; /* replacement of s/// or y/// */ -}; - #include "parser.h" typedef struct magic_state MGS; /* struct magic_state defined in mg.c */ |