This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.h: Swap struct vs typedef
authorKarl Williamson <khw@cpan.org>
Fri, 21 Sep 2018 14:33:31 +0000 (08:33 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 20 Oct 2018 06:09:54 +0000 (00:09 -0600)
This struct has two names.  I previously left the less descriptive one
as the primary because of back compat issues.  But I now realize that
regcomp.h is only used in the core, so it's ok to swap for the better
name to be primary.

perl.h
regcomp.h

diff --git a/perl.h b/perl.h
index 5e5a157..e6ab70f 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3682,11 +3682,10 @@ typedef struct magic_state MGS; /* struct magic_state defined in mg.c */
 struct scan_data_t;
 typedef struct regnode_charclass regnode_charclass;
 
-struct regnode_charclass_class;
-
 /* A hopefully less confusing name.  The sub-classes are all Posix classes only
  * used under /l matching */
-typedef struct regnode_charclass_class regnode_charclass_posixl;
+typedef struct regnode_charclass_posixl regnode_charclass_class;
+typedef struct regnode_charclass_posixl regnode_charclass_posixl;
 
 typedef struct regnode_ssc regnode_ssc;
 typedef struct RExC_state_t RExC_state_t;
index 6fcdc22..8bffb5d 100644 (file)
--- a/regcomp.h
+++ b/regcomp.h
@@ -217,7 +217,7 @@ struct regnode_charclass {
 };
 
 /* has runtime (locale) \d, \w, ..., [:posix:] classes */
-struct regnode_charclass_class {
+struct regnode_charclass_posixl {
     U8 flags;                      /* ANYOF_MATCHES_POSIXL bit must go here */
     U8  type;
     U16 next_off;