Artifact 56c82164882f9fa0def298ec9a5e80a0446c840600c27797d8720102b37c0634:
- File
src/runtime/init.m
— part of check-in
[4e40a57efa]
at
2017-04-02 15:30:03
on branch trunk
— Make __objc_exec_class() take a void*
This is necessary for ObjC++ with GCC, as otherwise, this generates an
error. Since the objc_abi_module struct is private anyway, there is not
much reason to have the argument of that type. (user: js, size: 1227) [annotate] [blame] [check-ins using] [more...]
/* * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 * Jonathan Schleifer <js@heap.zone> * * 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 * the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "runtime.h" #import "runtime-private.h" void __objc_exec_class(void *module_) { struct objc_abi_module *module = module_; objc_global_mutex_lock(); objc_register_all_selectors(module->symtab); objc_register_all_classes(module->symtab); objc_register_all_categories(module->symtab); objc_init_static_instances(module->symtab); objc_global_mutex_unlock(); } void objc_exit(void) { objc_global_mutex_lock(); objc_unregister_all_categories(); objc_unregister_all_classes(); objc_unregister_all_selectors(); objc_forget_pending_static_instances(); objc_dtable_cleanup(); objc_global_mutex_unlock(); }