summaryrefslogtreecommitdiff
path: root/cop.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 /cop.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 'cop.h')
-rw-r--r--cop.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/cop.h b/cop.h
index 34ebbc09ab..5c66752859 100644
--- a/cop.h
+++ b/cop.h
@@ -190,9 +190,9 @@ associated with the key.
Perl_refcounted_he_fetch_pvn(aTHX_ cophh, keypv, keylen, hash, flags)
/*
-=for apidoc Amx|SV *|cophh_fetch_pvs|const COPHH *cophh|const char *key|U32 flags
+=for apidoc Amx|SV *|cophh_fetch_pvs|const COPHH *cophh|"literal string" key|U32 flags
-Like L</cophh_fetch_pvn>, but takes a C<NUL>-terminated literal string instead
+Like L</cophh_fetch_pvn>, but takes a literal string instead
of a string/length pair, and no precomputed hash.
=cut
@@ -296,9 +296,9 @@ be stored with referential integrity, but will be coerced to strings.
Perl_refcounted_he_new_pvn(aTHX_ cophh, keypv, keylen, hash, value, flags)
/*
-=for apidoc Amx|COPHH *|cophh_store_pvs|const COPHH *cophh|const char *key|SV *value|U32 flags
+=for apidoc Amx|COPHH *|cophh_store_pvs|const COPHH *cophh|"literal string" key|SV *value|U32 flags
-Like L</cophh_store_pvn>, but takes a C<NUL>-terminated literal string instead
+Like L</cophh_store_pvn>, but takes a literal string instead
of a string/length pair, and no precomputed hash.
=cut
@@ -353,9 +353,9 @@ hash of the key string, or zero if it has not been precomputed.
(SV *)NULL, flags)
/*
-=for apidoc Amx|COPHH *|cophh_delete_pvs|const COPHH *cophh|const char *key|U32 flags
+=for apidoc Amx|COPHH *|cophh_delete_pvs|const COPHH *cophh|"literal string" key|U32 flags
-Like L</cophh_delete_pvn>, but takes a C<NUL>-terminated literal string instead
+Like L</cophh_delete_pvn>, but takes a literal string instead
of a string/length pair, and no precomputed hash.
=cut
@@ -493,9 +493,9 @@ associated with the key.
cophh_fetch_pvn(CopHINTHASH_get(cop), keypv, keylen, hash, flags)
/*
-=for apidoc Am|SV *|cop_hints_fetch_pvs|const COP *cop|const char *key|U32 flags
+=for apidoc Am|SV *|cop_hints_fetch_pvs|const COP *cop|"literal string" key|U32 flags
-Like L</cop_hints_fetch_pvn>, but takes a C<NUL>-terminated literal string
+Like L</cop_hints_fetch_pvn>, but takes a literal string
instead of a string/length pair, and no precomputed hash.
=cut