Skip to content

Commit

Permalink
handle RW_REALIZING classes as RW_COPIED_RO
Browse files Browse the repository at this point in the history
  • Loading branch information
zydeco committed Aug 15, 2020
1 parent 6cd33cb commit 68f48f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/objc-cif.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ hidden void cif_cache_add_class(const char *name) {

#define RO_META 1
#define RW_COPIED_RO (1 << 27)
#define RW_REALIZING (1 << 19)

hidden void load_objc_methods(struct method_list *methods, bool meta, const char *name) {
if (methods == NULL) {
Expand All @@ -118,7 +119,7 @@ hidden void load_objc_methods(struct method_list *methods, bool meta, const char
}

static inline struct class_ro* get_class_ro(struct classref *class) {
if (class->data.flags->flags & RW_COPIED_RO) {
if (class->data.flags->flags & (RW_COPIED_RO | RW_REALIZING)) {
return class->data.rw->ro;
} else {
return class->data.ro;
Expand Down

0 comments on commit 68f48f8

Please sign in to comment.