summaryrefslogtreecommitdiff
path: root/hv.h
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-11-12 05:58:36 +0000
committerZefram <zefram@fysh.org>2017-11-12 06:06:00 +0000
commit1568d13a11564a7d9d62aaf6a79b9b04172a2a45 (patch)
tree0ab414c0b8e814426a4df60ec36b77db727443d4 /hv.h
parentbc3331071e1ccbdab715397718bb00282f5c5e88 (diff)
downloadperl-1568d13a11564a7d9d62aaf6a79b9b04172a2a45.tar.gz
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].
Diffstat (limited to 'hv.h')
-rw-r--r--hv.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/hv.h b/hv.h
index 8411b5d31f..dcc6eb1e2f 100644
--- a/hv.h
+++ b/hv.h
@@ -565,9 +565,9 @@ struct refcounted_he {
};
/*
-=for apidoc m|SV *|refcounted_he_fetch_pvs|const struct refcounted_he *chain|const char *key|U32 flags
+=for apidoc m|SV *|refcounted_he_fetch_pvs|const struct refcounted_he *chain|"literal string" key|U32 flags
-Like L</refcounted_he_fetch_pvn>, but takes a C<NUL>-terminated literal string
+Like L</refcounted_he_fetch_pvn>, but takes a literal string
instead of a string/length pair, and no precomputed hash.
=cut
@@ -577,9 +577,9 @@ instead of a string/length pair, and no precomputed hash.
Perl_refcounted_he_fetch_pvn(aTHX_ chain, STR_WITH_LEN(key), 0, flags)
/*
-=for apidoc m|struct refcounted_he *|refcounted_he_new_pvs|struct refcounted_he *parent|const char *key|SV *value|U32 flags
+=for apidoc m|struct refcounted_he *|refcounted_he_new_pvs|struct refcounted_he *parent|"literal string" key|SV *value|U32 flags
-Like L</refcounted_he_new_pvn>, but takes a C<NUL>-terminated literal string
+Like L</refcounted_he_new_pvn>, but takes a literal string
instead of a string/length pair, and no precomputed hash.
=cut