File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ PRIVATE BOOL objc_check_abi_version(struct objc_module_abi_8 *module)
137
137
}
138
138
// We can't mix GC_None and GC_Required code, but we can mix any other
139
139
// combination
140
- FAIL_IF ((gc_mode != GC_Optional ) && (gc_mode != current_gc_mode ),
140
+ FAIL_IF ((gc_mode == GC_Required ) && (gc_mode != current_gc_mode ),
141
141
"Attempting to mix GC and non-GC code!" );
142
142
return YES ;
143
143
}
Original file line number Diff line number Diff line change @@ -149,7 +149,8 @@ static void cleanupPools(struct arc_tls* tls)
149
149
150
150
static inline id retain (id obj)
151
151
{
152
- Class cls = classForObject (obj);
152
+ if (isSmallObject (obj)) { return obj; }
153
+ Class cls = obj->isa ;
153
154
if ((Class )&_NSConcreteStackBlock == cls)
154
155
{
155
156
return Block_copy (obj);
@@ -165,7 +166,8 @@ static inline id retain(id obj)
165
166
166
167
static inline void release (id obj)
167
168
{
168
- Class cls = classForObject (obj);
169
+ if (isSmallObject (obj)) { return ; }
170
+ Class cls = obj->isa ;
169
171
if (objc_test_class_flag (cls, objc_class_flag_fast_arc))
170
172
{
171
173
intptr_t *refCount = ((intptr_t *)obj) - 1 ;
You can’t perform that action at this time.
0 commit comments