From 9a3a8c67174754571c38c0b2ed464e20aa1772de Mon Sep 17 00:00:00 2001 From: "Craig A. Berry" Date: Mon, 15 Feb 2021 18:00:26 -0600 Subject: Hide Perl_regcurly in the re extension Otherwise a strict linker will fail to build the extenstion due to a multiply defined symbol. We used to do this but it was removed in e513125ac7bdea1f for unknown reasons. The same commit also defined some macros inside the function that are used but inside and outside it, so put them where they can be seen regardless of whether we are defining the function itself. --- regcomp.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'regcomp.c') diff --git a/regcomp.c b/regcomp.c index d279244bc2..e44c7a37e5 100644 --- a/regcomp.c +++ b/regcomp.c @@ -12550,6 +12550,13 @@ S_regbranch(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth) return ret; } +#define RBRACE 0 +#define MIN_S 1 +#define MIN_E 2 +#define MAX_S 3 +#define MAX_E 4 + +#ifndef PERL_IN_XSUB_RE bool Perl_regcurly(const char *s, const char *e, const char * result[5]) { @@ -12640,12 +12647,6 @@ Perl_regcurly(const char *s, const char *e, const char * result[5]) if (result) { -#define RBRACE 0 -#define MIN_S 1 -#define MIN_E 2 -#define MAX_S 3 -#define MAX_E 4 - result[RBRACE] = s; result[MIN_S] = min_start; @@ -12671,6 +12672,7 @@ Perl_regcurly(const char *s, const char *e, const char * result[5]) return TRUE; } +#endif U32 S_get_quantifier_value(pTHX_ RExC_state_t *pRExC_state, -- cgit v1.2.1