Skip to content

Commit

Permalink
S_new_SV: mark args unused, make inline, correct typo
Browse files Browse the repository at this point in the history
When sv_inline.h was created in
Perl@75acd14
and a number of things moved into it, the S_new_SV debugging function should
have been made PERL_STATIC_INLINE. This commit now does that. It also marks
the arguments to S_new_SV as PERL_UNUSED_ARG, reducing warnings on some
builds.
  • Loading branch information
richardleach committed May 11, 2024
1 parent 8cacb84 commit 250be70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sv_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,13 @@ SV* Perl_more_sv(pTHX);

#ifdef DEBUG_LEAKING_SCALARS
/* provide a real function for a debugger to play with */
STATIC SV*
PERL_STATIC_INLINE SV*
S_new_SV(pTHX_ const char *file, int line, const char *func)
{
SV* sv;
PERL_UNUSED_ARG(file);
PERL_UNUSED_ARG(line);
PERL_UNUSED_ARG(func);

if (PL_sv_root)
uproot_SV(sv);
Expand Down

0 comments on commit 250be70

Please sign in to comment.