Skip to content

Commit 604d1d0

Browse files
committed
Note when functions were first deprecated
We should eventually remove deprecated functions, after a suitable interval. This commit notes when all the current deprecated functions were made so. This saves time in the future in deciding if it is ok to actually remove them.
1 parent 3afafdb commit 604d1d0

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

embed.fnc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,12 @@
344344
: * makes the short name defined for everywhere, not just for PERL_CORE
345345
: or PERL_EXT
346346
:
347-
: 'D' Function is deprecated:
347+
: 'D' Function is deprecated.
348+
:
349+
: (Add a comment to the function source when adding this flag indicating
350+
: what release it is first being deprecated in. This will prevent having
351+
: to dig up this information when deciding if enough releases have passed
352+
: to actually remove the function.)
348353
:
349354
: proto.h: add __attribute__deprecated__
350355
: autodoc.pl adds a note to this effect in the doc entry

mathoms.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,8 @@ next possible position in C<s> that could begin a non-malformed character.
746746
See L<perlapi/utf8n_to_uvchr> for details on when the REPLACEMENT CHARACTER is returned.
747747
748748
=cut
749+
750+
Deprecated since 5.38
749751
*/
750752

751753
UV
@@ -815,15 +817,15 @@ convert to Unicode using L<perlapi/C<NATIVE_TO_UNI>>.
815817
UV
816818
Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
817819
{
818-
PERL_ARGS_ASSERT_UTF8N_TO_UVUNI;
820+
PERL_ARGS_ASSERT_UTF8N_TO_UVUNI; /* Deprecated since 5.38 */
819821

820822
return NATIVE_TO_UNI(utf8n_to_uvchr(s, curlen, retlen, flags));
821823
}
822824

823825
UV
824826
Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
825827
{
826-
PERL_ARGS_ASSERT_UTF8_TO_UVCHR;
828+
PERL_ARGS_ASSERT_UTF8_TO_UVCHR; /* Deprecated since 5.38 */
827829

828830
/* This function is unsafe if malformed UTF-8 input is given it, which is
829831
* why the function is deprecated. If the first byte of the input

pp_ctl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,9 @@ S_dopoptolabel(pTHX_ const char *label, STRLEN len, U32 flags)
16341634
Implements the deprecated L<perlapi/C<GIMME>>.
16351635
16361636
=cut
1637+
1638+
Deprecated since 5.38
1639+
16371640
*/
16381641

16391642
U8

util.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3667,6 +3667,8 @@ Given an opcode from the enum in F<opcodes.h>, C<PL_op_name[opcode]> returns a
36673667
pointer to a C language string giving its name.
36683668
36693669
=cut
3670+
3671+
Deprecated since 5.38
36703672
*/
36713673

36723674
char **
@@ -3684,6 +3686,8 @@ Given an opcode from the enum in F<opcodes.h>, C<PL_op_desc[opcode]> returns a
36843686
pointer to a C language string giving its description.
36853687
36863688
=cut
3689+
3690+
Deprecated since 5.38
36873691
*/
36883692

36893693
char **
@@ -3696,21 +3700,21 @@ Perl_get_op_descs(pTHX)
36963700
const char *
36973701
Perl_get_no_modify(pTHX)
36983702
{
3699-
PERL_UNUSED_CONTEXT;
3703+
PERL_UNUSED_CONTEXT; /* Deprecated since 5.38 */
37003704
return PL_no_modify;
37013705
}
37023706

37033707
U32 *
37043708
Perl_get_opargs(pTHX)
37053709
{
3706-
PERL_UNUSED_CONTEXT;
3710+
PERL_UNUSED_CONTEXT; /* Deprecated since 5.38 */
37073711
return (U32 *)PL_opargs;
37083712
}
37093713

37103714
PPADDR_t*
37113715
Perl_get_ppaddr(pTHX)
37123716
{
3713-
PERL_UNUSED_CONTEXT;
3717+
PERL_UNUSED_CONTEXT; /* Deprecated since 5.38 */
37143718
return (PPADDR_t*)PL_ppaddr;
37153719
}
37163720

0 commit comments

Comments
 (0)