Index: src/runtime/ObjFW_RT.h ================================================================== --- src/runtime/ObjFW_RT.h +++ src/runtime/ObjFW_RT.h @@ -63,12 +63,12 @@ typedef const struct objc_selector *SEL; #if !defined(__wii__) && !defined(__amigaos__) typedef bool BOOL; #endif typedef id _Nullable (*IMP)(id _Nonnull, SEL _Nonnull, ...); -typedef void (*objc_uncaught_exception_handler)(id _Nullable); -typedef void (*objc_enumeration_mutation_handler)(id _Nonnull); +typedef void (*objc_uncaught_exception_handler_t)(id _Nullable); +typedef void (*objc_enumeration_mutation_handler_t)(id _Nonnull); struct objc_class { Class _Nonnull isa; Class _Nullable superclass; const char *_Nonnull name; @@ -249,17 +249,17 @@ extern bool protocol_isEqual(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2); extern bool protocol_conformsToProtocol(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2); extern void objc_exit(void); -extern _Nullable objc_uncaught_exception_handler +extern _Nullable objc_uncaught_exception_handler_t objc_setUncaughtExceptionHandler( - objc_uncaught_exception_handler _Nullable handler); + objc_uncaught_exception_handler_t _Nullable handler); extern void objc_setForwardHandler(IMP _Nullable forward, IMP _Nullable stretForward); extern void objc_setEnumerationMutationHandler( - objc_enumeration_mutation_handler _Nullable handler); + objc_enumeration_mutation_handler_t _Nullable handler); extern void objc_zero_weak_references(id _Nonnull value); /* * Used by the compiler, but can also be called manually. * Index: src/runtime/ObjFW_RT.sfd ================================================================== --- src/runtime/ObjFW_RT.sfd +++ src/runtime/ObjFW_RT.sfd @@ -69,13 +69,13 @@ const char *_Nullable object_getClassName_m68k(id _Nullable object)(a0) const char *_Nonnull protocol_getName_m68k(Protocol *_Nonnull protocol)(a0) bool protocol_isEqual_m68k(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1) bool protocol_conformsToProtocol_m68k(Protocol *_Nonnull protocol1, Protocol *_Nonnull protocol2)(a0,a1) void objc_exit_m68k(void)() -_Nullable objc_uncaught_exception_handler objc_setUncaughtExceptionHandler_m68k(objc_uncaught_exception_handler _Nullable handler)(a0) +_Nullable objc_uncaught_exception_handler_t objc_setUncaughtExceptionHandler_m68k(objc_uncaught_exception_handler_t _Nullable handler)(a0) void objc_setForwardHandler_m68k(IMP _Nullable forward, IMP _Nullable stretForward)(a0,a1) -void objc_setEnumerationMutationHandler_m68k(objc_enumeration_mutation_handler _Nullable handler)(a0) +void objc_setEnumerationMutationHandler_m68k(objc_enumeration_mutation_handler_t _Nullable handler)(a0) void objc_zero_weak_references_m68k(id _Nonnull value)(a0) * SysV functions for MorphOS could be added here for performance. Having them * in addition to the m68k functions allows m68k applications to call into the * PPC library, while native code can use the SysV functions. ==end Index: src/runtime/amiga-glue.m ================================================================== --- src/runtime/amiga-glue.m +++ src/runtime/amiga-glue.m @@ -571,14 +571,14 @@ objc_exit_m68k(void) { objc_exit(); } -objc_uncaught_exception_handler __saveds +objc_uncaught_exception_handler_t __saveds objc_setUncaughtExceptionHandler_m68k(void) { - OBJC_M68K_ARG(objc_uncaught_exception_handler, handler, a0) + OBJC_M68K_ARG(objc_uncaught_exception_handler_t, handler, a0) return objc_setUncaughtExceptionHandler(handler); } void __saveds @@ -591,11 +591,11 @@ } void __saveds objc_setEnumerationMutationHandler_m68k(void) { - OBJC_M68K_ARG(objc_enumeration_mutation_handler, handler, a0) + OBJC_M68K_ARG(objc_enumeration_mutation_handler_t, handler, a0) objc_setEnumerationMutationHandler(handler); } void __saveds Index: src/runtime/amiga-library.m ================================================================== --- src/runtime/amiga-library.m +++ src/runtime/amiga-library.m @@ -121,11 +121,11 @@ extern const char *_Nullable object_getClassName_m68k(void); extern const char *_Nonnull protocol_getName_m68k(void); extern bool protocol_isEqual_m68k(void); extern bool protocol_conformsToProtocol_m68k(void); extern void objc_exit_m68k(void); -extern _Nullable objc_uncaught_exception_handler +extern _Nullable objc_uncaught_exception_handler_t objc_setUncaughtExceptionHandler_m68k(void); extern void objc_setForwardHandler_m68k(void); extern void objc_setEnumerationMutationHandler_m68k(void); extern void objc_zero_weak_references_m68k(void); Index: src/runtime/exception.m ================================================================== --- src/runtime/exception.m +++ src/runtime/exception.m @@ -239,11 +239,11 @@ extern EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT, PDISPATCHER_CONTEXT, _Unwind_Reason_Code (*)(int, int, uint64_t, struct _Unwind_Exception *, struct _Unwind_Context *)); #endif -static objc_uncaught_exception_handler uncaughtExceptionHandler; +static objc_uncaught_exception_handler_t uncaughtExceptionHandler; static struct objc_exception emergencyExceptions[NUM_EMERGENCY_EXCEPTIONS]; #ifdef OF_HAVE_THREADS static of_spinlock_t emergencyExceptionsSpinlock; OF_CONSTRUCTOR() @@ -759,14 +759,14 @@ uncaughtExceptionHandler(object); OBJC_ERROR("_Unwind_RaiseException() returned!") } -objc_uncaught_exception_handler -objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler handler) +objc_uncaught_exception_handler_t +objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler_t handler) { - objc_uncaught_exception_handler old = uncaughtExceptionHandler; + objc_uncaught_exception_handler_t old = uncaughtExceptionHandler; uncaughtExceptionHandler = handler; return old; } Index: src/runtime/linklib/linklib.m ================================================================== --- src/runtime/linklib/linklib.m +++ src/runtime/linklib/linklib.m @@ -544,12 +544,12 @@ objc_exit(void) { objc_exit_m68k(); } -objc_uncaught_exception_handler -objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler handler) +objc_uncaught_exception_handler_t +objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler_t handler) { return objc_setUncaughtExceptionHandler_m68k(handler); } void @@ -557,15 +557,15 @@ { objc_setForwardHandler_m68k(forward, stretForward); } void -objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler handler) +objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler_t handler) { objc_setEnumerationMutationHandler_m68k(handler); } void objc_zero_weak_references(id value) { objc_zero_weak_references_m68k(value); } Index: src/runtime/misc.m ================================================================== --- src/runtime/misc.m +++ src/runtime/misc.m @@ -21,11 +21,11 @@ #include #include "ObjFW_RT.h" #include "private.h" -static objc_enumeration_mutation_handler enumerationMutationHandler = NULL; +static objc_enumeration_mutation_handler_t enumerationMutationHandler = NULL; void objc_enumerationMutation(id object) { if (enumerationMutationHandler != NULL) @@ -33,9 +33,9 @@ else OBJC_ERROR("Object was mutated during enumeration!"); } void -objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler handler) +objc_setEnumerationMutationHandler(objc_enumeration_mutation_handler_t handler) { enumerationMutationHandler = handler; }