ObjFW  Diff

Differences From Artifact [2d5ba7013a]:

To Artifact [6922597523]:


59
60
61
62
63
64
65
66

67









68

69
70
71
72
73
74
75
59
60
61
62
63
64
65

66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85







-
+

+
+
+
+
+
+
+
+
+

+







#import "instance.h"
#if defined(OF_HAVE_ATOMIC_OPS)
# import "atomic.h"
#elif defined(OF_HAVE_THREADS)
# import "threading.h"
#endif

#if defined(OF_APPLE_RUNTIME) && !defined(__ppc64__)
#if defined(OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR)
extern id of_forward(id, SEL, ...);
# ifdef OF_APPLE_RUNTIME
/*
 * Forwarding for methods returning structs only works with the Apple ABI, as
 * with the GNU ABI, there is no way of knowing if a struct is returned and if
 * so how.
 * As forwardingTargetForSelector: only works for architectures for which
 * assembly has been written anyway, it makes sense to switch to
 * objc_msgSend(_{st,fp}ret) for those architectures to solve this problem.
 */
extern struct stret of_forward_stret(id, SEL, ...);
# endif
#endif

struct pre_ivar {
	int32_t retainCount;
	struct pre_mem *firstMem, *lastMem;
#if !defined(OF_HAVE_ATOMIC_OPS) && defined(OF_HAVE_THREADS)
	of_spinlock_t retainCountSpinlock;
156
157
158
159
160
161
162










163
164
165
166
167
168
169
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189







+
+
+
+
+
+
+
+
+
+







				    sel_getName(sel));
				abort();
			}

			return objc_msg_lookup(obj, sel);
		}
	}

#ifdef OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR
	if (class_respondsToSelector(object_getClass(obj),
	    @selector(forwardingTargetForSelector:))) {
		id target = [obj forwardingTargetForSelector: sel];

		if (target != nil && target != obj)
			return (IMP)of_forward;
	}
#endif

	of_method_not_found(obj, sel);
	return NULL;
}
#endif

#ifndef HAVE_OBJC_ENUMERATIONMUTATION