From 1568d13a11564a7d9d62aaf6a79b9b04172a2a45 Mon Sep 17 00:00:00 2001 From: Zefram Date: Sun, 12 Nov 2017 05:58:36 +0000 Subject: better document macros taking literal strings When giving a function-style prototype for a macro taking a literal string parameter, put a string literal in place of a type for that parameter. This goofy appearance makes it obvious that this isn't really a function, and clues the reader in that the parameter can't actually be an arbitrary expression of the right type. Also change the nonsensical "NUL-terminated literal string" to "literal string" to describe these parameters. Fixes [perl #116286]. --- pad.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pad.h') diff --git a/pad.h b/pad.h index 56d88abc8d..976dc058d4 100644 --- a/pad.h +++ b/pad.h @@ -492,9 +492,9 @@ Clone the state variables associated with running and compiling pads. PL_cop_seqmax = proto_perl->Icop_seqmax; /* -=for apidoc Am|PADOFFSET|pad_add_name_pvs|const char *name|U32 flags|HV *typestash|HV *ourstash +=for apidoc Am|PADOFFSET|pad_add_name_pvs|"literal string" name|U32 flags|HV *typestash|HV *ourstash -Exactly like L, but takes a C-terminated literal string +Exactly like L, but takes a literal string instead of a string/length pair. =cut @@ -504,9 +504,9 @@ instead of a string/length pair. Perl_pad_add_name_pvn(aTHX_ STR_WITH_LEN(name), flags, typestash, ourstash) /* -=for apidoc Am|PADOFFSET|pad_findmy_pvs|const char *name|U32 flags +=for apidoc Am|PADOFFSET|pad_findmy_pvs|"literal string" name|U32 flags -Exactly like L, but takes a C-terminated literal string +Exactly like L, but takes a literal string instead of a string/length pair. =cut -- cgit v1.2.1