From: Nicholas Clark Date: Fri, 21 Apr 2006 12:46:43 +0000 (+0000) Subject: Why hide functions (and duplicate them) when you can just avoid X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=76234dfb9b5ce1d0a5dafb80ee9a735679c4d6a3;p=p5sagit%2Fp5-mst-13.2.git Why hide functions (and duplicate them) when you can just avoid compiling them in the first place? p4raw-id: //depot/perl@27931 --- diff --git a/regcomp.c b/regcomp.c index ce24f44..8fb49d0 100644 --- a/regcomp.c +++ b/regcomp.c @@ -48,9 +48,6 @@ # define Perl_pregfree my_regfree # define Perl_re_intuit_string my_re_intuit_string /* *These* symbols are masked to allow static link. */ -# define Perl_regnext my_regnext -# define Perl_save_re_context my_save_re_context -# define Perl_reginitcolors my_reginitcolors # define PERL_NO_GET_CONTEXT #endif @@ -2753,6 +2750,7 @@ S_add_data(RExC_state_t *pRExC_state, I32 n, const char *s) return RExC_rx->data->count - n; } +#ifndef PERL_IN_XSUB_RE void Perl_reginitcolors(pTHX) { @@ -2778,7 +2776,7 @@ Perl_reginitcolors(pTHX) } PL_colorset = 1; } - +#endif /* - pregcomp - compile a regular expression into internal code @@ -6106,6 +6104,7 @@ Perl_pregfree(pTHX_ struct regexp *r) Safefree(r); } +#ifndef PERL_IN_XSUB_RE /* - regnext - dig the "next" pointer out of a node */ @@ -6124,6 +6123,7 @@ Perl_regnext(pTHX_ register regnode *p) return(p+offset); } +#endif STATIC void S_re_croak2(pTHX_ const char* pat1,const char* pat2,...) @@ -6161,6 +6161,7 @@ S_re_croak2(pTHX_ const char* pat1,const char* pat2,...) /* XXX Here's a total kludge. But we need to re-enter for swash routines. */ +#ifndef PERL_IN_XSUB_RE void Perl_save_re_context(pTHX) { @@ -6209,6 +6210,7 @@ Perl_save_re_context(pTHX) } } } +#endif static void clear_re(pTHX_ void *r) diff --git a/regexec.c b/regexec.c index 3393f61..b5f16c5 100644 --- a/regexec.c +++ b/regexec.c @@ -47,10 +47,6 @@ # define Perl_regdump my_regdump # define Perl_regprop my_regprop # define Perl_re_intuit_start my_re_intuit_start -/* *These* symbols are masked to allow static link. */ -# define Perl_pregexec my_pregexec -# define Perl_reginitcolors my_reginitcolors -# define Perl_regclass_swash my_regclass_swash # define PERL_NO_GET_CONTEXT #endif @@ -299,6 +295,7 @@ S_regcppop(pTHX_ const regexp *rex) * pregexec and friends */ +#ifndef PERL_IN_XSUB_RE /* - pregexec - match a regexp against a string */ @@ -314,7 +311,7 @@ Perl_pregexec(pTHX_ register regexp *prog, char *stringarg, register char *stren regexec_flags(prog, stringarg, strend, strbeg, minend, screamer, NULL, nosave ? 0 : REXEC_COPY_STR); } - +#endif /* * Need to implement the following flags for reg_anch: @@ -4928,6 +4925,7 @@ S_regrepeat(pTHX_ const regexp *prog, const regnode *p, I32 max) } +#ifndef PERL_IN_XSUB_RE /* - regclass_swash - prepare the utf8 swash */ @@ -4975,6 +4973,7 @@ Perl_regclass_swash(pTHX_ const regexp *prog, register const regnode* node, bool return sw; } +#endif /* - reginclass - determine if a character falls into a character class