ObjFW  Check-in [32d092b9ba]

Overview
Comment:Remove check for objc_enumerationMutation

Every supported runtime has it, so there is no point in having it.
(The ObjFW runtime has it and the Apple runtime has it since the one
shipped with OS X 10.5. No earlier Apple runtime is supported anyway.)

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 32d092b9ba00dab7ab356d84c262b8d35adea1747d2a6318a4cefc8c1d5371e5
User & Date: js on 2016-07-04 19:36:18
Other Links: manifest | tags
Context
2016-07-04
19:40
OFTarArchiveEntry: Make Apple GCC 4.0.1 happy check-in: 4e34369cfa user: js tags: trunk
19:36
Remove check for objc_enumerationMutation check-in: 32d092b9ba user: js tags: trunk
2016-07-03
22:40
Add support for hardlinks and symlinks on Windows check-in: 768b31dede user: js tags: trunk
Changes

Modified configure.ac from [9b304b3c2a] to [14d6dc27f7].

397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
	AC_SUBST(INSTANCE_M, "instance.m")
])

AC_CHECK_FUNC(objc_autoreleasePoolPush, [], [
	AC_SUBST(AUTORELEASE_M, "autorelease.m")
])

AC_CHECK_FUNC(objc_enumerationMutation, [
	AC_DEFINE(HAVE_OBJC_ENUMERATIONMUTATION, 1,
		[Whether we have objc_enumerationMutation()])
])

case "$host_os" in
	darwin*)
		AC_SUBST(LDFLAGS_REEXPORT, ["-Wl,-reexport-lobjfw"])
		AS_IF([test x"$objc_runtime" = x"Apple runtime"], [
			AC_SUBST(REEXPORT_LIBOBJC, ["-Wl,-reexport-lobjc"])
		])
		;;







<
<
<
<
<







397
398
399
400
401
402
403





404
405
406
407
408
409
410
	AC_SUBST(INSTANCE_M, "instance.m")
])

AC_CHECK_FUNC(objc_autoreleasePoolPush, [], [
	AC_SUBST(AUTORELEASE_M, "autorelease.m")
])






case "$host_os" in
	darwin*)
		AC_SUBST(LDFLAGS_REEXPORT, ["-Wl,-reexport-lobjfw"])
		AS_IF([test x"$objc_runtime" = x"Apple runtime"], [
			AC_SUBST(REEXPORT_LIBOBJC, ["-Wl,-reexport-lobjc"])
		])
		;;

Modified src/OFObject.m from [d472a9075a] to [f36c1920e5].

138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

void OF_NO_RETURN_FUNC
of_method_not_found_stret(void *st, id obj, SEL sel)
{
	of_method_not_found(obj, sel);
}

#if !defined(OF_OBJFW_RUNTIME) && !defined(HAVE_OBJC_ENUMERATIONMUTATION)
void
objc_enumerationMutation(id object)
{
	enumerationMutationHandler(object);
}
#endif

id
of_alloc_object(Class class, size_t extraSize, size_t extraAlignment,
    void **extra)
{
	OFObject *instance;
	size_t instanceSize;








<
<
<
<
<
<
<
<







138
139
140
141
142
143
144








145
146
147
148
149
150
151

void OF_NO_RETURN_FUNC
of_method_not_found_stret(void *st, id obj, SEL sel)
{
	of_method_not_found(obj, sel);
}









id
of_alloc_object(Class class, size_t extraSize, size_t extraAlignment,
    void **extra)
{
	OFObject *instance;
	size_t instanceSize;

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240

#if defined(OF_APPLE_RUNTIME)
	objc_setForwardHandler((void*)&of_forward, (void*)&of_forward_stret);
#else
	objc_setForwardHandler((IMP)&of_forward, (IMP)&of_forward_stret);
#endif

#if defined(OF_OBJFW_RUNTIME) || defined(HAVE_OBJC_ENUMERATIONMUTATION)
	objc_setEnumerationMutationHandler(enumerationMutationHandler);
#endif

	of_hash_seed = 0;
	while (of_hash_seed == 0) {
#if defined(HAVE_ARC4RANDOM)
		of_hash_seed = arc4random();
#elif defined(HAVE_RANDOM)
		struct timeval t;







<

<







216
217
218
219
220
221
222

223

224
225
226
227
228
229
230

#if defined(OF_APPLE_RUNTIME)
	objc_setForwardHandler((void*)&of_forward, (void*)&of_forward_stret);
#else
	objc_setForwardHandler((IMP)&of_forward, (IMP)&of_forward_stret);
#endif


	objc_setEnumerationMutationHandler(enumerationMutationHandler);


	of_hash_seed = 0;
	while (of_hash_seed == 0) {
#if defined(HAVE_ARC4RANDOM)
		of_hash_seed = arc4random();
#elif defined(HAVE_RANDOM)
		struct timeval t;