@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2021 Jonathan Schleifer + * Copyright (c) 2008-2022 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -26,16 +26,16 @@ if (class == Nil) /* * musl has broken dlclose(): Instead of calling the destructor * on dlclose(), they call it on exit(). This of course means - * that our tests might have already called objc_exit() and the - * class is already gone. + * that our tests might have already called objc_deinit() and + * the class is already gone. */ return; - objc_unregister_class(class); + objc_unregisterClass(class); } #endif @implementation TestPlugin - (int)test: (int)num @@ -42,10 +42,10 @@ { return num * 2; } @end -id -OFPluginInit(void) +Class +class(void) { - return [[[TestPlugin alloc] init] autorelease]; + return [TestPlugin class]; }