summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2016-08-02 23:58:52 -0700
committerFather Chrysostomos <sprout@cpan.org>2016-08-03 00:40:44 -0700
commit7ef70b3d59ec815fef24083df58e1ce363c63287 (patch)
tree9b7ce4723a32968a53204870adad42a9207af06f /perl.h
parent53225858d8a26c52154c06943d0ee5227573617c (diff)
downloadperl-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.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/perl.h b/perl.h
index 218f94c74d..1a38933ec9 100644
--- a/perl.h
+++ b/perl.h
@@ -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 */