Skip to content

Commit bf26151

Browse files
committed
Reapply "Attempt to remove deprecated sv_locking/unlocking"
This reverts commit f3a5b2b. That commit reverted 3afafdb. The reason was one of the removed deprecated functions being present in mathoms had an extra purpose, making sure that the functions in mathoms.c get loaded. The commit just prior to this one created a different mechanism for forcing that load, so the the reason for the original revert is gone, so it can be reapplied.
1 parent e12cf2f commit bf26151

File tree

6 files changed

+3
-68
lines changed

6 files changed

+3
-68
lines changed

embed.fnc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3275,10 +3275,7 @@ ARdp |SV * |sv_mortalcopy_flags \
32753275
|U32 flags
32763276
ARdp |SV * |sv_newmortal
32773277
Cdp |SV * |sv_newref |NULLOK SV * const sv
3278-
ADbdp |void |sv_nolocking |NULLOK SV *sv
3279-
32803278
Adp |void |sv_nosharing |NULLOK SV *sv
3281-
ADbdp |void |sv_nounlocking |NULLOK SV *sv
32823279
: Used in pp.c, pp_hot.c, sv.c
32833280
dpx |SV * |sv_2num |NN SV * const sv
32843281
Adm |bool |sv_numeq |NULLOK SV *sv1 \

embed.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -923,8 +923,6 @@
923923
# endif
924924
# endif
925925
# if !defined(NO_MATHOMS)
926-
# define sv_nolocking(a) Perl_sv_nolocking(aTHX_ a)
927-
# define sv_nounlocking(a) Perl_sv_nounlocking(aTHX_ a)
928926
# define utf8_to_uvchr(a,b) Perl_utf8_to_uvchr(aTHX_ a,b)
929927
# define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b)
930928
# define utf8n_to_uvuni(a,b,c,d) Perl_utf8n_to_uvuni(aTHX_ a,b,c,d)

intrpvar.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -936,13 +936,7 @@ PERLVARI(I, lockhook, share_proc_t, Perl_sv_nosharing)
936936
GCC_DIAG_IGNORE(-Wdeprecated-declarations)
937937
MSVC_DIAG_IGNORE(4996)
938938

939-
#ifdef NO_MATHOMS
940-
# define PERL_UNLOCK_HOOK Perl_sv_nosharing
941-
#else
942-
/* This reference ensures that the mathoms are linked with perl */
943-
# define PERL_UNLOCK_HOOK Perl_sv_nounlocking
944-
#endif
945-
PERLVARI(I, unlockhook, share_proc_t, PERL_UNLOCK_HOOK)
939+
PERLVARI(I, unlockhook, share_proc_t, Perl_sv_nosharing)
946940

947941
MSVC_DIAG_RESTORE
948942
GCC_DIAG_RESTORE

mathoms.c

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -444,51 +444,6 @@ Perl_do_aexec(pTHX_ SV *really, SV **mark, SV **sp)
444444
}
445445
#endif
446446

447-
/*
448-
=for apidoc_section $SV
449-
=for apidoc sv_nolocking
450-
451-
Dummy routine which "locks" an SV when there is no locking module present.
452-
Exists to avoid test for a C<NULL> function pointer and because it could
453-
potentially warn under some level of strict-ness.
454-
455-
"Superseded" by C<sv_nosharing()>.
456-
457-
=cut
458-
*/
459-
460-
void
461-
Perl_sv_nolocking(pTHX_ SV *sv)
462-
{
463-
PERL_UNUSED_CONTEXT;
464-
PERL_UNUSED_ARG(sv);
465-
}
466-
467-
468-
/*
469-
=for apidoc_section $SV
470-
=for apidoc sv_nounlocking
471-
472-
Dummy routine which "unlocks" an SV when there is no locking module present.
473-
Exists to avoid test for a C<NULL> function pointer and because it could
474-
potentially warn under some level of strict-ness.
475-
476-
"Superseded" by C<sv_nosharing()>.
477-
478-
=cut
479-
480-
PERL_UNLOCK_HOOK in intrpvar.h is the macro that refers to this, and guarantees
481-
that mathoms gets loaded.
482-
483-
*/
484-
485-
void
486-
Perl_sv_nounlocking(pTHX_ SV *sv)
487-
{
488-
PERL_UNUSED_CONTEXT;
489-
PERL_UNUSED_ARG(sv);
490-
}
491-
492447
void
493448
Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len)
494449
{

pod/perldelta.pod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,8 @@ well.
349349

350350
=item *
351351

352-
XXX
352+
Removed the deprecated (since 5.32) functions C<sv_locking()> and
353+
C<sv_unlocking>.
353354

354355
=back
355356

proto.h

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)