]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
man/man3/: SYNOPSIS: Use typeof() to improve readability of function pointer types
authorAlejandro Colomar <alx@kernel.org>
Fri, 13 Dec 2024 13:19:28 +0000 (14:19 +0100)
committerAlejandro Colomar <alx@kernel.org>
Sat, 11 Jan 2025 19:58:36 +0000 (20:58 +0100)
Due to different spacing, I had missed these ones in the previous
commits of this kind.

Suggested-by: Jorenar <dev@jorenar.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
man/man3/pthread_key_create.3
man/man3/pthread_once.3

index 966e5a24afd14839e7b3901554cdf4306a8d2578..78266bb689478be8feb648f0661153968686a4c3 100644 (file)
@@ -20,7 +20,7 @@ management of thread-specific data
 .B #include <pthread.h>
 .P
 .BI "int pthread_key_create(pthread_key_t *" key ,
-.BI "                       void (*" destr_function ") (void *));"
+.BI "                       typeof(void (void *)) *" destr_function ;
 .BI "int pthread_key_delete(pthread_key_t " key );
 .BI "int pthread_setspecific(pthread_key_t " key ", const void *" pointer );
 .BI "void * pthread_getspecific(pthread_key_t " key );
index 17d25360fc2b64b5c95764a387640ec818920718..2497f95d18a9fba726120981e3bf1327c2856dfc 100644 (file)
@@ -17,7 +17,7 @@ once-only initialization
 .P
 .BI "pthread_once_t " once_control " = PTHREAD_ONCE_INIT;"
 .P
-.BI "int pthread_once(pthread_once_t *" once_control ", void (*" init_routine ") (void));"
+.BI "int pthread_once(pthread_once_t *" once_control ", typeof(void (void)) *" init_routine ;
 .
 .
 .SH DESCRIPTION