Skip to content

Commit 1c16f24

Browse files
committed
S_new_SV: mark args unused, make inline, rename with Perl_ prefix
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 and given the Perl_ prefix. This commit now does those things. It also marks the arguments to Perl_new_SV as PERL_UNUSED_ARG, reducing warnings on some builds.
1 parent 8cacb84 commit 1c16f24

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sv_inline.h

Lines changed: 6 additions & 3 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*
75-
S_new_SV(pTHX_ const char *file, int line, const char *func)
74+
PERL_STATIC_INLINE SV*
75+
Perl_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)=Perl_new_SV(aTHX_ __FILE__, __LINE__, FUNCTION__)
106109

107110
#else
108111
# define new_SV(p) \

0 commit comments

Comments
 (0)