This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document NUM2PTR
authorKarl Williamson <khw@cpan.org>
Thu, 27 Aug 2020 12:59:49 +0000 (06:59 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 21 Nov 2020 19:38:04 +0000 (12:38 -0700)
or at least lead people to use something better

perl.h

diff --git a/perl.h b/perl.h
index e8ecb1b..93d7c71 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -2112,6 +2112,14 @@ typedef UVTYPE UV;
 #  define PTR2ul(p)    INT2PTR(unsigned long,p)        
 #endif
 
+/*
+=for apidoc_section Casting
+=for apidoc Cyh|type|NUM2PTR|type|int value
+You probably want to be using L<C</INT2PTR>> instead.
+
+=cut
+*/
+
 #define NUM2PTR(any,d) (any)(PTRV)(d)
 #define PTR2IV(p)      INT2PTR(IV,p)
 #define PTR2UV(p)      INT2PTR(UV,p)