This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlapi: Note proper rplcemnt for pad_compname_type
authorKarl Williamson <khw@cpan.org>
Thu, 27 Aug 2020 15:24:12 +0000 (09:24 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 23 Nov 2020 04:13:58 +0000 (21:13 -0700)
embed.fnc
embed.h
mathoms.c
proto.h

index eb14b68..3eb6dc7 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -3418,7 +3418,7 @@ Apd       |CV*    |cv_clone       |NN CV* proto
 p      |CV*    |cv_clone_into  |NN CV* proto|NN CV *target
 pd     |void   |pad_fixup_inner_anons|NN PADLIST *padlist|NN CV *old_cv|NN CV *new_cv
 pdX    |void   |pad_push       |NN PADLIST *padlist|int depth
-ApbdRM |HV*    |pad_compname_type|const PADOFFSET po
+ApbdDR |HV*    |pad_compname_type|const PADOFFSET po
 AxpdRT |PADNAME *|padnamelist_fetch|NN PADNAMELIST *pnl|SSize_t key
 Xop    |void   |padnamelist_free|NN PADNAMELIST *pnl
 Axpd   |PADNAME **|padnamelist_store|NN PADNAMELIST *pnl|SSize_t key \
diff --git a/embed.h b/embed.h
index 6348d64..8d27796 100644 (file)
--- a/embed.h
+++ b/embed.h
 #define pad_add_name_pvn(a,b,c,d,e)    Perl_pad_add_name_pvn(aTHX_ a,b,c,d,e)
 #define pad_add_name_sv(a,b,c,d)       Perl_pad_add_name_sv(aTHX_ a,b,c,d)
 #define pad_alloc(a,b)         Perl_pad_alloc(aTHX_ a,b)
+#ifndef NO_MATHOMS
+#define pad_compname_type(a)   Perl_pad_compname_type(aTHX_ a)
+#endif
 #define pad_findmy_pv(a,b)     Perl_pad_findmy_pv(aTHX_ a,b)
 #define pad_findmy_pvn(a,b,c)  Perl_pad_findmy_pvn(aTHX_ a,b,c)
 #define pad_findmy_sv(a,b)     Perl_pad_findmy_sv(aTHX_ a,b)
index a07b260..fb21563 100644 (file)
--- a/mathoms.c
+++ b/mathoms.c
@@ -1261,6 +1261,8 @@ Looks up the type of the lexical variable at position C<po> in the
 currently-compiling pad.  If the variable is typed, the stash of the
 class to which it is typed is returned.  If not, C<NULL> is returned.
 
+Use L<perlintern/C<PAD_COMPNAME_TYPE>> instead.
+
 =cut
 */
 
diff --git a/proto.h b/proto.h
index 5e1be02..e886261 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -2625,6 +2625,7 @@ PERL_CALLCONV void        Perl_pad_block_start(pTHX_ int full);
 #define PERL_ARGS_ASSERT_PAD_BLOCK_START
 #ifndef NO_MATHOMS
 PERL_CALLCONV HV*      Perl_pad_compname_type(pTHX_ const PADOFFSET po)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_PAD_COMPNAME_TYPE
 #endif