mirror of
https://github.com/darlinghq/darling-libobjc2.git
synced 2024-11-27 06:00:30 +00:00
Remove opts from default build - they must now be explicitly built.
Don't crash if objc_disposeClassPair() is called on a class that is not get registered with the runtime.
This commit is contained in:
parent
be68d81286
commit
d12de81cd6
@ -120,14 +120,14 @@ endif
|
||||
include $(GNUSTEP_MAKEFILES)/aggregate.make
|
||||
include $(GNUSTEP_MAKEFILES)/library.make
|
||||
|
||||
all::
|
||||
build-opts:
|
||||
@echo Building LLVM optimisation passes...
|
||||
@sh build_opts.sh $(MAKE) all
|
||||
|
||||
install::
|
||||
install-opts: build_opts
|
||||
@echo Installing LLVM optimisation passes...
|
||||
@sh build_opts.sh $(MAKE) install
|
||||
|
||||
clean::
|
||||
clean-opts:
|
||||
@echo Cleaning LLVM optimisation passes...
|
||||
@sh build_opts.sh $(MAKE) clean
|
||||
|
12
runtime.c
12
runtime.c
@ -534,6 +534,8 @@ static void freeIvarLists(Class aClass)
|
||||
*/
|
||||
static inline void safe_remove_from_subclass_list(Class cls)
|
||||
{
|
||||
// If this class hasn't been added to the class hierarchy, then this is easy
|
||||
if (!objc_test_class_flag(cls, objc_class_flag_resolved)) { return; }
|
||||
Class sub = cls->super_class->subclass_list;
|
||||
if (sub == cls)
|
||||
{
|
||||
@ -569,8 +571,14 @@ void objc_disposeClassPair(Class cls)
|
||||
freeMethodLists(cls);
|
||||
freeMethodLists(meta);
|
||||
freeIvarLists(cls);
|
||||
free_dtable(cls->dtable);
|
||||
free_dtable(meta->dtable);
|
||||
if (cls->dtable != uninstalled_dtable)
|
||||
{
|
||||
free_dtable(cls->dtable);
|
||||
}
|
||||
if (meta->dtable != uninstalled_dtable)
|
||||
{
|
||||
free_dtable(meta->dtable);
|
||||
}
|
||||
|
||||
// Free the class and metaclass
|
||||
free(meta);
|
||||
|
Loading…
Reference in New Issue
Block a user