This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Document PERL_UNUSED_DECL
authorKarl Williamson <khw@cpan.org>
Thu, 27 Aug 2020 12:57:28 +0000 (06:57 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 5 Sep 2020 23:31:10 +0000 (17:31 -0600)
perl.h

diff --git a/perl.h b/perl.h
index dab7546..a28e5ef 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -405,7 +405,25 @@ Now a no-op.
  * marking unused variables (they need e.g. a #pragma) and therefore
  * cpp macros like PERL_UNUSED_DECL cannot work for this purpose, even
  * if it were PERL_UNUSED_DECL(x), which it cannot be (see above).
- *
+
+=for apidoc_section Compiler directives
+=for apidoc AmnU||PERL_UNUSED_DECL
+Tells the compiler that the parameter in the function prototype just before it
+is not necessarily expected to be used in the function.  Not that many
+compilers understand this, so this should only be used in cases where
+C<L</PERL_UNUSED_ARG>> can't conveniently be used.
+
+Example usage:
+
+=over
+
+ Signal_t
+ Perl_perly_sighandler(int sig, Siginfo_t *sip PERL_UNUSED_DECL,
+                       void *uap PERL_UNUSED_DECL, bool safe)
+
+=back
+
+=cut
  */
 
 #ifndef PERL_UNUSED_DECL