Skip to content

Commit 2b8cbf5

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 0f6279c commit 2b8cbf5

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
@@ -924,8 +924,6 @@
924924
# endif
925925
# endif
926926
# if !defined(NO_MATHOMS)
927-
# define sv_nolocking(a) Perl_sv_nolocking(aTHX_ a)
928-
# define sv_nounlocking(a) Perl_sv_nounlocking(aTHX_ a)
929927
# define utf8_to_uvchr(a,b) Perl_utf8_to_uvchr(aTHX_ a,b)
930928
# define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b)
931929
# 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
@@ -106,51 +106,6 @@ Perl_huge(void)
106106
}
107107
#endif
108108

109-
/*
110-
=for apidoc_section $SV
111-
=for apidoc sv_nolocking
112-
113-
Dummy routine which "locks" an SV when there is no locking module present.
114-
Exists to avoid test for a C<NULL> function pointer and because it could
115-
potentially warn under some level of strict-ness.
116-
117-
"Superseded" by C<sv_nosharing()>.
118-
119-
=cut
120-
*/
121-
122-
void
123-
Perl_sv_nolocking(pTHX_ SV *sv)
124-
{
125-
PERL_UNUSED_CONTEXT;
126-
PERL_UNUSED_ARG(sv);
127-
}
128-
129-
130-
/*
131-
=for apidoc_section $SV
132-
=for apidoc sv_nounlocking
133-
134-
Dummy routine which "unlocks" an SV when there is no locking module present.
135-
Exists to avoid test for a C<NULL> function pointer and because it could
136-
potentially warn under some level of strict-ness.
137-
138-
"Superseded" by C<sv_nosharing()>.
139-
140-
=cut
141-
142-
PERL_UNLOCK_HOOK in intrpvar.h is the macro that refers to this, and guarantees
143-
that mathoms gets loaded.
144-
145-
*/
146-
147-
void
148-
Perl_sv_nounlocking(pTHX_ SV *sv)
149-
{
150-
PERL_UNUSED_CONTEXT;
151-
PERL_UNUSED_ARG(sv);
152-
}
153-
154109
/*
155110
=for apidoc_section $unicode
156111
=for apidoc utf8_to_uvuni

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)