Skip to content

Commit b3717a0

Browse files
committed
S_new_SV: mark args unused, make inline, correct typo
When sv_inline.h was created in 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, and corrects a transcription error in the __FUNCTION__ argument.
1 parent 8cacb84 commit b3717a0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sv_inline.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,13 @@ SV* Perl_more_sv(pTHX);
7171

7272
#ifdef DEBUG_LEAKING_SCALARS
7373
/* provide a real function for a debugger to play with */
74-
STATIC SV*
74+
PERL_STATIC_INLINE SV*
7575
S_new_SV(pTHX_ const char *file, int line, const char *func)
7676
{
7777
SV* sv;
78+
PERL_UNUSED_ARG(file);
79+
PERL_UNUSED_ARG(line);
80+
PERL_UNUSED_ARG(func);
7881

7982
if (PL_sv_root)
8083
uproot_SV(sv);
@@ -102,7 +105,7 @@ S_new_SV(pTHX_ const char *file, int line, const char *func)
102105

103106
return sv;
104107
}
105-
# define new_SV(p) (p)=S_new_SV(aTHX_ __FILE__, __LINE__, FUNCTION__)
108+
# define new_SV(p) (p)=S_new_SV(aTHX_ __FILE__, __LINE__, __FUNCTION__)
106109

107110
#else
108111
# define new_SV(p) \

0 commit comments

Comments
 (0)