From 1c16f240ad4ddd5fbb3f207b7147c81cccd005ce Mon Sep 17 00:00:00 2001 From: Richard Leach Date: Sat, 11 May 2024 13:26:27 +0000 Subject: [PATCH] S_new_SV: mark args unused, make inline, rename with Perl_ prefix When sv_inline.h was created in https://github.com/Perl/perl5/commit/75acd14e43f2ffb698fc7032498f31095b56adb5 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. --- sv_inline.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sv_inline.h b/sv_inline.h index 3afa6ab782e9..49c2dc1e46f0 100644 --- a/sv_inline.h +++ b/sv_inline.h @@ -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* -S_new_SV(pTHX_ const char *file, int line, const char *func) +PERL_STATIC_INLINE SV* +Perl_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); @@ -102,7 +105,7 @@ S_new_SV(pTHX_ const char *file, int line, const char *func) return sv; } -# define new_SV(p) (p)=S_new_SV(aTHX_ __FILE__, __LINE__, FUNCTION__) +# define new_SV(p) (p)=Perl_new_SV(aTHX_ __FILE__, __LINE__, FUNCTION__) #else # define new_SV(p) \