Skip to content

Commit 3680775

Browse files
committed
regcomp.c: don't include INTERN.h
This file only needs including by globals.c; it was being included in regcomp.c too as the declarations in regcomp.h aren't included by perl.h and thus don't get pulled into globals.c. This was a confusing and hacky workaround. Instead, this commit causes globals.c to #include regcomp.h directly After this commit, only globals.c #includes INTERN.h
1 parent 37137b9 commit 3680775

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

globals.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@
3333

3434
#include "perlapi.h" /* bring in PL_force_link_funcs */
3535

36+
/* regcomp.h * isn't #included in perl.h, as its only included within a
37+
* few specific files such as regcomp.c, regexec.c. So include it
38+
* explicitly to process any data declarations within it.
39+
*/
40+
#include "regcomp.h"
41+
42+
3643
/*
3744
* ex: set ts=8 sts=4 sw=4 et:
3845
*/

regcomp.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@
7474
#define PERL_IN_REGCOMP_C
7575
#include "perl.h"
7676

77-
#ifndef PERL_IN_XSUB_RE
78-
# include "INTERN.h"
79-
#endif
80-
8177
#define REG_COMP_C
8278
#ifdef PERL_IN_XSUB_RE
8379
# include "re_comp.h"

0 commit comments

Comments
 (0)