From: Alejandro Colomar <alx.manpages@gmail.com>
To: mtk.manpages@gmail.com
Cc: Alejandro Colomar <alx.manpages@gmail.com>,
linux-man@vger.kernel.org, libc-alpha@sourceware.org
Subject: [PATCH 02/17] tsearch.3: SYNOPSIS: Use 'restrict' in prototypes
Date: Thu, 11 Mar 2021 23:33:15 +0100 [thread overview]
Message-ID: <20210311223330.722437-3-alx.manpages@gmail.com> (raw)
In-Reply-To: <20210311223330.722437-1-alx.manpages@gmail.com>
Both POSIX and glibc use 'restrict' in tdelete().
Let's use it here too.
.../glibc$ grep_glibc_prototype tdelete
misc/search.h:138:
extern void *tdelete (const void *__restrict __key,
void **__restrict __rootp,
__compar_fn_t __compar);
.../glibc$
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
man3/tsearch.3 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man3/tsearch.3 b/man3/tsearch.3
index 1c771ef4a..ab4a2b767 100644
--- a/man3/tsearch.3
+++ b/man3/tsearch.3
@@ -35,11 +35,11 @@ tsearch, tfind, tdelete, twalk, tdestroy \- manage a binary search tree
.BI " int (*" compar ")(const void *, const void *));"
.BI "void *tfind(const void *" key ", void *const *" rootp ,
.BI " int (*" compar ")(const void *, const void *));"
-.BI "void *tdelete(const void *" key ", void **" rootp ,
+.BI "void *tdelete(const void *restrict " key ", void **restrict " rootp ,
.BI " int (*" compar ")(const void *, const void *));"
.BI "void twalk(const void *" root ,
.BI " void (*" action ")(const void *" nodep ", VISIT " which ,
-.BI " int " depth "));"
+.BI " int " depth ));
.PP
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <search.h>
--
2.30.1
next prev parent reply other threads:[~2021-03-11 22:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-11 22:33 [PATCH 00/17] man3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 01/17] scanf.3: SYNOPSIS: Use 'restrict' in prototypes; ffix too Alejandro Colomar
2021-03-11 22:33 ` Alejandro Colomar [this message]
2021-03-11 22:33 ` [PATCH 03/17] unlocked_stdio.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-03-11 22:33 ` [PATCH 04/17] wcpcpy.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 05/17] wcpncpy.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 06/17] wcrtomb.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 07/17] wcscat.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 08/17] wcscpy.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 09/17] wcsncat.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 10/17] wcsncpy.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 11/17] wcsnrtombs.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 12/17] wcsrtombs.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 13/17] wcstoimax.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 14/17] wcstok.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 15/17] wcstombs.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 16/17] wmemcpy.3: " Alejandro Colomar
2021-03-11 22:33 ` [PATCH 17/17] wordexp.3: " Alejandro Colomar
2021-03-13 4:11 ` [PATCH 00/17] man3: " Jonathan Nieder
2021-03-13 10:41 ` Alejandro Colomar (man-pages)
2021-03-14 20:56 ` Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210311223330.722437-3-alx.manpages@gmail.com \
--to=alx.manpages@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).