Skip to content

Commit 3afafdb

Browse files
committed
Attempt to remove deprecated sv_locking/unlocking
These have been deprecated since 5.32, emitting a compiler warning if actually called (for most modern compilers). I think it is time to see what breaks when we remove them.
1 parent bc5a3e9 commit 3afafdb

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
@@ -3271,10 +3271,7 @@ ARdp |SV * |sv_mortalcopy_flags \
32713271
|U32 flags
32723272
ARdp |SV * |sv_newmortal
32733273
Cdp |SV * |sv_newref |NULLOK SV * const sv
3274-
ADbdp |void |sv_nolocking |NULLOK SV *sv
3275-
32763274
Adp |void |sv_nosharing |NULLOK SV *sv
3277-
ADbdp |void |sv_nounlocking |NULLOK SV *sv
32783275
: Used in pp.c, pp_hot.c, sv.c
32793276
dpx |SV * |sv_2num |NN SV * const sv
32803277
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
@@ -437,51 +437,6 @@ Perl_do_aexec(pTHX_ SV *really, SV **mark, SV **sp)
437437
}
438438
#endif
439439

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

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)