mirror of https://github.com/mkerrisk/man-pages
tsearch.3: SYNOPSIS: Use 'restrict' in prototypes
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> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
4745230707
commit
c0828478b0
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue