Skip to content

Commit

Permalink
regexec.c: Remove no-value-added function
Browse files Browse the repository at this point in the history
This function merely calls an inline one.  Might as well not have any
indirection.
  • Loading branch information
khwilliamson committed Oct 15, 2024
1 parent d0895a3 commit 19a5403
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 20 deletions.
4 changes: 0 additions & 4 deletions embed.fnc
Original file line number Diff line number Diff line change
Expand Up @@ -5575,10 +5575,6 @@ ESW |void |regcp_restore |NN regexp *rex \
ERST |U8 * |reghop3 |NN U8 *s \
|SSize_t off \
|NN const U8 *lim
ERST |U8 * |reghop4 |NN U8 *s \
|SSize_t off \
|NN const U8 *llim \
|NN const U8 *rlim
ERST |U8 * |reghopmaybe3 |NN U8 *s \
|SSize_t off \
|NN const U8 * const lim
Expand Down
1 change: 0 additions & 1 deletion embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,6 @@
# define regcppop(a,b) S_regcppop(aTHX_ a,b comma_aDEPTH)
# define regcppush(a,b,c) S_regcppush(aTHX_ a,b,c comma_aDEPTH)
# define reghop3 S_reghop3
# define reghop4 S_reghop4
# define reghopmaybe3 S_reghopmaybe3
# define reginclass(a,b,c,d,e) S_reginclass(aTHX_ a,b,c,d,e)
# define regmatch(a,b,c) S_regmatch(aTHX_ a,b,c)
Expand Down
6 changes: 0 additions & 6 deletions proto.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions regexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static const char non_utf8_target_but_utf8_required[]
#define HOP3clim(pos,off,lim) ((char*)HOP3lim(pos,off,lim))

#define HOP4(pos,off,llim, rlim) (reginfo->is_utf8_target \
? reghop4((U8*)(pos), off, (U8*)(llim), (U8*)(rlim)) \
? utf8_hop_safe((U8*)(pos), off, (U8*)(llim), (U8*)(rlim)) \
: (U8*)(pos + off))
#define HOP4c(pos,off,llim, rlim) ((char*)HOP4(pos,off,llim, rlim))

Expand Down Expand Up @@ -11158,14 +11158,6 @@ S_reghop3(U8 *s, SSize_t off, const U8* lim)
return s;
}

STATIC U8 *
S_reghop4(U8 *s, SSize_t off, const U8* llim, const U8* rlim)
{
PERL_ARGS_ASSERT_REGHOP4;

return utf8_hop_safe(s, off, llim, rlim);
}

/* like reghop3, but returns NULL on overrun, rather than returning last
* char pos */

Expand Down

0 comments on commit 19a5403

Please sign in to comment.