@@ -15,12 +15,10 @@ #include "objfw-defs.h" #import "macros.h" -/** @file */ - #if defined(OF_HAVE_PTHREADS) # include typedef pthread_once_t OFOnceControl; # define OFOnceControlInitValue PTHREAD_ONCE_INIT #elif defined(OF_HAVE_ATOMIC_OPS) @@ -29,11 +27,13 @@ #elif defined(OF_AMIGAOS) || !defined(OF_HAVE_THREADS) typedef int OFOnceControl; # define OFOnceControlInitValue 0 #endif -typedef void (*OFOnceFunction)(void); +OF_ASSUME_NONNULL_BEGIN + +/** @file */ #ifdef __cplusplus extern "C" { #endif /** @@ -46,5 +46,7 @@ */ extern void OFOnce(OFOnceControl *control, void (*function)(void)); #ifdef __cplusplus } #endif + +OF_ASSUME_NONNULL_END